@nldd/design-system 0.10.0 → 0.12.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/custom-elements.json +3084 -784
- package/dist/components/actions/button/button.d.ts +10 -0
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +23 -0
- 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 +22 -0
- package/dist/components/actions/button/button.styles.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts +1 -0
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +20 -2
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +10 -0
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +23 -0
- package/dist/components/actions/icon-button/icon-button.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 +10 -3
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +8 -0
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +20 -0
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.template.js +4 -0
- package/dist/components/actions/split-button/split-button.template.js.map +1 -1
- package/dist/components/components.js +2857 -1993
- package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
- package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +98 -6
- 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 +134 -1
- 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 +5 -4
- 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 +13 -4
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +9 -0
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +9 -2
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +3 -3
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +6 -21
- 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 +3 -0
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +10 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +10 -0
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +14 -0
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +45 -6
- 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 +13 -0
- package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.template.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.template.js +18 -2
- package/dist/components/content/tooltip/tooltip.template.js.map +1 -1
- package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
- package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
- package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
- package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
- package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
- package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
- package/dist/components/dist-CC8oiVtm.js +366 -0
- package/dist/components/dist-COKR0tYU.js +2860 -0
- package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
- package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
- package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
- package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
- package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
- package/dist/components/{icon-D_ZGezHx.js → icon-DFhgRf3P.js} +19 -7
- package/dist/components/{icon-button-BVhiOwX9.js → icon-button-Sxkh5cVr.js} +526 -61
- package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +22 -262
- 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 +9 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.js +29 -5
- package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +11 -0
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +30 -1
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.styles.js +18 -0
- package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.js +12 -0
- package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +10 -0
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +25 -1
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js +20 -3
- package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
- package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
- package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +257 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.js +93 -313
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +26 -186
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
- package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
- package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
- package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.selection.js +62 -0
- package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +185 -64
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
- package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
- package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +25 -1
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +21 -7
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/layout/card/card.styles.js +4 -4
- package/dist/components/layout/container/container.d.ts +2 -0
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +9 -0
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +13 -0
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +9 -5
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +16 -15
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -2
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +9 -9
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +16 -9
- 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 +16 -9
- 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 +23 -18
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js +19 -21
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +2 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +5 -2
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js +19 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
- package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +4 -4
- package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +3 -3
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +7 -5
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/css/rich-text.css +61 -1
- package/dist/css/themes/bruin.css +108 -64
- package/dist/css/themes/donkerblauw.css +108 -64
- package/dist/css/themes/donkerbruin.css +88 -64
- package/dist/css/themes/donkergeel.css +149 -94
- package/dist/css/themes/donkergroen.css +93 -64
- package/dist/css/themes/geel.css +149 -94
- package/dist/css/themes/groen.css +108 -64
- package/dist/css/themes/hemelblauw.css +108 -64
- package/dist/css/themes/lichtblauw.css +111 -64
- package/dist/css/themes/mintgroen.css +111 -64
- package/dist/css/themes/mosgroen.css +108 -64
- package/dist/css/themes/oranje.css +162 -99
- package/dist/css/themes/paars.css +115 -64
- package/dist/css/themes/robijnrood.css +159 -96
- package/dist/css/themes/rood.css +159 -96
- package/dist/css/themes/roze.css +118 -64
- package/dist/css/themes/violet.css +93 -64
- package/dist/css/themes.css +2047 -1247
- package/dist/css/variables.css +142 -70
- package/dist/nldd.min.js +1468 -998
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +5 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +5 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/types/vue.d.ts +138 -32
- package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
- package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
- package/dist/utilities/codemirror/codemirror-input.js +250 -0
- package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
- package/dist/utilities/codemirror/theme.js +1 -1
- package/dist/utilities/codemirror/theme.js.map +1 -1
- package/dist/utilities/shortcut.d.ts +50 -0
- package/dist/utilities/shortcut.d.ts.map +1 -0
- package/dist/utilities/shortcut.js +77 -0
- package/dist/utilities/shortcut.js.map +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.spellcheck.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.spellcheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAuC,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAoC,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"text-editor.spellcheck.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.spellcheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU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,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACvD,OAAO;QACP,oEAAoE;QACpE,uBAAuB;QACvB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC;QACvB,aAAa;KACb,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"text-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBA+sB5B,CAAC"}
|
|
@@ -7,7 +7,11 @@ export const textEditorStyles = css `
|
|
|
7
7
|
|
|
8
8
|
:host {
|
|
9
9
|
--_text-editor-caret-width: var(--primitives-border-width-regular);
|
|
10
|
+
--_text-editor-caret-color: var(--components-text-editor-caret-color);
|
|
11
|
+
--_text-editor-drop-cursor-color: var(--components-text-editor-drop-cursor-color);
|
|
12
|
+
--_text-editor-drag-ghost-background-color: var(--components-text-editor-drag-ghost-background-color);
|
|
10
13
|
--_text-editor-caret-ring-width: var(--primitives-border-width-thin);
|
|
14
|
+
--_text-editor-caret-ring-color: var(--semantics-surfaces-base-background-color);
|
|
11
15
|
--_text-editor-corner-radius: 0;
|
|
12
16
|
--_text-editor-background-color: transparent;
|
|
13
17
|
--_text-editor-highlight-border-color: transparent;
|
|
@@ -17,28 +21,50 @@ export const textEditorStyles = css `
|
|
|
17
21
|
its width plus its ring. Without it the edge carets are clipped. */
|
|
18
22
|
--_text-editor-padding-inline: calc(var(--_text-editor-caret-width) + var(--_text-editor-caret-ring-width));
|
|
19
23
|
--_text-editor-content-color: var(--semantics-content-color);
|
|
24
|
+
--_text-editor-mark-color: var(--semantics-content-secondary-color);
|
|
25
|
+
--_text-editor-link-color: var(--semantics-links-color);
|
|
26
|
+
--_text-editor-strong-font-weight: var(--primitives-font-weight-body-bold);
|
|
27
|
+
--_text-editor-heading-1-font: var(--primitives-font-display-1-sm);
|
|
28
|
+
--_text-editor-heading-2-font: var(--primitives-font-display-2-sm);
|
|
29
|
+
--_text-editor-heading-3-font: var(--primitives-font-display-3-sm);
|
|
30
|
+
--_text-editor-heading-4-font: var(--primitives-font-display-4-sm);
|
|
31
|
+
--_text-editor-heading-5-font: var(--primitives-font-display-5-sm);
|
|
32
|
+
--_text-editor-heading-6-font: var(--primitives-font-display-6-sm);
|
|
33
|
+
--_text-editor-quote-font-size: var(--primitives-font-size-200);
|
|
20
34
|
--_text-editor-font: var(--primitives-font-body-md-regular-snug);
|
|
21
|
-
--_text-editor-code-font: var(--primitives-font-monospace-
|
|
22
|
-
--_text-editor-code-font-size:
|
|
35
|
+
--_text-editor-code-font: var(--primitives-font-monospace-sm-regular-snug);
|
|
36
|
+
--_text-editor-code-font-size: var(--semantics-code-inline-font-size);
|
|
37
|
+
--_text-editor-code-font-family: var(--primitives-font-family-monospace);
|
|
38
|
+
--_text-editor-code-font-weight: var(--primitives-font-weight-body-regular);
|
|
39
|
+
/* The scale of --semantics-code-inline-font-size, and the JetBrains Mono box
|
|
40
|
+
(ascent 1020 + descent 300 per 1000), to size inline code like a token. */
|
|
41
|
+
--_text-editor-code-scale: 0.85;
|
|
42
|
+
--_text-editor-code-content-height: 1.32em;
|
|
23
43
|
--_text-editor-marker-font-size: var(--primitives-font-size-90);
|
|
24
44
|
/* JetBrains Mono advance (600/1000 em) at the marker size; leading
|
|
25
45
|
list/quote markers are mono so the hanging indent equals their width. */
|
|
26
46
|
--_text-editor-marker-advance: calc(0.6 * var(--_text-editor-marker-font-size));
|
|
27
47
|
--_text-editor-bullet-size: 0.45em;
|
|
28
|
-
--_text-editor-bullet-color: var(--semantics-content-
|
|
48
|
+
--_text-editor-bullet-color: var(--semantics-content-color);
|
|
49
|
+
--_text-editor-rule-thickness: var(--semantics-dividers-thickness);
|
|
50
|
+
--_text-editor-quote-border-width: var(--primitives-border-width-regular);
|
|
51
|
+
--_text-editor-quote-border-color: var(--semantics-content-color);
|
|
52
|
+
--_text-editor-rule-color: var(--semantics-dividers-color);
|
|
29
53
|
--_text-editor-heading-marker-scale: 75%;
|
|
30
54
|
--_text-editor-token-corner-radius: var(--primitives-corner-radius-sm);
|
|
31
|
-
--_text-editor-token-block-padding: 0.15em;
|
|
32
55
|
--_text-editor-token-inline-padding: 0.3em;
|
|
33
56
|
/* Vertical padding for an inline token that inherits the block font (tint,
|
|
34
57
|
mention): fills the line up to its line-height, never past it, so tokens on
|
|
35
58
|
adjacent lines never overlap. 1lh and em resolve on the token, so it adapts
|
|
36
59
|
to a heading's tighter line. (~1.2em is the text's own box.) */
|
|
37
60
|
--_text-editor-token-block-padding-fit: max(0em, (1lh - 1.2em) / 2);
|
|
38
|
-
--_text-editor-code-token-background-color:
|
|
61
|
+
--_text-editor-code-token-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
62
|
+
--_text-editor-code-token-highlight-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
|
|
63
|
+
--_text-editor-token-highlight-border-width: var(--semantics-surfaces-highlight-border-width);
|
|
39
64
|
--_text-editor-code-token-is-selected-background-color: light-dark(var(--primitives-color-neutral-200), var(--primitives-color-neutral-300));
|
|
40
|
-
--_text-editor-code-block-inline-padding: var(--
|
|
41
|
-
--_text-editor-code-block-block-padding: var(--
|
|
65
|
+
--_text-editor-code-block-inline-padding: var(--primitives-space-16);
|
|
66
|
+
--_text-editor-code-block-block-padding: var(--primitives-space-16);
|
|
67
|
+
--_text-editor-code-block-corner-radius: var(--semantics-surfaces-corner-radius);
|
|
42
68
|
--_text-editor-annotation-token-background-color: light-dark(var(--primitives-color-mark-75), var(--primitives-color-mark-150));
|
|
43
69
|
--_text-editor-annotation-token-is-selected-background-color: light-dark(var(--primitives-color-mark-200), var(--primitives-color-mark-400));
|
|
44
70
|
--_text-editor-annotation-token-badge-content-color: var(--primitives-color-mark-1000);
|
|
@@ -53,21 +79,27 @@ export const textEditorStyles = css `
|
|
|
53
79
|
that swallows the white (mark-1000) badge number. */
|
|
54
80
|
--_text-editor-annotation-token-is-selected-badge-background-color: var(--primitives-color-mark-450);
|
|
55
81
|
--_text-editor-annotation-token-is-selected-badge-highlight-border-color: var(--primitives-color-mark-500);
|
|
82
|
+
--_text-editor-annotation-token-is-selected-content-color: var(--primitives-color-neutral-950);
|
|
83
|
+
--_text-editor-annotation-badge-font-family: var(--primitives-font-family-body);
|
|
56
84
|
--_text-editor-annotation-badge-size: 1.5em;
|
|
57
85
|
--_text-editor-annotation-badge-font-scale: 0.62;
|
|
58
86
|
--_text-editor-link-badge-size: calc(1em + 2 * var(--_text-editor-token-block-padding-fit));
|
|
59
|
-
--_text-editor-link-badge-
|
|
60
|
-
--_text-editor-link-badge-
|
|
61
|
-
--_text-editor-link-badge-
|
|
62
|
-
--_text-editor-link-badge-
|
|
63
|
-
--_text-editor-link-badge-is-
|
|
64
|
-
--_text-editor-link-badge-is-
|
|
65
|
-
--_text-editor-link-badge-is-
|
|
87
|
+
--_text-editor-link-badge-gap: 0.1em;
|
|
88
|
+
--_text-editor-link-badge-content-color: var(--components-text-editor-link-badge-content-color);
|
|
89
|
+
--_text-editor-link-badge-background-color: var(--components-text-editor-link-badge-background-color);
|
|
90
|
+
--_text-editor-link-badge-highlight-border-color: var(--components-text-editor-link-badge-highlight-border-color);
|
|
91
|
+
--_text-editor-link-badge-is-hovered-background-color: var(--components-text-editor-link-badge-is-hovered-background-color);
|
|
92
|
+
--_text-editor-link-badge-is-active-background-color: var(--components-text-editor-link-badge-is-active-background-color);
|
|
93
|
+
--_text-editor-link-badge-is-hovered-highlight-border-color: var(--components-text-editor-link-badge-is-hovered-highlight-border-color);
|
|
94
|
+
--_text-editor-link-badge-is-active-highlight-border-color: var(--components-text-editor-link-badge-is-active-highlight-border-color);
|
|
66
95
|
--_text-editor-mention-icon-size: 0.95em;
|
|
67
|
-
--_text-editor-mention-token-background-color: var(--
|
|
68
|
-
--_text-editor-
|
|
69
|
-
--_text-editor-
|
|
70
|
-
--_text-editor-mention-token-
|
|
96
|
+
--_text-editor-mention-token-background-color: var(--semantics-mentions-background-color);
|
|
97
|
+
--_text-editor-selection-color: var(--semantics-text-selection-background-color);
|
|
98
|
+
--_text-editor-selection-content-color: var(--primitives-color-neutral-1000);
|
|
99
|
+
--_text-editor-mention-token-highlight-border-color: var(--semantics-mentions-highlight-border-color);
|
|
100
|
+
--_text-editor-mention-token-content-color: var(--semantics-mentions-content-color);
|
|
101
|
+
--_text-editor-mention-token-is-selected-background-color: var(--semantics-mentions-is-selected-background-color);
|
|
102
|
+
--_text-editor-mention-token-is-selected-content-color: var(--semantics-mentions-is-selected-content-color);
|
|
71
103
|
--_text-editor-rows: 6;
|
|
72
104
|
|
|
73
105
|
${inheritedTextReset}
|
|
@@ -118,6 +150,8 @@ export const textEditorStyles = css `
|
|
|
118
150
|
:host([disabled]) .text-editor {
|
|
119
151
|
opacity: var(--primitives-opacity-disabled);
|
|
120
152
|
pointer-events: none;
|
|
153
|
+
-webkit-user-select: none;
|
|
154
|
+
user-select: none;
|
|
121
155
|
}
|
|
122
156
|
|
|
123
157
|
/* Focus ring only on the input-field variant; simple relies on the accent caret and
|
|
@@ -144,6 +178,11 @@ export const textEditorStyles = css `
|
|
|
144
178
|
min-height: calc(var(--_text-editor-rows) * 1lh);
|
|
145
179
|
}
|
|
146
180
|
|
|
181
|
+
/* Read-only, like a native read-only field: select and copy, but no caret. */
|
|
182
|
+
:host([readonly]) .cm-nldd-cursorLayer {
|
|
183
|
+
visibility: hidden;
|
|
184
|
+
}
|
|
185
|
+
|
|
147
186
|
/* Prominent accent caret in both variants (the input-field variant additionally has the focus
|
|
148
187
|
ring). The doubled class is purely for specificity — it outweighs
|
|
149
188
|
CodeMirror's theme cursor color without depending on an attribute. */
|
|
@@ -151,7 +190,7 @@ export const textEditorStyles = css `
|
|
|
151
190
|
/* accent-700: it keeps a >=525 lightness gap from both the base and tinted
|
|
152
191
|
surfaces in light and dark (accent-600 fell just short on white), so the
|
|
153
192
|
caret stays clearly visible without washing out. */
|
|
154
|
-
border-left-color: var(--
|
|
193
|
+
border-left-color: var(--_text-editor-caret-color);
|
|
155
194
|
border-left-width: var(--_text-editor-caret-width);
|
|
156
195
|
/* CodeMirror centers its own 1.2px caret with a -0.6px margin. Ours is wider,
|
|
157
196
|
so recenter it on the insertion point from its own width. */
|
|
@@ -159,7 +198,7 @@ export const textEditorStyles = css `
|
|
|
159
198
|
/* A thin surface-colored ring, like the drop cursor, so the caret stays legible
|
|
160
199
|
even over a tinted token (annotation, inline code) where the accent alone can
|
|
161
200
|
blend in. Blinks with the caret (opacity covers the shadow too). */
|
|
162
|
-
box-shadow: 0 0 0 var(--_text-editor-caret-ring-width) var(--
|
|
201
|
+
box-shadow: 0 0 0 var(--_text-editor-caret-ring-width) var(--_text-editor-caret-ring-color);
|
|
163
202
|
}
|
|
164
203
|
|
|
165
204
|
:host .cm-scroller {
|
|
@@ -182,34 +221,34 @@ export const textEditorStyles = css `
|
|
|
182
221
|
prefix a predictable width for the hanging indent (see --_text-editor-marker-advance). */
|
|
183
222
|
|
|
184
223
|
.cm-md-h1 {
|
|
185
|
-
font: var(--
|
|
224
|
+
font: var(--_text-editor-heading-1-font);
|
|
186
225
|
}
|
|
187
226
|
|
|
188
227
|
.cm-md-h2 {
|
|
189
|
-
font: var(--
|
|
228
|
+
font: var(--_text-editor-heading-2-font);
|
|
190
229
|
}
|
|
191
230
|
|
|
192
231
|
.cm-md-h3 {
|
|
193
|
-
font: var(--
|
|
232
|
+
font: var(--_text-editor-heading-3-font);
|
|
194
233
|
}
|
|
195
234
|
|
|
196
235
|
.cm-md-h4 {
|
|
197
|
-
font: var(--
|
|
236
|
+
font: var(--_text-editor-heading-4-font);
|
|
198
237
|
}
|
|
199
238
|
|
|
200
239
|
.cm-md-h5 {
|
|
201
|
-
font: var(--
|
|
240
|
+
font: var(--_text-editor-heading-5-font);
|
|
202
241
|
}
|
|
203
242
|
|
|
204
243
|
.cm-md-h6 {
|
|
205
|
-
font: var(--
|
|
244
|
+
font: var(--_text-editor-heading-6-font);
|
|
206
245
|
}
|
|
207
246
|
|
|
208
247
|
:is(.cm-md-h1, .cm-md-h2, .cm-md-h3, .cm-md-h4, .cm-md-h5, .cm-md-h6) .cm-md-mark {
|
|
209
248
|
font-size: var(--_text-editor-heading-marker-scale);
|
|
210
249
|
}
|
|
211
250
|
.cm-md-strong {
|
|
212
|
-
font-weight:
|
|
251
|
+
font-weight: var(--_text-editor-strong-font-weight);
|
|
213
252
|
}
|
|
214
253
|
.cm-md-emphasis {
|
|
215
254
|
font-style: italic;
|
|
@@ -221,38 +260,69 @@ export const textEditorStyles = css `
|
|
|
221
260
|
/* The selected run is darkened with a decoration (see cm-md-code-selected
|
|
222
261
|
below), since drawSelection hides the native selection. */
|
|
223
262
|
.cm-md-code {
|
|
224
|
-
padding-block: var(--_text-editor-
|
|
263
|
+
padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
|
|
225
264
|
/* No inline padding: the tint hugs the backticks, which are the visible bounds
|
|
226
265
|
anyway. A padded mark has no coordsAt hook, so the caret at its edge would
|
|
227
266
|
otherwise jump by the padding depending on the direction it arrives from. */
|
|
228
267
|
/* line-height is left to inherit from the block, so a fixed snug line-height
|
|
229
268
|
won't make the chip overflow inside a tight heading. */
|
|
230
|
-
font-family: var(--
|
|
269
|
+
font-family: var(--_text-editor-code-font-family);
|
|
231
270
|
font-size: var(--_text-editor-code-font-size);
|
|
232
|
-
font-weight: var(--
|
|
271
|
+
font-weight: var(--_text-editor-code-font-weight);
|
|
272
|
+
box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-code-token-highlight-border-color);
|
|
233
273
|
background-color: var(--_text-editor-code-token-background-color);
|
|
234
274
|
border-radius: var(--_text-editor-token-corner-radius);
|
|
235
275
|
}
|
|
236
276
|
|
|
277
|
+
.cm-md-code-bare {
|
|
278
|
+
padding-inline: var(--_text-editor-token-inline-padding);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.cm-md-rule {
|
|
282
|
+
display: inline-block;
|
|
283
|
+
border-top: var(--_text-editor-rule-thickness) solid var(--_text-editor-rule-color);
|
|
284
|
+
width: 100%;
|
|
285
|
+
vertical-align: middle;
|
|
286
|
+
}
|
|
287
|
+
|
|
237
288
|
/* :host beats the shared theme's ".cm-line { padding: 0 }" reset (equal
|
|
238
289
|
specificity otherwise wins on source order), same as .cm-content above —
|
|
239
290
|
without it the block padding never lands and the surface reads cramped. */
|
|
291
|
+
/* The block is drawn line by line, so its edge is too: the sides on every
|
|
292
|
+
line, the top on the first and the bottom on the last. */
|
|
240
293
|
:host .cm-md-codeblock {
|
|
294
|
+
--_text-editor-code-block-edge: var(--_text-editor-token-highlight-border-width);
|
|
295
|
+
|
|
241
296
|
padding-inline: var(--_text-editor-code-block-inline-padding);
|
|
297
|
+
box-shadow:
|
|
298
|
+
inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
299
|
+
inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color);
|
|
242
300
|
font: var(--_text-editor-code-font);
|
|
243
301
|
background-color: var(--_text-editor-code-token-background-color);
|
|
244
302
|
}
|
|
245
303
|
|
|
246
304
|
:host .cm-md-codeblock-first {
|
|
247
305
|
padding-top: var(--_text-editor-code-block-block-padding);
|
|
248
|
-
|
|
249
|
-
|
|
306
|
+
box-shadow:
|
|
307
|
+
inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
308
|
+
inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
309
|
+
inset 0 var(--_text-editor-code-block-edge) 0 var(--_text-editor-code-token-highlight-border-color);
|
|
310
|
+
border-start-start-radius: var(--_text-editor-code-block-corner-radius);
|
|
311
|
+
border-start-end-radius: var(--_text-editor-code-block-corner-radius);
|
|
250
312
|
}
|
|
251
313
|
|
|
252
314
|
:host .cm-md-codeblock-last {
|
|
253
315
|
padding-bottom: var(--_text-editor-code-block-block-padding);
|
|
254
|
-
|
|
255
|
-
|
|
316
|
+
box-shadow:
|
|
317
|
+
inset var(--_text-editor-code-block-edge) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
318
|
+
inset calc(-1 * var(--_text-editor-code-block-edge)) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
319
|
+
inset 0 calc(-1 * var(--_text-editor-code-block-edge)) 0 var(--_text-editor-code-token-highlight-border-color);
|
|
320
|
+
border-end-start-radius: var(--_text-editor-code-block-corner-radius);
|
|
321
|
+
border-end-end-radius: var(--_text-editor-code-block-corner-radius);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
:host .cm-md-codeblock-first.cm-md-codeblock-last {
|
|
325
|
+
box-shadow: inset 0 0 0 var(--_text-editor-code-block-edge) var(--_text-editor-code-token-highlight-border-color);
|
|
256
326
|
}
|
|
257
327
|
|
|
258
328
|
/* Selected slice of a code span — drawSelection hides the native ::selection,
|
|
@@ -269,6 +339,29 @@ export const textEditorStyles = css `
|
|
|
269
339
|
background-color: transparent;
|
|
270
340
|
}
|
|
271
341
|
|
|
342
|
+
.cm-md-code .cm-md-code-selected {
|
|
343
|
+
--_text-editor-code-slice-start: 0px;
|
|
344
|
+
--_text-editor-code-slice-end: 0px;
|
|
345
|
+
padding-block: max(0em, (1lh / var(--_text-editor-code-scale) - var(--_text-editor-code-content-height)) / 2);
|
|
346
|
+
box-shadow:
|
|
347
|
+
inset 0 var(--_text-editor-token-highlight-border-width) 0 var(--_text-editor-code-token-highlight-border-color),
|
|
348
|
+
inset 0 calc(-1 * var(--_text-editor-token-highlight-border-width)) 0 var(--_text-editor-code-token-highlight-border-color),
|
|
349
|
+
inset var(--_text-editor-code-slice-start) 0 0 var(--_text-editor-code-token-highlight-border-color),
|
|
350
|
+
inset calc(-1 * var(--_text-editor-code-slice-end)) 0 0 var(--_text-editor-code-token-highlight-border-color);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.cm-md-code .cm-md-code-selected-start {
|
|
354
|
+
--_text-editor-code-slice-start: var(--_text-editor-token-highlight-border-width);
|
|
355
|
+
border-start-start-radius: var(--_text-editor-token-corner-radius);
|
|
356
|
+
border-end-start-radius: var(--_text-editor-token-corner-radius);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.cm-md-code .cm-md-code-selected-end {
|
|
360
|
+
--_text-editor-code-slice-end: var(--_text-editor-token-highlight-border-width);
|
|
361
|
+
border-start-end-radius: var(--_text-editor-token-corner-radius);
|
|
362
|
+
border-end-end-radius: var(--_text-editor-token-corner-radius);
|
|
363
|
+
}
|
|
364
|
+
|
|
272
365
|
/* Whole code block selected: the line background (its padding-inline, the
|
|
273
366
|
first/last line's block padding, and the rounded corners) takes the selected
|
|
274
367
|
tint, so the block lights up edge to edge — the padding included, like a
|
|
@@ -277,17 +370,15 @@ export const textEditorStyles = css `
|
|
|
277
370
|
background-color: var(--_text-editor-code-token-is-selected-background-color);
|
|
278
371
|
}
|
|
279
372
|
|
|
280
|
-
.cm-md-mention {
|
|
281
|
-
color: var(--semantics-content-accent-color);
|
|
282
|
-
font-weight: 600;
|
|
283
|
-
}
|
|
284
373
|
|
|
285
374
|
.cm-md-mention-token {
|
|
375
|
+
position: relative;
|
|
286
376
|
padding-block: var(--_text-editor-token-block-padding-fit);
|
|
287
377
|
/* Left space equals the @ icon's vertical inset (token height minus the icon,
|
|
288
378
|
halved), so the icon sits equally clear left, top and bottom; the right keeps
|
|
289
379
|
the normal token inset around the name. */
|
|
290
380
|
padding-inline: max(0em, (max(1.2em, 1lh) - var(--_text-editor-mention-icon-size)) / 2) var(--_text-editor-token-inline-padding);
|
|
381
|
+
box-shadow: inset 0 0 0 var(--_text-editor-token-highlight-border-width) var(--_text-editor-mention-token-highlight-border-color);
|
|
291
382
|
color: var(--_text-editor-mention-token-content-color);
|
|
292
383
|
background-color: var(--_text-editor-mention-token-background-color);
|
|
293
384
|
border-radius: var(--_text-editor-token-corner-radius);
|
|
@@ -315,7 +406,24 @@ export const textEditorStyles = css `
|
|
|
315
406
|
content: attr(data-label);
|
|
316
407
|
}
|
|
317
408
|
|
|
409
|
+
/* CodeMirror draws no selection under a token, so its rounded corners showed
|
|
410
|
+
white. A selected token puts the selection color behind itself, in the
|
|
411
|
+
selection layer's stacking (the scroller), so the corners take it. */
|
|
412
|
+
.cm-md-mention-token[data-selected="within"]::before {
|
|
413
|
+
content: '';
|
|
414
|
+
position: absolute;
|
|
415
|
+
inset: 0;
|
|
416
|
+
z-index: -1;
|
|
417
|
+
background-color: var(--_text-editor-selection-color);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* A mention selected on its own keeps its rounded corners: the selection is the token. */
|
|
421
|
+
:host .cm-editor:has(.cm-md-mention-token[data-selected="alone"]) .cm-selectionLayer {
|
|
422
|
+
visibility: hidden;
|
|
423
|
+
}
|
|
424
|
+
|
|
318
425
|
.cm-md-mention-token[data-selected] {
|
|
426
|
+
box-shadow: none;
|
|
319
427
|
color: var(--_text-editor-mention-token-is-selected-content-color);
|
|
320
428
|
background-color: var(--_text-editor-mention-token-is-selected-background-color);
|
|
321
429
|
}
|
|
@@ -327,11 +435,11 @@ export const textEditorStyles = css `
|
|
|
327
435
|
}
|
|
328
436
|
|
|
329
437
|
.cm-md-link {
|
|
330
|
-
color: var(--
|
|
438
|
+
color: var(--_text-editor-link-color);
|
|
331
439
|
}
|
|
332
440
|
|
|
333
441
|
.cm-md-url {
|
|
334
|
-
color: var(--
|
|
442
|
+
color: var(--_text-editor-mark-color);
|
|
335
443
|
}
|
|
336
444
|
|
|
337
445
|
/* The markdown highlight style tints the URL token (teal); make its span inherit
|
|
@@ -344,7 +452,7 @@ export const textEditorStyles = css `
|
|
|
344
452
|
and override the highlight-style URL tint (teal) on its token span so the
|
|
345
453
|
whole address is the link color, not just the mark wrapper. */
|
|
346
454
|
.cm-md-autolink {
|
|
347
|
-
color: var(--
|
|
455
|
+
color: var(--_text-editor-link-color);
|
|
348
456
|
}
|
|
349
457
|
|
|
350
458
|
.cm-md-autolink span {
|
|
@@ -352,16 +460,20 @@ export const textEditorStyles = css `
|
|
|
352
460
|
}
|
|
353
461
|
|
|
354
462
|
.cm-md-quote {
|
|
355
|
-
color: var(--
|
|
463
|
+
color: var(--_text-editor-content-color);
|
|
356
464
|
font-style: italic;
|
|
357
|
-
font-size: var(--
|
|
465
|
+
font-size: var(--_text-editor-quote-font-size);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.cm-md-quote-row {
|
|
469
|
+
font-size: var(--_text-editor-quote-font-size);
|
|
358
470
|
}
|
|
359
471
|
|
|
360
472
|
/* Markers: dimmed (secondary color, not opacity, so contrast holds) and
|
|
361
473
|
monospace at the 16px marker size — tidy, and a fixed-width leading prefix. */
|
|
362
474
|
.cm-md-mark {
|
|
363
|
-
color: var(--
|
|
364
|
-
font-family: var(--
|
|
475
|
+
color: var(--_text-editor-mark-color);
|
|
476
|
+
font-family: var(--_text-editor-code-font-family);
|
|
365
477
|
font-size: var(--_text-editor-marker-font-size);
|
|
366
478
|
}
|
|
367
479
|
|
|
@@ -369,9 +481,19 @@ export const textEditorStyles = css `
|
|
|
369
481
|
font-size: 1em;
|
|
370
482
|
}
|
|
371
483
|
|
|
372
|
-
/*
|
|
373
|
-
|
|
374
|
-
|
|
484
|
+
/* A shadow, not a border, so the line takes no room and the text stays put
|
|
485
|
+
when the quote shows its marks instead. */
|
|
486
|
+
.cm-md-quote-line {
|
|
487
|
+
box-shadow: inset var(--_text-editor-quote-border-width) 0 0 var(--_text-editor-quote-border-color);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
:host .cm-md-quote-mark-hidden,
|
|
491
|
+
:host .cm-md-quote-mark-hidden * {
|
|
492
|
+
color: transparent;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* A bullet with syntax="hidden": the character keeps its mono advance, so a
|
|
496
|
+
wrapped line still aligns under the text, and a dot is drawn over it. */
|
|
375
497
|
.cm-md-bullet {
|
|
376
498
|
position: relative;
|
|
377
499
|
color: transparent;
|
|
@@ -394,23 +516,21 @@ export const textEditorStyles = css `
|
|
|
394
516
|
mono advance and the hanging indent lines up exactly. */
|
|
395
517
|
.cm-md-listprefix,
|
|
396
518
|
.cm-md-listprefix * {
|
|
397
|
-
font-family: var(--
|
|
519
|
+
font-family: var(--_text-editor-code-font-family);
|
|
398
520
|
font-size: var(--_text-editor-marker-font-size);
|
|
399
521
|
}
|
|
400
522
|
|
|
401
523
|
|
|
402
524
|
/* # Annotation overlay
|
|
403
|
-
A light body tint
|
|
404
|
-
|
|
405
|
-
annotations — the type is communicated by the consumer's pane
|
|
406
|
-
The dashed line is a non-color cue (with the badge) for accessibility. */
|
|
525
|
+
A light body tint marks the annotated text; a solid badge (the nub) sits at
|
|
526
|
+
the end carrying the count, the cue that does not rest on color. One role
|
|
527
|
+
for all annotations — the type is communicated by the consumer's pane. */
|
|
407
528
|
|
|
408
529
|
/* One cohesive yellow block: the light tint with rounded corners and a reserved
|
|
409
530
|
space on the right for the solid nub (which lives inside this run, so it
|
|
410
|
-
shares the tint and wraps with the text).
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
(vertical padding on an inline box is visual only). */
|
|
531
|
+
shares the tint and wraps with the text). box-decoration-break keeps the
|
|
532
|
+
tint + rounding on every wrapped fragment; padding-block extends the tint
|
|
533
|
+
without growing the line (vertical padding on an inline box is visual only). */
|
|
414
534
|
.cm-annotation {
|
|
415
535
|
background-color: var(--_text-editor-annotation-token-background-color);
|
|
416
536
|
border-radius: var(--_text-editor-token-corner-radius);
|
|
@@ -439,15 +559,15 @@ export const textEditorStyles = css `
|
|
|
439
559
|
.cm-annotation.is-selected,
|
|
440
560
|
.cm-annotation .is-selected {
|
|
441
561
|
background-color: var(--_text-editor-annotation-token-is-selected-background-color);
|
|
442
|
-
color: var(--
|
|
562
|
+
color: var(--_text-editor-annotation-token-is-selected-content-color);
|
|
443
563
|
}
|
|
444
564
|
|
|
445
565
|
.cm-content ::selection {
|
|
446
|
-
color: var(--
|
|
566
|
+
color: var(--_text-editor-selection-content-color);
|
|
447
567
|
}
|
|
448
568
|
|
|
449
569
|
.cm-annotation ::selection {
|
|
450
|
-
color: var(--
|
|
570
|
+
color: var(--_text-editor-annotation-token-is-selected-content-color);
|
|
451
571
|
}
|
|
452
572
|
|
|
453
573
|
.cm-annotation-badge {
|
|
@@ -471,7 +591,7 @@ export const textEditorStyles = css `
|
|
|
471
591
|
than it looks and scales with the token in headings. */
|
|
472
592
|
vertical-align: middle;
|
|
473
593
|
transform: translateY(-0.11em);
|
|
474
|
-
font-family: var(--
|
|
594
|
+
font-family: var(--_text-editor-annotation-badge-font-family);
|
|
475
595
|
font-size: calc(var(--_text-editor-annotation-badge-font-scale) * 1em);
|
|
476
596
|
font-weight: 700;
|
|
477
597
|
line-height: 1;
|
|
@@ -531,8 +651,8 @@ export const textEditorStyles = css `
|
|
|
531
651
|
position: absolute;
|
|
532
652
|
width: var(--primitives-border-width-regular);
|
|
533
653
|
border-radius: var(--primitives-border-width-thin);
|
|
534
|
-
background-color: var(--
|
|
535
|
-
box-shadow: 0 0 0 var(--primitives-border-width-thin) var(--
|
|
654
|
+
background-color: var(--_text-editor-drop-cursor-color);
|
|
655
|
+
box-shadow: 0 0 0 var(--primitives-border-width-thin) var(--_text-editor-caret-ring-color);
|
|
536
656
|
pointer-events: none;
|
|
537
657
|
z-index: 4;
|
|
538
658
|
}
|
|
@@ -543,7 +663,7 @@ export const textEditorStyles = css `
|
|
|
543
663
|
max-width: 24ch;
|
|
544
664
|
padding: 0 var(--primitives-space-4);
|
|
545
665
|
border-radius: var(--_text-editor-token-corner-radius);
|
|
546
|
-
background-color:
|
|
666
|
+
background-color: var(--_text-editor-drag-ghost-background-color);
|
|
547
667
|
color: var(--_text-editor-content-color);
|
|
548
668
|
font: var(--_text-editor-font);
|
|
549
669
|
white-space: nowrap;
|
|
@@ -558,6 +678,7 @@ export const textEditorStyles = css `
|
|
|
558
678
|
display: inline-flex;
|
|
559
679
|
align-items: center;
|
|
560
680
|
justify-content: center;
|
|
681
|
+
margin-inline: var(--_text-editor-link-badge-gap);
|
|
561
682
|
min-width: var(--_text-editor-link-badge-size);
|
|
562
683
|
height: var(--_text-editor-link-badge-size);
|
|
563
684
|
border-radius: var(--primitives-corner-radius-full);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"text-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsG/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAymBrB,CAAC"}
|
|
@@ -4,6 +4,28 @@ import type { SyntaxNode } from '@lezer/common';
|
|
|
4
4
|
* `side` decides which node a position between two of them belongs to: -1 the
|
|
5
5
|
* one that ends there, 1 the one that starts there. Null when none matches. */
|
|
6
6
|
export declare function enclosingNode(state: EditorState, pos: number, side: -1 | 0 | 1, match: (node: SyntaxNode) => boolean): SyntaxNode | null;
|
|
7
|
+
/** The nodes whose text is code, quoted as it is: no list, quote or link in it. */
|
|
8
|
+
export declare const CODE_BLOCK_NODES: ReadonlySet<string>;
|
|
9
|
+
export declare const CODE_NODES: ReadonlySet<string>;
|
|
10
|
+
/** Whether `pos` sits in a fenced or indented code block, where a leading `-`,
|
|
11
|
+
* `1.` or `>` is literal code. */
|
|
12
|
+
export declare function inCodeBlock(state: EditorState, pos: number): boolean;
|
|
13
|
+
/** Whether `pos` sits in any code, the backtick span included. */
|
|
14
|
+
export declare function inCode(state: EditorState, pos: number): boolean;
|
|
15
|
+
/** Call `each` with the start of every line from `from` to `to`. */
|
|
16
|
+
export declare function forEachLineStart(state: EditorState, from: number, to: number, each: (lineFrom: number) => void): void;
|
|
17
|
+
/** Whether the parse moved on between two states. The tree is parsed in the
|
|
18
|
+
* background, so a decoration built from it must be built again when it has
|
|
19
|
+
* caught up, not only when the text, the viewport or the selection changes. */
|
|
20
|
+
export declare function treeAdvanced(before: EditorState, after: EditorState): boolean;
|
|
21
|
+
/** Whether the line at `lineFrom` is a thematic break (`---`, `* * *`). Its
|
|
22
|
+
* characters look like a bullet to a regular expression; to the tree they are not. */
|
|
23
|
+
export declare function isRuleLine(state: EditorState, lineFrom: number): boolean;
|
|
7
24
|
/** `enclosingNode` for the common case: a node that goes by one of these names. */
|
|
8
25
|
export declare function enclosingNamed(state: EditorState, pos: number, side: -1 | 0 | 1, names: string | ReadonlySet<string>): SyntaxNode | null;
|
|
26
|
+
/** The text of a `[text](url)` link, between its brackets; null when it is empty. */
|
|
27
|
+
export declare function linkTextRange(link: SyntaxNode): {
|
|
28
|
+
from: number;
|
|
29
|
+
to: number;
|
|
30
|
+
} | null;
|
|
9
31
|
//# sourceMappingURL=text-editor.syntax.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.syntax.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD;;gFAEgF;AAChF,wBAAgB,aAAa,CAC5B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,GAClC,UAAU,GAAG,IAAI,CAKnB;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC7B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACjC,UAAU,GAAG,IAAI,CAEnB"}
|
|
1
|
+
{"version":3,"file":"text-editor.syntax.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD;;gFAEgF;AAChF,wBAAgB,aAAa,CAC5B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,GAClC,UAAU,GAAG,IAAI,CAKnB;AAED,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAwC,CAAC;AAC1F,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAgD,CAAC;AAE5F;mCACmC;AACnC,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAMrH;AAED;;gFAEgF;AAChF,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAE7E;AAED;uFACuF;AACvF,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExE;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC7B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAChB,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACjC,UAAU,GAAG,IAAI,CAEnB;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CASnF"}
|
|
@@ -13,8 +13,52 @@ export function enclosingNode(state, pos, side, match) {
|
|
|
13
13
|
}
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
+
/** The nodes whose text is code, quoted as it is: no list, quote or link in it. */
|
|
17
|
+
export const CODE_BLOCK_NODES = new Set(['FencedCode', 'CodeBlock']);
|
|
18
|
+
export const CODE_NODES = new Set([...CODE_BLOCK_NODES, 'InlineCode']);
|
|
19
|
+
/** Whether `pos` sits in a fenced or indented code block, where a leading `-`,
|
|
20
|
+
* `1.` or `>` is literal code. */
|
|
21
|
+
export function inCodeBlock(state, pos) {
|
|
22
|
+
return enclosingNamed(state, pos, 1, CODE_BLOCK_NODES) !== null;
|
|
23
|
+
}
|
|
24
|
+
/** Whether `pos` sits in any code, the backtick span included. */
|
|
25
|
+
export function inCode(state, pos) {
|
|
26
|
+
return enclosingNamed(state, pos, 1, CODE_NODES) !== null;
|
|
27
|
+
}
|
|
28
|
+
/** Call `each` with the start of every line from `from` to `to`. */
|
|
29
|
+
export function forEachLineStart(state, from, to, each) {
|
|
30
|
+
for (let pos = from; pos <= to;) {
|
|
31
|
+
const line = state.doc.lineAt(pos);
|
|
32
|
+
each(line.from);
|
|
33
|
+
pos = line.to + 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Whether the parse moved on between two states. The tree is parsed in the
|
|
37
|
+
* background, so a decoration built from it must be built again when it has
|
|
38
|
+
* caught up, not only when the text, the viewport or the selection changes. */
|
|
39
|
+
export function treeAdvanced(before, after) {
|
|
40
|
+
return syntaxTree(before) !== syntaxTree(after);
|
|
41
|
+
}
|
|
42
|
+
/** Whether the line at `lineFrom` is a thematic break (`---`, `* * *`). Its
|
|
43
|
+
* characters look like a bullet to a regular expression; to the tree they are not. */
|
|
44
|
+
export function isRuleLine(state, lineFrom) {
|
|
45
|
+
return enclosingNamed(state, lineFrom, 1, 'HorizontalRule') !== null;
|
|
46
|
+
}
|
|
16
47
|
/** `enclosingNode` for the common case: a node that goes by one of these names. */
|
|
17
48
|
export function enclosingNamed(state, pos, side, names) {
|
|
18
49
|
return enclosingNode(state, pos, side, typeof names === 'string' ? (node) => node.name === names : (node) => names.has(node.name));
|
|
19
50
|
}
|
|
51
|
+
/** The text of a `[text](url)` link, between its brackets; null when it is empty. */
|
|
52
|
+
export function linkTextRange(link) {
|
|
53
|
+
const marks = [];
|
|
54
|
+
for (let child = link.firstChild; child; child = child.nextSibling) {
|
|
55
|
+
if (child.name === 'LinkMark')
|
|
56
|
+
marks.push(child);
|
|
57
|
+
}
|
|
58
|
+
if (marks.length < 2)
|
|
59
|
+
return null;
|
|
60
|
+
const from = marks[0].to; // after the opening '['
|
|
61
|
+
const to = marks[1].from; // before the closing ']'
|
|
62
|
+
return to > from ? { from, to } : null;
|
|
63
|
+
}
|
|
20
64
|
//# sourceMappingURL=text-editor.syntax.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-editor.syntax.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;6DAG6D;AAE7D;;gFAEgF;AAChF,MAAM,UAAU,aAAa,CAC5B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAoC;IAEpC,KAAK,IAAI,IAAI,GAAsB,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxG,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,cAAc,CAC7B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAmC;IAEnC,OAAO,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACpI,CAAC"}
|
|
1
|
+
{"version":3,"file":"text-editor.syntax.js","sourceRoot":"","sources":["../../../../src/components/inputs/text-editor/text-editor.syntax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;6DAG6D;AAE7D;;gFAEgF;AAChF,MAAM,UAAU,aAAa,CAC5B,KAAkB,EAClB,GAAW,EACX,IAAgB,EAChB,KAAoC;IAEpC,KAAK,IAAI,IAAI,GAAsB,UAAU,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACxG,IAAI,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,gBAAgB,GAAwB,IA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