@zonsh/ui 0.0.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +43 -0
- package/README.md +81 -1
- package/assets/illustrations/drawing/bracket-construction-dark.svg +77 -0
- package/assets/illustrations/drawing/bracket-construction-filled-dark.svg +50 -0
- package/assets/illustrations/drawing/bracket-construction-filled.svg +50 -0
- package/assets/illustrations/drawing/bracket-construction.svg +77 -0
- package/assets/illustrations/drawing/crescent-dark.svg +28 -0
- package/assets/illustrations/drawing/crescent-guides-dark.svg +33 -0
- package/assets/illustrations/drawing/crescent-guides.svg +33 -0
- package/assets/illustrations/drawing/crescent.svg +28 -0
- package/assets/illustrations/drawing/eclipse-dark.svg +187 -0
- package/assets/illustrations/drawing/eclipse-guides-dark.svg +191 -0
- package/assets/illustrations/drawing/eclipse-guides.svg +191 -0
- package/assets/illustrations/drawing/eclipse.svg +187 -0
- package/assets/illustrations/drawing/elevation-guides-dark.svg +31 -0
- package/assets/illustrations/drawing/elevation-guides-plain-dark.svg +9 -0
- package/assets/illustrations/drawing/elevation-guides-plain.svg +9 -0
- package/assets/illustrations/drawing/elevation-guides.svg +31 -0
- package/assets/illustrations/drawing/horizon-dark.svg +30 -0
- package/assets/illustrations/drawing/horizon.svg +30 -0
- package/assets/illustrations/drawing/nib-study-dark.svg +107 -0
- package/assets/illustrations/drawing/nib-study-plain-dark.svg +93 -0
- package/assets/illustrations/drawing/nib-study-plain.svg +93 -0
- package/assets/illustrations/drawing/nib-study.svg +107 -0
- package/assets/illustrations/editorial/assistant-640.webp +0 -0
- package/assets/illustrations/editorial/assistant.webp +0 -0
- package/assets/illustrations/editorial/automation-640.webp +0 -0
- package/assets/illustrations/editorial/automation.webp +0 -0
- package/assets/illustrations/editorial/bracket-left-640.webp +0 -0
- package/assets/illustrations/editorial/bracket-left.webp +0 -0
- package/assets/illustrations/editorial/bracket-right-640.webp +0 -0
- package/assets/illustrations/editorial/bracket-right.webp +0 -0
- package/assets/illustrations/editorial/custom-software-640.webp +0 -0
- package/assets/illustrations/editorial/custom-software.webp +0 -0
- package/assets/illustrations/editorial/digitalization-640.webp +0 -0
- package/assets/illustrations/editorial/digitalization.webp +0 -0
- package/assets/illustrations/editorial/integration-640.webp +0 -0
- package/assets/illustrations/editorial/integration.webp +0 -0
- package/assets/illustrations/editorial/problem-640.webp +0 -0
- package/assets/illustrations/editorial/problem.webp +0 -0
- package/assets/illustrations/editorial/process-analysis-640.webp +0 -0
- package/assets/illustrations/editorial/process-analysis.webp +0 -0
- package/assets/illustrations/editorial/process-concept-640.webp +0 -0
- package/assets/illustrations/editorial/process-concept.webp +0 -0
- package/assets/illustrations/editorial/process-development-640.webp +0 -0
- package/assets/illustrations/editorial/process-development.webp +0 -0
- package/assets/illustrations/editorial/process-discovery-640.webp +0 -0
- package/assets/illustrations/editorial/process-discovery.webp +0 -0
- package/assets/illustrations/editorial/process-maintenance-640.webp +0 -0
- package/assets/illustrations/editorial/process-maintenance.webp +0 -0
- package/assets/illustrations/editorial/process-prototype-640.webp +0 -0
- package/assets/illustrations/editorial/process-prototype.webp +0 -0
- package/assets/illustrations/editorial/process-testing-640.webp +0 -0
- package/assets/illustrations/editorial/process-testing.webp +0 -0
- package/assets/illustrations/iso/automation-dark.svg +6 -0
- package/assets/illustrations/iso/automation.svg +6 -0
- package/assets/illustrations/iso/bar-chart-dark.svg +6 -0
- package/assets/illustrations/iso/bar-chart.svg +6 -0
- package/assets/illustrations/iso/brackets-classic-dark.svg +6 -0
- package/assets/illustrations/iso/brackets-classic.svg +6 -0
- package/assets/illustrations/iso/brackets-dark.svg +6 -0
- package/assets/illustrations/iso/brackets.svg +6 -0
- package/assets/illustrations/iso/city-dark.svg +6 -0
- package/assets/illustrations/iso/city.svg +6 -0
- package/assets/illustrations/iso/conveyor-dark.svg +6 -0
- package/assets/illustrations/iso/conveyor.svg +6 -0
- package/assets/illustrations/iso/database-dark.svg +6 -0
- package/assets/illustrations/iso/database.svg +6 -0
- package/assets/illustrations/iso/documents-dark.svg +6 -0
- package/assets/illustrations/iso/documents.svg +6 -0
- package/assets/illustrations/iso/inbox-dark.svg +6 -0
- package/assets/illustrations/iso/inbox.svg +6 -0
- package/assets/illustrations/iso/laptop-dark.svg +6 -0
- package/assets/illustrations/iso/laptop.svg +6 -0
- package/assets/illustrations/iso/monitor-dark.svg +6 -0
- package/assets/illustrations/iso/monitor.svg +6 -0
- package/assets/illustrations/iso/pipeline-dark.svg +6 -0
- package/assets/illustrations/iso/pipeline.svg +6 -0
- package/assets/illustrations/iso/platform-dark.svg +6 -0
- package/assets/illustrations/iso/platform.svg +6 -0
- package/assets/illustrations/iso/server-dark.svg +6 -0
- package/assets/illustrations/iso/server.svg +6 -0
- package/assets/illustrations/iso/spreadsheet-dark.svg +6 -0
- package/assets/illustrations/iso/spreadsheet.svg +6 -0
- package/assets/illustrations/iso/timeline-dark.svg +6 -0
- package/assets/illustrations/iso/timeline.svg +6 -0
- package/assets/illustrations/sheet/construction.svg +115 -0
- package/assets/illustrations/sheet/crescent.svg +40 -0
- package/assets/illustrations/sheet/limb.svg +42 -0
- package/assets/illustrations/sheet/stress-axis.svg +119 -0
- package/assets/illustrations/sheet/totality.svg +215 -0
- package/assets/illustrations/sheet/vertical-metrics.svg +43 -0
- package/assets/logo-left.svg +1 -0
- package/assets/logo-right.svg +1 -0
- package/assets/logo.svg +1 -0
- package/dist/components/_overlay.d.ts +47 -0
- package/dist/components/_overlay.js +59 -0
- package/dist/components/accordion.d.ts +32 -0
- package/dist/components/accordion.js +39 -0
- package/dist/components/alert-dialog.d.ts +45 -0
- package/dist/components/alert-dialog.js +56 -0
- package/dist/components/alert.d.ts +35 -0
- package/dist/components/alert.js +42 -0
- package/dist/components/ascii-field.d.ts +34 -0
- package/dist/components/ascii-field.js +410 -0
- package/dist/components/aspect-ratio.d.ts +14 -0
- package/dist/components/aspect-ratio.js +17 -0
- package/dist/components/avatar.d.ts +42 -0
- package/dist/components/avatar.js +55 -0
- package/dist/components/badge.d.ts +70 -0
- package/dist/components/badge.js +62 -0
- package/dist/components/bottom-nav.d.ts +86 -0
- package/dist/components/bottom-nav.js +175 -0
- package/dist/components/breadcrumb.d.ts +31 -0
- package/dist/components/breadcrumb.js +37 -0
- package/dist/components/button-group.d.ts +30 -0
- package/dist/components/button-group.js +47 -0
- package/dist/components/button.d.ts +53 -0
- package/dist/components/button.js +130 -0
- package/dist/components/calendar.d.ts +26 -0
- package/dist/components/calendar.js +179 -0
- package/dist/components/card.d.ts +42 -0
- package/dist/components/card.js +76 -0
- package/dist/components/carousel.d.ts +109 -0
- package/dist/components/carousel.js +231 -0
- package/dist/components/chart.d.ts +189 -0
- package/dist/components/chart.js +323 -0
- package/dist/components/checkbox.d.ts +23 -0
- package/dist/components/checkbox.js +43 -0
- package/dist/components/code-block.d.ts +55 -0
- package/dist/components/code-block.js +100 -0
- package/dist/components/collapsible.d.ts +20 -0
- package/dist/components/collapsible.js +32 -0
- package/dist/components/color-picker.d.ts +107 -0
- package/dist/components/color-picker.js +428 -0
- package/dist/components/combobox.d.ts +99 -0
- package/dist/components/combobox.js +172 -0
- package/dist/components/command.d.ts +132 -0
- package/dist/components/command.js +257 -0
- package/dist/components/context-menu.d.ts +29 -0
- package/dist/components/context-menu.js +35 -0
- package/dist/components/conversation.d.ts +36 -0
- package/dist/components/conversation.js +303 -0
- package/dist/components/copy-button.d.ts +55 -0
- package/dist/components/copy-button.js +133 -0
- package/dist/components/data-table.d.ts +235 -0
- package/dist/components/data-table.js +655 -0
- package/dist/components/date-picker.d.ts +160 -0
- package/dist/components/date-picker.js +338 -0
- package/dist/components/dialog.d.ts +57 -0
- package/dist/components/dialog.js +95 -0
- package/dist/components/direction.d.ts +16 -0
- package/dist/components/direction.js +18 -0
- package/dist/components/drawer.d.ts +69 -0
- package/dist/components/drawer.js +79 -0
- package/dist/components/empty.d.ts +31 -0
- package/dist/components/empty.js +50 -0
- package/dist/components/feature-list.d.ts +54 -0
- package/dist/components/feature-list.js +43 -0
- package/dist/components/field.d.ts +34 -0
- package/dist/components/field.js +81 -0
- package/dist/components/file-drop.d.ts +77 -0
- package/dist/components/file-drop.js +258 -0
- package/dist/components/filter-bar.d.ts +153 -0
- package/dist/components/filter-bar.js +334 -0
- package/dist/components/form.d.ts +35 -0
- package/dist/components/form.js +56 -0
- package/dist/components/graph.d.ts +146 -0
- package/dist/components/graph.js +825 -0
- package/dist/components/illustration.d.ts +85 -0
- package/dist/components/illustration.js +165 -0
- package/dist/components/input-group.d.ts +138 -0
- package/dist/components/input-group.js +312 -0
- package/dist/components/input.d.ts +16 -0
- package/dist/components/input.js +25 -0
- package/dist/components/item.d.ts +64 -0
- package/dist/components/item.js +116 -0
- package/dist/components/kbd.d.ts +50 -0
- package/dist/components/kbd.js +45 -0
- package/dist/components/label.d.ts +12 -0
- package/dist/components/label.js +24 -0
- package/dist/components/layout.d.ts +136 -0
- package/dist/components/layout.js +162 -0
- package/dist/components/lightbox.d.ts +100 -0
- package/dist/components/lightbox.js +439 -0
- package/dist/components/locale.d.ts +44 -0
- package/dist/components/locale.js +37 -0
- package/dist/components/logo.d.ts +54 -0
- package/dist/components/logo.js +96 -0
- package/dist/components/menu.d.ts +60 -0
- package/dist/components/menu.js +140 -0
- package/dist/components/menubar.d.ts +62 -0
- package/dist/components/menubar.js +223 -0
- package/dist/components/message.d.ts +42 -0
- package/dist/components/message.js +59 -0
- package/dist/components/meter.d.ts +31 -0
- package/dist/components/meter.js +27 -0
- package/dist/components/money-input.d.ts +80 -0
- package/dist/components/money-input.js +253 -0
- package/dist/components/native-select.d.ts +26 -0
- package/dist/components/native-select.js +35 -0
- package/dist/components/navigation-menu.d.ts +42 -0
- package/dist/components/navigation-menu.js +97 -0
- package/dist/components/number-field.d.ts +55 -0
- package/dist/components/number-field.js +164 -0
- package/dist/components/otp-field.d.ts +48 -0
- package/dist/components/otp-field.js +102 -0
- package/dist/components/pagination.d.ts +37 -0
- package/dist/components/pagination.js +81 -0
- package/dist/components/pdf-viewer.d.ts +134 -0
- package/dist/components/pdf-viewer.js +996 -0
- package/dist/components/phone-input.d.ts +79 -0
- package/dist/components/phone-input.js +282 -0
- package/dist/components/popover.d.ts +33 -0
- package/dist/components/popover.js +48 -0
- package/dist/components/preview-card.d.ts +25 -0
- package/dist/components/preview-card.js +22 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +25 -0
- package/dist/components/prompt-input.d.ts +156 -0
- package/dist/components/prompt-input.js +415 -0
- package/dist/components/quote.d.ts +22 -0
- package/dist/components/quote.js +15 -0
- package/dist/components/radio-group.d.ts +18 -0
- package/dist/components/radio-group.js +34 -0
- package/dist/components/rating.d.ts +73 -0
- package/dist/components/rating.js +124 -0
- package/dist/components/reasoning.d.ts +46 -0
- package/dist/components/reasoning.js +73 -0
- package/dist/components/resizable.d.ts +47 -0
- package/dist/components/resizable.js +44 -0
- package/dist/components/response.d.ts +41 -0
- package/dist/components/response.js +566 -0
- package/dist/components/scroll-area.d.ts +33 -0
- package/dist/components/scroll-area.js +31 -0
- package/dist/components/select.d.ts +35 -0
- package/dist/components/select.js +71 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +17 -0
- package/dist/components/sidebar.d.ts +163 -0
- package/dist/components/sidebar.js +505 -0
- package/dist/components/site-header.d.ts +93 -0
- package/dist/components/site-header.js +121 -0
- package/dist/components/skeleton.d.ts +31 -0
- package/dist/components/skeleton.js +29 -0
- package/dist/components/slider.d.ts +24 -0
- package/dist/components/slider.js +131 -0
- package/dist/components/sortable.d.ts +178 -0
- package/dist/components/sortable.js +1258 -0
- package/dist/components/sources.d.ts +40 -0
- package/dist/components/sources.js +42 -0
- package/dist/components/spinner.d.ts +48 -0
- package/dist/components/spinner.js +75 -0
- package/dist/components/stat.d.ts +91 -0
- package/dist/components/stat.js +141 -0
- package/dist/components/stepper.d.ts +71 -0
- package/dist/components/stepper.js +101 -0
- package/dist/components/suggestions.d.ts +20 -0
- package/dist/components/suggestions.js +18 -0
- package/dist/components/switch.d.ts +14 -0
- package/dist/components/switch.js +26 -0
- package/dist/components/table.d.ts +172 -0
- package/dist/components/table.js +895 -0
- package/dist/components/tabs.d.ts +25 -0
- package/dist/components/tabs.js +162 -0
- package/dist/components/tag.d.ts +41 -0
- package/dist/components/tag.js +88 -0
- package/dist/components/tags-input.d.ts +56 -0
- package/dist/components/tags-input.js +271 -0
- package/dist/components/textarea.d.ts +13 -0
- package/dist/components/textarea.js +16 -0
- package/dist/components/theme.d.ts +55 -0
- package/dist/components/theme.js +120 -0
- package/dist/components/time-field.d.ts +70 -0
- package/dist/components/time-field.js +450 -0
- package/dist/components/timeline.d.ts +92 -0
- package/dist/components/timeline.js +108 -0
- package/dist/components/tippy.d.ts +48 -0
- package/dist/components/tippy.js +648 -0
- package/dist/components/toast.d.ts +88 -0
- package/dist/components/toast.js +205 -0
- package/dist/components/toggle-group.d.ts +41 -0
- package/dist/components/toggle-group.js +140 -0
- package/dist/components/toggle.d.ts +23 -0
- package/dist/components/toggle.js +35 -0
- package/dist/components/tool-call.d.ts +63 -0
- package/dist/components/tool-call.js +68 -0
- package/dist/components/toolbar.d.ts +17 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +42 -0
- package/dist/components/tooltip.js +47 -0
- package/dist/components/tour.d.ts +127 -0
- package/dist/components/tour.js +648 -0
- package/dist/components/tree.d.ts +75 -0
- package/dist/components/tree.js +649 -0
- package/dist/components/typography.d.ts +134 -0
- package/dist/components/typography.js +176 -0
- package/dist/components/video-player.d.ts +284 -0
- package/dist/components/video-player.js +1392 -0
- package/dist/illustration.d.ts +2 -0
- package/dist/illustration.js +7 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +94 -0
- package/dist/lib/cn.d.ts +20 -0
- package/dist/lib/cn.js +38 -0
- package/dist/lib/code-highlight.d.ts +18 -0
- package/dist/lib/code-highlight.js +174 -0
- package/dist/lib/code-theme.d.ts +19 -0
- package/dist/lib/code-theme.js +140 -0
- package/dist/lib/collapse-row.d.ts +9 -0
- package/dist/lib/collapse-row.js +129 -0
- package/dist/lib/digit-roll.d.ts +21 -0
- package/dist/lib/digit-roll.js +31 -0
- package/dist/lib/editorial-assets.d.ts +16 -0
- package/dist/lib/editorial-assets.js +56 -0
- package/dist/lib/field-errors.d.ts +28 -0
- package/dist/lib/field-errors.js +24 -0
- package/dist/lib/field-value.d.ts +13 -0
- package/dist/lib/field-value.js +44 -0
- package/dist/lib/figure/catalog.d.ts +127 -0
- package/dist/lib/figure/catalog.js +130 -0
- package/dist/lib/figure/figures/automation.d.ts +7 -0
- package/dist/lib/figure/figures/automation.js +143 -0
- package/dist/lib/figure/figures/bar-chart.d.ts +7 -0
- package/dist/lib/figure/figures/bar-chart.js +99 -0
- package/dist/lib/figure/figures/brackets-classic.d.ts +11 -0
- package/dist/lib/figure/figures/brackets-classic.js +170 -0
- package/dist/lib/figure/figures/brackets.d.ts +8 -0
- package/dist/lib/figure/figures/brackets.js +84 -0
- package/dist/lib/figure/figures/city.d.ts +7 -0
- package/dist/lib/figure/figures/city.js +93 -0
- package/dist/lib/figure/figures/conveyor.d.ts +7 -0
- package/dist/lib/figure/figures/conveyor.js +97 -0
- package/dist/lib/figure/figures/database.d.ts +7 -0
- package/dist/lib/figure/figures/database.js +65 -0
- package/dist/lib/figure/figures/documents.d.ts +7 -0
- package/dist/lib/figure/figures/documents.js +83 -0
- package/dist/lib/figure/figures/inbox.d.ts +7 -0
- package/dist/lib/figure/figures/inbox.js +92 -0
- package/dist/lib/figure/figures/laptop.d.ts +7 -0
- package/dist/lib/figure/figures/laptop.js +67 -0
- package/dist/lib/figure/figures/monitor.d.ts +7 -0
- package/dist/lib/figure/figures/monitor.js +59 -0
- package/dist/lib/figure/figures/pipeline.d.ts +8 -0
- package/dist/lib/figure/figures/pipeline.js +117 -0
- package/dist/lib/figure/figures/platform.d.ts +7 -0
- package/dist/lib/figure/figures/platform.js +117 -0
- package/dist/lib/figure/figures/server.d.ts +7 -0
- package/dist/lib/figure/figures/server.js +115 -0
- package/dist/lib/figure/figures/spreadsheet.d.ts +7 -0
- package/dist/lib/figure/figures/spreadsheet.js +87 -0
- package/dist/lib/figure/figures/timeline.d.ts +7 -0
- package/dist/lib/figure/figures/timeline.js +65 -0
- package/dist/lib/figure/kernel.d.ts +152 -0
- package/dist/lib/figure/kernel.js +576 -0
- package/dist/lib/figure/parts.d.ts +42 -0
- package/dist/lib/figure/parts.js +126 -0
- package/dist/lib/form-reset.d.ts +11 -0
- package/dist/lib/form-reset.js +22 -0
- package/dist/lib/glide.d.ts +53 -0
- package/dist/lib/glide.js +138 -0
- package/dist/lib/graph-layout.d.ts +58 -0
- package/dist/lib/graph-layout.js +209 -0
- package/dist/lib/illustration-drawings.d.ts +89 -0
- package/dist/lib/illustration-drawings.js +539 -0
- package/dist/lib/illustration-info.d.ts +37 -0
- package/dist/lib/illustration-info.js +22 -0
- package/dist/lib/illustration-library.d.ts +87 -0
- package/dist/lib/illustration-library.js +352 -0
- package/dist/lib/logo-geometry.d.ts +29 -0
- package/dist/lib/logo-geometry.js +67 -0
- package/dist/lib/markdown-guard.d.ts +16 -0
- package/dist/lib/markdown-guard.js +123 -0
- package/dist/lib/merge-refs.d.ts +10 -0
- package/dist/lib/merge-refs.js +26 -0
- package/dist/lib/money.d.ts +73 -0
- package/dist/lib/money.js +343 -0
- package/dist/lib/motion.d.ts +6 -0
- package/dist/lib/motion.js +12 -0
- package/dist/lib/pdf-worker.d.ts +1 -0
- package/dist/lib/pdf-worker.js +6 -0
- package/dist/lib/pdf.d.ts +19 -0
- package/dist/lib/pdf.js +58 -0
- package/dist/lib/phone-countries.d.ts +1 -0
- package/dist/lib/phone-countries.js +281 -0
- package/dist/lib/phone.d.ts +90 -0
- package/dist/lib/phone.js +286 -0
- package/dist/lib/platform.d.ts +38 -0
- package/dist/lib/platform.js +75 -0
- package/dist/lib/room.d.ts +25 -0
- package/dist/lib/room.js +46 -0
- package/dist/lib/row-index.d.ts +15 -0
- package/dist/lib/row-index.js +136 -0
- package/dist/lib/table-fit.d.ts +143 -0
- package/dist/lib/table-fit.js +596 -0
- package/dist/lib/theme-script.d.ts +31 -0
- package/dist/lib/theme-script.js +49 -0
- package/dist/lib/tippy/pixels.d.ts +47 -0
- package/dist/lib/tippy/pixels.js +187 -0
- package/dist/lib/tippy/sprite.d.ts +86 -0
- package/dist/lib/tippy/sprite.js +753 -0
- package/dist/messages/de.d.ts +12 -0
- package/dist/messages/de.js +326 -0
- package/dist/styles/expressive.css +203 -0
- package/dist/styles/fonts.css +145 -0
- package/dist/styles/index.css +207 -0
- package/dist/styles/material.css +317 -0
- package/dist/styles/parts/ai.css +361 -0
- package/dist/styles/parts/brand.css +75 -0
- package/dist/styles/parts/controls.css +774 -0
- package/dist/styles/parts/data.css +222 -0
- package/dist/styles/parts/editorial.css +120 -0
- package/dist/styles/parts/feedback.css +340 -0
- package/dist/styles/parts/foundations.css +166 -0
- package/dist/styles/parts/graph.css +214 -0
- package/dist/styles/parts/inputs.css +261 -0
- package/dist/styles/parts/isometric.css +124 -0
- package/dist/styles/parts/navigation.css +424 -0
- package/dist/styles/parts/overlays.css +250 -0
- package/dist/styles/parts/pdf.css +154 -0
- package/dist/styles/parts/react-flow.css +519 -0
- package/dist/styles/tokens.css +299 -0
- package/dist/vite.d.ts +66 -0
- package/dist/vite.js +29 -0
- package/package.json +183 -5
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { editorialSource } from "./editorial-assets.js";
|
|
2
|
+
import { ILLUSTRATION_KINDS, ILLUSTRATION_LIBRARY, illustrationFiles, } from "./illustration-library.js";
|
|
3
|
+
/**
|
|
4
|
+
* Every entry of the illustration library — id, kind, title, meaning, tags, variants, motion
|
|
5
|
+
* and static files — for galleries, pickers and agents. Kinds: `iso`, `drawing`, `sheet`, `editorial`.
|
|
6
|
+
*/
|
|
7
|
+
export const illustrations = ILLUSTRATION_LIBRARY.map((e) => ({
|
|
8
|
+
id: e.id,
|
|
9
|
+
kind: e.kind,
|
|
10
|
+
name: e.name,
|
|
11
|
+
title: e.title,
|
|
12
|
+
meaning: e.meaning,
|
|
13
|
+
tags: e.tags,
|
|
14
|
+
variants: e.variants,
|
|
15
|
+
animated: e.animated,
|
|
16
|
+
motion: e.motion,
|
|
17
|
+
files: illustrationFiles(e),
|
|
18
|
+
src: e.kind === "editorial" ? editorialSource(e.name).src : undefined,
|
|
19
|
+
aspect: e.kind === "sheet" ? (e.sheet.aspect ?? 4 / 3) : e.kind === "editorial" ? e.width / e.height : undefined,
|
|
20
|
+
}));
|
|
21
|
+
/** The kinds in display order, with a title and one-line description each. */
|
|
22
|
+
export const illustrationKinds = ILLUSTRATION_KINDS;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type DrawCtx, type Drawing, type SheetSpec } from "./illustration-drawings.js";
|
|
2
|
+
import { type Figure } from "./figure/kernel.js";
|
|
3
|
+
export type IllustrationKind = "iso" | "drawing" | "sheet" | "editorial";
|
|
4
|
+
export type IllustrationTheme = "light" | "dark";
|
|
5
|
+
/** The kinds in display order, with their docs labels. */
|
|
6
|
+
export declare const ILLUSTRATION_KINDS: readonly {
|
|
7
|
+
id: IllustrationKind;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}[];
|
|
11
|
+
interface BaseEntry<Id extends string, V extends string> {
|
|
12
|
+
id: Id;
|
|
13
|
+
kind: IllustrationKind;
|
|
14
|
+
/** The part after the slash. */
|
|
15
|
+
name: string;
|
|
16
|
+
title: string;
|
|
17
|
+
/** What it stands for — use it beside the sentence it illustrates, not as decoration. */
|
|
18
|
+
meaning: string;
|
|
19
|
+
tags: readonly string[];
|
|
20
|
+
/** Supported variants; the first is the default. */
|
|
21
|
+
variants: readonly V[];
|
|
22
|
+
/** Whether it moves (inline only; reduced motion turns it off). */
|
|
23
|
+
animated: boolean;
|
|
24
|
+
/** What moves, for the docs. */
|
|
25
|
+
motion?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IsoEntry<Id extends string = string> extends BaseEntry<Id, "default"> {
|
|
28
|
+
kind: "iso";
|
|
29
|
+
/** The figure's code, loaded when it is first drawn. */
|
|
30
|
+
load: () => Promise<{
|
|
31
|
+
default: Figure;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
export interface DrawingEntry<Id extends string = string, V extends string = string> extends BaseEntry<Id, V> {
|
|
35
|
+
kind: "drawing";
|
|
36
|
+
draw: (ctx: DrawCtx) => Drawing;
|
|
37
|
+
}
|
|
38
|
+
export interface SheetEntry<Id extends string = string> extends BaseEntry<Id, "default"> {
|
|
39
|
+
kind: "sheet";
|
|
40
|
+
/** The drawing on the sheet, and the variant it is drawn in. */
|
|
41
|
+
drawing: DrawingId;
|
|
42
|
+
drawingVariant?: string;
|
|
43
|
+
sheet: SheetSpec;
|
|
44
|
+
}
|
|
45
|
+
export interface EditorialEntry<Id extends string = string> extends BaseEntry<Id, "default"> {
|
|
46
|
+
kind: "editorial";
|
|
47
|
+
/**
|
|
48
|
+
* The files are `assets/illustrations/editorial/<name>.webp` (1254 × 1254, for 2x displays)
|
|
49
|
+
* and `<name>-640.webp` (for 1x). Their URLs come from `editorial-assets.ts`, which the
|
|
50
|
+
* component imports; this module stays free of asset imports so Node can load it.
|
|
51
|
+
*/
|
|
52
|
+
sizes: string;
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
}
|
|
56
|
+
declare const drawingEntries: readonly [DrawingEntry<"drawing/eclipse", "default" | "guides">, DrawingEntry<"drawing/crescent", "default" | "guides">, DrawingEntry<"drawing/horizon", "default">, DrawingEntry<"drawing/nib-study", "default" | "plain">, DrawingEntry<"drawing/elevation-guides", "default" | "plain">, DrawingEntry<"drawing/bracket-construction", "default" | "filled">];
|
|
57
|
+
type DrawingId = (typeof drawingEntries)[number]["id"];
|
|
58
|
+
declare const editorialEntries: readonly [EditorialEntry<"editorial/problem">, EditorialEntry<"editorial/automation">, EditorialEntry<"editorial/custom-software">, EditorialEntry<"editorial/assistant">, EditorialEntry<"editorial/integration">, EditorialEntry<"editorial/digitalization">, EditorialEntry<"editorial/process-discovery">, EditorialEntry<"editorial/process-analysis">, EditorialEntry<"editorial/process-concept">, EditorialEntry<"editorial/process-prototype">, EditorialEntry<"editorial/process-development">, EditorialEntry<"editorial/process-testing">, EditorialEntry<"editorial/process-maintenance">, EditorialEntry<"editorial/bracket-left">, EditorialEntry<"editorial/bracket-right">];
|
|
59
|
+
/** The names of the editorial entries, so `editorial-assets.ts` must cover each one. */
|
|
60
|
+
export type EditorialName = (typeof editorialEntries)[number]["name"];
|
|
61
|
+
export declare const ILLUSTRATION_LIBRARY: (DrawingEntry<"drawing/bracket-construction", "default" | "filled"> | DrawingEntry<"drawing/crescent", "default" | "guides"> | DrawingEntry<"drawing/eclipse", "default" | "guides"> | DrawingEntry<"drawing/elevation-guides", "default" | "plain"> | DrawingEntry<"drawing/horizon", "default"> | DrawingEntry<"drawing/nib-study", "default" | "plain"> | EditorialEntry<"editorial/assistant"> | EditorialEntry<"editorial/automation"> | EditorialEntry<"editorial/bracket-left"> | EditorialEntry<"editorial/bracket-right"> | EditorialEntry<"editorial/custom-software"> | EditorialEntry<"editorial/digitalization"> | EditorialEntry<"editorial/integration"> | EditorialEntry<"editorial/problem"> | EditorialEntry<"editorial/process-analysis"> | EditorialEntry<"editorial/process-concept"> | EditorialEntry<"editorial/process-development"> | EditorialEntry<"editorial/process-discovery"> | EditorialEntry<"editorial/process-maintenance"> | EditorialEntry<"editorial/process-prototype"> | EditorialEntry<"editorial/process-testing"> | IsoEntry<"iso/automation" | "iso/bar-chart" | "iso/brackets" | "iso/brackets-classic" | "iso/city" | "iso/conveyor" | "iso/database" | "iso/documents" | "iso/inbox" | "iso/laptop" | "iso/monitor" | "iso/pipeline" | "iso/platform" | "iso/server" | "iso/spreadsheet" | "iso/timeline"> | SheetEntry<"sheet/construction"> | SheetEntry<"sheet/crescent"> | SheetEntry<"sheet/limb"> | SheetEntry<"sheet/stress-axis"> | SheetEntry<"sheet/totality"> | SheetEntry<"sheet/vertical-metrics">)[];
|
|
62
|
+
export type IllustrationEntry = (typeof ILLUSTRATION_LIBRARY)[number];
|
|
63
|
+
/** Every library id, e.g. `"iso/server"`, `"drawing/eclipse"`, `"sheet/totality"`. */
|
|
64
|
+
export type IllustrationName = IllustrationEntry["id"];
|
|
65
|
+
/** The variants an entry supports. */
|
|
66
|
+
export type IllustrationVariantOf<N extends IllustrationName> = IllustrationEntry extends infer E ? E extends {
|
|
67
|
+
id: infer I;
|
|
68
|
+
variants: readonly (infer V)[];
|
|
69
|
+
} ? N extends I ? V : never : never : never;
|
|
70
|
+
export type IllustrationVariant = IllustrationVariantOf<IllustrationName>;
|
|
71
|
+
export declare function getIllustration(id: string): IllustrationEntry | undefined;
|
|
72
|
+
export interface IllustrationFile {
|
|
73
|
+
variant: string;
|
|
74
|
+
theme: IllustrationTheme;
|
|
75
|
+
/** Relative to the illustrations folder: `assets/illustrations/` in the package, `/illustrations/` on the docs site. */
|
|
76
|
+
path: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The static files of an entry: SVG renders for vector entries, the full-size webp for an
|
|
80
|
+
* editorial entry (its `-640` companion sits beside it).
|
|
81
|
+
*/
|
|
82
|
+
export declare function illustrationFiles(entry: IllustrationEntry): IllustrationFile[];
|
|
83
|
+
/** A figure at rest as a standalone SVG file. */
|
|
84
|
+
export declare function figureToSvg(figure: Figure, theme: IllustrationTheme, title?: string): string;
|
|
85
|
+
/** Render one static file of a vector entry. */
|
|
86
|
+
export declare function renderIllustrationFile(entry: IllustrationEntry, file: IllustrationFile): Promise<string>;
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The zon illustration library: every illustration and drawing, one entry each.
|
|
3
|
+
*
|
|
4
|
+
* Ids are `<kind>/<name>`: lower-case, kebab-case, named for what is drawn (like an icon), never
|
|
5
|
+
* for the page that first used it. The meaning lives in metadata, so one drawing can serve
|
|
6
|
+
* several sentences and new entries never need a new component.
|
|
7
|
+
*
|
|
8
|
+
* iso/<name> isometric line figures that answer the pointer (figure/) — loaded on demand
|
|
9
|
+
* drawing/<name> parametric line drawings from the light table (illustration-drawings.ts)
|
|
10
|
+
* sheet/<name> a drawing framed as a spec sheet: night or paper, captions, title block
|
|
11
|
+
* editorial/<name> the raster line art shared with zon.sh, shipped as webp in
|
|
12
|
+
* assets/illustrations/editorial/<name>[-640].webp (editorial-assets.ts)
|
|
13
|
+
*
|
|
14
|
+
* Vector entries (iso, drawing, sheet) are also exported as static SVG files by
|
|
15
|
+
* scripts/build-illustrations.mjs to assets/illustrations/<kind>/<name>[-<variant>][-dark].svg.
|
|
16
|
+
*
|
|
17
|
+
* To add an entry: draw it (a figure in figure/figures/ or a drawing function), add it with
|
|
18
|
+
* title, meaning and tags, then run `pnpm agents`. The component, the docs gallery, the
|
|
19
|
+
* carousel, the static files and the agent docs all pick it up from here.
|
|
20
|
+
*
|
|
21
|
+
* Pure TypeScript with no JSX or DOM: the export script imports it under Node.
|
|
22
|
+
*/
|
|
23
|
+
import { bracketConstruction, crescent, drawingToSvg, eclipse, elevationGuides, horizon, nibStudy, sheetToSvg, } from "./illustration-drawings.js";
|
|
24
|
+
import { FIGURES } from "./figure/catalog.js";
|
|
25
|
+
import { VIEW, renderStill } from "./figure/kernel.js";
|
|
26
|
+
/** The kinds in display order, with their docs labels. */
|
|
27
|
+
export const ILLUSTRATION_KINDS = [
|
|
28
|
+
{
|
|
29
|
+
id: "iso",
|
|
30
|
+
title: "Isometric",
|
|
31
|
+
description: "Line figures in isometric that answer the pointer: one hairline stroke, rounded solids, one bright edge.",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "drawing",
|
|
35
|
+
title: "Drawings",
|
|
36
|
+
description: "Monochrome constructions from the light table, inked in currentColor.",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "sheet",
|
|
40
|
+
title: "Sheets",
|
|
41
|
+
description: "A drawing pinned to a night or paper spec sheet with captions and a title block.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "editorial",
|
|
45
|
+
title: "Editorial",
|
|
46
|
+
description: "The black line-art raster illustrations shared with zon.sh, shipped in the package and inverted in dark mode.",
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
const isoEntries = FIGURES.map((o) => ({
|
|
50
|
+
id: `iso/${o.name}`,
|
|
51
|
+
kind: "iso",
|
|
52
|
+
name: o.name,
|
|
53
|
+
title: o.title,
|
|
54
|
+
meaning: o.meaning,
|
|
55
|
+
tags: o.tags,
|
|
56
|
+
variants: ["default"],
|
|
57
|
+
animated: true,
|
|
58
|
+
motion: o.motion,
|
|
59
|
+
load: o.load,
|
|
60
|
+
}));
|
|
61
|
+
/* ── Drawings ───────────────────────────────────────────────────────────────── */
|
|
62
|
+
function drawing(name, variants, draw, meta) {
|
|
63
|
+
return { id: `drawing/${name}`, kind: "drawing", name, variants, animated: false, draw, ...meta };
|
|
64
|
+
}
|
|
65
|
+
const drawingEntries = [
|
|
66
|
+
drawing("eclipse", ["default", "guides"], eclipse, {
|
|
67
|
+
title: "Eclipse",
|
|
68
|
+
meaning: "“The o, at totality”: a disc in the ground colour with a corona of hairlines. Brand covers and closing moments.",
|
|
69
|
+
tags: ["eclipse", "corona", "night", "cover", "licht"],
|
|
70
|
+
}),
|
|
71
|
+
drawing("crescent", ["default", "guides"], crescent, {
|
|
72
|
+
title: "Crescent",
|
|
73
|
+
meaning: "A thin lit crescent at 14°: a quiet beginning, a first step, an empty state at night.",
|
|
74
|
+
tags: ["moon", "crescent", "night", "start"],
|
|
75
|
+
}),
|
|
76
|
+
drawing("horizon", ["default"], horizon, {
|
|
77
|
+
title: "Horizon",
|
|
78
|
+
meaning: "A planet limb with a glowing rim: the ground of a footer or a closing call to action. It fills its box.",
|
|
79
|
+
tags: ["horizon", "planet", "footer", "backdrop", "ground"],
|
|
80
|
+
}),
|
|
81
|
+
drawing("nib-study", ["default", "plain"], nibStudy, {
|
|
82
|
+
title: "Nib study",
|
|
83
|
+
meaning: "A protractor with the 14° stress axis and an oval nib: the construction behind Licht's contrast.",
|
|
84
|
+
tags: ["typography", "licht", "construction", "protractor", "craft"],
|
|
85
|
+
}),
|
|
86
|
+
drawing("elevation-guides", ["default", "plain"], elevationGuides, {
|
|
87
|
+
title: "Elevation guides",
|
|
88
|
+
meaning: "Licht's vertical metrics (742 · 720 · 506 · 0 · −204) around a “Hxgo” specimen: type and precision.",
|
|
89
|
+
tags: ["typography", "licht", "metrics", "specimen", "baseline"],
|
|
90
|
+
}),
|
|
91
|
+
drawing("bracket-construction", ["default", "filled"], bracketConstruction, {
|
|
92
|
+
title: "Bracket construction",
|
|
93
|
+
meaning: "The mark as a construction drawing with its exact dimensions: how the brand is built. Not a logo.",
|
|
94
|
+
tags: ["brand", "logo", "construction", "dimensions", "brackets"],
|
|
95
|
+
}),
|
|
96
|
+
];
|
|
97
|
+
/* ── Sheets ─────────────────────────────────────────────────────────────────── */
|
|
98
|
+
function sheet(name, drawingId, spec, meta) {
|
|
99
|
+
const { drawingVariant, ...rest } = meta;
|
|
100
|
+
return {
|
|
101
|
+
id: `sheet/${name}`,
|
|
102
|
+
kind: "sheet",
|
|
103
|
+
name,
|
|
104
|
+
variants: ["default"],
|
|
105
|
+
animated: false,
|
|
106
|
+
drawing: drawingId,
|
|
107
|
+
drawingVariant,
|
|
108
|
+
sheet: spec,
|
|
109
|
+
...rest,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const drawnBy = (scale) => [
|
|
113
|
+
{ label: "Drawn", value: "zon" },
|
|
114
|
+
{ label: "Scale", value: scale },
|
|
115
|
+
];
|
|
116
|
+
const sheetEntries = [
|
|
117
|
+
sheet("totality", "drawing/eclipse", { tone: "night", index: "05.1", eyebrow: "The o, at totality", marks: true, titleBlock: drawnBy("1:4") }, {
|
|
118
|
+
title: "Totality",
|
|
119
|
+
meaning: "The eclipse on a night sheet with crosshairs and a title block — the strongest single brand image.",
|
|
120
|
+
tags: ["eclipse", "night", "cover", "hero"],
|
|
121
|
+
}),
|
|
122
|
+
sheet("stress-axis", "drawing/nib-study", { tone: "paper", index: "05.2", eyebrow: "Stress axis 14°" }, {
|
|
123
|
+
title: "Stress axis",
|
|
124
|
+
meaning: "The nib study on paper: craft and typography, beside writing about how things are made.",
|
|
125
|
+
tags: ["typography", "paper", "craft"],
|
|
126
|
+
}),
|
|
127
|
+
sheet("crescent", "drawing/crescent", { tone: "night", index: "05.3", eyebrow: "Crescent", aspect: 1 }, {
|
|
128
|
+
title: "Crescent",
|
|
129
|
+
meaning: "The crescent on a square night sheet: a calm image for a beginning or an empty state.",
|
|
130
|
+
tags: ["moon", "night", "square"],
|
|
131
|
+
}),
|
|
132
|
+
sheet("vertical-metrics", "drawing/elevation-guides", { tone: "paper", index: "05.4", eyebrow: "Vertical metrics", aspect: 2 }, {
|
|
133
|
+
title: "Vertical metrics",
|
|
134
|
+
meaning: "Licht's metrics on a wide paper sheet: precision, measurement, the type system.",
|
|
135
|
+
tags: ["typography", "licht", "paper", "wide"],
|
|
136
|
+
}),
|
|
137
|
+
sheet("limb", "drawing/horizon", { tone: "night", index: "05.5", eyebrow: "Limb", aspect: 3, bleed: true }, {
|
|
138
|
+
title: "Limb",
|
|
139
|
+
meaning: "The horizon running edge to edge on a wide night sheet: a banner or a closing band.",
|
|
140
|
+
tags: ["horizon", "night", "banner", "wide"],
|
|
141
|
+
}),
|
|
142
|
+
sheet("construction", "drawing/bracket-construction", {
|
|
143
|
+
tone: "paper",
|
|
144
|
+
index: "07",
|
|
145
|
+
eyebrow: "Bracket, construction",
|
|
146
|
+
marks: true,
|
|
147
|
+
titleBlock: [...drawnBy("1:4"), { label: "Sheet", value: "07/173" }, { label: "Rev", value: "0.500" }],
|
|
148
|
+
}, {
|
|
149
|
+
title: "Construction",
|
|
150
|
+
meaning: "The bracket construction on paper with a full title block: brand guidelines, the about page.",
|
|
151
|
+
tags: ["brand", "construction", "paper"],
|
|
152
|
+
}),
|
|
153
|
+
];
|
|
154
|
+
/* ── Editorial ──────────────────────────────────────────────────────────────── */
|
|
155
|
+
function editorial(name, meta, size = {
|
|
156
|
+
width: 1254,
|
|
157
|
+
height: 1254,
|
|
158
|
+
sizes: "(min-width: 1024px) 500px, 384px",
|
|
159
|
+
}) {
|
|
160
|
+
return {
|
|
161
|
+
id: `editorial/${name}`,
|
|
162
|
+
kind: "editorial",
|
|
163
|
+
name,
|
|
164
|
+
variants: ["default"],
|
|
165
|
+
animated: false,
|
|
166
|
+
...size,
|
|
167
|
+
...meta,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
const editorialEntries = [
|
|
171
|
+
editorial("problem", {
|
|
172
|
+
title: "Problem",
|
|
173
|
+
meaning: "Many small, repeated tasks piling up: a problem worth solving.",
|
|
174
|
+
tags: ["problem", "manual work", "busywork"],
|
|
175
|
+
}),
|
|
176
|
+
editorial("automation", {
|
|
177
|
+
title: "Automation",
|
|
178
|
+
meaning: "Repetitive steps that run by themselves: automation, scripts, scheduled work.",
|
|
179
|
+
tags: ["automation", "workflow", "ai"],
|
|
180
|
+
}),
|
|
181
|
+
editorial("custom-software", {
|
|
182
|
+
title: "Custom software",
|
|
183
|
+
meaning: "Software built for a job: tools, dashboards and apps.",
|
|
184
|
+
tags: ["software", "tools", "dashboard"],
|
|
185
|
+
}),
|
|
186
|
+
editorial("assistant", {
|
|
187
|
+
title: "Assistant",
|
|
188
|
+
meaning: "AI assistants and chatbots that search, summarise and answer from your documents.",
|
|
189
|
+
tags: ["assistant", "chatbot", "ai"],
|
|
190
|
+
}),
|
|
191
|
+
editorial("integration", {
|
|
192
|
+
title: "Integration",
|
|
193
|
+
meaning: "Data flowing between tools instead of copy and paste: integrations, APIs, sync.",
|
|
194
|
+
tags: ["integration", "api", "sync"],
|
|
195
|
+
}),
|
|
196
|
+
editorial("digitalization", {
|
|
197
|
+
title: "Digitalisation",
|
|
198
|
+
meaning: "Paper and manual steps turned into something digital.",
|
|
199
|
+
tags: ["digitalisation", "paperwork", "process"],
|
|
200
|
+
}),
|
|
201
|
+
editorial("process-discovery", {
|
|
202
|
+
title: "First call",
|
|
203
|
+
meaning: "Step 1 of a project: a first conversation about what is needed.",
|
|
204
|
+
tags: ["process", "step", "discovery", "call"],
|
|
205
|
+
}),
|
|
206
|
+
editorial("process-analysis", {
|
|
207
|
+
title: "Process analysis",
|
|
208
|
+
meaning: "Step 2 of a project: mapping how things work today.",
|
|
209
|
+
tags: ["process", "step", "analysis"],
|
|
210
|
+
}),
|
|
211
|
+
editorial("process-concept", {
|
|
212
|
+
title: "Solution concept",
|
|
213
|
+
meaning: "Step 3 of a project: a concrete plan.",
|
|
214
|
+
tags: ["process", "step", "concept", "plan"],
|
|
215
|
+
}),
|
|
216
|
+
editorial("process-prototype", {
|
|
217
|
+
title: "Prototype / MVP",
|
|
218
|
+
meaning: "Step 4 of a project: a first working version to try.",
|
|
219
|
+
tags: ["process", "step", "prototype", "mvp"],
|
|
220
|
+
}),
|
|
221
|
+
editorial("process-development", {
|
|
222
|
+
title: "Development",
|
|
223
|
+
meaning: "Step 5 of a project: building it out.",
|
|
224
|
+
tags: ["process", "step", "development", "build"],
|
|
225
|
+
}),
|
|
226
|
+
editorial("process-testing", {
|
|
227
|
+
title: "Testing & deployment",
|
|
228
|
+
meaning: "Step 6 of a project: testing and shipping.",
|
|
229
|
+
tags: ["process", "step", "testing", "deployment"],
|
|
230
|
+
}),
|
|
231
|
+
editorial("process-maintenance", {
|
|
232
|
+
title: "Maintenance & improvement",
|
|
233
|
+
meaning: "Step 7 of a project: keeping it running and improving it.",
|
|
234
|
+
tags: ["process", "step", "maintenance", "support"],
|
|
235
|
+
}),
|
|
236
|
+
// The two halves of the mark drawn by hand, cropped to one height so they line up when
|
|
237
|
+
// set apart: a lockup in the editorial hand, with the wordmark set between them.
|
|
238
|
+
editorial("bracket-left", {
|
|
239
|
+
title: "Bracket, left (hand-drawn)",
|
|
240
|
+
meaning: "The left eigen-bracket drawn by hand: one half of an editorial lockup, with its pair and the wordmark between.",
|
|
241
|
+
tags: ["brand", "brackets", "lockup", "hand-drawn", "footer"],
|
|
242
|
+
}, { width: 383, height: 975, sizes: "(min-width: 1024px) 160px, 96px" }),
|
|
243
|
+
editorial("bracket-right", {
|
|
244
|
+
title: "Bracket, right (hand-drawn)",
|
|
245
|
+
meaning: "The right eigen-bracket drawn by hand: one half of an editorial lockup, with its pair and the wordmark between.",
|
|
246
|
+
tags: ["brand", "brackets", "lockup", "hand-drawn", "footer"],
|
|
247
|
+
}, { width: 387, height: 975, sizes: "(min-width: 1024px) 160px, 96px" }),
|
|
248
|
+
];
|
|
249
|
+
/* ── The library ────────────────────────────────────────────────────────────── */
|
|
250
|
+
export const ILLUSTRATION_LIBRARY = [
|
|
251
|
+
...isoEntries,
|
|
252
|
+
...drawingEntries,
|
|
253
|
+
...sheetEntries,
|
|
254
|
+
...editorialEntries,
|
|
255
|
+
];
|
|
256
|
+
const byId = new Map(ILLUSTRATION_LIBRARY.map((e) => [e.id, e]));
|
|
257
|
+
export function getIllustration(id) {
|
|
258
|
+
return byId.get(id);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* The static files of an entry: SVG renders for vector entries, the full-size webp for an
|
|
262
|
+
* editorial entry (its `-640` companion sits beside it).
|
|
263
|
+
*/
|
|
264
|
+
export function illustrationFiles(entry) {
|
|
265
|
+
if (entry.kind === "editorial") {
|
|
266
|
+
return [{ variant: "default", theme: "light", path: `editorial/${entry.name}.webp` }];
|
|
267
|
+
}
|
|
268
|
+
// A sheet keeps its own ground in any theme, so it has one file.
|
|
269
|
+
const themes = entry.kind === "sheet" ? ["light"] : ["light", "dark"];
|
|
270
|
+
return entry.variants.flatMap((variant, i) => themes.map((theme) => ({
|
|
271
|
+
variant,
|
|
272
|
+
theme,
|
|
273
|
+
path: `${entry.kind}/${entry.name}${i === 0 ? "" : `-${variant}`}${theme === "dark" ? "-dark" : ""}.svg`,
|
|
274
|
+
})));
|
|
275
|
+
}
|
|
276
|
+
/** Fixed colours for the figures' static files (the --fig-* properties, resolved). */
|
|
277
|
+
const FIGURE_COLORS = {
|
|
278
|
+
light: { plate: "#ffffff", hi: "#0a0a0a", edge: "#7a7a7a", mid: "#a3a3a3", lo: "#d0d0d0", ok: "#16804a" },
|
|
279
|
+
dark: { plate: "#0a0a0a", hi: "#fafafa", edge: "#9a9a9a", mid: "#6f6f6f", lo: "#3a3a3a", ok: "#4fd17e" },
|
|
280
|
+
};
|
|
281
|
+
/** The classic solid mark's tones (the `so-*` classes; see isometric.css). */
|
|
282
|
+
const SOLID_COLORS = {
|
|
283
|
+
light: {
|
|
284
|
+
top: "#ffffff",
|
|
285
|
+
left: "#ececec",
|
|
286
|
+
right: "#d7d7d7",
|
|
287
|
+
"ink-top": "#555555",
|
|
288
|
+
"ink-left": "#2b2b2b",
|
|
289
|
+
"ink-right": "#1a1a1a",
|
|
290
|
+
edge: "rgba(0,0,0,.22)",
|
|
291
|
+
"ink-edge": "rgba(255,255,255,.1)",
|
|
292
|
+
shadow: "rgba(0,0,0,.07)",
|
|
293
|
+
detail: "rgba(0,0,0,.38)",
|
|
294
|
+
},
|
|
295
|
+
dark: {
|
|
296
|
+
top: "#2e2e2e",
|
|
297
|
+
left: "#202020",
|
|
298
|
+
right: "#161616",
|
|
299
|
+
"ink-top": "#f4f4f4",
|
|
300
|
+
"ink-left": "#d6d6d6",
|
|
301
|
+
"ink-right": "#b4b4b4",
|
|
302
|
+
edge: "rgba(255,255,255,.14)",
|
|
303
|
+
"ink-edge": "rgba(0,0,0,.18)",
|
|
304
|
+
shadow: "rgba(0,0,0,.45)",
|
|
305
|
+
detail: "rgba(255,255,255,.34)",
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
/** A figure at rest as a standalone SVG file. */
|
|
309
|
+
export function figureToSvg(figure, theme, title) {
|
|
310
|
+
const c = FIGURE_COLORS[theme];
|
|
311
|
+
const s = SOLID_COLORS[theme];
|
|
312
|
+
const css = [
|
|
313
|
+
`path{fill:none;stroke:${c.mid};stroke-width:1;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}`,
|
|
314
|
+
`.sil{fill:${c.plate};stroke:${c.edge}}`,
|
|
315
|
+
`.crease,.guide{stroke:${c.lo}}`,
|
|
316
|
+
".guide{stroke-dasharray:2 3}",
|
|
317
|
+
".led,.pulse{stroke-width:2.4}",
|
|
318
|
+
`.hi,.pulse{stroke:${c.hi}}`,
|
|
319
|
+
`.ok{stroke:${c.ok}}`,
|
|
320
|
+
...["top", "left", "right", "ink-top", "ink-left", "ink-right"].map((t) => `.so-${t}{fill:${s[t]};stroke:${t.startsWith("ink") ? s["ink-edge"] : s.edge};stroke-width:1.25}`),
|
|
321
|
+
`.so-shadow{fill:${s.shadow};stroke:none}`,
|
|
322
|
+
`.so-detail{stroke:${s.detail}}`,
|
|
323
|
+
].join("");
|
|
324
|
+
const esc = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
325
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${VIEW.w} ${VIEW.h}" width="${VIEW.w * 1.2}" height="${VIEW.h * 1.2}" fill="none"${title ? ` role="img" aria-label="${esc(title)}"` : ` aria-hidden="true"`}>
|
|
326
|
+
${title
|
|
327
|
+
? `<title>${esc(title)}</title>
|
|
328
|
+
`
|
|
329
|
+
: ""}<style>${css}</style>
|
|
330
|
+
<rect width="100%" height="100%" fill="${c.plate}"/>
|
|
331
|
+
${renderStill(figure)}
|
|
332
|
+
</svg>
|
|
333
|
+
`;
|
|
334
|
+
}
|
|
335
|
+
/** Render one static file of a vector entry. */
|
|
336
|
+
export async function renderIllustrationFile(entry, file) {
|
|
337
|
+
const uid = `ep-${entry.kind}-${entry.name}`;
|
|
338
|
+
switch (entry.kind) {
|
|
339
|
+
case "iso":
|
|
340
|
+
return figureToSvg((await entry.load()).default, file.theme, entry.title);
|
|
341
|
+
case "drawing":
|
|
342
|
+
return drawingToSvg(entry.draw, file.variant, file.theme, uid, entry.title);
|
|
343
|
+
case "sheet": {
|
|
344
|
+
const d = byId.get(entry.drawing);
|
|
345
|
+
if (d?.kind !== "drawing")
|
|
346
|
+
throw new Error(`${entry.id}: unknown drawing ${entry.drawing}`);
|
|
347
|
+
return sheetToSvg(entry.sheet, d.draw, entry.drawingVariant ?? d.variants[0], uid, entry.title);
|
|
348
|
+
}
|
|
349
|
+
case "editorial":
|
|
350
|
+
throw new Error(`${entry.id} is a raster image on zon.sh; it has no static SVG`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Stroke width of stems and arms: 36.757812 / 264.457031. */
|
|
2
|
+
export declare const BRACKET_STROKE = 0.138993;
|
|
3
|
+
/** Arm length, including the stem it grows from: 93.171875 / 264.457031. */
|
|
4
|
+
export declare const BRACKET_ARM = 0.352315;
|
|
5
|
+
/** Top of the left arm: 56.367188 / 264.457031. */
|
|
6
|
+
export declare const LEFT_ARM_Y = 0.213142;
|
|
7
|
+
/** Top of the right arm: 112.757813 / 264.457031. */
|
|
8
|
+
export declare const RIGHT_ARM_Y = 0.426373;
|
|
9
|
+
/** Gap between the two stems in logo.svg: 76.128907 / 264.53125. */
|
|
10
|
+
export declare const MARK_GAP = 0.287786;
|
|
11
|
+
export type Rect = readonly [x: number, y: number, w: number, h: number];
|
|
12
|
+
export interface BracketGeometry {
|
|
13
|
+
/** Bracket height. */
|
|
14
|
+
h: number;
|
|
15
|
+
/** Bracket width (= arm length). */
|
|
16
|
+
w: number;
|
|
17
|
+
/** Space between the stems in the complete symbol. */
|
|
18
|
+
gap: number;
|
|
19
|
+
left: readonly Rect[];
|
|
20
|
+
right: readonly Rect[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The two brackets at `size` px. With `dpr`, every edge is snapped to whole device pixels,
|
|
24
|
+
* so stems and arms are an exact number of pixels wide and both halves render identically
|
|
25
|
+
* with `shape-rendering="crispEdges"` wherever they land on the page.
|
|
26
|
+
*/
|
|
27
|
+
export declare function bracketGeometry(size: number, dpr?: number): BracketGeometry;
|
|
28
|
+
/** The device pixel ratio, updated on zoom and when a window moves between screens. 1 on the server. */
|
|
29
|
+
export declare function useDevicePixelRatio(): number;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
/*
|
|
3
|
+
* The zon bracket geometry, measured from assets/logo.svg, logo-left.svg and
|
|
4
|
+
* logo-right.svg (every transform and clipPath resolved) and expressed as fractions of the
|
|
5
|
+
* bracket height. Each bracket is a full-height stem and one arm; the arms differ in height
|
|
6
|
+
* (the left arm sits high, the right one near the middle), the strokes are identical.
|
|
7
|
+
*
|
|
8
|
+
* The source files draw the right stem 0.8% shorter than the left one (262.27 vs 264.42
|
|
9
|
+
* units) — an export artefact that shows as a sub-pixel mismatch. Both stems are the full
|
|
10
|
+
* bracket height here, so the halves always share height, stroke and baseline.
|
|
11
|
+
*/
|
|
12
|
+
/** Stroke width of stems and arms: 36.757812 / 264.457031. */
|
|
13
|
+
export const BRACKET_STROKE = 0.138993;
|
|
14
|
+
/** Arm length, including the stem it grows from: 93.171875 / 264.457031. */
|
|
15
|
+
export const BRACKET_ARM = 0.352315;
|
|
16
|
+
/** Top of the left arm: 56.367188 / 264.457031. */
|
|
17
|
+
export const LEFT_ARM_Y = 0.213142;
|
|
18
|
+
/** Top of the right arm: 112.757813 / 264.457031. */
|
|
19
|
+
export const RIGHT_ARM_Y = 0.426373;
|
|
20
|
+
/** Gap between the two stems in logo.svg: 76.128907 / 264.53125. */
|
|
21
|
+
export const MARK_GAP = 0.287786;
|
|
22
|
+
/**
|
|
23
|
+
* The two brackets at `size` px. With `dpr`, every edge is snapped to whole device pixels,
|
|
24
|
+
* so stems and arms are an exact number of pixels wide and both halves render identically
|
|
25
|
+
* with `shape-rendering="crispEdges"` wherever they land on the page.
|
|
26
|
+
*/
|
|
27
|
+
export function bracketGeometry(size, dpr) {
|
|
28
|
+
const q = dpr ? (v, min = 0) => Math.max(min, Math.round(v * dpr)) / dpr : (v) => v;
|
|
29
|
+
const h = q(size, 1);
|
|
30
|
+
const s = q(size * BRACKET_STROKE, 1);
|
|
31
|
+
const w = Math.max(q(size * BRACKET_ARM, 1), s);
|
|
32
|
+
const yl = q(size * LEFT_ARM_Y);
|
|
33
|
+
const yr = q(size * RIGHT_ARM_Y);
|
|
34
|
+
const gap = q(size * MARK_GAP, 1);
|
|
35
|
+
return {
|
|
36
|
+
h,
|
|
37
|
+
w,
|
|
38
|
+
gap,
|
|
39
|
+
left: [
|
|
40
|
+
[0, yl, w, s], // arm
|
|
41
|
+
[w - s, 0, s, h], // stem
|
|
42
|
+
],
|
|
43
|
+
right: [
|
|
44
|
+
[0, 0, s, h], // stem
|
|
45
|
+
[0, yr, w, s], // arm
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function subscribeDpr(onChange) {
|
|
50
|
+
if (typeof window === "undefined" || !window.matchMedia)
|
|
51
|
+
return () => { };
|
|
52
|
+
let query;
|
|
53
|
+
const listen = () => {
|
|
54
|
+
query = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
55
|
+
query.addEventListener("change", handle, { once: true });
|
|
56
|
+
};
|
|
57
|
+
const handle = () => {
|
|
58
|
+
listen();
|
|
59
|
+
onChange();
|
|
60
|
+
};
|
|
61
|
+
listen();
|
|
62
|
+
return () => query.removeEventListener("change", handle);
|
|
63
|
+
}
|
|
64
|
+
/** The device pixel ratio, updated on zoom and when a window moves between screens. 1 on the server. */
|
|
65
|
+
export function useDevicePixelRatio() {
|
|
66
|
+
return useSyncExternalStore(subscribeDpr, () => window.devicePixelRatio || 1, () => 1);
|
|
67
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The deepest nesting of quotes and list items the parser is given. */
|
|
2
|
+
export declare const MAX_DEPTH = 24;
|
|
3
|
+
/**
|
|
4
|
+
* The text with no line nested deeper than MAX_DEPTH: past that many quote and list markers, the
|
|
5
|
+
* next one is escaped and the rest of the line is text. A quote or list item indented past
|
|
6
|
+
* MAX_INDENT columns is moved back to it. Code fences are left as they are, and so is any text no
|
|
7
|
+
* reply needs changed: it comes back as the same string.
|
|
8
|
+
*/
|
|
9
|
+
export declare function capNesting(text: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether marked would take too long on one inline run — a paragraph's or a heading's text, a
|
|
12
|
+
* table cell, a list item's text. An estimate in one pass: how far each emphasis delimiter (`*`,
|
|
13
|
+
* `_`, `~`), each `[` and each `<` scans for its closer, delimiter by delimiter, with a stack per
|
|
14
|
+
* kind; and how often an intraword delimiter makes marked read the run again.
|
|
15
|
+
*/
|
|
16
|
+
export declare function overBudget(text: string): boolean;
|