@prestack/thread-ui 0.0.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/CHANGELOG.md +348 -0
- package/dist/attach.d.ts +1 -0
- package/dist/attach.js +1 -0
- package/dist/ui/animations/anm_appear.d.ts +16 -0
- package/dist/ui/animations/anm_appear.js +10 -0
- package/dist/ui/animations/anm_blur_in.d.ts +22 -0
- package/dist/ui/animations/anm_blur_in.js +16 -0
- package/dist/ui/animations/anm_blur_out.d.ts +22 -0
- package/dist/ui/animations/anm_blur_out.js +16 -0
- package/dist/ui/animations/anm_dismiss.d.ts +22 -0
- package/dist/ui/animations/anm_dismiss.js +16 -0
- package/dist/ui/animations/anm_drop.d.ts +22 -0
- package/dist/ui/animations/anm_drop.js +16 -0
- package/dist/ui/animations/anm_fall.d.ts +22 -0
- package/dist/ui/animations/anm_fall.js +16 -0
- package/dist/ui/animations/anm_flash.d.ts +19 -0
- package/dist/ui/animations/anm_flash.js +16 -0
- package/dist/ui/animations/anm_glow.d.ts +16 -0
- package/dist/ui/animations/anm_glow.js +14 -0
- package/dist/ui/animations/anm_lift.d.ts +16 -0
- package/dist/ui/animations/anm_lift.js +14 -0
- package/dist/ui/animations/anm_nudge.d.ts +16 -0
- package/dist/ui/animations/anm_nudge.js +14 -0
- package/dist/ui/animations/anm_pop_in.d.ts +29 -0
- package/dist/ui/animations/anm_pop_in.js +20 -0
- package/dist/ui/animations/anm_pop_out.d.ts +29 -0
- package/dist/ui/animations/anm_pop_out.js +20 -0
- package/dist/ui/animations/anm_press.d.ts +19 -0
- package/dist/ui/animations/anm_press.js +10 -0
- package/dist/ui/animations/anm_pulse.d.ts +20 -0
- package/dist/ui/animations/anm_pulse.js +11 -0
- package/dist/ui/animations/anm_rise.d.ts +22 -0
- package/dist/ui/animations/anm_rise.js +16 -0
- package/dist/ui/animations/anm_shake.d.ts +23 -0
- package/dist/ui/animations/anm_shake.js +11 -0
- package/dist/ui/animations/anm_slide_in_left.d.ts +22 -0
- package/dist/ui/animations/anm_slide_in_left.js +16 -0
- package/dist/ui/animations/anm_slide_in_right.d.ts +22 -0
- package/dist/ui/animations/anm_slide_in_right.js +16 -0
- package/dist/ui/animations/anm_slide_out_left.d.ts +22 -0
- package/dist/ui/animations/anm_slide_out_left.js +16 -0
- package/dist/ui/animations/anm_slide_out_right.d.ts +22 -0
- package/dist/ui/animations/anm_slide_out_right.js +16 -0
- package/dist/ui/animations/anm_spin.d.ts +16 -0
- package/dist/ui/animations/anm_spin.js +10 -0
- package/dist/ui/animations/anm_swell.d.ts +16 -0
- package/dist/ui/animations/anm_swell.js +14 -0
- package/dist/ui/animations/anm_wobble.d.ts +27 -0
- package/dist/ui/animations/anm_wobble.js +22 -0
- package/dist/ui/animations/anm_zoom_in.d.ts +22 -0
- package/dist/ui/animations/anm_zoom_in.js +16 -0
- package/dist/ui/animations/anm_zoom_out.d.ts +22 -0
- package/dist/ui/animations/anm_zoom_out.js +16 -0
- package/dist/ui/animations.d.ts +59 -0
- package/dist/ui/animations.js +227 -0
- package/dist/ui/attach.d.ts +3 -0
- package/dist/ui/attach.js +497 -0
- package/dist/ui/charts.d.ts +32 -0
- package/dist/ui/charts.js +35 -0
- package/dist/ui/checked.d.ts +19 -0
- package/dist/ui/checked.js +3 -0
- package/dist/ui/collector.d.ts +32 -0
- package/dist/ui/collector.js +75 -0
- package/dist/ui/compositions.d.ts +21 -0
- package/dist/ui/compositions.js +305 -0
- package/dist/ui/consent.d.ts +22 -0
- package/dist/ui/consent.js +44 -0
- package/dist/ui/content.d.ts +9 -0
- package/dist/ui/content.js +11 -0
- package/dist/ui/contrast.d.ts +3 -0
- package/dist/ui/contrast.js +23 -0
- package/dist/ui/controls.d.ts +14 -0
- package/dist/ui/controls.js +2 -0
- package/dist/ui/disclosure.d.ts +14 -0
- package/dist/ui/disclosure.js +2 -0
- package/dist/ui/dismiss-layer.d.ts +14 -0
- package/dist/ui/dismiss-layer.js +66 -0
- package/dist/ui/door.d.ts +40 -0
- package/dist/ui/door.js +100 -0
- package/dist/ui/drag.d.ts +82 -0
- package/dist/ui/drag.js +212 -0
- package/dist/ui/elements/accordion.d.ts +12 -0
- package/dist/ui/elements/accordion.js +16 -0
- package/dist/ui/elements/accordion.works.d.ts +22 -0
- package/dist/ui/elements/accordion.works.js +44 -0
- package/dist/ui/elements/aspect-ratio.d.ts +10 -0
- package/dist/ui/elements/aspect-ratio.js +9 -0
- package/dist/ui/elements/aspect-ratio.works.d.ts +2 -0
- package/dist/ui/elements/aspect-ratio.works.js +3 -0
- package/dist/ui/elements/avatar.d.ts +11 -0
- package/dist/ui/elements/avatar.js +10 -0
- package/dist/ui/elements/avatar.works.d.ts +4 -0
- package/dist/ui/elements/avatar.works.js +16 -0
- package/dist/ui/elements/badge.d.ts +11 -0
- package/dist/ui/elements/badge.js +10 -0
- package/dist/ui/elements/badge.works.d.ts +5 -0
- package/dist/ui/elements/badge.works.js +6 -0
- package/dist/ui/elements/bars.d.ts +14 -0
- package/dist/ui/elements/bars.js +17 -0
- package/dist/ui/elements/bars.works.d.ts +12 -0
- package/dist/ui/elements/bars.works.js +20 -0
- package/dist/ui/elements/box.d.ts +12 -0
- package/dist/ui/elements/box.js +11 -0
- package/dist/ui/elements/breadcrumb.d.ts +10 -0
- package/dist/ui/elements/breadcrumb.js +12 -0
- package/dist/ui/elements/breadcrumb.works.d.ts +7 -0
- package/dist/ui/elements/breadcrumb.works.js +21 -0
- package/dist/ui/elements/button.d.ts +17 -0
- package/dist/ui/elements/button.js +16 -0
- package/dist/ui/elements/button.works.d.ts +17 -0
- package/dist/ui/elements/button.works.js +34 -0
- package/dist/ui/elements/column.d.ts +9 -0
- package/dist/ui/elements/column.js +8 -0
- package/dist/ui/elements/consent.d.ts +13 -0
- package/dist/ui/elements/consent.js +21 -0
- package/dist/ui/elements/consent.works.d.ts +41 -0
- package/dist/ui/elements/consent.works.js +79 -0
- package/dist/ui/elements/donut.d.ts +13 -0
- package/dist/ui/elements/donut.js +16 -0
- package/dist/ui/elements/donut.works.d.ts +11 -0
- package/dist/ui/elements/donut.works.js +28 -0
- package/dist/ui/elements/each.d.ts +14 -0
- package/dist/ui/elements/each.js +9 -0
- package/dist/ui/elements/each.works.d.ts +3 -0
- package/dist/ui/elements/each.works.js +68 -0
- package/dist/ui/elements/empty.d.ts +9 -0
- package/dist/ui/elements/empty.js +12 -0
- package/dist/ui/elements/field.d.ts +16 -0
- package/dist/ui/elements/field.js +15 -0
- package/dist/ui/elements/field.works.d.ts +17 -0
- package/dist/ui/elements/field.works.js +45 -0
- package/dist/ui/elements/funnel.d.ts +14 -0
- package/dist/ui/elements/funnel.js +17 -0
- package/dist/ui/elements/funnel.works.d.ts +12 -0
- package/dist/ui/elements/funnel.works.js +23 -0
- package/dist/ui/elements/gauge.d.ts +12 -0
- package/dist/ui/elements/gauge.js +15 -0
- package/dist/ui/elements/gauge.works.d.ts +11 -0
- package/dist/ui/elements/gauge.works.js +31 -0
- package/dist/ui/elements/glyph.d.ts +10 -0
- package/dist/ui/elements/glyph.js +9 -0
- package/dist/ui/elements/glyph.works.d.ts +5 -0
- package/dist/ui/elements/glyph.works.js +16 -0
- package/dist/ui/elements/grid.d.ts +9 -0
- package/dist/ui/elements/grid.js +8 -0
- package/dist/ui/elements/heatmap.d.ts +15 -0
- package/dist/ui/elements/heatmap.js +17 -0
- package/dist/ui/elements/heatmap.works.d.ts +11 -0
- package/dist/ui/elements/heatmap.works.js +11 -0
- package/dist/ui/elements/hit-box.d.ts +19 -0
- package/dist/ui/elements/hit-box.js +15 -0
- package/dist/ui/elements/hit-box.works.d.ts +87 -0
- package/dist/ui/elements/hit-box.works.js +451 -0
- package/dist/ui/elements/image.d.ts +10 -0
- package/dist/ui/elements/image.js +9 -0
- package/dist/ui/elements/line-chart.d.ts +13 -0
- package/dist/ui/elements/line-chart.js +16 -0
- package/dist/ui/elements/line-chart.works.d.ts +12 -0
- package/dist/ui/elements/line-chart.works.js +27 -0
- package/dist/ui/elements/link.d.ts +12 -0
- package/dist/ui/elements/link.js +15 -0
- package/dist/ui/elements/link.works.d.ts +10 -0
- package/dist/ui/elements/link.works.js +15 -0
- package/dist/ui/elements/media.d.ts +11 -0
- package/dist/ui/elements/media.js +22 -0
- package/dist/ui/elements/menu.d.ts +12 -0
- package/dist/ui/elements/menu.js +18 -0
- package/dist/ui/elements/menu.works.d.ts +50 -0
- package/dist/ui/elements/menu.works.js +100 -0
- package/dist/ui/elements/money.d.ts +10 -0
- package/dist/ui/elements/money.js +9 -0
- package/dist/ui/elements/money.works.d.ts +4 -0
- package/dist/ui/elements/money.works.js +4 -0
- package/dist/ui/elements/pagination.d.ts +11 -0
- package/dist/ui/elements/pagination.js +12 -0
- package/dist/ui/elements/pagination.works.d.ts +5 -0
- package/dist/ui/elements/pagination.works.js +15 -0
- package/dist/ui/elements/progress.d.ts +11 -0
- package/dist/ui/elements/progress.js +11 -0
- package/dist/ui/elements/progress.works.d.ts +2 -0
- package/dist/ui/elements/progress.works.js +6 -0
- package/dist/ui/elements/radio-group.d.ts +15 -0
- package/dist/ui/elements/radio-group.js +16 -0
- package/dist/ui/elements/radio-group.works.d.ts +10 -0
- package/dist/ui/elements/radio-group.works.js +22 -0
- package/dist/ui/elements/row.d.ts +9 -0
- package/dist/ui/elements/row.js +8 -0
- package/dist/ui/elements/scatter.d.ts +13 -0
- package/dist/ui/elements/scatter.js +15 -0
- package/dist/ui/elements/scatter.works.d.ts +11 -0
- package/dist/ui/elements/scatter.works.js +24 -0
- package/dist/ui/elements/select.d.ts +13 -0
- package/dist/ui/elements/select.js +11 -0
- package/dist/ui/elements/select.works.d.ts +4 -0
- package/dist/ui/elements/select.works.js +3 -0
- package/dist/ui/elements/separator.d.ts +10 -0
- package/dist/ui/elements/separator.js +9 -0
- package/dist/ui/elements/skeleton.d.ts +8 -0
- package/dist/ui/elements/skeleton.js +9 -0
- package/dist/ui/elements/slider.d.ts +14 -0
- package/dist/ui/elements/slider.js +10 -0
- package/dist/ui/elements/slider.works.d.ts +4 -0
- package/dist/ui/elements/slider.works.js +3 -0
- package/dist/ui/elements/sparkline.d.ts +10 -0
- package/dist/ui/elements/sparkline.js +15 -0
- package/dist/ui/elements/sparkline.works.d.ts +10 -0
- package/dist/ui/elements/sparkline.works.js +19 -0
- package/dist/ui/elements/spinner.d.ts +9 -0
- package/dist/ui/elements/spinner.js +12 -0
- package/dist/ui/elements/stack.d.ts +9 -0
- package/dist/ui/elements/stack.js +8 -0
- package/dist/ui/elements/stat.d.ts +12 -0
- package/dist/ui/elements/stat.js +10 -0
- package/dist/ui/elements/stat.works.d.ts +3 -0
- package/dist/ui/elements/stat.works.js +10 -0
- package/dist/ui/elements/surface.d.ts +9 -0
- package/dist/ui/elements/surface.js +15 -0
- package/dist/ui/elements/surface.works.d.ts +7 -0
- package/dist/ui/elements/surface.works.js +4 -0
- package/dist/ui/elements/table.d.ts +13 -0
- package/dist/ui/elements/table.js +16 -0
- package/dist/ui/elements/table.works.d.ts +11 -0
- package/dist/ui/elements/table.works.js +15 -0
- package/dist/ui/elements/tabs.d.ts +12 -0
- package/dist/ui/elements/tabs.js +16 -0
- package/dist/ui/elements/tabs.works.d.ts +25 -0
- package/dist/ui/elements/tabs.works.js +53 -0
- package/dist/ui/elements/text.d.ts +13 -0
- package/dist/ui/elements/text.js +9 -0
- package/dist/ui/elements/textarea.d.ts +14 -0
- package/dist/ui/elements/textarea.js +11 -0
- package/dist/ui/elements/textarea.works.d.ts +4 -0
- package/dist/ui/elements/textarea.works.js +3 -0
- package/dist/ui/elements/time.d.ts +11 -0
- package/dist/ui/elements/time.js +14 -0
- package/dist/ui/elements/time.works.d.ts +11 -0
- package/dist/ui/elements/time.works.js +16 -0
- package/dist/ui/elements/toggle.d.ts +11 -0
- package/dist/ui/elements/toggle.js +10 -0
- package/dist/ui/elements/toggle.works.d.ts +4 -0
- package/dist/ui/elements/toggle.works.js +3 -0
- package/dist/ui/elements/tooltip.d.ts +12 -0
- package/dist/ui/elements/tooltip.js +15 -0
- package/dist/ui/elements/tooltip.works.d.ts +28 -0
- package/dist/ui/elements/tooltip.works.js +54 -0
- package/dist/ui/elements/value.d.ts +12 -0
- package/dist/ui/elements/value.js +9 -0
- package/dist/ui/elements/value.works.d.ts +4 -0
- package/dist/ui/elements/value.works.js +4 -0
- package/dist/ui/elements.d.ts +1143 -0
- package/dist/ui/elements.js +68 -0
- package/dist/ui/focus-scope.d.ts +7 -0
- package/dist/ui/focus-scope.js +109 -0
- package/dist/ui/fonts.d.ts +103 -0
- package/dist/ui/fonts.js +243 -0
- package/dist/ui/generators/dev.d.ts +2 -0
- package/dist/ui/generators/dev.js +61 -0
- package/dist/ui/generators/elements.d.ts +31 -0
- package/dist/ui/generators/elements.js +520 -0
- package/dist/ui/generators/i18n.d.ts +5 -0
- package/dist/ui/generators/i18n.js +264 -0
- package/dist/ui/generators/icons.d.ts +1 -0
- package/dist/ui/generators/icons.js +187 -0
- package/dist/ui/generators/react.d.ts +26 -0
- package/dist/ui/generators/react.js +218 -0
- package/dist/ui/generators/routes.d.ts +11 -0
- package/dist/ui/generators/routes.js +597 -0
- package/dist/ui/generators/show.d.ts +1 -0
- package/dist/ui/generators/show.js +231 -0
- package/dist/ui/generators/styles.d.ts +1 -0
- package/dist/ui/generators/styles.js +502 -0
- package/dist/ui/generators/variants.d.ts +12 -0
- package/dist/ui/generators/variants.js +162 -0
- package/dist/ui/i18n/catalogs/en.d.ts +172 -0
- package/dist/ui/i18n/catalogs/en.js +148 -0
- package/dist/ui/i18n/format.d.ts +13 -0
- package/dist/ui/i18n/format.js +161 -0
- package/dist/ui/i18n/locales.d.ts +9 -0
- package/dist/ui/i18n/locales.js +20 -0
- package/dist/ui/i18n/parse.d.ts +45 -0
- package/dist/ui/i18n/parse.js +249 -0
- package/dist/ui/i18n/translator.d.ts +10 -0
- package/dist/ui/i18n/translator.js +22 -0
- package/dist/ui/i18n/types.d.ts +33 -0
- package/dist/ui/i18n/types.js +9 -0
- package/dist/ui/icons.d.ts +67 -0
- package/dist/ui/icons.js +249 -0
- package/dist/ui/islands/map.d.ts +33 -0
- package/dist/ui/islands/map.js +44 -0
- package/dist/ui/localizations.d.ts +33 -0
- package/dist/ui/localizations.js +51 -0
- package/dist/ui/makers/message.d.ts +1 -0
- package/dist/ui/makers/message.js +230 -0
- package/dist/ui/material.d.ts +83 -0
- package/dist/ui/material.js +95 -0
- package/dist/ui/materials/mat_bordered.d.ts +22 -0
- package/dist/ui/materials/mat_bordered.js +12 -0
- package/dist/ui/materials/mat_ceramic.d.ts +22 -0
- package/dist/ui/materials/mat_ceramic.js +12 -0
- package/dist/ui/materials/mat_clay.d.ts +22 -0
- package/dist/ui/materials/mat_clay.js +12 -0
- package/dist/ui/materials/mat_elevated.d.ts +32 -0
- package/dist/ui/materials/mat_elevated.js +23 -0
- package/dist/ui/materials/mat_flat.d.ts +50 -0
- package/dist/ui/materials/mat_flat.js +33 -0
- package/dist/ui/materials/mat_glass.d.ts +32 -0
- package/dist/ui/materials/mat_glass.js +19 -0
- package/dist/ui/materials/mat_lit.d.ts +22 -0
- package/dist/ui/materials/mat_lit.js +12 -0
- package/dist/ui/materials/mat_moulded.d.ts +16 -0
- package/dist/ui/materials/mat_moulded.js +10 -0
- package/dist/ui/materials.d.ts +56 -0
- package/dist/ui/materials.js +175 -0
- package/dist/ui/modes.d.ts +25 -0
- package/dist/ui/modes.js +25 -0
- package/dist/ui/navigation.d.ts +3 -0
- package/dist/ui/navigation.js +24 -0
- package/dist/ui/positioning.d.ts +24 -0
- package/dist/ui/positioning.js +48 -0
- package/dist/ui/presented.d.ts +10 -0
- package/dist/ui/presented.js +81 -0
- package/dist/ui/provider.d.ts +31 -0
- package/dist/ui/provider.js +104 -0
- package/dist/ui/render-loop.d.ts +12 -0
- package/dist/ui/render-loop.js +94 -0
- package/dist/ui/roving-focus.d.ts +15 -0
- package/dist/ui/roving-focus.js +143 -0
- package/dist/ui/screens.d.ts +17 -0
- package/dist/ui/screens.js +112 -0
- package/dist/ui/scroll-lock.d.ts +2 -0
- package/dist/ui/scroll-lock.js +24 -0
- package/dist/ui/series.d.ts +9 -0
- package/dist/ui/series.js +67 -0
- package/dist/ui/signals.d.ts +120 -0
- package/dist/ui/signals.js +286 -0
- package/dist/ui/styleguide.d.ts +27 -0
- package/dist/ui/styleguide.js +138 -0
- package/dist/ui/styleguides.d.ts +11 -0
- package/dist/ui/styleguides.js +299 -0
- package/dist/ui/themes.d.ts +5 -0
- package/dist/ui/themes.js +16 -0
- package/dist/ui/token.d.ts +16 -0
- package/dist/ui/token.js +37 -0
- package/dist/ui/tokens/shadow.d.ts +6 -0
- package/dist/ui/tokens/shadow.js +17 -0
- package/dist/ui/tokens.d.ts +180 -0
- package/dist/ui/tokens.js +200 -0
- package/dist/ui/validators.d.ts +37 -0
- package/dist/ui/validators.js +184 -0
- package/dist/ui/variant.d.ts +122 -0
- package/dist/ui/variant.js +201 -0
- package/dist/ui/variants/var_avatar-round.d.ts +23 -0
- package/dist/ui/variants/var_avatar-round.js +13 -0
- package/dist/ui/variants/var_bubble-me.d.ts +21 -0
- package/dist/ui/variants/var_bubble-me.js +13 -0
- package/dist/ui/variants/var_bubble-them.d.ts +18 -0
- package/dist/ui/variants/var_bubble-them.js +12 -0
- package/dist/ui/variants/var_button-border.d.ts +116 -0
- package/dist/ui/variants/var_button-border.js +75 -0
- package/dist/ui/variants/var_button-cta.d.ts +116 -0
- package/dist/ui/variants/var_button-cta.js +75 -0
- package/dist/ui/variants/var_button-destructive-ghost.d.ts +113 -0
- package/dist/ui/variants/var_button-destructive-ghost.js +71 -0
- package/dist/ui/variants/var_button-destructive.d.ts +116 -0
- package/dist/ui/variants/var_button-destructive.js +75 -0
- package/dist/ui/variants/var_button-fill.d.ts +116 -0
- package/dist/ui/variants/var_button-fill.js +75 -0
- package/dist/ui/variants/var_button-ghost.d.ts +113 -0
- package/dist/ui/variants/var_button-ghost.js +71 -0
- package/dist/ui/variants/var_button-glass.d.ts +84 -0
- package/dist/ui/variants/var_button-glass.js +54 -0
- package/dist/ui/variants/var_button-normal.d.ts +116 -0
- package/dist/ui/variants/var_button-normal.js +75 -0
- package/dist/ui/variants/var_button-quiet.d.ts +119 -0
- package/dist/ui/variants/var_button-quiet.js +73 -0
- package/dist/ui/variants/var_card.d.ts +30 -0
- package/dist/ui/variants/var_card.js +16 -0
- package/dist/ui/variants/var_chip.d.ts +18 -0
- package/dist/ui/variants/var_chip.js +12 -0
- package/dist/ui/variants/var_choice.d.ts +26 -0
- package/dist/ui/variants/var_choice.js +14 -0
- package/dist/ui/variants/var_framed.d.ts +11 -0
- package/dist/ui/variants/var_framed.js +9 -0
- package/dist/ui/variants/var_glyph-plain.d.ts +14 -0
- package/dist/ui/variants/var_glyph-plain.js +10 -0
- package/dist/ui/variants/var_input.d.ts +61 -0
- package/dist/ui/variants/var_input.js +42 -0
- package/dist/ui/variants/var_link-inline.d.ts +39 -0
- package/dist/ui/variants/var_link-inline.js +28 -0
- package/dist/ui/variants/var_list-row.d.ts +47 -0
- package/dist/ui/variants/var_list-row.js +33 -0
- package/dist/ui/variants/var_rule.d.ts +11 -0
- package/dist/ui/variants/var_rule.js +9 -0
- package/dist/ui/variants/var_skeleton-block.d.ts +17 -0
- package/dist/ui/variants/var_skeleton-block.js +11 -0
- package/dist/ui/variants/var_spinner-turning.d.ts +17 -0
- package/dist/ui/variants/var_spinner-turning.js +11 -0
- package/dist/ui/variants/var_stat-tile.d.ts +18 -0
- package/dist/ui/variants/var_stat-tile.js +12 -0
- package/dist/ui/variants/var_tab-bar.d.ts +24 -0
- package/dist/ui/variants/var_tab-bar.js +14 -0
- package/dist/ui/variants/var_tap-target.d.ts +33 -0
- package/dist/ui/variants/var_tap-target.js +24 -0
- package/dist/ui/variants.d.ts +174 -0
- package/dist/ui/variants.js +50 -0
- package/dist/ui/wrappers.d.ts +128 -0
- package/dist/ui/wrappers.js +220 -0
- package/package.json +16 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const CLAY: {
|
|
2
|
+
readonly id: "clay";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-surface";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "borderWidth";
|
|
8
|
+
readonly is: "edge-thin";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "borderStyle";
|
|
11
|
+
readonly is: "line-solid";
|
|
12
|
+
}, {
|
|
13
|
+
readonly property: "borderColor";
|
|
14
|
+
readonly is: "colour-edge-clay";
|
|
15
|
+
}, {
|
|
16
|
+
readonly property: "boxShadow";
|
|
17
|
+
readonly is: "shadow-2";
|
|
18
|
+
}, {
|
|
19
|
+
readonly property: "color";
|
|
20
|
+
readonly is: "colour-ink";
|
|
21
|
+
}];
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const CLAY = material({
|
|
3
|
+
id: 'clay',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-surface' },
|
|
6
|
+
{ property: 'borderWidth', is: 'edge-thin' },
|
|
7
|
+
{ property: 'borderStyle', is: 'line-solid' },
|
|
8
|
+
{ property: 'borderColor', is: 'colour-edge-clay' },
|
|
9
|
+
{ property: 'boxShadow', is: 'shadow-2' },
|
|
10
|
+
{ property: 'color', is: 'colour-ink' },
|
|
11
|
+
],
|
|
12
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const ELEVATED: {
|
|
2
|
+
readonly id: "elevated";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-surface";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "boxShadow";
|
|
8
|
+
readonly is: "shadow-2";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "color";
|
|
11
|
+
readonly is: "colour-ink";
|
|
12
|
+
}];
|
|
13
|
+
readonly states: readonly [{
|
|
14
|
+
readonly when: readonly ["hover"];
|
|
15
|
+
readonly sets: readonly [{
|
|
16
|
+
readonly property: "boxShadow";
|
|
17
|
+
readonly is: "shadow-3";
|
|
18
|
+
}];
|
|
19
|
+
}, {
|
|
20
|
+
readonly when: readonly ["active"];
|
|
21
|
+
readonly sets: readonly [{
|
|
22
|
+
readonly property: "boxShadow";
|
|
23
|
+
readonly is: "shadow-1";
|
|
24
|
+
}];
|
|
25
|
+
}, {
|
|
26
|
+
readonly when: readonly ["active", "hover"];
|
|
27
|
+
readonly sets: readonly [{
|
|
28
|
+
readonly property: "boxShadow";
|
|
29
|
+
readonly is: "shadow-1";
|
|
30
|
+
}];
|
|
31
|
+
}];
|
|
32
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const ELEVATED = material({
|
|
3
|
+
id: 'elevated',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-surface' },
|
|
6
|
+
{ property: 'boxShadow', is: 'shadow-2' },
|
|
7
|
+
{ property: 'color', is: 'colour-ink' },
|
|
8
|
+
],
|
|
9
|
+
states: [
|
|
10
|
+
{
|
|
11
|
+
when: ['hover'],
|
|
12
|
+
sets: [{ property: 'boxShadow', is: 'shadow-3' }],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
when: ['active'],
|
|
16
|
+
sets: [{ property: 'boxShadow', is: 'shadow-1' }],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
when: ['active', 'hover'],
|
|
20
|
+
sets: [{ property: 'boxShadow', is: 'shadow-1' }],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const FLAT: {
|
|
2
|
+
readonly id: "flat";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-surface";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "borderWidth";
|
|
8
|
+
readonly is: "edge-hair";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "borderStyle";
|
|
11
|
+
readonly is: "line-solid";
|
|
12
|
+
}, {
|
|
13
|
+
readonly property: "borderColor";
|
|
14
|
+
readonly is: "colour-edge-faint";
|
|
15
|
+
}, {
|
|
16
|
+
readonly property: "boxShadow";
|
|
17
|
+
readonly is: "shadow-1";
|
|
18
|
+
}, {
|
|
19
|
+
readonly property: "color";
|
|
20
|
+
readonly is: "colour-ink";
|
|
21
|
+
}];
|
|
22
|
+
readonly states: readonly [{
|
|
23
|
+
readonly when: readonly ["hover"];
|
|
24
|
+
readonly sets: readonly [{
|
|
25
|
+
readonly property: "boxShadow";
|
|
26
|
+
readonly is: "shadow-2";
|
|
27
|
+
}];
|
|
28
|
+
}, {
|
|
29
|
+
readonly when: readonly ["focus"];
|
|
30
|
+
readonly sets: readonly [{
|
|
31
|
+
readonly property: "borderColor";
|
|
32
|
+
readonly is: "colour-accent";
|
|
33
|
+
}, {
|
|
34
|
+
readonly property: "borderWidth";
|
|
35
|
+
readonly is: "edge-thick";
|
|
36
|
+
}];
|
|
37
|
+
}, {
|
|
38
|
+
readonly when: readonly ["focus", "hover"];
|
|
39
|
+
readonly sets: readonly [{
|
|
40
|
+
readonly property: "borderColor";
|
|
41
|
+
readonly is: "colour-accent";
|
|
42
|
+
}, {
|
|
43
|
+
readonly property: "borderWidth";
|
|
44
|
+
readonly is: "edge-thick";
|
|
45
|
+
}, {
|
|
46
|
+
readonly property: "boxShadow";
|
|
47
|
+
readonly is: "shadow-2";
|
|
48
|
+
}];
|
|
49
|
+
}];
|
|
50
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const FLAT = material({
|
|
3
|
+
id: 'flat',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-surface' },
|
|
6
|
+
{ property: 'borderWidth', is: 'edge-hair' },
|
|
7
|
+
{ property: 'borderStyle', is: 'line-solid' },
|
|
8
|
+
{ property: 'borderColor', is: 'colour-edge-faint' },
|
|
9
|
+
{ property: 'boxShadow', is: 'shadow-1' },
|
|
10
|
+
{ property: 'color', is: 'colour-ink' },
|
|
11
|
+
],
|
|
12
|
+
states: [
|
|
13
|
+
{
|
|
14
|
+
when: ['hover'],
|
|
15
|
+
sets: [{ property: 'boxShadow', is: 'shadow-2' }],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
when: ['focus'],
|
|
19
|
+
sets: [
|
|
20
|
+
{ property: 'borderColor', is: 'colour-accent' },
|
|
21
|
+
{ property: 'borderWidth', is: 'edge-thick' },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
when: ['focus', 'hover'],
|
|
26
|
+
sets: [
|
|
27
|
+
{ property: 'borderColor', is: 'colour-accent' },
|
|
28
|
+
{ property: 'borderWidth', is: 'edge-thick' },
|
|
29
|
+
{ property: 'boxShadow', is: 'shadow-2' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const GLASS: {
|
|
2
|
+
readonly id: "glass";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-glass";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "backdropFilter";
|
|
8
|
+
readonly is: "blur-md";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "borderWidth";
|
|
11
|
+
readonly is: "edge-hair";
|
|
12
|
+
}, {
|
|
13
|
+
readonly property: "borderStyle";
|
|
14
|
+
readonly is: "line-solid";
|
|
15
|
+
}, {
|
|
16
|
+
readonly property: "borderColor";
|
|
17
|
+
readonly is: "colour-edge-glass";
|
|
18
|
+
}, {
|
|
19
|
+
readonly property: "boxShadow";
|
|
20
|
+
readonly is: "shadow-3";
|
|
21
|
+
}, {
|
|
22
|
+
readonly property: "color";
|
|
23
|
+
readonly is: "colour-ink";
|
|
24
|
+
}];
|
|
25
|
+
readonly states: readonly [{
|
|
26
|
+
readonly when: readonly ["hover"];
|
|
27
|
+
readonly sets: readonly [{
|
|
28
|
+
readonly property: "backdropFilter";
|
|
29
|
+
readonly is: "blur-lg";
|
|
30
|
+
}];
|
|
31
|
+
}];
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const GLASS = material({
|
|
3
|
+
id: 'glass',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-glass' },
|
|
6
|
+
{ property: 'backdropFilter', is: 'blur-md' },
|
|
7
|
+
{ property: 'borderWidth', is: 'edge-hair' },
|
|
8
|
+
{ property: 'borderStyle', is: 'line-solid' },
|
|
9
|
+
{ property: 'borderColor', is: 'colour-edge-glass' },
|
|
10
|
+
{ property: 'boxShadow', is: 'shadow-3' },
|
|
11
|
+
{ property: 'color', is: 'colour-ink' },
|
|
12
|
+
],
|
|
13
|
+
states: [
|
|
14
|
+
{
|
|
15
|
+
when: ['hover'],
|
|
16
|
+
sets: [{ property: 'backdropFilter', is: 'blur-lg' }],
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const LIT: {
|
|
2
|
+
readonly id: "lit";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-surface-lit";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "borderWidth";
|
|
8
|
+
readonly is: "edge-thin";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "borderStyle";
|
|
11
|
+
readonly is: "line-solid";
|
|
12
|
+
}, {
|
|
13
|
+
readonly property: "borderColor";
|
|
14
|
+
readonly is: "colour-edge-lit";
|
|
15
|
+
}, {
|
|
16
|
+
readonly property: "boxShadow";
|
|
17
|
+
readonly is: "shadow-glow";
|
|
18
|
+
}, {
|
|
19
|
+
readonly property: "color";
|
|
20
|
+
readonly is: "colour-ink";
|
|
21
|
+
}];
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const LIT = material({
|
|
3
|
+
id: 'lit',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-surface-lit' },
|
|
6
|
+
{ property: 'borderWidth', is: 'edge-thin' },
|
|
7
|
+
{ property: 'borderStyle', is: 'line-solid' },
|
|
8
|
+
{ property: 'borderColor', is: 'colour-edge-lit' },
|
|
9
|
+
{ property: 'boxShadow', is: 'shadow-glow' },
|
|
10
|
+
{ property: 'color', is: 'colour-ink' },
|
|
11
|
+
],
|
|
12
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const MOULDED: {
|
|
2
|
+
readonly id: "moulded";
|
|
3
|
+
readonly sets: readonly [{
|
|
4
|
+
readonly property: "background";
|
|
5
|
+
readonly is: "colour-page";
|
|
6
|
+
}, {
|
|
7
|
+
readonly property: "borderStyle";
|
|
8
|
+
readonly is: "line-off";
|
|
9
|
+
}, {
|
|
10
|
+
readonly property: "boxShadow";
|
|
11
|
+
readonly is: "shadow-moulded";
|
|
12
|
+
}, {
|
|
13
|
+
readonly property: "color";
|
|
14
|
+
readonly is: "colour-ink";
|
|
15
|
+
}];
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { material } from "../material.js";
|
|
2
|
+
export const MOULDED = material({
|
|
3
|
+
id: 'moulded',
|
|
4
|
+
sets: [
|
|
5
|
+
{ property: 'background', is: 'colour-page' },
|
|
6
|
+
{ property: 'borderStyle', is: 'line-off' },
|
|
7
|
+
{ property: 'boxShadow', is: 'shadow-moulded' },
|
|
8
|
+
{ property: 'color', is: 'colour-ink' },
|
|
9
|
+
],
|
|
10
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Threaded } from '@prestack/thread/core/thread';
|
|
2
|
+
export declare const MATERIALS: {
|
|
3
|
+
readonly id: "material";
|
|
4
|
+
readonly at: "thread/ui/materials.ts";
|
|
5
|
+
readonly files: "ui/mat_*.ts";
|
|
6
|
+
readonly describes: "A combination of style guide values that gives one specific appearance, worn by any variant that names it: glass, clay, a glaze. It composes and never computes, because every value it sets is a name the style guide holds and never a raw one, which is what lets one material be worn by many variants. Each row names a file prefixed `mat_`, and that file is the material; a file under it that no row names is not a material but a file somebody wrote. An app adds its own to this same list, and a row that goes missing breaks the build, because what the framework offers is not an app’s to withdraw. These are materials and not aesthetics: Neumorphism, Claymorphism and Cyberpunk are templates, and a template is what picks a material.";
|
|
7
|
+
readonly version: 1;
|
|
8
|
+
readonly cites: readonly [{
|
|
9
|
+
readonly on: "2026-08-25";
|
|
10
|
+
readonly said: "Style guides they can be used for simple pickings that need no thinking. We can pick colours and basic effects for using the app. Materials however are for more complex and detailed work. Materials.ts is a declaration sheet, SSOT, and each row is a file, mat_";
|
|
11
|
+
}];
|
|
12
|
+
readonly declares: readonly [{
|
|
13
|
+
readonly id: "glass";
|
|
14
|
+
readonly at: "thread/ui/materials/mat_glass.ts";
|
|
15
|
+
readonly describes: "A pane you can see through, with what is behind it softened and desaturation corrected for.";
|
|
16
|
+
}, {
|
|
17
|
+
readonly id: "flat";
|
|
18
|
+
readonly at: "thread/ui/materials/mat_flat.ts";
|
|
19
|
+
readonly describes: "Paper. A plain filled panel with a hairline and almost no lift — the same tokens as glass, asked more quietly.";
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "elevated";
|
|
22
|
+
readonly at: "thread/ui/materials/mat_elevated.ts";
|
|
23
|
+
readonly describes: "Something lifted off the page, reading by its shadow rather than by any outline.";
|
|
24
|
+
}, {
|
|
25
|
+
readonly id: "bordered";
|
|
26
|
+
readonly at: "thread/ui/materials/mat_bordered.ts";
|
|
27
|
+
readonly describes: "Ink on paper — a hard outline and a shadow with no blur, offset like a stamp.";
|
|
28
|
+
}, {
|
|
29
|
+
readonly id: "moulded";
|
|
30
|
+
readonly at: "thread/ui/materials/mat_moulded.ts";
|
|
31
|
+
readonly describes: "Pressed out of the page rather than laid on it. Its fill is the page itself, and its relief is one shadow cast twice in opposite directions.";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "clay";
|
|
34
|
+
readonly at: "thread/ui/materials/mat_clay.ts";
|
|
35
|
+
readonly describes: "Something soft and inflated, lit from above — an outer shadow it sits in and an inset highlight along its top edge.";
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: "lit";
|
|
38
|
+
readonly at: "thread/ui/materials/mat_lit.ts";
|
|
39
|
+
readonly describes: "Something that emits rather than reflects. Its glow is a shadow cast from nowhere in particular, and it names no colour of its own.";
|
|
40
|
+
}, {
|
|
41
|
+
readonly id: "ceramic";
|
|
42
|
+
readonly at: "thread/ui/materials/mat_ceramic.ts";
|
|
43
|
+
readonly describes: "A glazed surface with the light falling down its face. The one material that asks for a gradient rather than a fill.";
|
|
44
|
+
}];
|
|
45
|
+
};
|
|
46
|
+
export declare function nameOf(id: string): string;
|
|
47
|
+
export declare function seeds(rows: readonly Threaded[], held: (at: string) => boolean): readonly {
|
|
48
|
+
readonly path: string;
|
|
49
|
+
readonly content: string;
|
|
50
|
+
}[];
|
|
51
|
+
export declare function mismatched(rows: readonly Threaded[], loader: (row: Threaded) => Promise<{
|
|
52
|
+
readonly id?: string;
|
|
53
|
+
} | undefined>): Promise<readonly string[]>;
|
|
54
|
+
export declare function orphaned(rows: readonly Threaded[], strays: readonly string[]): readonly string[];
|
|
55
|
+
export declare function unguarded(rows: readonly Threaded[], read: (at: string) => string): readonly string[];
|
|
56
|
+
export declare function guarding(source: string): string | undefined;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
|
+
import { basename, dirname, join } from 'node:path';
|
|
11
|
+
import { argv, stdout } from 'node:process';
|
|
12
|
+
import { pathToFileURL } from 'node:url';
|
|
13
|
+
import { exit, invoked } from "@prestack/thread/core/invoked";
|
|
14
|
+
import { findTree, inTree, strayFiles } from "@prestack/thread/core/tree";
|
|
15
|
+
export const MATERIALS = {
|
|
16
|
+
id: 'material',
|
|
17
|
+
at: 'thread/ui/materials.ts',
|
|
18
|
+
files: 'ui/mat_*.ts',
|
|
19
|
+
describes: 'A combination of style guide values that gives one specific appearance, worn by any variant that names it: glass, clay, a glaze. It composes and never computes, because every value it sets is a name the style guide holds and never a raw one, which is what lets one material be worn by many variants. Each row names a file prefixed `mat_`, and that file is the material; a file under it that no row names is not a material but a file somebody wrote. An app adds its own to this same list, and a row that goes missing breaks the build, because what the framework offers is not an app’s to withdraw. These are materials and not aesthetics: Neumorphism, Claymorphism and Cyberpunk are templates, and a template is what picks a material.',
|
|
20
|
+
version: 1,
|
|
21
|
+
cites: [
|
|
22
|
+
{
|
|
23
|
+
on: '2026-08-25',
|
|
24
|
+
said: 'Style guides they can be used for simple pickings that need no thinking. We can pick colours and basic effects for using the app. Materials however are for more complex and detailed work. Materials.ts is a declaration sheet, SSOT, and each row is a file, mat_',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
declares: [
|
|
28
|
+
{ id: 'glass', at: 'thread/ui/materials/mat_glass.ts', describes: 'A pane you can see through, with what is behind it softened and desaturation corrected for.' },
|
|
29
|
+
{ id: 'flat', at: 'thread/ui/materials/mat_flat.ts', describes: 'Paper. A plain filled panel with a hairline and almost no lift — the same tokens as glass, asked more quietly.' },
|
|
30
|
+
{ id: 'elevated', at: 'thread/ui/materials/mat_elevated.ts', describes: 'Something lifted off the page, reading by its shadow rather than by any outline.' },
|
|
31
|
+
{ id: 'bordered', at: 'thread/ui/materials/mat_bordered.ts', describes: 'Ink on paper — a hard outline and a shadow with no blur, offset like a stamp.' },
|
|
32
|
+
{ id: 'moulded', at: 'thread/ui/materials/mat_moulded.ts', describes: 'Pressed out of the page rather than laid on it. Its fill is the page itself, and its relief is one shadow cast twice in opposite directions.' },
|
|
33
|
+
{ id: 'clay', at: 'thread/ui/materials/mat_clay.ts', describes: 'Something soft and inflated, lit from above — an outer shadow it sits in and an inset highlight along its top edge.' },
|
|
34
|
+
{ id: 'lit', at: 'thread/ui/materials/mat_lit.ts', describes: 'Something that emits rather than reflects. Its glow is a shadow cast from nowhere in particular, and it names no colour of its own.' },
|
|
35
|
+
{ id: 'ceramic', at: 'thread/ui/materials/mat_ceramic.ts', describes: 'A glazed surface with the light falling down its face. The one material that asks for a gradient rather than a fill.' },
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
export function nameOf(id) {
|
|
39
|
+
return id.replace(/-/g, '_').toUpperCase();
|
|
40
|
+
}
|
|
41
|
+
function starter(row) {
|
|
42
|
+
const name = nameOf(row.id);
|
|
43
|
+
return `import { material } from './material.ts'
|
|
44
|
+
|
|
45
|
+
export const ${name} = material({
|
|
46
|
+
id: '${row.id}',
|
|
47
|
+
sets: [],
|
|
48
|
+
} as const)
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
export function seeds(rows, held) {
|
|
52
|
+
return rows.filter((row) => !held(row.at)).map((row) => ({ path: row.at, content: starter(row) }));
|
|
53
|
+
}
|
|
54
|
+
export async function mismatched(rows, loader) {
|
|
55
|
+
const found = [];
|
|
56
|
+
for (const row of rows) {
|
|
57
|
+
const material = await loader(row);
|
|
58
|
+
if (material === undefined) {
|
|
59
|
+
found.push(`\`${row.id}\` is declared at \`${row.at}\`, and that file exports no \`${nameOf(row.id)}\`. ` +
|
|
60
|
+
'A row names a file, and the file is the thing.');
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (material.id !== row.id) {
|
|
64
|
+
found.push(`\`${row.at}\` declares itself \`${String(material.id)}\`, and the row that names it calls it \`${row.id}\`. ` +
|
|
65
|
+
"A material file and the row that names it have to be the same material — make the file's `id` match the row, or fix the row.");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return found;
|
|
69
|
+
}
|
|
70
|
+
function extensionOf(path) {
|
|
71
|
+
const name = basename(path);
|
|
72
|
+
const at = name.lastIndexOf('.');
|
|
73
|
+
return at === -1 ? '' : name.slice(at);
|
|
74
|
+
}
|
|
75
|
+
const MAT_PREFIX = /^mat_/;
|
|
76
|
+
export function orphaned(rows, strays) {
|
|
77
|
+
const named = new Set(rows.map((row) => row.at));
|
|
78
|
+
return strays
|
|
79
|
+
.filter((one) => !named.has(one))
|
|
80
|
+
.map((one) => `\`${one}\` is under materials and no row names it — not a material, a file somebody wrote. ` +
|
|
81
|
+
'Add a row for it, or delete the file.');
|
|
82
|
+
}
|
|
83
|
+
const GUARDED = /=\s*material\s*\(/;
|
|
84
|
+
const TYPED = /import type \{ Material \} from '([^']*)'/;
|
|
85
|
+
const OPENS = /export const ([A-Z0-9_]+) = \{/;
|
|
86
|
+
const CLOSES = /\} as const satisfies Material/;
|
|
87
|
+
export function unguarded(rows, read) {
|
|
88
|
+
return rows
|
|
89
|
+
.filter((row) => !GUARDED.test(read(row.at)))
|
|
90
|
+
.map((row) => `\`${row.at}\` declares \`${row.id}\` with \`satisfies Material\`, which accepts a value no ` +
|
|
91
|
+
'row holds — `satisfies` checks against `string`, so `8px` and `var(--x)` compile. Run ' +
|
|
92
|
+
'`thread materials` and it rewrites the two lines that wrap the declaration, leaving what is ' +
|
|
93
|
+
'between them alone.');
|
|
94
|
+
}
|
|
95
|
+
export function guarding(source) {
|
|
96
|
+
if (GUARDED.test(source))
|
|
97
|
+
return undefined;
|
|
98
|
+
const typed = TYPED.exec(source);
|
|
99
|
+
const opens = OPENS.exec(source);
|
|
100
|
+
if (typed === null || opens === null || !CLOSES.test(source))
|
|
101
|
+
return undefined;
|
|
102
|
+
return source
|
|
103
|
+
.replace(typed[0], `import { material } from '${typed[1] ?? ''}'`)
|
|
104
|
+
.replace(opens[0], `export const ${opens[1] ?? ''} = material({`)
|
|
105
|
+
.replace(CLOSES, '} as const)');
|
|
106
|
+
}
|
|
107
|
+
async function run() {
|
|
108
|
+
const tree = findTree();
|
|
109
|
+
const at = inTree(tree, 'materials.ts');
|
|
110
|
+
if (!existsSync(at)) {
|
|
111
|
+
stdout.write(`thread: this tree has no ${tree.name}/${basename(at)}, so it declares no material and there is nothing to seed or check.\n`);
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
const held = (await import(__rewriteRelativeImportExtension(pathToFileURL(at).href)));
|
|
115
|
+
if (held.MATERIAL === undefined) {
|
|
116
|
+
stdout.write(`thread: ${tree.name}/materials.ts exports no \`MATERIAL\`, so nothing declares a material here.\n`);
|
|
117
|
+
return 1;
|
|
118
|
+
}
|
|
119
|
+
const rows = held.MATERIAL.declares ?? [];
|
|
120
|
+
const checking = argv.includes('--check');
|
|
121
|
+
const exists = (where) => existsSync(join(tree.at, where));
|
|
122
|
+
const made = seeds(rows, exists);
|
|
123
|
+
if (checking) {
|
|
124
|
+
const unseeded = rows.find((row) => !exists(row.at));
|
|
125
|
+
if (unseeded !== undefined) {
|
|
126
|
+
stdout.write(`thread: \`${unseeded.id}\` is declared at \`${unseeded.at}\`, and the file is not there yet. ` +
|
|
127
|
+
'A row names a file, and `--check` never writes one — run `thread materials` and commit what it seeds.\n');
|
|
128
|
+
return 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
for (const one of made) {
|
|
133
|
+
mkdirSync(dirname(join(tree.at, one.path)), { recursive: true });
|
|
134
|
+
writeFileSync(join(tree.at, one.path), one.content, 'utf8');
|
|
135
|
+
stdout.write(`thread: seeded ${one.path}\n`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const wrong = (await mismatched(rows, async (row) => {
|
|
139
|
+
const module = (await import(__rewriteRelativeImportExtension(pathToFileURL(join(tree.at, row.at)).href)));
|
|
140
|
+
return module[nameOf(row.id)];
|
|
141
|
+
}))[0];
|
|
142
|
+
if (wrong !== undefined) {
|
|
143
|
+
stdout.write(`thread: ${wrong}\n`);
|
|
144
|
+
return 1;
|
|
145
|
+
}
|
|
146
|
+
const read = (at) => readFileSync(join(tree.at, at), 'utf8');
|
|
147
|
+
if (checking) {
|
|
148
|
+
const loose = unguarded(rows, read)[0];
|
|
149
|
+
if (loose !== undefined) {
|
|
150
|
+
stdout.write(`thread: ${loose}\n`);
|
|
151
|
+
return 1;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
for (const row of rows) {
|
|
156
|
+
const written = guarding(read(row.at));
|
|
157
|
+
if (written === undefined)
|
|
158
|
+
continue;
|
|
159
|
+
writeFileSync(join(tree.at, row.at), written, 'utf8');
|
|
160
|
+
stdout.write(`thread: ${row.at} now declares through \`material(...)\`\n`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const stray = orphaned(rows, strayFiles(tree.at, 'mat_', '.' + 'ts'))[0];
|
|
164
|
+
if (stray !== undefined) {
|
|
165
|
+
stdout.write(`thread: ${stray}\n`);
|
|
166
|
+
return 1;
|
|
167
|
+
}
|
|
168
|
+
stdout.write(checking
|
|
169
|
+
? `thread: ${String(rows.length)} material(s) declared, all seeded\n`
|
|
170
|
+
: `thread: ${String(rows.length)} material(s) declared, ${String(made.length)} seeded, ` +
|
|
171
|
+
`${String(rows.length - made.length)} already written\n`);
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
174
|
+
if (invoked(import.meta.url))
|
|
175
|
+
exit(await run());
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Threaded } from '@prestack/thread/core/thread';
|
|
2
|
+
export declare const holds: readonly [Omit<Threaded, "at"> & {
|
|
3
|
+
readonly id: "dark";
|
|
4
|
+
readonly is: string;
|
|
5
|
+
}, Omit<Threaded, "at"> & {
|
|
6
|
+
readonly id: "light";
|
|
7
|
+
readonly is: string;
|
|
8
|
+
}];
|
|
9
|
+
export declare const MODES: {
|
|
10
|
+
readonly id: "mode";
|
|
11
|
+
readonly at: "thread/ui/modes.ts";
|
|
12
|
+
readonly describes: "Every way a reader’s own device can ask for a different look, and the query that answers it. A mode is chosen for the app rather than by it, which is what tells it from a theme — and a theme has its own modes, so the two are dimensions rather than one list. A mode changes what the variables hold, never what a material or a variant says.";
|
|
13
|
+
readonly version: 1;
|
|
14
|
+
readonly cites: {
|
|
15
|
+
on: string;
|
|
16
|
+
said: string;
|
|
17
|
+
}[];
|
|
18
|
+
readonly holds: readonly [Omit<Threaded, "at"> & {
|
|
19
|
+
readonly id: "dark";
|
|
20
|
+
readonly is: string;
|
|
21
|
+
}, Omit<Threaded, "at"> & {
|
|
22
|
+
readonly id: "light";
|
|
23
|
+
readonly is: string;
|
|
24
|
+
}];
|
|
25
|
+
};
|
package/dist/ui/modes.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const here = 'thread/ui/modes.ts';
|
|
2
|
+
const said = [
|
|
3
|
+
{
|
|
4
|
+
on: '2026-08-25',
|
|
5
|
+
said: 'themes can have dark and light modes too. So they are not at all the same.',
|
|
6
|
+
},
|
|
7
|
+
];
|
|
8
|
+
const one = (id, is, describes) => ({
|
|
9
|
+
id,
|
|
10
|
+
is,
|
|
11
|
+
describes,
|
|
12
|
+
version: 1,
|
|
13
|
+
});
|
|
14
|
+
export const holds = [
|
|
15
|
+
one('dark', '(prefers-color-scheme: dark)', 'The reader has asked their device for a dark interface. Nothing about the app chooses this and nothing about the app can override it.'),
|
|
16
|
+
one('light', '(prefers-color-scheme: light)', 'The reader has asked their device for a light interface. Stated rather than assumed, because the resting values are not the same thing as an answer to the question.'),
|
|
17
|
+
];
|
|
18
|
+
export const MODES = {
|
|
19
|
+
id: 'mode',
|
|
20
|
+
at: here,
|
|
21
|
+
describes: 'Every way a reader’s own device can ask for a different look, and the query that answers it. A mode is chosen for the app rather than by it, which is what tells it from a theme — and a theme has its own modes, so the two are dimensions rather than one list. A mode changes what the variables hold, never what a material or a variant says.',
|
|
22
|
+
version: 1,
|
|
23
|
+
cites: said,
|
|
24
|
+
holds,
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
export function trailTo(map, to) {
|
|
3
|
+
const entries = map.screens.filter((s) => s.entry).map((s) => s.id);
|
|
4
|
+
if (entries.includes(to))
|
|
5
|
+
return [to];
|
|
6
|
+
const seen = new Set(entries);
|
|
7
|
+
let frontier = entries.map((id) => [id]);
|
|
8
|
+
while (frontier.length > 0) {
|
|
9
|
+
const next = [];
|
|
10
|
+
for (const path of frontier) {
|
|
11
|
+
const here = path[path.length - 1];
|
|
12
|
+
for (const link of map.links.filter((l) => l.from === here)) {
|
|
13
|
+
if (link.to === to)
|
|
14
|
+
return [...path, link.to];
|
|
15
|
+
if (seen.has(link.to))
|
|
16
|
+
continue;
|
|
17
|
+
seen.add(link.to);
|
|
18
|
+
next.push([...path, link.to]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
frontier = next;
|
|
22
|
+
}
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Placement, type Platform } from '@floating-ui/dom';
|
|
2
|
+
import { useFloating } from '@floating-ui/react-dom';
|
|
3
|
+
import type { RefObject } from 'react';
|
|
4
|
+
export interface AnchorOptions {
|
|
5
|
+
readonly placement?: Placement;
|
|
6
|
+
readonly gap?: number;
|
|
7
|
+
readonly padding?: number;
|
|
8
|
+
readonly arrowRef?: RefObject<HTMLElement | null>;
|
|
9
|
+
}
|
|
10
|
+
export interface Position {
|
|
11
|
+
readonly x: number;
|
|
12
|
+
readonly y: number;
|
|
13
|
+
readonly placement: Placement;
|
|
14
|
+
readonly maxWidth?: number;
|
|
15
|
+
readonly maxHeight?: number;
|
|
16
|
+
readonly arrow?: {
|
|
17
|
+
readonly x?: number;
|
|
18
|
+
readonly y?: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare function positionOf(reference: Element, floating: HTMLElement, options?: AnchorOptions & {
|
|
22
|
+
readonly platform?: Platform;
|
|
23
|
+
}): Promise<Position>;
|
|
24
|
+
export declare function useAnchored(options?: AnchorOptions): ReturnType<typeof useFloating>;
|