@flyingrobots/bijou 7.0.0 → 7.2.0
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/README.md +2 -0
- package/dist/adapters/test/assertions.d.ts.map +1 -1
- package/dist/adapters/test/assertions.js +3 -2
- package/dist/adapters/test/assertions.js.map +1 -1
- package/dist/adapters/test/audit-style.d.ts.map +1 -1
- package/dist/adapters/test/audit-style.js +7 -4
- package/dist/adapters/test/audit-style.js.map +1 -1
- package/dist/adapters/test/clock.d.ts +2 -35
- package/dist/adapters/test/clock.d.ts.map +1 -1
- package/dist/adapters/test/clock.js +1 -131
- package/dist/adapters/test/clock.js.map +1 -1
- package/dist/adapters/test/clock.part01.d.ts +29 -0
- package/dist/adapters/test/clock.part01.d.ts.map +1 -0
- package/dist/adapters/test/clock.part01.js +6 -0
- package/dist/adapters/test/clock.part01.js.map +1 -0
- package/dist/adapters/test/clock.part02.d.ts +3 -0
- package/dist/adapters/test/clock.part02.d.ts.map +1 -0
- package/dist/adapters/test/clock.part02.js +123 -0
- package/dist/adapters/test/clock.part02.js.map +1 -0
- package/dist/adapters/test/fixtures.d.ts +3 -3
- package/dist/adapters/test/fixtures.d.ts.map +1 -1
- package/dist/adapters/test/fixtures.js +7 -4
- package/dist/adapters/test/fixtures.js.map +1 -1
- package/dist/adapters/test/index.d.ts +3 -0
- package/dist/adapters/test/index.d.ts.map +1 -1
- package/dist/adapters/test/index.js +5 -0
- package/dist/adapters/test/index.js.map +1 -1
- package/dist/adapters/test/io.d.ts +2 -48
- package/dist/adapters/test/io.d.ts.map +1 -1
- package/dist/adapters/test/io.js +1 -146
- package/dist/adapters/test/io.js.map +1 -1
- package/dist/adapters/test/io.part01.d.ts +29 -0
- package/dist/adapters/test/io.part01.d.ts.map +1 -0
- package/dist/adapters/test/io.part01.js +2 -0
- package/dist/adapters/test/io.part01.js.map +1 -0
- package/dist/adapters/test/io.part02.d.ts +3 -0
- package/dist/adapters/test/io.part02.d.ts.map +1 -0
- package/dist/adapters/test/io.part02.js +136 -0
- package/dist/adapters/test/io.part02.js.map +1 -0
- package/dist/core/active-binding-collection.d.ts.map +1 -1
- package/dist/core/active-binding-collection.js +61 -45
- package/dist/core/active-binding-collection.js.map +1 -1
- package/dist/core/ansi.d.ts +4 -0
- package/dist/core/ansi.d.ts.map +1 -1
- package/dist/core/ansi.js +7 -0
- package/dist/core/ansi.js.map +1 -1
- package/dist/core/app-shell-composition.js +7 -5
- package/dist/core/app-shell-composition.js.map +1 -1
- package/dist/core/bg-fill.d.ts.map +1 -1
- package/dist/core/bg-fill.js +5 -4
- package/dist/core/bg-fill.js.map +1 -1
- package/dist/core/binding-frame-update.js +8 -10
- package/dist/core/binding-frame-update.js.map +1 -1
- package/dist/core/binding-lifecycle.d.ts +3 -64
- package/dist/core/binding-lifecycle.d.ts.map +1 -1
- package/dist/core/binding-lifecycle.js +2 -356
- package/dist/core/binding-lifecycle.js.map +1 -1
- package/dist/core/binding-lifecycle.part01.d.ts +63 -0
- package/dist/core/binding-lifecycle.part01.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part01.js +30 -0
- package/dist/core/binding-lifecycle.part01.js.map +1 -0
- package/dist/core/binding-lifecycle.part02.d.ts +6 -0
- package/dist/core/binding-lifecycle.part02.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part02.js +77 -0
- package/dist/core/binding-lifecycle.part02.js.map +1 -0
- package/dist/core/binding-lifecycle.part03.d.ts +6 -0
- package/dist/core/binding-lifecycle.part03.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part03.js +67 -0
- package/dist/core/binding-lifecycle.part03.js.map +1 -0
- package/dist/core/binding-lifecycle.part04.d.ts +8 -0
- package/dist/core/binding-lifecycle.part04.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part04.js +71 -0
- package/dist/core/binding-lifecycle.part04.js.map +1 -0
- package/dist/core/binding-lifecycle.part05.d.ts +6 -0
- package/dist/core/binding-lifecycle.part05.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part05.js +73 -0
- package/dist/core/binding-lifecycle.part05.js.map +1 -0
- package/dist/core/binding-lifecycle.part06.d.ts +20 -0
- package/dist/core/binding-lifecycle.part06.d.ts.map +1 -0
- package/dist/core/binding-lifecycle.part06.js +64 -0
- package/dist/core/binding-lifecycle.part06.js.map +1 -0
- package/dist/core/binding.d.ts +9 -191
- package/dist/core/binding.d.ts.map +1 -1
- package/dist/core/binding.js +7 -586
- package/dist/core/binding.js.map +1 -1
- package/dist/core/binding.part01.d.ts +92 -0
- package/dist/core/binding.part01.d.ts.map +1 -0
- package/dist/core/binding.part01.js +10 -0
- package/dist/core/binding.part01.js.map +1 -0
- package/dist/core/binding.part02.d.ts +50 -0
- package/dist/core/binding.part02.d.ts.map +1 -0
- package/dist/core/binding.part02.js +17 -0
- package/dist/core/binding.part02.js.map +1 -0
- package/dist/core/binding.part03.d.ts +18 -0
- package/dist/core/binding.part03.d.ts.map +1 -0
- package/dist/core/binding.part03.js +70 -0
- package/dist/core/binding.part03.js.map +1 -0
- package/dist/core/binding.part04.d.ts +17 -0
- package/dist/core/binding.part04.d.ts.map +1 -0
- package/dist/core/binding.part04.js +57 -0
- package/dist/core/binding.part04.js.map +1 -0
- package/dist/core/binding.part05.d.ts +15 -0
- package/dist/core/binding.part05.d.ts.map +1 -0
- package/dist/core/binding.part05.js +78 -0
- package/dist/core/binding.part05.js.map +1 -0
- package/dist/core/binding.part06.d.ts +10 -0
- package/dist/core/binding.part06.d.ts.map +1 -0
- package/dist/core/binding.part06.js +48 -0
- package/dist/core/binding.part06.js.map +1 -0
- package/dist/core/binding.part07.d.ts +9 -0
- package/dist/core/binding.part07.d.ts.map +1 -0
- package/dist/core/binding.part07.js +83 -0
- package/dist/core/binding.part07.js.map +1 -0
- package/dist/core/binding.part08.d.ts +4 -0
- package/dist/core/binding.part08.d.ts.map +1 -0
- package/dist/core/binding.part08.js +81 -0
- package/dist/core/binding.part08.js.map +1 -0
- package/dist/core/binding.part09.d.ts +23 -0
- package/dist/core/binding.part09.d.ts.map +1 -0
- package/dist/core/binding.part09.js +76 -0
- package/dist/core/binding.part09.js.map +1 -0
- package/dist/core/binding.part10.d.ts +8 -0
- package/dist/core/binding.part10.d.ts.map +1 -0
- package/dist/core/binding.part10.js +84 -0
- package/dist/core/binding.part10.js.map +1 -0
- package/dist/core/binding.part11.d.ts +6 -0
- package/dist/core/binding.part11.d.ts.map +1 -0
- package/dist/core/binding.part11.js +27 -0
- package/dist/core/binding.part11.js.map +1 -0
- package/dist/core/block-metadata.d.ts +5 -112
- package/dist/core/block-metadata.d.ts.map +1 -1
- package/dist/core/block-metadata.js +3 -375
- package/dist/core/block-metadata.js.map +1 -1
- package/dist/core/block-metadata.part01.d.ts +76 -0
- package/dist/core/block-metadata.part01.d.ts.map +1 -0
- package/dist/core/block-metadata.part01.js +2 -0
- package/dist/core/block-metadata.part01.js.map +1 -0
- package/dist/core/block-metadata.part02.d.ts +37 -0
- package/dist/core/block-metadata.part02.d.ts.map +1 -0
- package/dist/core/block-metadata.part02.js +59 -0
- package/dist/core/block-metadata.part02.js.map +1 -0
- package/dist/core/block-metadata.part03.d.ts +11 -0
- package/dist/core/block-metadata.part03.d.ts.map +1 -0
- package/dist/core/block-metadata.part03.js +81 -0
- package/dist/core/block-metadata.part03.js.map +1 -0
- package/dist/core/block-metadata.part04.d.ts +8 -0
- package/dist/core/block-metadata.part04.d.ts.map +1 -0
- package/dist/core/block-metadata.part04.js +73 -0
- package/dist/core/block-metadata.part04.js.map +1 -0
- package/dist/core/block-metadata.part05.d.ts +7 -0
- package/dist/core/block-metadata.part05.d.ts.map +1 -0
- package/dist/core/block-metadata.part05.js +64 -0
- package/dist/core/block-metadata.part05.js.map +1 -0
- package/dist/core/block-metadata.part06.d.ts +11 -0
- package/dist/core/block-metadata.part06.d.ts.map +1 -0
- package/dist/core/block-metadata.part06.js +72 -0
- package/dist/core/block-metadata.part06.js.map +1 -0
- package/dist/core/block-metadata.part07.d.ts +9 -0
- package/dist/core/block-metadata.part07.d.ts.map +1 -0
- package/dist/core/block-metadata.part07.js +49 -0
- package/dist/core/block-metadata.part07.js.map +1 -0
- package/dist/core/block-tree-render.js +7 -8
- package/dist/core/block-tree-render.js.map +1 -1
- package/dist/core/clock.d.ts.map +1 -1
- package/dist/core/clock.js +8 -1
- package/dist/core/clock.js.map +1 -1
- package/dist/core/component-metadata.d.ts +3 -62
- package/dist/core/component-metadata.d.ts.map +1 -1
- package/dist/core/component-metadata.js +2 -157
- package/dist/core/component-metadata.js.map +1 -1
- package/dist/core/component-metadata.part01.d.ts +63 -0
- package/dist/core/component-metadata.part01.d.ts.map +1 -0
- package/dist/core/component-metadata.part01.js +31 -0
- package/dist/core/component-metadata.part01.js.map +1 -0
- package/dist/core/component-metadata.part02.d.ts +9 -0
- package/dist/core/component-metadata.part02.d.ts.map +1 -0
- package/dist/core/component-metadata.part02.js +77 -0
- package/dist/core/component-metadata.part02.js.map +1 -0
- package/dist/core/component-metadata.part03.d.ts +12 -0
- package/dist/core/component-metadata.part03.d.ts.map +1 -0
- package/dist/core/component-metadata.part03.js +55 -0
- package/dist/core/component-metadata.part03.js.map +1 -0
- package/dist/core/components/alert.d.ts +1 -1
- package/dist/core/components/alert.d.ts.map +1 -1
- package/dist/core/components/alert.js.map +1 -1
- package/dist/core/components/badge.d.ts.map +1 -1
- package/dist/core/components/badge.js +9 -7
- package/dist/core/components/badge.js.map +1 -1
- package/dist/core/components/box-v3.d.ts.map +1 -1
- package/dist/core/components/box-v3.js +10 -10
- package/dist/core/components/box-v3.js.map +1 -1
- package/dist/core/components/box.d.ts +2 -2
- package/dist/core/components/box.d.ts.map +1 -1
- package/dist/core/components/box.js.map +1 -1
- package/dist/core/components/braille-chart.d.ts.map +1 -1
- package/dist/core/components/braille-chart.js +9 -2
- package/dist/core/components/braille-chart.js.map +1 -1
- package/dist/core/components/constrain.d.ts +1 -1
- package/dist/core/components/constrain.d.ts.map +1 -1
- package/dist/core/components/constrain.js.map +1 -1
- package/dist/core/components/cursor-guard.d.ts +1 -0
- package/dist/core/components/cursor-guard.d.ts.map +1 -1
- package/dist/core/components/cursor-guard.js +2 -18
- package/dist/core/components/cursor-guard.js.map +1 -1
- package/dist/core/components/dag-edges.d.ts.map +1 -1
- package/dist/core/components/dag-edges.js +5 -3
- package/dist/core/components/dag-edges.js.map +1 -1
- package/dist/core/components/dag-layout.d.ts.map +1 -1
- package/dist/core/components/dag-layout.js +19 -19
- package/dist/core/components/dag-layout.js.map +1 -1
- package/dist/core/components/dag-render.d.ts.map +1 -1
- package/dist/core/components/dag-render.js +23 -27
- package/dist/core/components/dag-render.js.map +1 -1
- package/dist/core/components/dag-source.d.ts.map +1 -1
- package/dist/core/components/dag-source.js +23 -29
- package/dist/core/components/dag-source.js.map +1 -1
- package/dist/core/components/dag-stats-types.d.ts +16 -0
- package/dist/core/components/dag-stats-types.d.ts.map +1 -0
- package/dist/core/components/dag-stats-types.js +2 -0
- package/dist/core/components/dag-stats-types.js.map +1 -0
- package/dist/core/components/dag-stats.d.ts +3 -17
- package/dist/core/components/dag-stats.d.ts.map +1 -1
- package/dist/core/components/dag-stats.js +25 -2
- package/dist/core/components/dag-stats.js.map +1 -1
- package/dist/core/components/dag.d.ts +2 -148
- package/dist/core/components/dag.d.ts.map +1 -1
- package/dist/core/components/dag.js +1 -40
- package/dist/core/components/dag.js.map +1 -1
- package/dist/core/components/dag.part01.d.ts +78 -0
- package/dist/core/components/dag.part01.d.ts.map +1 -0
- package/dist/core/components/dag.part01.js +2 -0
- package/dist/core/components/dag.part01.js.map +1 -0
- package/dist/core/components/dag.part02.d.ts +7 -0
- package/dist/core/components/dag.part02.d.ts.map +1 -0
- package/dist/core/components/dag.part02.js +41 -0
- package/dist/core/components/dag.part02.js.map +1 -0
- package/dist/core/components/data-viz-utils.d.ts.map +1 -1
- package/dist/core/components/data-viz-utils.js +17 -16
- package/dist/core/components/data-viz-utils.js.map +1 -1
- package/dist/core/components/enumerated-list.d.ts.map +1 -1
- package/dist/core/components/enumerated-list.js +15 -19
- package/dist/core/components/enumerated-list.js.map +1 -1
- package/dist/core/components/explainability.js +1 -1
- package/dist/core/components/explainability.js.map +1 -1
- package/dist/core/components/hyperlink.js +2 -2
- package/dist/core/components/hyperlink.js.map +1 -1
- package/dist/core/components/index.d.ts.map +1 -1
- package/dist/core/components/index.js.map +1 -1
- package/dist/core/components/inspector-types.d.ts +40 -0
- package/dist/core/components/inspector-types.d.ts.map +1 -0
- package/dist/core/components/inspector-types.js +2 -0
- package/dist/core/components/inspector-types.js.map +1 -0
- package/dist/core/components/inspector.d.ts +2 -39
- package/dist/core/components/inspector.d.ts.map +1 -1
- package/dist/core/components/inspector.js.map +1 -1
- package/dist/core/components/inspector.test-style.d.ts +3 -0
- package/dist/core/components/inspector.test-style.d.ts.map +1 -0
- package/dist/core/components/inspector.test-style.js +52 -0
- package/dist/core/components/inspector.test-style.js.map +1 -0
- package/dist/core/components/log.d.ts.map +1 -1
- package/dist/core/components/log.js.map +1 -1
- package/dist/core/components/logo.d.ts +2 -0
- package/dist/core/components/logo.d.ts.map +1 -1
- package/dist/core/components/logo.js +2 -1
- package/dist/core/components/logo.js.map +1 -1
- package/dist/core/components/markdown-parse.d.ts.map +1 -1
- package/dist/core/components/markdown-parse.js +26 -33
- package/dist/core/components/markdown-parse.js.map +1 -1
- package/dist/core/components/markdown-render.d.ts +0 -16
- package/dist/core/components/markdown-render.d.ts.map +1 -1
- package/dist/core/components/markdown-render.js +24 -37
- package/dist/core/components/markdown-render.js.map +1 -1
- package/dist/core/components/markdown.d.ts +1 -1
- package/dist/core/components/markdown.d.ts.map +1 -1
- package/dist/core/components/markdown.js.map +1 -1
- package/dist/core/components/paginator.d.ts.map +1 -1
- package/dist/core/components/paginator.js +5 -3
- package/dist/core/components/paginator.js.map +1 -1
- package/dist/core/components/perf-overlay.js +1 -1
- package/dist/core/components/perf-overlay.js.map +1 -1
- package/dist/core/components/preference-list.d.ts.map +1 -1
- package/dist/core/components/preference-list.js +26 -25
- package/dist/core/components/preference-list.js.map +1 -1
- package/dist/core/components/progress.d.ts +1 -2
- package/dist/core/components/progress.d.ts.map +1 -1
- package/dist/core/components/progress.js +4 -3
- package/dist/core/components/progress.js.map +1 -1
- package/dist/core/components/separator-v3.d.ts.map +1 -1
- package/dist/core/components/separator-v3.js +8 -6
- package/dist/core/components/separator-v3.js.map +1 -1
- package/dist/core/components/sparkline.d.ts.map +1 -1
- package/dist/core/components/sparkline.js +5 -6
- package/dist/core/components/sparkline.js.map +1 -1
- package/dist/core/components/stats-panel.js +2 -2
- package/dist/core/components/stats-panel.js.map +1 -1
- package/dist/core/components/stepper.js +1 -1
- package/dist/core/components/stepper.js.map +1 -1
- package/dist/core/components/surface-text.d.ts.map +1 -1
- package/dist/core/components/surface-text.js +9 -11
- package/dist/core/components/surface-text.js.map +1 -1
- package/dist/core/components/table-v3.js +20 -23
- package/dist/core/components/table-v3.js.map +1 -1
- package/dist/core/components/table.d.ts +2 -2
- package/dist/core/components/table.d.ts.map +1 -1
- package/dist/core/components/table.js +35 -38
- package/dist/core/components/table.js.map +1 -1
- package/dist/core/components/tabs.js +1 -1
- package/dist/core/components/tabs.js.map +1 -1
- package/dist/core/components/timeline.js.map +1 -1
- package/dist/core/components/timer.js +3 -3
- package/dist/core/components/timer.js.map +1 -1
- package/dist/core/components/tree.js +1 -1
- package/dist/core/components/tree.js.map +1 -1
- package/dist/core/detect/tty.js +3 -2
- package/dist/core/detect/tty.js.map +1 -1
- package/dist/core/forms/filter-interactive.d.ts.map +1 -1
- package/dist/core/forms/filter-interactive.js +8 -8
- package/dist/core/forms/filter-interactive.js.map +1 -1
- package/dist/core/forms/filter.js +7 -2
- package/dist/core/forms/filter.js.map +1 -1
- package/dist/core/forms/form-utils.d.ts +3 -155
- package/dist/core/forms/form-utils.d.ts.map +1 -1
- package/dist/core/forms/form-utils.js +2 -231
- package/dist/core/forms/form-utils.js.map +1 -1
- package/dist/core/forms/form-utils.part01.d.ts +30 -0
- package/dist/core/forms/form-utils.part01.d.ts.map +1 -0
- package/dist/core/forms/form-utils.part01.js +86 -0
- package/dist/core/forms/form-utils.part01.js.map +1 -0
- package/dist/core/forms/form-utils.part02.d.ts +6 -0
- package/dist/core/forms/form-utils.part02.d.ts.map +1 -0
- package/dist/core/forms/form-utils.part02.js +27 -0
- package/dist/core/forms/form-utils.part02.js.map +1 -0
- package/dist/core/forms/group.d.ts.map +1 -1
- package/dist/core/forms/group.js +5 -0
- package/dist/core/forms/group.js.map +1 -1
- package/dist/core/forms/input.js +1 -1
- package/dist/core/forms/input.js.map +1 -1
- package/dist/core/forms/multiselect.js +11 -23
- package/dist/core/forms/multiselect.js.map +1 -1
- package/dist/core/forms/note.d.ts.map +1 -1
- package/dist/core/forms/note.js +2 -1
- package/dist/core/forms/note.js.map +1 -1
- package/dist/core/forms/select-types.d.ts +12 -0
- package/dist/core/forms/select-types.d.ts.map +1 -0
- package/dist/core/forms/select-types.js +2 -0
- package/dist/core/forms/select-types.js.map +1 -0
- package/dist/core/forms/select.d.ts +2 -11
- package/dist/core/forms/select.d.ts.map +1 -1
- package/dist/core/forms/select.js +12 -33
- package/dist/core/forms/select.js.map +1 -1
- package/dist/core/forms/textarea-editor.d.ts +0 -21
- package/dist/core/forms/textarea-editor.d.ts.map +1 -1
- package/dist/core/forms/textarea-editor.js +17 -37
- package/dist/core/forms/textarea-editor.js.map +1 -1
- package/dist/core/forms/textarea.js +1 -1
- package/dist/core/forms/textarea.js.map +1 -1
- package/dist/core/forms/wizard.d.ts +8 -3
- package/dist/core/forms/wizard.d.ts.map +1 -1
- package/dist/core/forms/wizard.js +11 -1
- package/dist/core/forms/wizard.js.map +1 -1
- package/dist/core/graphql-bijou-block.d.ts +6 -0
- package/dist/core/graphql-bijou-block.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.js +5 -0
- package/dist/core/graphql-bijou-block.js.map +1 -0
- package/dist/core/graphql-bijou-block.part01.d.ts +97 -0
- package/dist/core/graphql-bijou-block.part01.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part01.js +3 -0
- package/dist/core/graphql-bijou-block.part01.js.map +1 -0
- package/dist/core/graphql-bijou-block.part02.d.ts +26 -0
- package/dist/core/graphql-bijou-block.part02.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part02.js +45 -0
- package/dist/core/graphql-bijou-block.part02.js.map +1 -0
- package/dist/core/graphql-bijou-block.part03.d.ts +4 -0
- package/dist/core/graphql-bijou-block.part03.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part03.js +69 -0
- package/dist/core/graphql-bijou-block.part03.js.map +1 -0
- package/dist/core/graphql-bijou-block.part04.d.ts +4 -0
- package/dist/core/graphql-bijou-block.part04.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part04.js +39 -0
- package/dist/core/graphql-bijou-block.part04.js.map +1 -0
- package/dist/core/graphql-bijou-block.part05.d.ts +6 -0
- package/dist/core/graphql-bijou-block.part05.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part05.js +84 -0
- package/dist/core/graphql-bijou-block.part05.js.map +1 -0
- package/dist/core/graphql-bijou-block.part06.d.ts +10 -0
- package/dist/core/graphql-bijou-block.part06.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part06.js +85 -0
- package/dist/core/graphql-bijou-block.part06.js.map +1 -0
- package/dist/core/graphql-bijou-block.part07.d.ts +10 -0
- package/dist/core/graphql-bijou-block.part07.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part07.js +80 -0
- package/dist/core/graphql-bijou-block.part07.js.map +1 -0
- package/dist/core/graphql-bijou-block.part08.d.ts +23 -0
- package/dist/core/graphql-bijou-block.part08.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part08.js +79 -0
- package/dist/core/graphql-bijou-block.part08.js.map +1 -0
- package/dist/core/graphql-bijou-block.part09.d.ts +11 -0
- package/dist/core/graphql-bijou-block.part09.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part09.js +72 -0
- package/dist/core/graphql-bijou-block.part09.js.map +1 -0
- package/dist/core/graphql-bijou-block.part10.d.ts +3 -0
- package/dist/core/graphql-bijou-block.part10.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.part10.js +38 -0
- package/dist/core/graphql-bijou-block.part10.js.map +1 -0
- package/dist/core/graphql-bijou-block.test-support.d.ts +18 -0
- package/dist/core/graphql-bijou-block.test-support.d.ts.map +1 -0
- package/dist/core/graphql-bijou-block.test-support.js +80 -0
- package/dist/core/graphql-bijou-block.test-support.js.map +1 -0
- package/dist/core/graphql-parser-utils.d.ts +3 -0
- package/dist/core/graphql-parser-utils.d.ts.map +1 -0
- package/dist/core/graphql-parser-utils.js +18 -0
- package/dist/core/graphql-parser-utils.js.map +1 -0
- package/dist/core/key-input.d.ts.map +1 -1
- package/dist/core/key-input.js +2 -0
- package/dist/core/key-input.js.map +1 -1
- package/dist/core/layout/envelope.d.ts +6 -173
- package/dist/core/layout/envelope.d.ts.map +1 -1
- package/dist/core/layout/envelope.js +4 -335
- package/dist/core/layout/envelope.js.map +1 -1
- package/dist/core/layout/envelope.part01.d.ts +88 -0
- package/dist/core/layout/envelope.part01.d.ts.map +1 -0
- package/dist/core/layout/envelope.part01.js +2 -0
- package/dist/core/layout/envelope.part01.js.map +1 -0
- package/dist/core/layout/envelope.part02.d.ts +72 -0
- package/dist/core/layout/envelope.part02.d.ts.map +1 -0
- package/dist/core/layout/envelope.part02.js +33 -0
- package/dist/core/layout/envelope.part02.js.map +1 -0
- package/dist/core/layout/envelope.part03.d.ts +14 -0
- package/dist/core/layout/envelope.part03.d.ts.map +1 -0
- package/dist/core/layout/envelope.part03.js +81 -0
- package/dist/core/layout/envelope.part03.js.map +1 -0
- package/dist/core/layout/envelope.part04.d.ts +6 -0
- package/dist/core/layout/envelope.part04.d.ts.map +1 -0
- package/dist/core/layout/envelope.part04.js +79 -0
- package/dist/core/layout/envelope.part04.js.map +1 -0
- package/dist/core/layout/envelope.part05.d.ts +5 -0
- package/dist/core/layout/envelope.part05.d.ts.map +1 -0
- package/dist/core/layout/envelope.part05.js +40 -0
- package/dist/core/layout/envelope.part05.js.map +1 -0
- package/dist/core/layout/envelope.part06.d.ts +10 -0
- package/dist/core/layout/envelope.part06.d.ts.map +1 -0
- package/dist/core/layout/envelope.part06.js +94 -0
- package/dist/core/layout/envelope.part06.js.map +1 -0
- package/dist/core/layout/envelope.part07.d.ts +8 -0
- package/dist/core/layout/envelope.part07.d.ts.map +1 -0
- package/dist/core/layout/envelope.part07.js +26 -0
- package/dist/core/layout/envelope.part07.js.map +1 -0
- package/dist/core/layout/flex-types.d.ts +18 -0
- package/dist/core/layout/flex-types.d.ts.map +1 -0
- package/dist/core/layout/flex-types.js +2 -0
- package/dist/core/layout/flex-types.js.map +1 -0
- package/dist/core/layout/flex.d.ts +2 -17
- package/dist/core/layout/flex.d.ts.map +1 -1
- package/dist/core/layout/flex.js +15 -17
- package/dist/core/layout/flex.js.map +1 -1
- package/dist/core/layout/geometry.d.ts.map +1 -1
- package/dist/core/layout/geometry.js +13 -15
- package/dist/core/layout/geometry.js.map +1 -1
- package/dist/core/mode-render.d.ts +1 -3
- package/dist/core/mode-render.d.ts.map +1 -1
- package/dist/core/mode-render.js +1 -1
- package/dist/core/mode-render.js.map +1 -1
- package/dist/core/render/differ.d.ts.map +1 -1
- package/dist/core/render/differ.js +56 -53
- package/dist/core/render/differ.js.map +1 -1
- package/dist/core/render/packed-cell.d.ts +3 -109
- package/dist/core/render/packed-cell.d.ts.map +1 -1
- package/dist/core/render/packed-cell.js +3 -300
- package/dist/core/render/packed-cell.js.map +1 -1
- package/dist/core/render/packed-cell.part01.d.ts +34 -0
- package/dist/core/render/packed-cell.part01.d.ts.map +1 -0
- package/dist/core/render/packed-cell.part01.js +98 -0
- package/dist/core/render/packed-cell.part01.js.map +1 -0
- package/dist/core/render/packed-cell.part02.d.ts +11 -0
- package/dist/core/render/packed-cell.part02.d.ts.map +1 -0
- package/dist/core/render/packed-cell.part02.js +93 -0
- package/dist/core/render/packed-cell.part02.js.map +1 -0
- package/dist/core/render/packed-cell.part03.d.ts +4 -0
- package/dist/core/render/packed-cell.part03.d.ts.map +1 -0
- package/dist/core/render/packed-cell.part03.js +31 -0
- package/dist/core/render/packed-cell.part03.js.map +1 -0
- package/dist/core/render/safe-read.d.ts +12 -0
- package/dist/core/render/safe-read.d.ts.map +1 -0
- package/dist/core/render/safe-read.js +37 -0
- package/dist/core/render/safe-read.js.map +1 -0
- package/dist/core/runtime-viewport.d.ts +2 -2
- package/dist/core/runtime-viewport.d.ts.map +1 -1
- package/dist/core/runtime-viewport.js.map +1 -1
- package/dist/core/schema-block.d.ts +3 -62
- package/dist/core/schema-block.d.ts.map +1 -1
- package/dist/core/schema-block.js +2 -360
- package/dist/core/schema-block.js.map +1 -1
- package/dist/core/schema-block.part01.d.ts +59 -0
- package/dist/core/schema-block.part01.d.ts.map +1 -0
- package/dist/core/schema-block.part01.js +10 -0
- package/dist/core/schema-block.part01.js.map +1 -0
- package/dist/core/schema-block.part02.d.ts +7 -0
- package/dist/core/schema-block.part02.d.ts.map +1 -0
- package/dist/core/schema-block.part02.js +63 -0
- package/dist/core/schema-block.part02.js.map +1 -0
- package/dist/core/schema-block.part03.d.ts +22 -0
- package/dist/core/schema-block.part03.d.ts.map +1 -0
- package/dist/core/schema-block.part03.js +70 -0
- package/dist/core/schema-block.part03.js.map +1 -0
- package/dist/core/schema-block.part04.d.ts +12 -0
- package/dist/core/schema-block.part04.d.ts.map +1 -0
- package/dist/core/schema-block.part04.js +70 -0
- package/dist/core/schema-block.part04.js.map +1 -0
- package/dist/core/schema-block.part05.d.ts +10 -0
- package/dist/core/schema-block.part05.d.ts.map +1 -0
- package/dist/core/schema-block.part05.js +74 -0
- package/dist/core/schema-block.part05.js.map +1 -0
- package/dist/core/schema-block.part06.d.ts +16 -0
- package/dist/core/schema-block.part06.d.ts.map +1 -0
- package/dist/core/schema-block.part06.js +59 -0
- package/dist/core/schema-block.part06.js.map +1 -0
- package/dist/core/schema-block.test-support.d.ts +9 -0
- package/dist/core/schema-block.test-support.d.ts.map +1 -0
- package/dist/core/schema-block.test-support.js +60 -0
- package/dist/core/schema-block.test-support.js.map +1 -0
- package/dist/core/schema-inert-data.d.ts +4 -0
- package/dist/core/schema-inert-data.d.ts.map +1 -0
- package/dist/core/schema-inert-data.js +85 -0
- package/dist/core/schema-inert-data.js.map +1 -0
- package/dist/core/selection.d.ts +4 -126
- package/dist/core/selection.d.ts.map +1 -1
- package/dist/core/selection.js +2 -349
- package/dist/core/selection.js.map +1 -1
- package/dist/core/selection.part01.d.ts +87 -0
- package/dist/core/selection.part01.d.ts.map +1 -0
- package/dist/core/selection.part01.js +2 -0
- package/dist/core/selection.part01.js.map +1 -0
- package/dist/core/selection.part02.d.ts +37 -0
- package/dist/core/selection.part02.d.ts.map +1 -0
- package/dist/core/selection.part02.js +60 -0
- package/dist/core/selection.part02.js.map +1 -0
- package/dist/core/selection.part03.d.ts +7 -0
- package/dist/core/selection.part03.d.ts.map +1 -0
- package/dist/core/selection.part03.js +77 -0
- package/dist/core/selection.part03.js.map +1 -0
- package/dist/core/selection.part04.d.ts +5 -0
- package/dist/core/selection.part04.d.ts.map +1 -0
- package/dist/core/selection.part04.js +65 -0
- package/dist/core/selection.part04.js.map +1 -0
- package/dist/core/selection.part05.d.ts +5 -0
- package/dist/core/selection.part05.d.ts.map +1 -0
- package/dist/core/selection.part05.js +61 -0
- package/dist/core/selection.part05.js.map +1 -0
- package/dist/core/selection.part06.d.ts +14 -0
- package/dist/core/selection.part06.d.ts.map +1 -0
- package/dist/core/selection.part06.js +80 -0
- package/dist/core/selection.part06.js.map +1 -0
- package/dist/core/selection.part07.d.ts +6 -0
- package/dist/core/selection.part07.d.ts.map +1 -0
- package/dist/core/selection.part07.js +27 -0
- package/dist/core/selection.part07.js.map +1 -0
- package/dist/core/standard-blocks/block-definitions.d.ts +4 -0
- package/dist/core/standard-blocks/block-definitions.d.ts.map +1 -0
- package/dist/core/standard-blocks/block-definitions.js +4 -0
- package/dist/core/standard-blocks/block-definitions.js.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part01.d.ts +11 -0
- package/dist/core/standard-blocks/block-definitions.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part01.js +69 -0
- package/dist/core/standard-blocks/block-definitions.part01.js.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part02.d.ts +11 -0
- package/dist/core/standard-blocks/block-definitions.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part02.js +59 -0
- package/dist/core/standard-blocks/block-definitions.part02.js.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part03.d.ts +11 -0
- package/dist/core/standard-blocks/block-definitions.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/block-definitions.part03.js +59 -0
- package/dist/core/standard-blocks/block-definitions.part03.js.map +1 -0
- package/dist/core/standard-blocks/catalog.d.ts +6 -0
- package/dist/core/standard-blocks/catalog.d.ts.map +1 -0
- package/dist/core/standard-blocks/catalog.js +87 -0
- package/dist/core/standard-blocks/catalog.js.map +1 -0
- package/dist/core/standard-blocks/metadata-custom.d.ts +5 -0
- package/dist/core/standard-blocks/metadata-custom.d.ts.map +1 -0
- package/dist/core/standard-blocks/metadata-custom.js +136 -0
- package/dist/core/standard-blocks/metadata-custom.js.map +1 -0
- package/dist/core/standard-blocks/metadata-standard.d.ts +28 -0
- package/dist/core/standard-blocks/metadata-standard.d.ts.map +1 -0
- package/dist/core/standard-blocks/metadata-standard.js +422 -0
- package/dist/core/standard-blocks/metadata-standard.js.map +1 -0
- package/dist/core/standard-blocks/render.d.ts +16 -0
- package/dist/core/standard-blocks/render.d.ts.map +1 -0
- package/dist/core/standard-blocks/render.js +341 -0
- package/dist/core/standard-blocks/render.js.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.d.ts +4 -0
- package/dist/core/standard-blocks/schema-adapters.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.js +4 -0
- package/dist/core/standard-blocks/schema-adapters.js.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part01.d.ts +11 -0
- package/dist/core/standard-blocks/schema-adapters.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part01.js +85 -0
- package/dist/core/standard-blocks/schema-adapters.part01.js.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part02.d.ts +16 -0
- package/dist/core/standard-blocks/schema-adapters.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part02.js +83 -0
- package/dist/core/standard-blocks/schema-adapters.part02.js.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part03.d.ts +8 -0
- package/dist/core/standard-blocks/schema-adapters.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-adapters.part03.js +34 -0
- package/dist/core/standard-blocks/schema-adapters.part03.js.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.d.ts +5 -0
- package/dist/core/standard-blocks/schema-blocks.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.js +5 -0
- package/dist/core/standard-blocks/schema-blocks.js.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part01.d.ts +10 -0
- package/dist/core/standard-blocks/schema-blocks.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part01.js +65 -0
- package/dist/core/standard-blocks/schema-blocks.part01.js.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part02.d.ts +12 -0
- package/dist/core/standard-blocks/schema-blocks.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part02.js +51 -0
- package/dist/core/standard-blocks/schema-blocks.part02.js.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part03.d.ts +12 -0
- package/dist/core/standard-blocks/schema-blocks.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part03.js +51 -0
- package/dist/core/standard-blocks/schema-blocks.part03.js.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part04.d.ts +4 -0
- package/dist/core/standard-blocks/schema-blocks.part04.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-blocks.part04.js +11 -0
- package/dist/core/standard-blocks/schema-blocks.part04.js.map +1 -0
- package/dist/core/standard-blocks/schema-helpers.d.ts +18 -0
- package/dist/core/standard-blocks/schema-helpers.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-helpers.js +50 -0
- package/dist/core/standard-blocks/schema-helpers.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.d.ts +4 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.js +4 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part01.d.ts +6 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part01.js +82 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part01.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part02.d.ts +5 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part02.js +72 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part02.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part03.d.ts +4 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part03.js +42 -0
- package/dist/core/standard-blocks/schema-parsers-advanced.part03.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.d.ts +5 -0
- package/dist/core/standard-blocks/schema-parsers-core.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.js +5 -0
- package/dist/core/standard-blocks/schema-parsers-core.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part01.d.ts +7 -0
- package/dist/core/standard-blocks/schema-parsers-core.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part01.js +80 -0
- package/dist/core/standard-blocks/schema-parsers-core.part01.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part02.d.ts +6 -0
- package/dist/core/standard-blocks/schema-parsers-core.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part02.js +76 -0
- package/dist/core/standard-blocks/schema-parsers-core.part02.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part03.d.ts +6 -0
- package/dist/core/standard-blocks/schema-parsers-core.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part03.js +76 -0
- package/dist/core/standard-blocks/schema-parsers-core.part03.js.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part04.d.ts +4 -0
- package/dist/core/standard-blocks/schema-parsers-core.part04.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-parsers-core.part04.js +42 -0
- package/dist/core/standard-blocks/schema-parsers-core.part04.js.map +1 -0
- package/dist/core/standard-blocks/schema-utils.d.ts +12 -0
- package/dist/core/standard-blocks/schema-utils.d.ts.map +1 -0
- package/dist/core/standard-blocks/schema-utils.js +66 -0
- package/dist/core/standard-blocks/schema-utils.js.map +1 -0
- package/dist/core/standard-blocks/sections.d.ts +7 -0
- package/dist/core/standard-blocks/sections.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.js +7 -0
- package/dist/core/standard-blocks/sections.js.map +1 -0
- package/dist/core/standard-blocks/sections.part01.d.ts +21 -0
- package/dist/core/standard-blocks/sections.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part01.js +79 -0
- package/dist/core/standard-blocks/sections.part01.js.map +1 -0
- package/dist/core/standard-blocks/sections.part02.d.ts +25 -0
- package/dist/core/standard-blocks/sections.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part02.js +92 -0
- package/dist/core/standard-blocks/sections.part02.js.map +1 -0
- package/dist/core/standard-blocks/sections.part03.d.ts +15 -0
- package/dist/core/standard-blocks/sections.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part03.js +89 -0
- package/dist/core/standard-blocks/sections.part03.js.map +1 -0
- package/dist/core/standard-blocks/sections.part04.d.ts +14 -0
- package/dist/core/standard-blocks/sections.part04.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part04.js +88 -0
- package/dist/core/standard-blocks/sections.part04.js.map +1 -0
- package/dist/core/standard-blocks/sections.part05.d.ts +14 -0
- package/dist/core/standard-blocks/sections.part05.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part05.js +93 -0
- package/dist/core/standard-blocks/sections.part05.js.map +1 -0
- package/dist/core/standard-blocks/sections.part06.d.ts +4 -0
- package/dist/core/standard-blocks/sections.part06.d.ts.map +1 -0
- package/dist/core/standard-blocks/sections.part06.js +23 -0
- package/dist/core/standard-blocks/sections.part06.js.map +1 -0
- package/dist/core/standard-blocks/types.d.ts +5 -0
- package/dist/core/standard-blocks/types.d.ts.map +1 -0
- package/dist/core/standard-blocks/types.js +2 -0
- package/dist/core/standard-blocks/types.js.map +1 -0
- package/dist/core/standard-blocks/types.part01.d.ts +58 -0
- package/dist/core/standard-blocks/types.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks/types.part01.js +8 -0
- package/dist/core/standard-blocks/types.part01.js.map +1 -0
- package/dist/core/standard-blocks/types.part02.d.ts +95 -0
- package/dist/core/standard-blocks/types.part02.d.ts.map +1 -0
- package/dist/core/standard-blocks/types.part02.js +2 -0
- package/dist/core/standard-blocks/types.part02.js.map +1 -0
- package/dist/core/standard-blocks/types.part03.d.ts +37 -0
- package/dist/core/standard-blocks/types.part03.d.ts.map +1 -0
- package/dist/core/standard-blocks/types.part03.js +2 -0
- package/dist/core/standard-blocks/types.part03.js.map +1 -0
- package/dist/core/standard-blocks.d.ts +5 -263
- package/dist/core/standard-blocks.d.ts.map +1 -1
- package/dist/core/standard-blocks.js +4 -2517
- package/dist/core/standard-blocks.js.map +1 -1
- package/dist/core/standard-blocks.test-support.d.ts +12 -0
- package/dist/core/standard-blocks.test-support.d.ts.map +1 -0
- package/dist/core/standard-blocks.test-support.js +11 -0
- package/dist/core/standard-blocks.test-support.js.map +1 -0
- package/dist/core/standard-blocks.test-support.part01.d.ts +30 -0
- package/dist/core/standard-blocks.test-support.part01.d.ts.map +1 -0
- package/dist/core/standard-blocks.test-support.part01.js +42 -0
- package/dist/core/standard-blocks.test-support.part01.js.map +1 -0
- package/dist/core/story-capture.js +1 -1
- package/dist/core/story-capture.js.map +1 -1
- package/dist/core/text/clip.d.ts.map +1 -1
- package/dist/core/text/clip.js +4 -0
- package/dist/core/text/clip.js.map +1 -1
- package/dist/core/text/grapheme.d.ts.map +1 -1
- package/dist/core/text/grapheme.js +17 -7
- package/dist/core/text/grapheme.js.map +1 -1
- package/dist/core/text/wrap.d.ts +1 -1
- package/dist/core/text/wrap.d.ts.map +1 -1
- package/dist/core/text/wrap.js +1 -1
- package/dist/core/text/wrap.js.map +1 -1
- package/dist/core/theme/bijou-dark-preset.d.ts +10 -0
- package/dist/core/theme/bijou-dark-preset.d.ts.map +1 -0
- package/dist/core/theme/bijou-dark-preset.js +81 -0
- package/dist/core/theme/bijou-dark-preset.js.map +1 -0
- package/dist/core/theme/bijou-light-preset.d.ts +10 -0
- package/dist/core/theme/bijou-light-preset.d.ts.map +1 -0
- package/dist/core/theme/bijou-light-preset.js +84 -0
- package/dist/core/theme/bijou-light-preset.js.map +1 -0
- package/dist/core/theme/builder.d.ts +91 -0
- package/dist/core/theme/builder.d.ts.map +1 -0
- package/dist/core/theme/builder.js +236 -0
- package/dist/core/theme/builder.js.map +1 -0
- package/dist/core/theme/color.d.ts +3 -95
- package/dist/core/theme/color.d.ts.map +1 -1
- package/dist/core/theme/color.js +2 -279
- package/dist/core/theme/color.js.map +1 -1
- package/dist/core/theme/color.part01.d.ts +18 -0
- package/dist/core/theme/color.part01.d.ts.map +1 -0
- package/dist/core/theme/color.part01.js +93 -0
- package/dist/core/theme/color.part01.js.map +1 -0
- package/dist/core/theme/color.part02.d.ts +12 -0
- package/dist/core/theme/color.part02.d.ts.map +1 -0
- package/dist/core/theme/color.part02.js +85 -0
- package/dist/core/theme/color.part02.js.map +1 -0
- package/dist/core/theme/doctor.d.ts +15 -0
- package/dist/core/theme/doctor.d.ts.map +1 -1
- package/dist/core/theme/doctor.js +57 -8
- package/dist/core/theme/doctor.js.map +1 -1
- package/dist/core/theme/downsample.d.ts +3 -52
- package/dist/core/theme/downsample.d.ts.map +1 -1
- package/dist/core/theme/downsample.js +2 -171
- package/dist/core/theme/downsample.js.map +1 -1
- package/dist/core/theme/downsample.part01.d.ts +7 -0
- package/dist/core/theme/downsample.part01.d.ts.map +1 -0
- package/dist/core/theme/downsample.part01.js +77 -0
- package/dist/core/theme/downsample.part01.js.map +1 -0
- package/dist/core/theme/downsample.part02.d.ts +3 -0
- package/dist/core/theme/downsample.part02.d.ts.map +1 -0
- package/dist/core/theme/downsample.part02.js +26 -0
- package/dist/core/theme/downsample.part02.js.map +1 -0
- package/dist/core/theme/dtcg.d.ts +3 -6
- package/dist/core/theme/dtcg.d.ts.map +1 -1
- package/dist/core/theme/dtcg.js +86 -118
- package/dist/core/theme/dtcg.js.map +1 -1
- package/dist/core/theme/extend.js +14 -3
- package/dist/core/theme/extend.js.map +1 -1
- package/dist/core/theme/gradient.d.ts.map +1 -1
- package/dist/core/theme/gradient.js +11 -7
- package/dist/core/theme/gradient.js.map +1 -1
- package/dist/core/theme/graph-dependencies.d.ts +3 -0
- package/dist/core/theme/graph-dependencies.d.ts.map +1 -0
- package/dist/core/theme/graph-dependencies.js +29 -0
- package/dist/core/theme/graph-dependencies.js.map +1 -0
- package/dist/core/theme/graph-guards.d.ts +8 -0
- package/dist/core/theme/graph-guards.d.ts.map +1 -0
- package/dist/core/theme/graph-guards.js +19 -0
- package/dist/core/theme/graph-guards.js.map +1 -0
- package/dist/core/theme/graph-import.d.ts +5 -0
- package/dist/core/theme/graph-import.d.ts.map +1 -0
- package/dist/core/theme/graph-import.js +30 -0
- package/dist/core/theme/graph-import.js.map +1 -0
- package/dist/core/theme/graph-resolve.d.ts +12 -0
- package/dist/core/theme/graph-resolve.d.ts.map +1 -0
- package/dist/core/theme/graph-resolve.js +71 -0
- package/dist/core/theme/graph-resolve.js.map +1 -0
- package/dist/core/theme/graph-transform.d.ts +4 -0
- package/dist/core/theme/graph-transform.d.ts.map +1 -0
- package/dist/core/theme/graph-transform.js +41 -0
- package/dist/core/theme/graph-transform.js.map +1 -0
- package/dist/core/theme/graph-types.d.ts +69 -1
- package/dist/core/theme/graph-types.d.ts.map +1 -1
- package/dist/core/theme/graph.d.ts +2 -13
- package/dist/core/theme/graph.d.ts.map +1 -1
- package/dist/core/theme/graph.js +53 -158
- package/dist/core/theme/graph.js.map +1 -1
- package/dist/core/theme/index.d.ts +9 -12
- package/dist/core/theme/index.d.ts.map +1 -1
- package/dist/core/theme/index.js +5 -21
- package/dist/core/theme/index.js.map +1 -1
- package/dist/core/theme/preset-authoring.d.ts +16 -0
- package/dist/core/theme/preset-authoring.d.ts.map +1 -0
- package/dist/core/theme/preset-authoring.js +87 -0
- package/dist/core/theme/preset-authoring.js.map +1 -0
- package/dist/core/theme/presets.d.ts +7 -4
- package/dist/core/theme/presets.d.ts.map +1 -1
- package/dist/core/theme/presets.js +6 -1
- package/dist/core/theme/presets.js.map +1 -1
- package/dist/core/theme/resolve.d.ts +2 -13
- package/dist/core/theme/resolve.d.ts.map +1 -1
- package/dist/core/theme/resolve.js +16 -16
- package/dist/core/theme/resolve.js.map +1 -1
- package/dist/core/theme/styled.d.ts.map +1 -1
- package/dist/core/theme/styled.js +3 -2
- package/dist/core/theme/styled.js.map +1 -1
- package/dist/core/theme/theme-rule-candidates.d.ts +19 -0
- package/dist/core/theme/theme-rule-candidates.d.ts.map +1 -0
- package/dist/core/theme/theme-rule-candidates.js +101 -0
- package/dist/core/theme/theme-rule-candidates.js.map +1 -0
- package/dist/core/theme/theme-rule-color-validation.d.ts +5 -0
- package/dist/core/theme/theme-rule-color-validation.d.ts.map +1 -0
- package/dist/core/theme/theme-rule-color-validation.js +9 -0
- package/dist/core/theme/theme-rule-color-validation.js.map +1 -0
- package/dist/core/theme/theme-rule-evaluate.d.ts +13 -0
- package/dist/core/theme/theme-rule-evaluate.d.ts.map +1 -0
- package/dist/core/theme/theme-rule-evaluate.js +113 -0
- package/dist/core/theme/theme-rule-evaluate.js.map +1 -0
- package/dist/core/theme/theme-rule-metrics.d.ts +4 -0
- package/dist/core/theme/theme-rule-metrics.d.ts.map +1 -0
- package/dist/core/theme/theme-rule-metrics.js +34 -0
- package/dist/core/theme/theme-rule-metrics.js.map +1 -0
- package/dist/core/theme/theme-rule-paths.d.ts +3 -0
- package/dist/core/theme/theme-rule-paths.d.ts.map +1 -0
- package/dist/core/theme/theme-rule-paths.js +10 -0
- package/dist/core/theme/theme-rule-paths.js.map +1 -0
- package/dist/core/theme/theme-rules.d.ts +22 -0
- package/dist/core/theme/theme-rules.d.ts.map +1 -0
- package/dist/core/theme/theme-rules.js +84 -0
- package/dist/core/theme/theme-rules.js.map +1 -0
- package/dist/core/ui-scene-ir.d.ts +195 -0
- package/dist/core/ui-scene-ir.d.ts.map +1 -0
- package/dist/core/ui-scene-ir.js +570 -0
- package/dist/core/ui-scene-ir.js.map +1 -0
- package/dist/factory.js +3 -3
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +10 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -71
- package/dist/index.js.map +1 -1
- package/dist/index.part01.d.ts +18 -0
- package/dist/index.part01.d.ts.map +1 -0
- package/dist/index.part01.js +19 -0
- package/dist/index.part01.js.map +1 -0
- package/dist/index.part02.d.ts +5 -0
- package/dist/index.part02.d.ts.map +1 -0
- package/dist/index.part02.js +6 -0
- package/dist/index.part02.js.map +1 -0
- package/dist/index.part03.d.ts +6 -0
- package/dist/index.part03.d.ts.map +1 -0
- package/dist/index.part03.js +6 -0
- package/dist/index.part03.js.map +1 -0
- package/dist/index.part04.d.ts +5 -0
- package/dist/index.part04.d.ts.map +1 -0
- package/dist/index.part04.js +5 -0
- package/dist/index.part04.js.map +1 -0
- package/dist/index.part05.d.ts +2 -0
- package/dist/index.part05.d.ts.map +1 -0
- package/dist/index.part05.js +2 -0
- package/dist/index.part05.js.map +1 -0
- package/dist/index.part06.d.ts +7 -0
- package/dist/index.part06.d.ts.map +1 -0
- package/dist/index.part06.js +9 -0
- package/dist/index.part06.js.map +1 -0
- package/dist/index.part07.d.ts +4 -0
- package/dist/index.part07.d.ts.map +1 -0
- package/dist/index.part07.js +5 -0
- package/dist/index.part07.js.map +1 -0
- package/dist/index.part08.d.ts +3 -0
- package/dist/index.part08.d.ts.map +1 -0
- package/dist/index.part08.js +3 -0
- package/dist/index.part08.js.map +1 -0
- package/dist/index.part09.d.ts +2 -0
- package/dist/index.part09.d.ts.map +1 -0
- package/dist/index.part09.js +3 -0
- package/dist/index.part09.js.map +1 -0
- package/dist/index.part10.d.ts +8 -0
- package/dist/index.part10.d.ts.map +1 -0
- package/dist/index.part10.js +9 -0
- package/dist/index.part10.js.map +1 -0
- package/dist/ports/io-handles.d.ts +11 -0
- package/dist/ports/io-handles.d.ts.map +1 -0
- package/dist/ports/io-handles.js +2 -0
- package/dist/ports/io-handles.js.map +1 -0
- package/dist/ports/io.d.ts +2 -10
- package/dist/ports/io.d.ts.map +1 -1
- package/dist/ports/surface.d.ts +1 -1
- package/dist/ports/surface.d.ts.map +1 -1
- package/dist/ports/surface.js +41 -46
- package/dist/ports/surface.js.map +1 -1
- package/package.json +1 -1
package/dist/core/theme/color.js
CHANGED
|
@@ -1,280 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Provides conversion between hex and RGB, plus manipulation functions
|
|
5
|
-
* (lighten, darken, mix, complementary, saturate, desaturate) that
|
|
6
|
-
* preserve token modifiers.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Preserve a literal hex string as a lazy color reference.
|
|
10
|
-
*
|
|
11
|
-
* User code can keep calling styling APIs with `#rrggbb`; hot paths can
|
|
12
|
-
* later upgrade that reference via {@link resolveColor}.
|
|
13
|
-
*/
|
|
14
|
-
export function color(hex) {
|
|
15
|
-
return hex;
|
|
16
|
-
}
|
|
17
|
-
/** Narrow an unknown value to a pre-resolved color reference. */
|
|
18
|
-
export function isResolvedColor(value) {
|
|
19
|
-
return typeof value === 'object'
|
|
20
|
-
&& value !== null
|
|
21
|
-
&& 'kind' in value
|
|
22
|
-
&& value.kind === 'resolved-color'
|
|
23
|
-
&& typeof value.hex === 'string'
|
|
24
|
-
&& Array.isArray(value.rgb);
|
|
25
|
-
}
|
|
26
|
-
/** Resolve a color reference into its eager `{ hex, rgb }` form. */
|
|
27
|
-
export function resolveColor(ref) {
|
|
28
|
-
if (isResolvedColor(ref))
|
|
29
|
-
return ref;
|
|
30
|
-
const rgb = hexToRgb(ref);
|
|
31
|
-
return {
|
|
32
|
-
kind: 'resolved-color',
|
|
33
|
-
hex: rgbToHex(rgb),
|
|
34
|
-
rgb,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/** Resolve a color reference when valid, otherwise return `undefined`. */
|
|
38
|
-
export function tryResolveColor(ref) {
|
|
39
|
-
if (ref == null)
|
|
40
|
-
return undefined;
|
|
41
|
-
if (isResolvedColor(ref))
|
|
42
|
-
return ref;
|
|
43
|
-
const rgb = tryHexToRgb(ref);
|
|
44
|
-
if (rgb == null)
|
|
45
|
-
return undefined;
|
|
46
|
-
return {
|
|
47
|
-
kind: 'resolved-color',
|
|
48
|
-
hex: rgbToHex(rgb),
|
|
49
|
-
rgb,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/** Return the canonical hex form for a color reference when available. */
|
|
53
|
-
export function colorHex(ref) {
|
|
54
|
-
if (ref == null)
|
|
55
|
-
return undefined;
|
|
56
|
-
return isResolvedColor(ref) ? ref.hex : ref;
|
|
57
|
-
}
|
|
58
|
-
/** Return parsed RGB bytes for a color reference when available. */
|
|
59
|
-
export function colorRgb(ref) {
|
|
60
|
-
return tryResolveColor(ref)?.rgb;
|
|
61
|
-
}
|
|
62
|
-
// ── Conversion ─────────────────────────────────────────────────────
|
|
63
|
-
/**
|
|
64
|
-
* Parse a hex color string to an RGB tuple. Supports `#RGB` and `#RRGGBB` (with or without `#`).
|
|
65
|
-
* @param hex - Hex color string to parse.
|
|
66
|
-
* @returns Parsed RGB tuple.
|
|
67
|
-
* @throws {Error} If the hex string is not a valid 3- or 6-digit hex color.
|
|
68
|
-
*/
|
|
69
|
-
export function hexToRgb(hex) {
|
|
70
|
-
let h = hex.startsWith('#') ? hex.slice(1) : hex;
|
|
71
|
-
if (h.length === 3) {
|
|
72
|
-
h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];
|
|
73
|
-
}
|
|
74
|
-
if (h.length !== 6 || !/^[0-9a-f]{6}$/i.test(h)) {
|
|
75
|
-
throw new Error(`Invalid hex color: "${hex}"`);
|
|
76
|
-
}
|
|
77
|
-
const n = parseInt(h, 16);
|
|
78
|
-
return [(n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff];
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Parse a hex color string to an RGB tuple, returning `undefined` for invalid input.
|
|
82
|
-
*
|
|
83
|
-
* Use this when theme/runtime code wants to preserve invalid authored input
|
|
84
|
-
* without throwing, but still cache parsed bytes for valid colors.
|
|
85
|
-
*/
|
|
86
|
-
export function tryHexToRgb(hex) {
|
|
87
|
-
try {
|
|
88
|
-
return hexToRgb(hex);
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Convert an RGB tuple to a `#rrggbb` hex string.
|
|
96
|
-
* @param rgb - RGB tuple to convert. Values are clamped to [0, 255].
|
|
97
|
-
* @returns Lowercase hex string with leading `#`.
|
|
98
|
-
*/
|
|
99
|
-
export function rgbToHex(rgb) {
|
|
100
|
-
const r = Math.max(0, Math.min(255, Math.round(rgb[0])));
|
|
101
|
-
const g = Math.max(0, Math.min(255, Math.round(rgb[1])));
|
|
102
|
-
const b = Math.max(0, Math.min(255, Math.round(rgb[2])));
|
|
103
|
-
return '#' + ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1);
|
|
104
|
-
}
|
|
105
|
-
// ── Internal HSL helpers ───────────────────────────────────────────
|
|
106
|
-
/**
|
|
107
|
-
* Convert an RGB tuple to HSL (hue, saturation, lightness), all in [0, 1].
|
|
108
|
-
* @param rgb - Input RGB color.
|
|
109
|
-
* @returns HSL triple with each component normalized to [0, 1].
|
|
110
|
-
*/
|
|
111
|
-
function rgbToHsl(rgb) {
|
|
112
|
-
const r = rgb[0] / 255;
|
|
113
|
-
const g = rgb[1] / 255;
|
|
114
|
-
const b = rgb[2] / 255;
|
|
115
|
-
const max = Math.max(r, g, b);
|
|
116
|
-
const min = Math.min(r, g, b);
|
|
117
|
-
const l = (max + min) / 2;
|
|
118
|
-
if (max === min)
|
|
119
|
-
return [0, 0, l];
|
|
120
|
-
const d = max - min;
|
|
121
|
-
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
122
|
-
let h;
|
|
123
|
-
if (max === r) {
|
|
124
|
-
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
125
|
-
}
|
|
126
|
-
else if (max === g) {
|
|
127
|
-
h = ((b - r) / d + 2) / 6;
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
h = ((r - g) / d + 4) / 6;
|
|
131
|
-
}
|
|
132
|
-
return [h, s, l];
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Convert a single HSL hue sector to an RGB channel value.
|
|
136
|
-
* @param p - Lower bound from lightness calculation.
|
|
137
|
-
* @param q - Upper bound from lightness calculation.
|
|
138
|
-
* @param t - Hue offset for this channel.
|
|
139
|
-
* @returns Channel value in [0, 1].
|
|
140
|
-
*/
|
|
141
|
-
function hue2rgb(p, q, t) {
|
|
142
|
-
let tt = t;
|
|
143
|
-
if (tt < 0)
|
|
144
|
-
tt += 1;
|
|
145
|
-
if (tt > 1)
|
|
146
|
-
tt -= 1;
|
|
147
|
-
if (tt < 1 / 6)
|
|
148
|
-
return p + (q - p) * 6 * tt;
|
|
149
|
-
if (tt < 1 / 2)
|
|
150
|
-
return q;
|
|
151
|
-
if (tt < 2 / 3)
|
|
152
|
-
return p + (q - p) * (2 / 3 - tt) * 6;
|
|
153
|
-
return p;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Convert HSL values to an RGB tuple.
|
|
157
|
-
* @param h - Hue in [0, 1].
|
|
158
|
-
* @param s - Saturation in [0, 1].
|
|
159
|
-
* @param l - Lightness in [0, 1].
|
|
160
|
-
* @returns RGB tuple with each channel in [0, 255].
|
|
161
|
-
*/
|
|
162
|
-
function hslToRgb(h, s, l) {
|
|
163
|
-
if (s === 0) {
|
|
164
|
-
const v = Math.round(l * 255);
|
|
165
|
-
return [v, v, v];
|
|
166
|
-
}
|
|
167
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
168
|
-
const p = 2 * l - q;
|
|
169
|
-
return [
|
|
170
|
-
Math.round(hue2rgb(p, q, h + 1 / 3) * 255),
|
|
171
|
-
Math.round(hue2rgb(p, q, h) * 255),
|
|
172
|
-
Math.round(hue2rgb(p, q, h - 1 / 3) * 255),
|
|
173
|
-
];
|
|
174
|
-
}
|
|
175
|
-
// ── Token helpers ──────────────────────────────────────────────────
|
|
176
|
-
/**
|
|
177
|
-
* Clamp a numeric amount to the [0, 1] range.
|
|
178
|
-
* @param amount - Value to clamp.
|
|
179
|
-
* @returns Clamped value.
|
|
180
|
-
*/
|
|
181
|
-
function clampAmount(amount) {
|
|
182
|
-
return Math.max(0, Math.min(1, amount));
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Create a new TokenValue with the given hex, preserving the original's modifiers.
|
|
186
|
-
* @param token - Source token whose modifiers are carried over.
|
|
187
|
-
* @param hex - New hex color string.
|
|
188
|
-
* @returns New TokenValue with the updated hex.
|
|
189
|
-
*/
|
|
190
|
-
function withHex(token, hex) {
|
|
191
|
-
return token.modifiers
|
|
192
|
-
? { hex, modifiers: [...token.modifiers] }
|
|
193
|
-
: { hex };
|
|
194
|
-
}
|
|
195
|
-
// ── Manipulation ───────────────────────────────────────────────────
|
|
196
|
-
/**
|
|
197
|
-
* Blend a token's color toward white by `amount` (0 = unchanged, 1 = white).
|
|
198
|
-
* @param token - Source token to lighten.
|
|
199
|
-
* @param amount - Blend factor, clamped to [0, 1].
|
|
200
|
-
* @returns New TokenValue with the lightened hex, preserving modifiers.
|
|
201
|
-
*/
|
|
202
|
-
export function lighten(token, amount) {
|
|
203
|
-
const t = clampAmount(amount);
|
|
204
|
-
const [r, g, b] = hexToRgb(token.hex);
|
|
205
|
-
return withHex(token, rgbToHex([
|
|
206
|
-
r + (255 - r) * t,
|
|
207
|
-
g + (255 - g) * t,
|
|
208
|
-
b + (255 - b) * t,
|
|
209
|
-
]));
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Blend a token's color toward black by `amount` (0 = unchanged, 1 = black).
|
|
213
|
-
* @param token - Source token to darken.
|
|
214
|
-
* @param amount - Blend factor, clamped to [0, 1].
|
|
215
|
-
* @returns New TokenValue with the darkened hex, preserving modifiers.
|
|
216
|
-
*/
|
|
217
|
-
export function darken(token, amount) {
|
|
218
|
-
const t = clampAmount(amount);
|
|
219
|
-
const [r, g, b] = hexToRgb(token.hex);
|
|
220
|
-
return withHex(token, rgbToHex([
|
|
221
|
-
r * (1 - t),
|
|
222
|
-
g * (1 - t),
|
|
223
|
-
b * (1 - t),
|
|
224
|
-
]));
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Blend two token colors by `ratio` (0 = first, 1 = second, default 0.5). Preserves modifiers from the first token.
|
|
228
|
-
* @param a - First token (its modifiers are preserved).
|
|
229
|
-
* @param b - Second token.
|
|
230
|
-
* @param ratio - Blend ratio, clamped to [0, 1]. Default is 0.5.
|
|
231
|
-
* @returns New TokenValue with the blended hex.
|
|
232
|
-
*/
|
|
233
|
-
export function mix(a, b, ratio = 0.5) {
|
|
234
|
-
const t = clampAmount(ratio);
|
|
235
|
-
const [ar, ag, ab] = hexToRgb(a.hex);
|
|
236
|
-
const [br, bg, bb] = hexToRgb(b.hex);
|
|
237
|
-
return withHex(a, rgbToHex([
|
|
238
|
-
ar + (br - ar) * t,
|
|
239
|
-
ag + (bg - ag) * t,
|
|
240
|
-
ab + (bb - ab) * t,
|
|
241
|
-
]));
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Rotate hue by 180 degrees to produce the complementary color.
|
|
245
|
-
* @param token - Source token.
|
|
246
|
-
* @returns New TokenValue with the complementary hex, preserving modifiers.
|
|
247
|
-
*/
|
|
248
|
-
export function complementary(token) {
|
|
249
|
-
const rgb = hexToRgb(token.hex);
|
|
250
|
-
const [h, s, l] = rgbToHsl(rgb);
|
|
251
|
-
const newH = (h + 0.5) % 1;
|
|
252
|
-
return withHex(token, rgbToHex(hslToRgb(newH, s, l)));
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Increase saturation by `amount` (0 = unchanged, 1 = full saturation).
|
|
256
|
-
* @param token - Source token.
|
|
257
|
-
* @param amount - Saturation increase factor, clamped to [0, 1].
|
|
258
|
-
* @returns New TokenValue with the saturated hex, preserving modifiers.
|
|
259
|
-
*/
|
|
260
|
-
export function saturate(token, amount) {
|
|
261
|
-
const t = clampAmount(amount);
|
|
262
|
-
const rgb = hexToRgb(token.hex);
|
|
263
|
-
const [h, s, l] = rgbToHsl(rgb);
|
|
264
|
-
const newS = Math.min(1, s + (1 - s) * t);
|
|
265
|
-
return withHex(token, rgbToHex(hslToRgb(h, newS, l)));
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Decrease saturation by `amount` (0 = unchanged, 1 = fully desaturated).
|
|
269
|
-
* @param token - Source token.
|
|
270
|
-
* @param amount - Desaturation factor, clamped to [0, 1].
|
|
271
|
-
* @returns New TokenValue with the desaturated hex, preserving modifiers.
|
|
272
|
-
*/
|
|
273
|
-
export function desaturate(token, amount) {
|
|
274
|
-
const t = clampAmount(amount);
|
|
275
|
-
const rgb = hexToRgb(token.hex);
|
|
276
|
-
const [h, s, l] = rgbToHsl(rgb);
|
|
277
|
-
const newS = s * (1 - t);
|
|
278
|
-
return withHex(token, rgbToHex(hslToRgb(h, newS, l)));
|
|
279
|
-
}
|
|
1
|
+
export { color, colorHex, colorRgb, hexToRgb, isResolvedColor, resolveColor, rgbToHex, tryHexToRgb, tryResolveColor } from './color.part01.js';
|
|
2
|
+
export { complementary, darken, desaturate, lighten, mix, saturate } from './color.part02.js';
|
|
280
3
|
//# sourceMappingURL=color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../src/core/theme/color.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../src/core/theme/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/I,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RGB } from './tokens.js';
|
|
2
|
+
export interface ResolvedColor {
|
|
3
|
+
readonly kind: 'resolved-color';
|
|
4
|
+
readonly hex: string;
|
|
5
|
+
readonly rgb: RGB;
|
|
6
|
+
}
|
|
7
|
+
export type ColorRef = string | ResolvedColor;
|
|
8
|
+
export declare function color(hex: string): ColorRef;
|
|
9
|
+
export declare function isResolvedColor(value: unknown): value is ResolvedColor;
|
|
10
|
+
export declare function resolveColor(ref: ColorRef): ResolvedColor;
|
|
11
|
+
export declare function tryResolveColor(ref: ColorRef | undefined): ResolvedColor | undefined;
|
|
12
|
+
export declare function colorHex(ref: ColorRef | undefined): string | undefined;
|
|
13
|
+
export declare function colorRgb(ref: ColorRef | undefined): RGB | undefined;
|
|
14
|
+
export declare function hexToRgb(hex: string): RGB;
|
|
15
|
+
export declare function tryHexToRgb(hex: string): RGB | undefined;
|
|
16
|
+
export declare function rgbToHex(rgb: RGB): string;
|
|
17
|
+
export declare function rgbToHsl(rgb: RGB): [number, number, number];
|
|
18
|
+
//# sourceMappingURL=color.part01.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.part01.d.ts","sourceRoot":"","sources":["../../../src/core/theme/color.part01.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;CACnB;AACD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,aAAa,CAAC;AAC9C,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAE3C;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAMtE;AACD,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,GAAG,aAAa,CAQzD;AACD,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAUpF;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGtE;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS,CAEnE;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAUzC;AACD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAMxD;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAKzC;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAwB3D"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export function color(hex) {
|
|
2
|
+
return hex;
|
|
3
|
+
}
|
|
4
|
+
export function isResolvedColor(value) {
|
|
5
|
+
if (typeof value !== 'object' || value === null || !('kind' in value) || value.kind !== 'resolved-color')
|
|
6
|
+
return false;
|
|
7
|
+
if (!('hex' in value) || typeof value.hex !== 'string' || !('rgb' in value))
|
|
8
|
+
return false;
|
|
9
|
+
const rgb = value.rgb;
|
|
10
|
+
return Array.isArray(rgb) && rgb.length === 3
|
|
11
|
+
&& typeof rgb[0] === 'number' && typeof rgb[1] === 'number' && typeof rgb[2] === 'number';
|
|
12
|
+
}
|
|
13
|
+
export function resolveColor(ref) {
|
|
14
|
+
if (isResolvedColor(ref))
|
|
15
|
+
return ref;
|
|
16
|
+
const rgb = hexToRgb(ref);
|
|
17
|
+
return {
|
|
18
|
+
kind: 'resolved-color',
|
|
19
|
+
hex: rgbToHex(rgb),
|
|
20
|
+
rgb,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function tryResolveColor(ref) {
|
|
24
|
+
if (ref == null)
|
|
25
|
+
return undefined;
|
|
26
|
+
if (isResolvedColor(ref))
|
|
27
|
+
return ref;
|
|
28
|
+
const rgb = tryHexToRgb(ref);
|
|
29
|
+
if (rgb == null)
|
|
30
|
+
return undefined;
|
|
31
|
+
return {
|
|
32
|
+
kind: 'resolved-color',
|
|
33
|
+
hex: rgbToHex(rgb),
|
|
34
|
+
rgb,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function colorHex(ref) {
|
|
38
|
+
if (ref == null)
|
|
39
|
+
return undefined;
|
|
40
|
+
return isResolvedColor(ref) ? ref.hex : ref;
|
|
41
|
+
}
|
|
42
|
+
export function colorRgb(ref) {
|
|
43
|
+
return tryResolveColor(ref)?.rgb;
|
|
44
|
+
}
|
|
45
|
+
export function hexToRgb(hex) {
|
|
46
|
+
let h = hex.startsWith('#') ? hex.slice(1) : hex;
|
|
47
|
+
if (h.length === 3) {
|
|
48
|
+
h = h.split('').map((ch) => ch + ch).join('');
|
|
49
|
+
}
|
|
50
|
+
if (h.length !== 6 || !/^[0-9a-f]{6}$/i.test(h)) {
|
|
51
|
+
throw new Error(`Invalid hex color: "${hex}"`);
|
|
52
|
+
}
|
|
53
|
+
const n = parseInt(h, 16);
|
|
54
|
+
return [(n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff];
|
|
55
|
+
}
|
|
56
|
+
export function tryHexToRgb(hex) {
|
|
57
|
+
try {
|
|
58
|
+
return hexToRgb(hex);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function rgbToHex(rgb) {
|
|
65
|
+
const r = Math.max(0, Math.min(255, Math.round(rgb[0])));
|
|
66
|
+
const g = Math.max(0, Math.min(255, Math.round(rgb[1])));
|
|
67
|
+
const b = Math.max(0, Math.min(255, Math.round(rgb[2])));
|
|
68
|
+
return '#' + ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1);
|
|
69
|
+
}
|
|
70
|
+
export function rgbToHsl(rgb) {
|
|
71
|
+
const r = rgb[0] / 255;
|
|
72
|
+
const g = rgb[1] / 255;
|
|
73
|
+
const b = rgb[2] / 255;
|
|
74
|
+
const max = Math.max(r, g, b);
|
|
75
|
+
const min = Math.min(r, g, b);
|
|
76
|
+
const l = (max + min) / 2;
|
|
77
|
+
if (max === min)
|
|
78
|
+
return [0, 0, l];
|
|
79
|
+
const d = max - min;
|
|
80
|
+
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
81
|
+
let h;
|
|
82
|
+
if (max === r) {
|
|
83
|
+
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
84
|
+
}
|
|
85
|
+
else if (max === g) {
|
|
86
|
+
h = ((b - r) / d + 2) / 6;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
h = ((r - g) / d + 4) / 6;
|
|
90
|
+
}
|
|
91
|
+
return [h, s, l];
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=color.part01.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.part01.js","sourceRoot":"","sources":["../../../src/core/theme/color.part01.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC;AACD,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACvH,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1F,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;IACtB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;WACxC,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC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CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;SAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;QACrB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RGB, TokenValue } from './tokens.js';
|
|
2
|
+
export declare function hue2rgb(p: number, q: number, t: number): number;
|
|
3
|
+
export declare function hslToRgb(h: number, s: number, l: number): RGB;
|
|
4
|
+
export declare function clampAmount(amount: number): number;
|
|
5
|
+
export declare function withHex(token: TokenValue, hex: string): TokenValue;
|
|
6
|
+
export declare function lighten(token: TokenValue, amount: number): TokenValue;
|
|
7
|
+
export declare function darken(token: TokenValue, amount: number): TokenValue;
|
|
8
|
+
export declare function mix(a: TokenValue, b: TokenValue, ratio?: number): TokenValue;
|
|
9
|
+
export declare function complementary(token: TokenValue): TokenValue;
|
|
10
|
+
export declare function saturate(token: TokenValue, amount: number): TokenValue;
|
|
11
|
+
export declare function desaturate(token: TokenValue, amount: number): TokenValue;
|
|
12
|
+
//# sourceMappingURL=color.part02.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.part02.d.ts","sourceRoot":"","sources":["../../../src/core/theme/color.part02.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGnD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ/D;AACD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,CAc7D;AACD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AACD,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAIlE;AACD,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAQrE;AACD,wBAAgB,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAQpE;AACD,wBAAgB,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,SAAM,GAAG,UAAU,CASzE;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAK3D;AACD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAMtE;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAMxE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { hexToRgb, rgbToHex, rgbToHsl } from './color.part01.js';
|
|
2
|
+
export function hue2rgb(p, q, t) {
|
|
3
|
+
let tt = t;
|
|
4
|
+
if (tt < 0)
|
|
5
|
+
tt += 1;
|
|
6
|
+
if (tt > 1)
|
|
7
|
+
tt -= 1;
|
|
8
|
+
if (tt < 1 / 6)
|
|
9
|
+
return p + (q - p) * 6 * tt;
|
|
10
|
+
if (tt < 1 / 2)
|
|
11
|
+
return q;
|
|
12
|
+
if (tt < 2 / 3)
|
|
13
|
+
return p + (q - p) * (2 / 3 - tt) * 6;
|
|
14
|
+
return p;
|
|
15
|
+
}
|
|
16
|
+
export function hslToRgb(h, s, l) {
|
|
17
|
+
if (s === 0) {
|
|
18
|
+
const v = Math.round(l * 255);
|
|
19
|
+
return [v, v, v];
|
|
20
|
+
}
|
|
21
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
22
|
+
const p = 2 * l - q;
|
|
23
|
+
return [
|
|
24
|
+
Math.round(hue2rgb(p, q, h + 1 / 3) * 255),
|
|
25
|
+
Math.round(hue2rgb(p, q, h) * 255),
|
|
26
|
+
Math.round(hue2rgb(p, q, h - 1 / 3) * 255),
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
export function clampAmount(amount) {
|
|
30
|
+
return Math.max(0, Math.min(1, amount));
|
|
31
|
+
}
|
|
32
|
+
export function withHex(token, hex) {
|
|
33
|
+
return token.modifiers
|
|
34
|
+
? { hex, modifiers: [...token.modifiers] }
|
|
35
|
+
: { hex };
|
|
36
|
+
}
|
|
37
|
+
export function lighten(token, amount) {
|
|
38
|
+
const t = clampAmount(amount);
|
|
39
|
+
const [r, g, b] = hexToRgb(token.hex);
|
|
40
|
+
return withHex(token, rgbToHex([
|
|
41
|
+
r + (255 - r) * t,
|
|
42
|
+
g + (255 - g) * t,
|
|
43
|
+
b + (255 - b) * t,
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
export function darken(token, amount) {
|
|
47
|
+
const t = clampAmount(amount);
|
|
48
|
+
const [r, g, b] = hexToRgb(token.hex);
|
|
49
|
+
return withHex(token, rgbToHex([
|
|
50
|
+
r * (1 - t),
|
|
51
|
+
g * (1 - t),
|
|
52
|
+
b * (1 - t),
|
|
53
|
+
]));
|
|
54
|
+
}
|
|
55
|
+
export function mix(a, b, ratio = 0.5) {
|
|
56
|
+
const t = clampAmount(ratio);
|
|
57
|
+
const [ar, ag, ab] = hexToRgb(a.hex);
|
|
58
|
+
const [br, bg, bb] = hexToRgb(b.hex);
|
|
59
|
+
return withHex(a, rgbToHex([
|
|
60
|
+
ar + (br - ar) * t,
|
|
61
|
+
ag + (bg - ag) * t,
|
|
62
|
+
ab + (bb - ab) * t,
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
export function complementary(token) {
|
|
66
|
+
const rgb = hexToRgb(token.hex);
|
|
67
|
+
const [h, s, l] = rgbToHsl(rgb);
|
|
68
|
+
const newH = (h + 0.5) % 1;
|
|
69
|
+
return withHex(token, rgbToHex(hslToRgb(newH, s, l)));
|
|
70
|
+
}
|
|
71
|
+
export function saturate(token, amount) {
|
|
72
|
+
const t = clampAmount(amount);
|
|
73
|
+
const rgb = hexToRgb(token.hex);
|
|
74
|
+
const [h, s, l] = rgbToHsl(rgb);
|
|
75
|
+
const newS = Math.min(1, s + (1 - s) * t);
|
|
76
|
+
return withHex(token, rgbToHex(hslToRgb(h, newS, l)));
|
|
77
|
+
}
|
|
78
|
+
export function desaturate(token, amount) {
|
|
79
|
+
const t = clampAmount(amount);
|
|
80
|
+
const rgb = hexToRgb(token.hex);
|
|
81
|
+
const [h, s, l] = rgbToHsl(rgb);
|
|
82
|
+
const newS = s * (1 - t);
|
|
83
|
+
return withHex(token, rgbToHex(hslToRgb(h, newS, l)));
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=color.part02.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.part02.js","sourceRoot":"","sources":["../../../src/core/theme/color.part02.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACjE,MAAM,UAAU,OAAO,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACrD,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,CAAC;QAAE,EAAE,IAAI,CAAC,CAAC;IACpB,IAAI,EAAE,GAAG,CAAC;QAAE,EAAE,IAAI,CAAC,CA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AAC,CAAC;IAChC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1C,OAAO,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,KAAiB,EAAE,MAAc;IAC1D,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -7,6 +7,20 @@ export interface ThemeContrastPair {
|
|
|
7
7
|
readonly minRatio?: number;
|
|
8
8
|
readonly label?: string;
|
|
9
9
|
}
|
|
10
|
+
export type ThemeSafePairKind = 'readable' | 'status' | 'chrome';
|
|
11
|
+
export interface ThemeSafePair extends ThemeContrastPair {
|
|
12
|
+
readonly kind: ThemeSafePairKind;
|
|
13
|
+
}
|
|
14
|
+
export interface ThemeSafePairOptions {
|
|
15
|
+
readonly minRatio?: number;
|
|
16
|
+
readonly label?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ThemeSafePairBuilder {
|
|
19
|
+
readable(foreground: string, background: string, options?: ThemeSafePairOptions): ThemeSafePairBuilder;
|
|
20
|
+
status(foreground: string, background: string, options?: ThemeSafePairOptions): ThemeSafePairBuilder;
|
|
21
|
+
chrome(foreground: string, background: string, options?: ThemeSafePairOptions): ThemeSafePairBuilder;
|
|
22
|
+
build(): readonly ThemeSafePair[];
|
|
23
|
+
}
|
|
10
24
|
export interface ThemeDoctorOptions {
|
|
11
25
|
readonly contrastPairs?: readonly ThemeContrastPair[];
|
|
12
26
|
readonly minContrastRatio?: number;
|
|
@@ -32,6 +46,7 @@ export interface ThemeDoctorReport {
|
|
|
32
46
|
readonly checkedTokenCount: number;
|
|
33
47
|
readonly issues: readonly ThemeDoctorIssue[];
|
|
34
48
|
}
|
|
49
|
+
export declare function defineThemeSafePairs(): ThemeSafePairBuilder;
|
|
35
50
|
export declare function doctorTheme(theme: Theme, options?: ThemeDoctorOptions): ThemeDoctorReport;
|
|
36
51
|
export declare function themeContrastRatio(foreground: string, background: string): number | undefined;
|
|
37
52
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/core/theme/doctor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAO,KAAK,EAAc,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,CAAC;AACtD,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,eAAe,GACf,cAAc,GACd,aAAa,CAAC;AAElB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,iBAAiB,E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