file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
lib/portable_text/parser.rb
Ruby
module PortableText class UnknownTypeError < StandardError end class Parser def parse(json) elements = ensure_array(json) create_chunks(elements).map do |chunk| if List.list_item?(chunk.first) create_list(chunk) else Block.from_json(chunk.first) end ...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/renderable.rb
Ruby
module PortableText module Renderable def to_html(wrapping_html = nil) raise NotImplementedError, "#{self.class} must implement #to_html" end end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/renderer.rb
Ruby
module PortableText class Renderer def render(input) blocks = parser.parse(input) html = blocks.map(&:to_html).join return html if blocks.length <= 1 serializer.call(html) end private def parser Parser.new end def serializer Serializer::HTMLEl...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/base.rb
Ruby
module PortableText module Serializer class Base def call(inner_html, data = nil) raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'" end end end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/html_element.rb
Ruby
require_relative "base" module PortableText module Serializer class HTMLElement < Base def initialize(tag) @tag = tag end def call(inner_html, _data = nil) "<#{@tag}>#{inner_html}</#{@tag}>" end end end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/image.rb
Ruby
require_relative "base" module PortableText module Serializer class Image < Base def initialize(base_url) @base_url = base_url end def call(_inner_html, data) src = image_url(data) if data.dig("_internal", "inline") image_html(src) else figur...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/link.rb
Ruby
require_relative "base" module PortableText module Serializer class Link < Base def call(inner_html, data = nil) "<a href=\"#{data["href"]}\">#{inner_html}</a>" end end end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/list_item.rb
Ruby
require_relative "base" module PortableText module Serializer class ListItem < Base def call(inner_html, data) list_tag(with_styles(inner_html, data["style"])) end private def with_styles(inner_html, style) if style && style != "normal" apply_styles(inner...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/registry.rb
Ruby
module PortableText module Serializer class Registry def initialize(base_image_url:, on_missing_serializer: -> {}) @base_image_url = base_image_url @on_missing_serializer = on_missing_serializer @serializers = default_serializers end def get(key, fallback:, ctx: nil) ...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/span.rb
Ruby
require_relative "base" module PortableText module Serializer class Span < Base def call(inner_html, _data = nil) escape_html_string(inner_html) end private def escape_html_string(html_string) map = { "'" => "&#x27;", "\n" => "<br/>", ...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/serializer/underline.rb
Ruby
require_relative "base" module PortableText module Serializer class Underline < Base def call(inner_html, _data = nil) "<span style=\"text-decoration:underline;\">#{inner_html}</span>" end end end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/span.rb
Ruby
require_relative "renderable" module PortableText class Span include Renderable class << self def from_json(json, mark_defs) type = json["_type"] text = json["text"] marks = (json["marks"] || []).map { |mark_key| Mark.from_key(mark_key, mark_defs) } serializer = Portab...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
lib/portable_text/version.rb
Ruby
module RubyPortabletext VERSION = "0.1.0" end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/block_test.rb
Ruby
require_relative "test_helper" require_relative "./renderable_interface_test" class PortableText::BlockTest < Minitest::Test include RenderableInterfaceTest def setup @object = PortableText::Block.new \ attributes: { key: "test", type: "test", style: "test", children: [] ...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/children_test.rb
Ruby
require_relative "test_helper" class PortableText::ChildrenTest < Minitest::Test class MockHtmlSerializer < PortableText::Serializer::Base def initialize(key) @key = key end def call(inner_html, data = nil) "<#{@key}>#{inner_html}</#{@key}>" end end class MockCustomSerializer < Por...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/list_test.rb
Ruby
require_relative "test_helper" require_relative "renderable_interface_test" class PortableText::ListTest < Minitest::Test include RenderableInterfaceTest class MockListSerializer < PortableText::Serializer::Base def initialize(tag) @tag = tag end def call(inner_html, data = nil) "<#{@tag}...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/parser_test.rb
Ruby
require "test_helper" class ParserTest < Minitest::Test test "can parse single block" do json_data = read_json_file("001-empty-block.json")["input"] parser = PortableText::Parser.new assert_equal 1, parser.parse(json_data).length end test "can parse array of blocks" do json_data = read_json_fi...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/renderable_interface_test.rb
Ruby
module RenderableInterfaceTest def test_implements_interface assert_respond_to(@object, :to_html) end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/renderer_test.rb
Ruby
require "test_helper" class RendererTest < Minitest::Test def setup @renderer = PortableText::Renderer.new end test "001-empty-block" do json_data = read_json_file("001-empty-block.json") assert_rendered_result(json_data) end test "002-single-span" do json_data = read_json_file("002-single-...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/serializer/html_element_test.rb
Ruby
require_relative "../test_helper" require_relative "./interface_test" class PortableText::Serializer::HTMLElementTest < Minitest::Test include SerializerInterfaceTest def setup @object = PortableText::Serializer::HTMLElement.new("p") end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/serializer/interface_test.rb
Ruby
module SerializerInterfaceTest def test_implements_interface assert_respond_to(@object, :call) end end
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
test/test_helper.rb
Ruby
require "minitest/autorun" require "minitest/spec" require "json" require "portable_text" PortableText.configure do |config| config.project_id = "3do82whm" config.dataset = "production" config.cdn_base_url = "https://cdn.sanity.io/images" end module Minitest class Test def self.test(name, &block) de...
zachgoll/ruby-portabletext
0
A Portable Text Renderer in Ruby
Ruby
zachgoll
Zach Gollwitzer
main.go
Go
package main import ( "crypto/sha256" "encoding/hex" "fmt" "io" "log" "net/http" "net/url" "os" "path/filepath" _ "embed" "github.com/h2non/filetype" ) var port, destDir, baseURLRaw, allowedSubnet string var baseURL *url.URL func main() { port = os.Getenv("PORT") destDir = os.Getenv("FS_DEST_DIR") ba...
zachlatta/cdn
4
CDN microservice to upload files to zachlatta.com that only accepts traffic from Tailscale IPs
Go
zachlatta
Zach Latta
hackclub
Sources/App.swift
Swift
import SwiftUI @main struct FreeFlowApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { MenuBarExtra { MenuBarView() .environmentObject(appDelegate.appState) } label: { MenuBarLabel() .environ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/AppContextService.swift
Swift
import Foundation import ApplicationServices import AppKit struct AppContext { let appName: String? let bundleIdentifier: String? let windowTitle: String? let selectedText: String? let currentActivity: String let contextPrompt: String? let screenshotDataURL: String? let screenshotMimeTy...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/AppDelegate.swift
Swift
import SwiftUI class AppDelegate: NSObject, NSApplicationDelegate { let appState = AppState() var setupWindow: NSWindow? private var settingsWindow: NSWindow? func applicationDidFinishLaunching(_ notification: Notification) { NotificationCenter.default.addObserver( self, ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/AppState.swift
Swift
import Foundation import Combine import AppKit import AVFoundation import CoreAudio import ServiceManagement import ApplicationServices import ScreenCaptureKit import os.log private let recordingLog = OSLog(subsystem: "com.zachlatta.freeflow", category: "Recording") enum SettingsTab: String, CaseIterable, Identifiabl...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/AudioRecorder.swift
Swift
import AVFoundation import CoreAudio import Foundation import os.log private let recordingLog = OSLog(subsystem: "com.zachlatta.freeflow", category: "Recording") struct AudioDevice: Identifiable { let id: AudioDeviceID let uid: String let name: String static func availableInputDevices() -> [AudioDevi...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/HotkeyManager.swift
Swift
import Cocoa import Carbon enum HotkeyOption: String, CaseIterable, Identifiable { case fnKey = "fn" case rightOption = "rightOption" case f5 = "f5" var id: String { rawValue } var displayName: String { switch self { case .fnKey: return "Fn (Globe) Key" case .rightOption: ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/KeychainStorage.swift
Swift
import Foundation import Security enum AppSettingsStorage { private static let bundleID = Bundle.main.bundleIdentifier ?? "com.zachlatta.freeflow" private static var storageDirectory: URL { let appSupport = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first! ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/MenuBarView.swift
Swift
import SwiftUI struct MenuBarView: View { @EnvironmentObject var appState: AppState @ObservedObject private var updateManager = UpdateManager.shared private var appVersion: String { Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0" } var body: some View { ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/Notification+VoiceToText.swift
Swift
import Foundation // Notification names defined in MenuBarView.swift: // .showSetup, .showSettings
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/PipelineDebugContentView.swift
Swift
import SwiftUI import AppKit func imageFromDataURL(_ dataURL: String) -> NSImage? { guard let commaIndex = dataURL.lastIndex(of: ",") else { return nil } let base64 = String(dataURL[dataURL.index(after: commaIndex)...]) guard let data = Data(base64Encoded: base64, options: .ignoreUnknownCharacters) else { ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/PipelineDebugPanelView.swift
Swift
import SwiftUI struct PipelineDebugPanelView: View { @EnvironmentObject var appState: AppState var body: some View { VStack(alignment: .leading, spacing: 16) { header Divider() PipelineDebugContentView( statusMessage: appState.debugStatusMessage, ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/PipelineHistoryItem.swift
Swift
import Foundation struct PipelineHistoryItem: Identifiable, Codable { let id: UUID let timestamp: Date let rawTranscript: String let postProcessedTranscript: String let postProcessingPrompt: String? let contextSummary: String let contextPrompt: String? let contextScreenshotDataURL: Stri...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/PipelineHistoryStore.swift
Swift
import Foundation import CoreData final class PipelineHistoryStore { private let container: NSPersistentContainer init() { let model = Self.makeModel() container = NSPersistentContainer(name: "PipelineHistory", managedObjectModel: model) if let appSupport = FileManager.default.urls(fo...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/PostProcessingService.swift
Swift
import Foundation enum PostProcessingError: LocalizedError { case requestFailed(Int, String) case invalidResponse(String) case requestTimedOut(TimeInterval) var errorDescription: String? { switch self { case .requestFailed(let statusCode, let details): "Post-processing fail...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/RecordingOverlay.swift
Swift
import SwiftUI import AppKit // MARK: - State class RecordingOverlayState: ObservableObject { @Published var phase: OverlayPhase = .recording @Published var audioLevel: Float = 0.0 } enum OverlayPhase { case initializing case recording case transcribing case done } // MARK: - Panel Helpers ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/SettingsView.swift
Swift
import SwiftUI import AVFoundation import ServiceManagement struct SettingsView: View { @EnvironmentObject var appState: AppState var body: some View { HStack(spacing: 0) { VStack(alignment: .leading, spacing: 2) { ForEach(SettingsTab.allCases) { tab in ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/SetupView.swift
Swift
import SwiftUI import AVFoundation import Combine import Foundation import ServiceManagement struct SetupView: View { var onComplete: () -> Void @EnvironmentObject var appState: AppState @Environment(\.openURL) private var openURL private let freeflowRepoURL = URL(string: "https://github.com/zachlatta/...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/TranscriptionService.swift
Swift
import Foundation class TranscriptionService { private let apiKey: String private let baseURL = "https://api.groq.com/openai/v1" private let transcriptionModel = "whisper-large-v3" private let transcriptionTimeoutSeconds: TimeInterval = 20 init(apiKey: String) { self.apiKey = apiKey } ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
Sources/UpdateManager.swift
Swift
import Foundation import AppKit // MARK: - Data Models struct GitHubRelease: Decodable { let tagName: String let name: String? let htmlUrl: String let publishedAt: String let assets: [GitHubReleaseAsset] enum CodingKeys: String, CodingKey { case tagName = "tag_name" case name ...
zachlatta/freeflow
247
Free and open source alternative to Wispr Flow / Superwhisper / Monologue / etc
Swift
zachlatta
Zach Latta
hackclub
frontend/app.ts
TypeScript
import { Howl } from 'howler' //// UTILITIES import { v4 as uuidLib } from 'uuid' const uuid = uuidLib const elementFromHTML = (html: string): HTMLElement => { let div = document.createElement('div') div.innerHTML = html.trim() return div.firstChild as HTMLElement } //// APP LOGIC const welcome = docum...
zachlatta/soundscape
9
Attempt to make a soundscape designer in the web
TypeScript
zachlatta
Zach Latta
hackclub
frontend/index.html
HTML
<!DOCTYPE html> <html> <head> <title>Soundscape</title> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; } #app { width: 100%; height: 100%; } #soundSources { ...
zachlatta/soundscape
9
Attempt to make a soundscape designer in the web
TypeScript
zachlatta
Zach Latta
hackclub
demo.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <title>Fundraising Status</title> <style> :root { color-scheme: light dark; } body { color: light-dark(#222, #ddd); backgro...
zachleat/fundraising-status
5
Web component to show the current status of a fundraiser.
HTML
zachleat
Zach Leatherman
11ty, fortawesome
fundraising-status.js
JavaScript
class FundraisingStatus extends HTMLElement { static tagName = "fundraising-status"; static css = ` :host { --fs-color: #333; --fs-background: #eee; display: flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: .25em; } @media (prefers-color-scheme: dark) { :host { --fs-color: rgba(255,2...
zachleat/fundraising-status
5
Web component to show the current status of a fundraiser.
HTML
zachleat
Zach Leatherman
11ty, fortawesome
demo.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <title>&lt;hyper-card&gt; Web Component</title> <style> /* Demo styles */ body { font-family: system-ui, sans-serif; background-...
zachleat/hypercard
58
Web component to add a three-dimensional hover effect to a card.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
hypercard.js
JavaScript
class HyperCard extends HTMLElement { static tagName = "hyper-card"; static register(tagName, registry) { if(!registry && ("customElements" in globalThis)) { registry = globalThis.customElements; } registry?.define(tagName || this.tagName, this); } static classes = { active: "active" }; static css ...
zachleat/hypercard
58
Web component to add a three-dimensional hover effect to a card.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
demo.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>&lt;line-numbers&gt; Web Component</title> <style> * { box-sizing: border-box; } :root { --uln-font: Roboto Mono, monospace; --uln-padding-h: .75em; --u...
zachleat/line-numbers
161
A web component to add line numbers next to various HTML elements
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
line-numbers.js
JavaScript
//! <line-numbers> const css = String.raw; function getObtrusiveScrollbarSize() { let [w, h] = [40, 40]; let d = document; let parent = d.createElement("div"); parent.setAttribute("style", `width:${w}px;height:${h}px;overflow:auto;`); let child = d.createElement("div"); child.setAttribute("style", `width:${w+10}...
zachleat/line-numbers
161
A web component to add line numbers next to various HTML elements
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
index.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <title>pagefind-search Web Component</title> <link rel="stylesheet" href="./pagefind/pagefind-ui.css"> <script type="module" src="pagefi...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind-search.js
JavaScript
class PagefindSearch extends HTMLElement { static register(tagName = "pagefind-search", registry) { if ("customElements" in window) { (registry || customElements).define(tagName, this); } } static attrs = { bundlePath: "_bundle_path", manualInit: "manual", autofocus: "pagefind-autofocus", }; static ...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind-highlight.js
JavaScript
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require(...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind-modular-ui.css
CSS
:root { --pagefind-ui-scale: 0.8; --pagefind-ui-primary: #034AD8; --pagefind-ui-fade: #707070; --pagefind-ui-text: #393939; --pagefind-ui-background: #ffffff; --pagefind-ui-border: #eeeeee; --pagefind-ui-tag: #eeeeee; --pagefind-ui-border-width: 2px; --pagefind-ui-border-radius: 8px;...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind-modular-ui.js
JavaScript
(()=>{var b=Object.defineProperty;var w=(i,e)=>{for(var t in e)b(i,t,{get:e[t],enumerable:!0})};var f={};w(f,{FilterPills:()=>h,Input:()=>l,Instance:()=>p,ResultList:()=>a,Summary:()=>o});var r=class i{constructor(e){this.element=document.createElement(e)}id(e){return this.element.id=e,this}class(e){return this.element...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind-ui.css
CSS
.pagefind-ui__result.svelte-j9e30.svelte-j9e30{list-style-type:none;display:flex;align-items:flex-start;gap:min(calc(40px * var(--pagefind-ui-scale)),3%);padding:calc(30px * var(--pagefind-ui-scale)) 0 calc(40px * var(--pagefind-ui-scale));border-top:solid var(--pagefind-ui-border-width) var(--pagefind-ui-border)}.page...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind-ui.js
JavaScript
(()=>{var is=Object.defineProperty;var v=(n,e)=>{for(var t in e)is(n,t,{get:e[t],enumerable:!0})};function j(){}function lt(n){return n()}function Qt(){return Object.create(null)}function V(n){n.forEach(lt)}function Ye(n){return typeof n=="function"}function G(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof ...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
pagefind/pagefind.js
JavaScript
const pagefind_version="1.0.4";let wasm_bindgen;(function(){const __exports={};let script_src;if(typeof document==='undefined'){script_src=location.href}else{script_src=new URL("UNHANDLED",location.href).toString()}let wasm;let cachedUint8Memory0=null;function getUint8Memory0(){if(cachedUint8Memory0===null||cachedUint8...
zachleat/pagefind-search
37
A web component to search with Pagefind.
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
demo.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="" /> <title>table-saw Web Component Demo</title> <style> /* Demo styles */ td { padding: .3em; } .demo-numeric { text-align...
zachleat/table-saw
336
A small web component for responsive <table> elements.
HTML
zachleat
Zach Leatherman
11ty, fortawesome
table-saw.js
JavaScript
class Tablesaw extends HTMLElement { static dupes = {}; constructor() { super(); this.autoOffset = 50; this._needsStylesheet = true; this.attrs = { breakpoint: "breakpoint", breakpointBackwardsCompat: "media", type: "type", ratio: "ratio", label: "data-tablesaw-label", zeropad: "zero-padd...
zachleat/table-saw
336
A small web component for responsive <table> elements.
HTML
zachleat
Zach Leatherman
11ty, fortawesome
demo.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <title>&lt;throb-ber&gt; Web Component</title> <style> /* Demo styles */ body { font-family: system-ui, sans-serif; } /* See h...
zachleat/throbber
17
A loading indicator overlay for images (and maybe other things later).
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
throbber.js
JavaScript
class Throbber extends HTMLElement { static tagName = "throb-ber"; static register(tagName, registry) { if(!registry && ("customElements" in globalThis)) { registry = globalThis.customElements; } registry?.define(tagName || this.tagName, this); } static attr = { delay: "delay", // minimum amount of ti...
zachleat/throbber
17
A loading indicator overlay for images (and maybe other things later).
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
demo.html
HTML
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <title>&lt;webcare-webshare&gt; Web Component</title> <style> /* Demo styles */ body { font-family: system-ui, sans-serif; } b...
zachleat/webcare-webshare
25
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
webcare-webshare.js
JavaScript
// Inspired by https://web.dev/patterns/web-apps/share/ class WebcareWebshare extends HTMLElement { static tagName = "webcare-webshare"; static register(tagName, registry) { if(!registry && ("customElements" in globalThis)) { registry = globalThis.customElements; } registry?.define(tagName || this.tagName,...
zachleat/webcare-webshare
25
JavaScript
zachleat
Zach Leatherman
11ty, fortawesome
main.go
Go
package main import ( "bytes" "fmt" "os" "os/exec" "path/filepath" "strings" "github.com/yuin/goldmark" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/renderer/html" ) var version = "dev" // Set by GoReleaser at build time // Markdown to HTML converter using goldmark var md goldmark.Markdow...
zainfathoni/fizzy-md
2
Transparent Markdown→HTML wrapper for Fizzy CLI. Write natural Markdown, get perfect HTML for Fizzy cards and comments.
Go
zainfathoni
Zain Fathoni
book-that-app
main_test.go
Go
package main import ( "os" "path/filepath" "strings" "testing" ) func TestConvertMarkdownToHTML(t *testing.T) { tests := []struct { name string input string expected string }{ { name: "simple paragraph", input: "Hello world", expected: "<p>Hello world</p>", }, { name: "...
zainfathoni/fizzy-md
2
Transparent Markdown→HTML wrapper for Fizzy CLI. Write natural Markdown, get perfect HTML for Fizzy cards and comments.
Go
zainfathoni
Zain Fathoni
book-that-app
example/lib/main.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/activity_indicators.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/alerts.dart
Dart
import 'package:chicago/chicago.dart'; import 'package:flutter/widgets.dart'; import 'text.dart'; class AlertsDemo extends StatefulWidget { const AlertsDemo({Key? key}) : super(key: key); @override _AlertsDemoState createState() => _AlertsDemoState(); } class _AlertsDemoState extends State<AlertsDemo> { lat...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/asset_image_precache.dart
Dart
import 'package:flutter/widgets.dart'; class AssetImagePrecache extends StatefulWidget { const AssetImagePrecache({ Key? key, required this.paths, required this.child, this.loadingIndicator, }) : super(key: key); final List<String> paths; final Widget child; final Widget? loadingIndicator; ...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/buttons.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/calendars.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/lists.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/navigation.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/spinners.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/splitters.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/tables.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/lib/src/text.dart
Dart
import 'package:flutter/widgets.dart'; class BoldText extends StatelessWidget { const BoldText(this.text, {Key? key}) : super(key: key); final String text; @override Widget build(BuildContext context) { final TextStyle baseStyle = DefaultTextStyle.of(context).style; final TextStyle boldStyle = baseSt...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/macos/Flutter/GeneratedPluginRegistrant.swift
Swift
// // Generated file. Do not edit. // import FlutterMacOS import Foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { }
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/macos/Runner/AppDelegate.swift
Swift
import Cocoa import FlutterMacOS @main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { return true } }
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/macos/Runner/MainFlutterWindow.swift
Swift
import Cocoa import FlutterMacOS class MainFlutterWindow: NSWindow { override func awakeFromNib() { let flutterViewController = FlutterViewController() let windowFrame = self.frame self.contentViewController = flutterViewController self.setFrame(windowFrame, display: true) RegisterGeneratedPlugi...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/macos/RunnerTests/RunnerTests.swift
Swift
import FlutterMacOS import Cocoa import XCTest class RunnerTests: XCTestCase { func testExample() { // If you add code to the Runner application, consider adding tests here. // See https://developer.apple.com/documentation/xctest for more information about using XCTest. } }
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
example/web/index.html
HTML
<!DOCTYPE html> <html> <head> <!-- If you are serving your web app in a path other than the root, change the href value below to reflect the base path you are serving from. The path provided below has to start and end with a slash "/" in order for it to work correctly. For more details: * ht...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/chicago.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/action_tracker.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/activity_indicator.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/app.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/basic_list_view.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/basic_table_view.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/border_pane.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/box_pane.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/calendar.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/calendar_button.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/checkbox.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/colors.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/debug.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/deferred_layout.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/focus_indicator.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/form_pane.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google
lib/src/foundation.dart
Dart
// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not...
zanderso/chicago
468
The Chicago widget set for Flutter
Dart
zanderso
Zachary Anderson
Google