@nldd/design-system 0.8.64 → 0.8.66
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/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +7 -6
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.styles.d.ts.map +1 -1
- package/dist/components/actions/button/button.styles.js +9 -5
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.js +3 -2
- package/dist/components/actions/button-bar/button-bar.js.map +1 -1
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +3 -2
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +4 -0
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +13 -5
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.styles.js +15 -10
- package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +2 -0
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +1 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +33 -15
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +8 -0
- package/dist/components/actions/menu/menu.styles.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +5 -4
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +15 -2
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +116 -42
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +33 -18
- package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +5 -2
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +104 -102
- package/dist/components/content/blockquote/blockquote.styles.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.styles.js +0 -3
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/byline/byline.d.ts.map +1 -1
- package/dist/components/content/byline/byline.js +3 -2
- package/dist/components/content/byline/byline.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +24 -64
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +239 -156
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +33 -92
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.js +10 -29
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +43 -8
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +34 -4
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +3 -2
- package/dist/components/content/icon/icon.js.map +1 -1
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +7 -6
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +2 -6
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +8 -7
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +5 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +3 -2
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.d.ts.map +1 -1
- package/dist/components/content/tag/tag.js +5 -4
- package/dist/components/content/tag/tag.js.map +1 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +2 -1
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/token/token.d.ts +70 -0
- package/dist/components/content/token/token.d.ts.map +1 -0
- package/dist/components/content/token/token.js +170 -0
- package/dist/components/content/token/token.js.map +1 -0
- package/dist/components/content/token/token.styles.d.ts.map +1 -0
- package/dist/components/content/token/token.styles.js +122 -0
- package/dist/components/content/token/token.styles.js.map +1 -0
- package/dist/components/content/token/token.template.d.ts +6 -0
- package/dist/components/content/token/token.template.d.ts.map +1 -0
- package/dist/components/content/token/token.template.js +47 -0
- package/dist/components/content/token/token.template.js.map +1 -0
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +14 -5
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +11 -0
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/gherkin-DhZlEZiy.js +115 -0
- package/dist/components/index-Bfw_pYWB.js +405 -0
- package/dist/components/index-Bqf6o41r.js +81 -0
- package/dist/components/index-CKnwqp_9.js +688 -0
- package/dist/components/index-CXT1jMFt.js +384 -0
- package/dist/components/index-DO7aT0MT.js +177 -0
- package/dist/components/index-DWwviobk.js +703 -0
- package/dist/components/index-DjsXjoZJ.js +67143 -0
- package/dist/components/index.d.ts +20 -18
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +20 -18
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.d.ts +58 -29
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +241 -52
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +58 -46
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.template.d.ts +1 -1
- package/dist/components/inputs/code-editor/code-editor.template.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.template.js +5 -22
- package/dist/components/inputs/code-editor/code-editor.template.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts +15 -4
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +53 -9
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +2 -1
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +6 -5
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +8 -11
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +2 -1
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.js +3 -2
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.js +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +2 -1
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +10 -9
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.styles.js +70 -36
- package/dist/components/inputs/segmented-control/segmented-control.styles.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +2 -1
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.js +2 -1
- package/dist/components/inputs/switch/switch.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts +51 -0
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +148 -0
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.annotations.d.ts +47 -0
- package/dist/components/inputs/text-editor/text-editor.annotations.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.annotations.js +327 -0
- package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.caret.d.ts +13 -0
- package/dist/components/inputs/text-editor/text-editor.caret.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.caret.js +27 -0
- package/dist/components/inputs/text-editor/text-editor.caret.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.commands.d.ts +68 -0
- package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.commands.js +420 -0
- package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.d.ts +241 -0
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.drag.d.ts +30 -0
- package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.drag.js +231 -0
- package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +8 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.js +13 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.js +780 -0
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts +18 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.links.js +147 -0
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +20 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.js +372 -0
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +32 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.js +153 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.ordered-list.d.ts +12 -0
- package/dist/components/inputs/text-editor/text-editor.ordered-list.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.ordered-list.js +106 -0
- package/dist/components/inputs/text-editor/text-editor.ordered-list.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts +2 -0
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.styles.js +592 -0
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.template.d.ts +4 -0
- package/dist/components/inputs/text-editor/text-editor.template.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.template.js +7 -0
- package/dist/components/inputs/text-editor/text-editor.template.js.map +1 -0
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +3 -2
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +4 -3
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.styles.js +14 -10
- package/dist/components/inputs/toggle-button/toggle-button.styles.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js +5 -4
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts +257 -0
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -0
- package/dist/components/inputs/token-field/token-field.i18n.d.ts +9 -0
- package/dist/components/inputs/token-field/token-field.i18n.d.ts.map +1 -0
- package/dist/components/inputs/token-field/token-field.i18n.js +8 -0
- package/dist/components/inputs/token-field/token-field.i18n.js.map +1 -0
- package/dist/components/inputs/token-field/token-field.js +889 -0
- package/dist/components/inputs/token-field/token-field.js.map +1 -0
- package/dist/components/inputs/token-field/token-field.styles.d.ts +2 -0
- package/dist/components/inputs/token-field/token-field.styles.d.ts.map +1 -0
- package/dist/components/inputs/token-field/token-field.styles.js +194 -0
- package/dist/components/inputs/token-field/token-field.styles.js.map +1 -0
- package/dist/components/inputs/token-field/token-field.template.d.ts +8 -0
- package/dist/components/inputs/token-field/token-field.template.d.ts.map +1 -0
- package/dist/components/inputs/token-field/token-field.template.js +136 -0
- package/dist/components/inputs/token-field/token-field.template.js.map +1 -0
- package/dist/components/layout/app-view/app-view.d.ts +26 -6
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +103 -12
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/app-view/app-view.styles.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.styles.js +25 -0
- package/dist/components/layout/app-view/app-view.styles.js.map +1 -1
- package/dist/components/layout/box/box.d.ts.map +1 -1
- package/dist/components/layout/box/box.js +2 -1
- package/dist/components/layout/box/box.js.map +1 -1
- package/dist/components/layout/box/box.styles.d.ts.map +1 -1
- package/dist/components/layout/box/box.styles.js +1 -6
- package/dist/components/layout/box/box.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +5 -0
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +17 -1
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +18 -17
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +31 -1
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +112 -26
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page/page.styles.d.ts.map +1 -1
- package/dist/components/layout/page/page.styles.js +48 -0
- package/dist/components/layout/page/page.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +2 -1
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +7 -23
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +12 -73
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +13 -159
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts +1 -0
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +14 -1
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +11 -0
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +5 -1
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +20 -6
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +60 -83
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/spacer/spacer.d.ts.map +1 -1
- package/dist/components/layout/spacer/spacer.js +2 -1
- package/dist/components/layout/spacer/spacer.js.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.d.ts.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.js +0 -1
- package/dist/components/layout/spacer/spacer.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +3 -0
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +49 -0
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js +55 -0
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.js +18 -9
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.template.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -0
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +21 -0
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +34 -0
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js +17 -7
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.template.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts +6 -0
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +17 -0
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.js +2 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.js.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.styles.js +10 -10
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts +10 -0
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +13 -0
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +19 -0
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js.map +1 -1
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +11 -2
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-tables/cells/cell/cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/cell/cell.js +4 -3
- package/dist/components/lists-and-tables/cells/cell/cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +3 -2
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +3 -2
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +10 -9
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +3 -2
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +9 -8
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +5 -4
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +3 -2
- package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +2 -1
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +4 -3
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +2 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +5 -4
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +2 -1
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +2 -1
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +4 -3
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +2 -1
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +7 -0
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +31 -5
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +74 -78
- package/dist/components/navigation/tab-bar/tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +8 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +7 -6
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +6 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +47 -10
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/shell-BlsXDxCn.js +222 -0
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +4 -3
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +0 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.js +4 -3
- package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts +0 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +13 -13
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +5 -4
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts +1 -0
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +35 -4
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js +11 -0
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +4 -3
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +9 -8
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +0 -6
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +8 -7
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +0 -2
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js +3 -2
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/components/toml-BOuWGMcf.js +76 -0
- package/dist/css/fouc.css +30 -0
- package/dist/css/global.css +1 -0
- package/dist/css/rich-text.css +0 -5
- package/dist/css/settings.css +25 -10
- package/dist/utilities/codemirror/codemirror-element.d.ts +66 -0
- package/dist/utilities/codemirror/codemirror-element.d.ts.map +1 -0
- package/dist/utilities/codemirror/codemirror-element.js +121 -0
- package/dist/utilities/codemirror/codemirror-element.js.map +1 -0
- package/dist/utilities/codemirror/languages.d.ts +4 -0
- package/dist/utilities/codemirror/languages.d.ts.map +1 -0
- package/dist/utilities/codemirror/languages.js +39 -0
- package/dist/utilities/codemirror/languages.js.map +1 -0
- package/dist/utilities/codemirror/theme.d.ts +4 -0
- package/dist/utilities/codemirror/theme.d.ts.map +1 -0
- package/dist/utilities/codemirror/theme.js +84 -0
- package/dist/utilities/codemirror/theme.js.map +1 -0
- package/dist/utilities/dismiss-from-title-bar.d.ts +19 -0
- package/dist/utilities/dismiss-from-title-bar.d.ts.map +1 -0
- package/dist/utilities/dismiss-from-title-bar.js +21 -0
- package/dist/utilities/dismiss-from-title-bar.js.map +1 -0
- package/dist/utilities/reflect-non-default.d.ts +30 -0
- package/dist/utilities/reflect-non-default.d.ts.map +1 -0
- package/dist/utilities/reflect-non-default.js +34 -0
- package/dist/utilities/reflect-non-default.js.map +1 -0
- package/dist/utilities/scroll-mode-controller.d.ts +69 -0
- package/dist/utilities/scroll-mode-controller.d.ts.map +1 -0
- package/dist/utilities/scroll-mode-controller.js +101 -0
- package/dist/utilities/scroll-mode-controller.js.map +1 -0
- package/package.json +92 -68
- package/dist/components/index-BNhqNvDd.js +0 -36784
- package/dist/components/inputs/token/token.d.ts +0 -42
- package/dist/components/inputs/token/token.d.ts.map +0 -1
- package/dist/components/inputs/token/token.js +0 -86
- package/dist/components/inputs/token/token.js.map +0 -1
- package/dist/components/inputs/token/token.styles.d.ts.map +0 -1
- package/dist/components/inputs/token/token.styles.js +0 -142
- package/dist/components/inputs/token/token.styles.js.map +0 -1
- package/dist/components/inputs/token/token.template.d.ts +0 -4
- package/dist/components/inputs/token/token.template.d.ts.map +0 -1
- package/dist/components/inputs/token/token.template.js +0 -41
- package/dist/components/inputs/token/token.template.js.map +0 -1
- package/dist/components/prism-bash-vbqaw3JR.js +0 -226
- package/dist/components/prism-css-B93tXdOU.js +0 -59
- package/dist/components/prism-gherkin-CMPYyXOQ.js +0 -82
- package/dist/components/prism-javascript-DeC_17Pw.js +0 -140
- package/dist/components/prism-json-DIMpow89.js +0 -25
- package/dist/components/prism-markdown-D-uFBkiz.js +0 -339
- package/dist/components/prism-markup-DfJYPYHA.js +0 -177
- package/dist/components/prism-python--N285k7w.js +0 -99
- package/dist/components/prism-rust-Cnm1tSdo.js +0 -157
- package/dist/components/prism-sql-BGqCBMyJ.js +0 -33
- package/dist/components/prism-toml-Ubdq-a5x.js +0 -45
- package/dist/components/prism-typescript-BPJAiB1s.js +0 -87
- package/dist/components/prism-yaml-DO0f9pf6.js +0 -71
- /package/dist/components/{inputs → content}/token/token.styles.d.ts +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const toml = {
|
|
2
|
+
name: "toml",
|
|
3
|
+
startState: function() {
|
|
4
|
+
return {
|
|
5
|
+
inString: false,
|
|
6
|
+
stringType: "",
|
|
7
|
+
lhs: true,
|
|
8
|
+
inArray: 0
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
token: function(stream, state) {
|
|
12
|
+
let quote;
|
|
13
|
+
if (!state.inString && (quote = stream.match(/^('''|"""|'|")/))) {
|
|
14
|
+
state.stringType = quote[0];
|
|
15
|
+
state.inString = true;
|
|
16
|
+
}
|
|
17
|
+
if (stream.sol() && !state.inString && state.inArray === 0) {
|
|
18
|
+
state.lhs = true;
|
|
19
|
+
}
|
|
20
|
+
if (state.inString) {
|
|
21
|
+
while (state.inString) {
|
|
22
|
+
if (stream.match(state.stringType)) {
|
|
23
|
+
state.inString = false;
|
|
24
|
+
} else if (stream.peek() === "\\") {
|
|
25
|
+
stream.next();
|
|
26
|
+
stream.next();
|
|
27
|
+
} else if (stream.eol()) {
|
|
28
|
+
break;
|
|
29
|
+
} else {
|
|
30
|
+
stream.match(/^.[^\\\"\']*/);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return state.lhs ? "property" : "string";
|
|
34
|
+
} else if (state.inArray && stream.peek() === "]") {
|
|
35
|
+
stream.next();
|
|
36
|
+
state.inArray--;
|
|
37
|
+
return "bracket";
|
|
38
|
+
} else if (state.lhs && stream.peek() === "[" && stream.skipTo("]")) {
|
|
39
|
+
stream.next();
|
|
40
|
+
if (stream.peek() === "]") stream.next();
|
|
41
|
+
return "atom";
|
|
42
|
+
} else if (stream.peek() === "#") {
|
|
43
|
+
stream.skipToEnd();
|
|
44
|
+
return "comment";
|
|
45
|
+
} else if (stream.eatSpace()) {
|
|
46
|
+
return null;
|
|
47
|
+
} else if (state.lhs && stream.eatWhile(function(c) {
|
|
48
|
+
return c != "=" && c != " ";
|
|
49
|
+
})) {
|
|
50
|
+
return "property";
|
|
51
|
+
} else if (state.lhs && stream.peek() === "=") {
|
|
52
|
+
stream.next();
|
|
53
|
+
state.lhs = false;
|
|
54
|
+
return null;
|
|
55
|
+
} else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) {
|
|
56
|
+
return "atom";
|
|
57
|
+
} else if (!state.lhs && (stream.match("true") || stream.match("false"))) {
|
|
58
|
+
return "atom";
|
|
59
|
+
} else if (!state.lhs && stream.peek() === "[") {
|
|
60
|
+
state.inArray++;
|
|
61
|
+
stream.next();
|
|
62
|
+
return "bracket";
|
|
63
|
+
} else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) {
|
|
64
|
+
return "number";
|
|
65
|
+
} else if (!stream.eatSpace()) {
|
|
66
|
+
stream.next();
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
},
|
|
70
|
+
languageData: {
|
|
71
|
+
commentTokens: { line: "#" }
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
toml
|
|
76
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* Reduce FOUC — flash of unstyled / not-yet-upgraded web components.
|
|
2
|
+
*
|
|
3
|
+
* Bundled into the design system's global stylesheet, so importing
|
|
4
|
+
* '@nldd/design-system/styles' pulls it in. Also importable on its own:
|
|
5
|
+
* import '@nldd/design-system/styles/fouc';
|
|
6
|
+
* (or, in an Astro layout, in the frontmatter — it applies to the whole page).
|
|
7
|
+
*
|
|
8
|
+
* Keeps the page hidden until every custom element on it has upgraded (:defined),
|
|
9
|
+
* or a 200ms fallback — whichever comes first, so the page still reveals if a
|
|
10
|
+
* component never loads. Note the :defined check is page-wide: ANY undefined
|
|
11
|
+
* custom element on the page (including a non-NLDD one) holds the page hidden
|
|
12
|
+
* until it upgrades or the fallback fires. Pure CSS, no JS.
|
|
13
|
+
*
|
|
14
|
+
* Based on https://dev.to/stuffbreaker/reducing-fouc-with-web-components-1jnh
|
|
15
|
+
*/
|
|
16
|
+
body {
|
|
17
|
+
/* The always-on animation reveals — and, via `forwards`, keeps revealed — after
|
|
18
|
+
the fallback delay, so a later-added undefined element can't re-hide the page. */
|
|
19
|
+
animation: nldd-fouc-reveal 0s linear 200ms forwards;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body:has(:not(:defined)) {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes nldd-fouc-reveal {
|
|
27
|
+
to {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/css/global.css
CHANGED
package/dist/css/rich-text.css
CHANGED
|
@@ -46,7 +46,6 @@ nldd-rich-text[centered] {
|
|
|
46
46
|
|
|
47
47
|
nldd-rich-text[spacing="flat"] { --_spacing: var(--components-rich-text-spacing-flat); }
|
|
48
48
|
nldd-rich-text[spacing="tight"] { --_spacing: var(--components-rich-text-spacing-tight); }
|
|
49
|
-
nldd-rich-text[spacing="snug"] { --_spacing: var(--components-rich-text-spacing-snug); }
|
|
50
49
|
nldd-rich-text[spacing="loose"] { --_spacing: var(--components-rich-text-spacing-loose); }
|
|
51
50
|
|
|
52
51
|
nldd-rich-text[hidden] {
|
|
@@ -454,11 +453,8 @@ nldd-rich-text blockquote {
|
|
|
454
453
|
calc(var(--semantics-blockquotes-md-spacing) - var(--_spacing))
|
|
455
454
|
);
|
|
456
455
|
margin-inline: 0;
|
|
457
|
-
padding-block-start: var(--semantics-blockquotes-md-spacing);
|
|
458
456
|
padding-inline: var(--semantics-blockquotes-md-spacing);
|
|
459
|
-
border-top: var(--semantics-blockquotes-border);
|
|
460
457
|
border-left: var(--semantics-blockquotes-border);
|
|
461
|
-
border-top-left-radius: var(--semantics-blockquotes-corner-radius);
|
|
462
458
|
font: var(--semantics-blockquotes-md-quote-font);
|
|
463
459
|
|
|
464
460
|
@container (max-width: 640px) {
|
|
@@ -467,7 +463,6 @@ nldd-rich-text blockquote {
|
|
|
467
463
|
0px,
|
|
468
464
|
calc(var(--semantics-blockquotes-sm-spacing) - var(--_spacing))
|
|
469
465
|
);
|
|
470
|
-
padding-block-start: var(--semantics-blockquotes-sm-spacing);
|
|
471
466
|
padding-inline: var(--semantics-blockquotes-sm-spacing);
|
|
472
467
|
font: var(--semantics-blockquotes-sm-quote-font);
|
|
473
468
|
}
|
package/dist/css/settings.css
CHANGED
|
@@ -1235,7 +1235,6 @@
|
|
|
1235
1235
|
--semantics-blockquotes-sm-spacing: calc(var(--primitives-font-size-200) * var(--primitives-line-height-snug));
|
|
1236
1236
|
--semantics-blockquotes-md-spacing: calc(var(--primitives-font-size-300) * var(--primitives-line-height-snug));
|
|
1237
1237
|
--semantics-blockquotes-border: var(--primitives-border-width-regular) solid var(--semantics-content-color);
|
|
1238
|
-
--semantics-blockquotes-corner-radius: var(--primitives-corner-radius-xxxl);
|
|
1239
1238
|
--semantics-blockquotes-sm-quote-font:
|
|
1240
1239
|
italic
|
|
1241
1240
|
var(--primitives-font-weight-body-regular)
|
|
@@ -1310,15 +1309,30 @@
|
|
|
1310
1309
|
--semantics-buttons-md-icon-size: var(--primitives-space-20);
|
|
1311
1310
|
--semantics-buttons-lg-icon-size: var(--primitives-space-24);
|
|
1312
1311
|
|
|
1313
|
-
--semantics-buttons-xs-
|
|
1314
|
-
--semantics-buttons-sm-
|
|
1315
|
-
--semantics-buttons-md-
|
|
1316
|
-
--semantics-buttons-lg-
|
|
1312
|
+
--semantics-buttons-xs-has-supporting-text-icon-size: var(--primitives-space-16);
|
|
1313
|
+
--semantics-buttons-sm-has-supporting-text-icon-size: var(--primitives-space-18);
|
|
1314
|
+
--semantics-buttons-md-has-supporting-text-icon-size: var(--primitives-space-24);
|
|
1315
|
+
--semantics-buttons-lg-has-supporting-text-icon-size: var(--primitives-space-32);
|
|
1317
1316
|
|
|
1318
|
-
--semantics-buttons-xs-icon-only-icon-size: var(--primitives-space-16);
|
|
1319
|
-
--semantics-buttons-sm-icon-only-icon-size: var(--primitives-space-20);
|
|
1320
|
-
--semantics-buttons-md-icon-only-icon-size: var(--primitives-space-24);
|
|
1321
|
-
--semantics-buttons-lg-icon-only-icon-size: var(--primitives-space-28);
|
|
1317
|
+
--semantics-buttons-xs-is-icon-only-icon-size: var(--primitives-space-16);
|
|
1318
|
+
--semantics-buttons-sm-is-icon-only-icon-size: var(--primitives-space-20);
|
|
1319
|
+
--semantics-buttons-md-is-icon-only-icon-size: var(--primitives-space-24);
|
|
1320
|
+
--semantics-buttons-lg-is-icon-only-icon-size: var(--primitives-space-28);
|
|
1321
|
+
|
|
1322
|
+
--semantics-buttons-xs-inline-padding: calc((var(--semantics-controls-xs-min-size) - var(--semantics-buttons-xs-icon-size)) / 2);
|
|
1323
|
+
--semantics-buttons-sm-inline-padding: calc((var(--semantics-controls-sm-min-size) - var(--semantics-buttons-sm-icon-size)) / 2);
|
|
1324
|
+
--semantics-buttons-md-inline-padding: calc((var(--semantics-controls-md-min-size) - var(--semantics-buttons-md-icon-size)) / 2);
|
|
1325
|
+
--semantics-buttons-lg-inline-padding: calc((var(--semantics-controls-lg-min-size) - var(--semantics-buttons-lg-icon-size)) / 2);
|
|
1326
|
+
|
|
1327
|
+
--semantics-buttons-xs-has-supporting-text-inline-padding: calc((var(--semantics-controls-xs-min-size) - var(--semantics-buttons-xs-has-supporting-text-icon-size)) / 2);
|
|
1328
|
+
--semantics-buttons-sm-has-supporting-text-inline-padding: calc((var(--semantics-controls-sm-min-size) - var(--semantics-buttons-sm-has-supporting-text-icon-size)) / 2);
|
|
1329
|
+
--semantics-buttons-md-has-supporting-text-inline-padding: calc((var(--semantics-controls-md-min-size) - var(--semantics-buttons-md-has-supporting-text-icon-size)) / 2);
|
|
1330
|
+
--semantics-buttons-lg-has-supporting-text-inline-padding: calc((var(--semantics-controls-lg-min-size) - var(--semantics-buttons-lg-has-supporting-text-icon-size)) / 2);
|
|
1331
|
+
|
|
1332
|
+
--semantics-buttons-xs-is-icon-only-inline-padding: calc((var(--semantics-controls-xs-min-size) - var(--semantics-buttons-xs-is-icon-only-icon-size)) / 2);
|
|
1333
|
+
--semantics-buttons-sm-is-icon-only-inline-padding: calc((var(--semantics-controls-sm-min-size) - var(--semantics-buttons-sm-is-icon-only-icon-size)) / 2);
|
|
1334
|
+
--semantics-buttons-md-is-icon-only-inline-padding: calc((var(--semantics-controls-md-min-size) - var(--semantics-buttons-md-is-icon-only-icon-size)) / 2);
|
|
1335
|
+
--semantics-buttons-lg-is-icon-only-inline-padding: calc((var(--semantics-controls-lg-min-size) - var(--semantics-buttons-lg-is-icon-only-icon-size)) / 2);
|
|
1322
1336
|
|
|
1323
1337
|
--semantics-buttons-neutral-base-background-color: var(--semantics-surfaces-base-background-color);
|
|
1324
1338
|
--semantics-buttons-neutral-base-primary-content-color: light-dark(var(--primitives-color-neutral-900), var(--primitives-color-neutral-900));
|
|
@@ -1717,7 +1731,8 @@
|
|
|
1717
1731
|
|
|
1718
1732
|
/* ## Image */
|
|
1719
1733
|
|
|
1720
|
-
--components-image-corner-radius: var(--
|
|
1734
|
+
--components-image-corner-radius: var(--primitives-corner-radius-none);
|
|
1735
|
+
--components-image-rounded-corner-radius: var(--semantics-controls-md-corner-radius);
|
|
1721
1736
|
--components-image-background-color: light-dark(var(--primitives-color-neutral-75), var(--primitives-color-neutral-50));
|
|
1722
1737
|
--components-image-error-text-color: var(--semantics-content-color);
|
|
1723
1738
|
--components-image-error-font: var(--primitives-font-body-sm-regular-snug);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
import { type Compartment, type Extension } from '@codemirror/state';
|
|
4
|
+
/**
|
|
5
|
+
* Shared base for design-system editors built on CodeMirror 6
|
|
6
|
+
* (nldd-code-editor, nldd-code-viewer, nldd-text-editor).
|
|
7
|
+
*
|
|
8
|
+
* It owns the EditorView lifecycle, mounts the view inside the component's
|
|
9
|
+
* shadow root (so CodeMirror's generated styles and selection stay scoped),
|
|
10
|
+
* and offers small helpers for document and compartment updates. Subclasses
|
|
11
|
+
* provide the parent element and the extension set; everything component
|
|
12
|
+
* specific (form association, public attributes, events) lives there.
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class NLDDCodeMirrorElement extends LitElement {
|
|
15
|
+
protected view?: EditorView;
|
|
16
|
+
/** True once the view has been mounted at least once — drives re-mount on reconnect. */
|
|
17
|
+
private _hasMounted;
|
|
18
|
+
/** Document captured on disconnect so a re-mount restores the live content. */
|
|
19
|
+
private _preservedDoc?;
|
|
20
|
+
/** The shadow-DOM element the EditorView mounts into. */
|
|
21
|
+
protected abstract getEditorParent(): HTMLElement | null | undefined;
|
|
22
|
+
/** The full extension set for the initial EditorState. */
|
|
23
|
+
protected abstract buildExtensions(): Extension[];
|
|
24
|
+
/** Current document text, or '' before the view exists. */
|
|
25
|
+
protected get doc(): string;
|
|
26
|
+
protected mountEditor(initialDoc: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Per-mount setup hook, called right after the view is created — on the
|
|
29
|
+
* initial mount (from the subclass `firstUpdated`) and on every re-mount
|
|
30
|
+
* after a detach/reattach. Subclasses (re)attach observers, DOM listeners
|
|
31
|
+
* and language grammars here so they survive being moved in the DOM.
|
|
32
|
+
* Default: no-op.
|
|
33
|
+
*/
|
|
34
|
+
protected onEditorMounted(): void;
|
|
35
|
+
/**
|
|
36
|
+
* The document to seed the view with on a re-mount after a detach/reattach.
|
|
37
|
+
* Defaults to the document captured on disconnect — correct for editors,
|
|
38
|
+
* whose live view is the source of truth. A subclass whose source of truth
|
|
39
|
+
* lives elsewhere (e.g. the viewer, backed by its slot) overrides this to
|
|
40
|
+
* return that live text so a reattach with changed content isn't stale.
|
|
41
|
+
*/
|
|
42
|
+
protected getRemountDoc(): string;
|
|
43
|
+
protected destroyEditor(): void;
|
|
44
|
+
/** Replace the whole document (used by the `value` property setter). */
|
|
45
|
+
protected setDoc(text: string): void;
|
|
46
|
+
/** Swap a single compartment at runtime (language, readonly, wrap, …). */
|
|
47
|
+
protected reconfigure(compartment: Compartment, extension: Extension): void;
|
|
48
|
+
/**
|
|
49
|
+
* Focus the editor itself, not the host. delegatesFocus handles a click or tab
|
|
50
|
+
* into the host, but a programmatic host.focus() is routed straight to
|
|
51
|
+
* CodeMirror here, whose contenteditable delegatesFocus does not reliably
|
|
52
|
+
* target.
|
|
53
|
+
*/
|
|
54
|
+
focus(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Focus the editor and place the caret on the line nearest a viewport point.
|
|
57
|
+
* Lets a wrapping composition forward clicks from its own padding —
|
|
58
|
+
* `editor.focusFromPoint(event.clientX, event.clientY)` — so a layout
|
|
59
|
+
* container can own the surrounding space without the editor knowing about
|
|
60
|
+
* it. No-op on a non-editable view.
|
|
61
|
+
*/
|
|
62
|
+
focusFromPoint(x: number, y: number): void;
|
|
63
|
+
connectedCallback(): void;
|
|
64
|
+
disconnectedCallback(): void;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=codemirror-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-element.d.ts","sourceRoot":"","sources":["../../../src/utilities/codemirror/codemirror-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAElF;;;;;;;;;GASG;AACH,8BAAsB,qBAAsB,SAAQ,UAAU;IAC7D,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAE5B,wFAAwF;IACxF,OAAO,CAAC,WAAW,CAAS;IAE5B,+EAA+E;IAC/E,OAAO,CAAC,aAAa,CAAC,CAAS;IAE/B,yDAAyD;IACzD,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS;IAEpE,0DAA0D;IAC1D,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,SAAS,EAAE;IAEjD,2DAA2D;IAC3D,SAAS,KAAK,GAAG,IAAI,MAAM,CAE1B;IAED,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAa/C;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,IAAI,IAAI;IAEjC;;;;;;OAMG;IACH,SAAS,CAAC,aAAa,IAAI,MAAM;IAIjC,SAAS,CAAC,aAAa,IAAI,IAAI;IAK/B,wEAAwE;IACxE,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMpC,0EAA0E;IAC1E,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAI3E;;;;;OAKG;IACM,KAAK,IAAI,IAAI;IAItB;;;;;;OAMG;IACH,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAajC,iBAAiB,IAAI,IAAI;IAYzB,oBAAoB,IAAI,IAAI;CAOrC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
import { EditorState } from '@codemirror/state';
|
|
4
|
+
/**
|
|
5
|
+
* Shared base for design-system editors built on CodeMirror 6
|
|
6
|
+
* (nldd-code-editor, nldd-code-viewer, nldd-text-editor).
|
|
7
|
+
*
|
|
8
|
+
* It owns the EditorView lifecycle, mounts the view inside the component's
|
|
9
|
+
* shadow root (so CodeMirror's generated styles and selection stay scoped),
|
|
10
|
+
* and offers small helpers for document and compartment updates. Subclasses
|
|
11
|
+
* provide the parent element and the extension set; everything component
|
|
12
|
+
* specific (form association, public attributes, events) lives there.
|
|
13
|
+
*/
|
|
14
|
+
export class NLDDCodeMirrorElement extends LitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/** True once the view has been mounted at least once — drives re-mount on reconnect. */
|
|
18
|
+
this._hasMounted = false;
|
|
19
|
+
}
|
|
20
|
+
/** Current document text, or '' before the view exists. */
|
|
21
|
+
get doc() {
|
|
22
|
+
return this.view ? this.view.state.doc.toString() : '';
|
|
23
|
+
}
|
|
24
|
+
mountEditor(initialDoc) {
|
|
25
|
+
const parent = this.getEditorParent();
|
|
26
|
+
if (!parent || this.view)
|
|
27
|
+
return;
|
|
28
|
+
this.view = new EditorView({
|
|
29
|
+
state: EditorState.create({ doc: initialDoc, extensions: this.buildExtensions() }),
|
|
30
|
+
parent,
|
|
31
|
+
// Mount in the shadow root so getSelection()/focus stay scoped and
|
|
32
|
+
// CodeMirror's StyleModule injects into this root, not the document.
|
|
33
|
+
root: this.shadowRoot ?? undefined,
|
|
34
|
+
});
|
|
35
|
+
this._hasMounted = true;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Per-mount setup hook, called right after the view is created — on the
|
|
39
|
+
* initial mount (from the subclass `firstUpdated`) and on every re-mount
|
|
40
|
+
* after a detach/reattach. Subclasses (re)attach observers, DOM listeners
|
|
41
|
+
* and language grammars here so they survive being moved in the DOM.
|
|
42
|
+
* Default: no-op.
|
|
43
|
+
*/
|
|
44
|
+
onEditorMounted() { }
|
|
45
|
+
/**
|
|
46
|
+
* The document to seed the view with on a re-mount after a detach/reattach.
|
|
47
|
+
* Defaults to the document captured on disconnect — correct for editors,
|
|
48
|
+
* whose live view is the source of truth. A subclass whose source of truth
|
|
49
|
+
* lives elsewhere (e.g. the viewer, backed by its slot) overrides this to
|
|
50
|
+
* return that live text so a reattach with changed content isn't stale.
|
|
51
|
+
*/
|
|
52
|
+
getRemountDoc() {
|
|
53
|
+
return this._preservedDoc ?? '';
|
|
54
|
+
}
|
|
55
|
+
destroyEditor() {
|
|
56
|
+
this.view?.destroy();
|
|
57
|
+
this.view = undefined;
|
|
58
|
+
}
|
|
59
|
+
/** Replace the whole document (used by the `value` property setter). */
|
|
60
|
+
setDoc(text) {
|
|
61
|
+
const view = this.view;
|
|
62
|
+
if (!view || view.state.doc.toString() === text)
|
|
63
|
+
return;
|
|
64
|
+
view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: text } });
|
|
65
|
+
}
|
|
66
|
+
/** Swap a single compartment at runtime (language, readonly, wrap, …). */
|
|
67
|
+
reconfigure(compartment, extension) {
|
|
68
|
+
this.view?.dispatch({ effects: compartment.reconfigure(extension) });
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Focus the editor itself, not the host. delegatesFocus handles a click or tab
|
|
72
|
+
* into the host, but a programmatic host.focus() is routed straight to
|
|
73
|
+
* CodeMirror here, whose contenteditable delegatesFocus does not reliably
|
|
74
|
+
* target.
|
|
75
|
+
*/
|
|
76
|
+
focus() {
|
|
77
|
+
this.view?.focus();
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Focus the editor and place the caret on the line nearest a viewport point.
|
|
81
|
+
* Lets a wrapping composition forward clicks from its own padding —
|
|
82
|
+
* `editor.focusFromPoint(event.clientX, event.clientY)` — so a layout
|
|
83
|
+
* container can own the surrounding space without the editor knowing about
|
|
84
|
+
* it. No-op on a non-editable view.
|
|
85
|
+
*/
|
|
86
|
+
focusFromPoint(x, y) {
|
|
87
|
+
const view = this.view;
|
|
88
|
+
if (!view)
|
|
89
|
+
return;
|
|
90
|
+
// No caret to move on a read-only/disabled view — a direct call is a
|
|
91
|
+
// genuine no-op (matches this comment; also covers the read-only viewer
|
|
92
|
+
// and text-editor). Callers that forward padding clicks already guard on
|
|
93
|
+
// state.readOnly, but a bare focusFromPoint() must not move the caret.
|
|
94
|
+
if (view.state.readOnly)
|
|
95
|
+
return;
|
|
96
|
+
const pos = view.posAtCoords({ x, y }, false) ?? view.state.doc.length;
|
|
97
|
+
view.dispatch({ selection: { anchor: pos } });
|
|
98
|
+
view.focus();
|
|
99
|
+
}
|
|
100
|
+
connectedCallback() {
|
|
101
|
+
super.connectedCallback();
|
|
102
|
+
// A detach/reattach — Vue <KeepAlive>, a moved subtree, a <details> toggle —
|
|
103
|
+
// runs disconnectedCallback (which destroyed the view) without re-running
|
|
104
|
+
// Lit's one-shot firstUpdated. Rebuild the view from the preserved document
|
|
105
|
+
// so the editor comes back populated instead of blank until a page reload.
|
|
106
|
+
if (this._hasMounted && !this.view) {
|
|
107
|
+
this.mountEditor(this.getRemountDoc());
|
|
108
|
+
if (this.view)
|
|
109
|
+
this.onEditorMounted();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
disconnectedCallback() {
|
|
113
|
+
super.disconnectedCallback();
|
|
114
|
+
// Capture the live document before the view is torn down so a later
|
|
115
|
+
// re-mount (see connectedCallback) restores exactly what was on screen.
|
|
116
|
+
if (this.view)
|
|
117
|
+
this._preservedDoc = this.doc;
|
|
118
|
+
this.destroyEditor();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=codemirror-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-element.js","sourceRoot":"","sources":["../../../src/utilities/codemirror/codemirror-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAoC,MAAM,mBAAmB,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,OAAgB,qBAAsB,SAAQ,UAAU;IAA9D;;QAGC,wFAAwF;QAChF,gBAA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F,CAAC;IAEQ,oBAAoB;QAC5B,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,oEAAoE;QACpE,wEAAwE;QACxE,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC;QAC7C,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/utilities/codemirror/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AA4BvE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,CAc/E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LanguageSupport, StreamLanguage } from '@codemirror/language';
|
|
2
|
+
const loaders = {
|
|
3
|
+
json: async () => (await import('@codemirror/lang-json')).json(),
|
|
4
|
+
yaml: async () => (await import('@codemirror/lang-yaml')).yaml(),
|
|
5
|
+
javascript: async () => (await import('@codemirror/lang-javascript')).javascript(),
|
|
6
|
+
typescript: async () => (await import('@codemirror/lang-javascript')).javascript({ typescript: true }),
|
|
7
|
+
css: async () => (await import('@codemirror/lang-css')).css(),
|
|
8
|
+
html: async () => (await import('@codemirror/lang-html')).html(),
|
|
9
|
+
xml: async () => (await import('@codemirror/lang-xml')).xml(),
|
|
10
|
+
python: async () => (await import('@codemirror/lang-python')).python(),
|
|
11
|
+
rust: async () => (await import('@codemirror/lang-rust')).rust(),
|
|
12
|
+
sql: async () => (await import('@codemirror/lang-sql')).sql(),
|
|
13
|
+
markdown: async () => (await import('@codemirror/lang-markdown')).markdown(),
|
|
14
|
+
// No official lang-* package — wrap the legacy StreamLanguage modes.
|
|
15
|
+
bash: async () => new LanguageSupport(StreamLanguage.define((await import('@codemirror/legacy-modes/mode/shell')).shell)),
|
|
16
|
+
toml: async () => new LanguageSupport(StreamLanguage.define((await import('@codemirror/legacy-modes/mode/toml')).toml)),
|
|
17
|
+
gherkin: async () => new LanguageSupport(StreamLanguage.define((await import('@codemirror/legacy-modes/mode/gherkin')).gherkin)),
|
|
18
|
+
};
|
|
19
|
+
const cache = new Map();
|
|
20
|
+
export function isLanguageSupported(name) {
|
|
21
|
+
return Object.prototype.hasOwnProperty.call(loaders, name);
|
|
22
|
+
}
|
|
23
|
+
export function loadLanguage(name) {
|
|
24
|
+
const loader = loaders[name];
|
|
25
|
+
if (!loader)
|
|
26
|
+
return undefined;
|
|
27
|
+
let pending = cache.get(name);
|
|
28
|
+
if (!pending) {
|
|
29
|
+
// Drop the cache entry on failure so a later attempt can retry
|
|
30
|
+
// (e.g. a transient chunk-load failure on a flaky network).
|
|
31
|
+
pending = loader().catch((err) => {
|
|
32
|
+
cache.delete(name);
|
|
33
|
+
throw err;
|
|
34
|
+
});
|
|
35
|
+
cache.set(name, pending);
|
|
36
|
+
}
|
|
37
|
+
return pending;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../../src/utilities/codemirror/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQvE,MAAM,OAAO,GAA2B;IACvC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,EAAE;IAChE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,EAAE;IAChE,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,6BAA6B,C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vH,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI,eAAe,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;CAChI,CAAC;AAEF,MAAM,KAAK,GAAG,IAAI,GAAG,EAAoC,CAAC;AAE1D,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC/C,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACxC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,IAAI,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,+DAA+D;QAC/D,4DAA4D;QAC5D,OAAO,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YAChC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,GAAG,CAAC;QACX,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/utilities/codemirror/theme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkFnD,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,EAAE,SAA2D,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
3
|
+
import { tags as t } from '@lezer/highlight';
|
|
4
|
+
/* CodeMirror's generated theme styles mount into the same root as the view
|
|
5
|
+
* (the component's shadow root). CSS custom properties inherit across the
|
|
6
|
+
* shadow boundary, so every var(--…) below resolves against settings.css and
|
|
7
|
+
* adapts to light/dark mode automatically. Background and padding are left to
|
|
8
|
+
* the host component (the box/simple variant owns the framing). */
|
|
9
|
+
const baseTheme = EditorView.theme({
|
|
10
|
+
'&': {
|
|
11
|
+
height: '100%',
|
|
12
|
+
color: 'var(--semantics-content-color)',
|
|
13
|
+
backgroundColor: 'transparent',
|
|
14
|
+
},
|
|
15
|
+
'&.cm-focused': {
|
|
16
|
+
// The focus ring lives on the host (.code-editor:focus-within).
|
|
17
|
+
outline: 'none',
|
|
18
|
+
},
|
|
19
|
+
'.cm-scroller': {
|
|
20
|
+
fontFamily: 'inherit',
|
|
21
|
+
lineHeight: 'inherit',
|
|
22
|
+
overflow: 'auto',
|
|
23
|
+
},
|
|
24
|
+
'.cm-content': {
|
|
25
|
+
padding: '0',
|
|
26
|
+
caretColor: 'var(--semantics-content-color)',
|
|
27
|
+
},
|
|
28
|
+
'.cm-line': {
|
|
29
|
+
padding: '0',
|
|
30
|
+
},
|
|
31
|
+
'.cm-cursor, .cm-dropCursor': {
|
|
32
|
+
borderLeftColor: 'var(--semantics-content-color)',
|
|
33
|
+
},
|
|
34
|
+
'.cm-placeholder': {
|
|
35
|
+
color: 'var(--semantics-input-fields-placeholder-color)',
|
|
36
|
+
},
|
|
37
|
+
// A solid selection colour. accent-150/250 are themselves light-dark; the
|
|
38
|
+
// outer light-dark() picks the lighter step in light mode and the darker step
|
|
39
|
+
// in dark mode (the accent scale inverts), keeping the selection subtle.
|
|
40
|
+
// The focused selector matches CodeMirror's own deep one so our colour wins on
|
|
41
|
+
// equal specificity — otherwise CM's light base theme paints the focused
|
|
42
|
+
// selection lavender, unreadable on a dark surface.
|
|
43
|
+
'&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
44
|
+
backgroundColor: 'light-dark(var(--primitives-color-accent-150), var(--primitives-color-accent-250))',
|
|
45
|
+
},
|
|
46
|
+
'.cm-gutters': {
|
|
47
|
+
border: 'none',
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
color: 'var(--semantics-input-fields-placeholder-color)',
|
|
50
|
+
},
|
|
51
|
+
// Breathing room between the line-number gutter and the code (VS Code-like).
|
|
52
|
+
'.cm-lineNumbers .cm-gutterElement': {
|
|
53
|
+
padding: '0 var(--primitives-space-16) 0 var(--primitives-space-8)',
|
|
54
|
+
},
|
|
55
|
+
'.cm-activeLine, .cm-activeLineGutter': {
|
|
56
|
+
backgroundColor: 'transparent',
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
/* Token colors reuse the existing code-viewer palette so the editor and the
|
|
60
|
+
* read-only viewer highlight identically with one source of truth. */
|
|
61
|
+
const highlightStyle = HighlightStyle.define([
|
|
62
|
+
{ tag: [t.comment, t.lineComment, t.blockComment, t.docComment], color: 'var(--components-code-viewer-token-comment-color)', fontStyle: 'italic' },
|
|
63
|
+
{ tag: [t.keyword, t.modifier, t.controlKeyword, t.operatorKeyword], color: 'var(--components-code-viewer-token-keyword-color)' },
|
|
64
|
+
{ tag: [t.string, t.special(t.string), t.character], color: 'var(--components-code-viewer-token-string-color)' },
|
|
65
|
+
{ tag: [t.number, t.integer, t.float], color: 'var(--components-code-viewer-token-number-color)' },
|
|
66
|
+
{ tag: t.bool, color: 'var(--components-code-viewer-token-boolean-color)' },
|
|
67
|
+
{ tag: t.null, color: 'var(--components-code-viewer-token-null-color)' },
|
|
68
|
+
{ tag: [t.function(t.variableName), t.function(t.propertyName)], color: 'var(--components-code-viewer-token-function-color)' },
|
|
69
|
+
{ tag: [t.className, t.typeName, t.namespace], color: 'var(--components-code-viewer-token-class-color)' },
|
|
70
|
+
{ tag: [t.propertyName, t.attributeName], color: 'var(--components-code-viewer-token-property-color)' },
|
|
71
|
+
{ tag: [t.punctuation, t.separator, t.bracket], color: 'var(--components-code-viewer-token-punctuation-color)' },
|
|
72
|
+
{ tag: t.operator, color: 'var(--components-code-viewer-token-operator-color)' },
|
|
73
|
+
{ tag: t.tagName, color: 'var(--components-code-viewer-token-tag-color)' },
|
|
74
|
+
{ tag: t.attributeValue, color: 'var(--components-code-viewer-token-attr-value-color)' },
|
|
75
|
+
{ tag: t.variableName, color: 'var(--components-code-viewer-token-variable-color)' },
|
|
76
|
+
{ tag: [t.constant(t.variableName), t.standard(t.variableName)], color: 'var(--components-code-viewer-token-constant-color)' },
|
|
77
|
+
{ tag: t.regexp, color: 'var(--components-code-viewer-token-regex-color)' },
|
|
78
|
+
{ tag: t.url, color: 'var(--components-code-viewer-token-url-color)' },
|
|
79
|
+
{ tag: t.strong, fontWeight: 'bold' },
|
|
80
|
+
{ tag: t.emphasis, fontStyle: 'italic' },
|
|
81
|
+
]);
|
|
82
|
+
/** Theme + syntax highlighting as one extension, shared by all DS editors. */
|
|
83
|
+
export const nlddCodeMirrorTheme = [baseTheme, syntaxHighlighting(highlightStyle)];
|
|
84
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/utilities/codemirror/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,kBAAkB,CAAC;AAG7C;;;;mEAImE;AACnE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC;IAClC,GAAG,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,gCAAgC;QACvC,eAAe,EAAE,aAAa;KAC9B;IACD,cAAc,EAAE;QACf,gEAAgE;QAChE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AC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,oDAAoD,EAAE;IAC9H,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,iDAAiD,EAAE;IAC3E,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,+CAA+C,EAAE;IACtE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;IACrC,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAc,CAAC,SAAS,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when a bubbling `dismiss` event originates from an `nldd-top-title-bar`'s
|
|
3
|
+
* close button.
|
|
4
|
+
*
|
|
5
|
+
* Overlay containers (`nldd-sheet`, `nldd-window`) listen for bubbling `dismiss`
|
|
6
|
+
* events to close themselves. But nested components fire their own `dismiss` for
|
|
7
|
+
* their own element — an `nldd-token`'s remove button, an `nldd-banner`, an
|
|
8
|
+
* `nldd-document-tab-bar` — and those must NOT close the container. Only the
|
|
9
|
+
* container's own top-title-bar dismiss should. This shared check keeps that rule
|
|
10
|
+
* identical across every overlay container.
|
|
11
|
+
*
|
|
12
|
+
* Limitation: it matches ANY nldd-top-title-bar in the composed path, not
|
|
13
|
+
* specifically the container's own. That is correct for today's one-title-bar-per
|
|
14
|
+
* -container usage; a nested composition with more than one title bar (a sheet
|
|
15
|
+
* inside a sheet, each with its own) would need the inner container to
|
|
16
|
+
* stopPropagation on its own dismiss so it doesn't also reach the outer one.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isDismissFromTitleBar(e: Event): boolean;
|
|
19
|
+
//# sourceMappingURL=dismiss-from-title-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dismiss-from-title-bar.d.ts","sourceRoot":"","sources":["../../src/utilities/dismiss-from-title-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAIvD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when a bubbling `dismiss` event originates from an `nldd-top-title-bar`'s
|
|
3
|
+
* close button.
|
|
4
|
+
*
|
|
5
|
+
* Overlay containers (`nldd-sheet`, `nldd-window`) listen for bubbling `dismiss`
|
|
6
|
+
* events to close themselves. But nested components fire their own `dismiss` for
|
|
7
|
+
* their own element — an `nldd-token`'s remove button, an `nldd-banner`, an
|
|
8
|
+
* `nldd-document-tab-bar` — and those must NOT close the container. Only the
|
|
9
|
+
* container's own top-title-bar dismiss should. This shared check keeps that rule
|
|
10
|
+
* identical across every overlay container.
|
|
11
|
+
*
|
|
12
|
+
* Limitation: it matches ANY nldd-top-title-bar in the composed path, not
|
|
13
|
+
* specifically the container's own. That is correct for today's one-title-bar-per
|
|
14
|
+
* -container usage; a nested composition with more than one title bar (a sheet
|
|
15
|
+
* inside a sheet, each with its own) would need the inner container to
|
|
16
|
+
* stopPropagation on its own dismiss so it doesn't also reach the outer one.
|
|
17
|
+
*/
|
|
18
|
+
export function isDismissFromTitleBar(e) {
|
|
19
|
+
return e.composedPath().some((t) => t instanceof Element && t.tagName.toLowerCase() === 'nldd-top-title-bar');
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=dismiss-from-title-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dismiss-from-title-bar.js","sourceRoot":"","sources":["../../src/utilities/dismiss-from-title-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAAQ;IAC7C,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,IAAI,CAC3B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,oBAAoB,CAC/E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ComplexAttributeConverter } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* A Lit attribute converter for a reflected enum property whose DEFAULT value
|
|
4
|
+
* should not appear in the DOM.
|
|
5
|
+
*
|
|
6
|
+
* It reflects any non-default value to the attribute (so `:host([prop="x"])`
|
|
7
|
+
* styling and framework property binding keep working), but maps the default to
|
|
8
|
+
* *no* attribute (`toAttribute` returns null), so the DOM isn't polluted with a
|
|
9
|
+
* redundant `prop="<default>"` on every instance.
|
|
10
|
+
*
|
|
11
|
+
* Pair it with `reflect: true`. The component's default styling must then live
|
|
12
|
+
* on the bare `:host` (not `:host([prop="<default>"])`), since a default-valued
|
|
13
|
+
* element carries no attribute to select on.
|
|
14
|
+
*
|
|
15
|
+
* Known edge: if markup writes the default *explicitly* (e.g. `<nldd-button
|
|
16
|
+
* size="md">`), `fromAttribute` resolves the property to the value it already
|
|
17
|
+
* holds, so Lit's default `hasChanged` sees no change, schedules no update, and
|
|
18
|
+
* `toAttribute` never runs to strip the attribute — so that one authored default
|
|
19
|
+
* attribute stays in the DOM. Visual behavior is unaffected (styling keys off the
|
|
20
|
+
* bare `:host`); it only matters to code matching `[prop="<default>"]`, which
|
|
21
|
+
* should read the property instead. Not worth a fragile `hasChanged` workaround.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* @property({ reflect: true, converter: reflectNonDefault<Size>('md') })
|
|
26
|
+
* size: Size = 'md';
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function reflectNonDefault<T extends string>(defaultValue: T): ComplexAttributeConverter<T>;
|
|
30
|
+
//# sourceMappingURL=reflect-non-default.d.ts.map
|