@aleph-alpha/chat-kit 6.4.0 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{CkHistory.vue_vue_type_script_setup_true_lang-B0WUzTHa.js → CkHistory.vue_vue_type_script_setup_true_lang-BvRIp3m6.js} +71 -14
  2. package/dist/adapters/responses-api.js +1 -1
  3. package/dist/chat-kit.css +81 -11
  4. package/dist/{code-palette-DH_G7mZ5.js → code-palette-BWrZDi47.js} +71 -35
  5. package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts +2 -1
  6. package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts.map +1 -1
  7. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +1 -0
  8. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts.map +1 -1
  9. package/dist/components/base/CkCodeEditor/badgeDecoration.d.ts +2 -2
  10. package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts +15 -1
  11. package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts.map +1 -1
  12. package/dist/components/base/CkCodeEditor/types.d.ts +12 -0
  13. package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -1
  14. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +7 -0
  15. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
  16. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts +9 -0
  17. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts.map +1 -1
  18. package/dist/components/base/CkMarkdownRenderer/types.d.ts +13 -0
  19. package/dist/components/base/CkMarkdownRenderer/types.d.ts.map +1 -1
  20. package/dist/components/index.js +1 -1
  21. package/dist/composables/index.js +1 -1
  22. package/dist/{createCodeMirror-5iswYetS.js → createCodeMirror-BO-TWTzn.js} +27 -9
  23. package/dist/{createCrepeEditor-C-AQ1w_e.js → createCrepeEditor-BGSlwmKn.js} +4 -4
  24. package/dist/handlers/index.js +2 -2
  25. package/dist/helpers/codemirror/theme.d.ts.map +1 -1
  26. package/dist/helpers/unified/remarkBreaks.d.ts +15 -0
  27. package/dist/helpers/unified/remarkBreaks.d.ts.map +1 -0
  28. package/dist/{index-DLjsqQHx.js → index--Yonjzfi.js} +3 -3
  29. package/dist/{index-Mh3WUU-6.js → index-2YPxXIaf.js} +1 -1
  30. package/dist/{index-CWp_t8Wl.js → index-B4uqe-fL.js} +2 -2
  31. package/dist/{index-hEJ_Bavx.js → index-Bfo4U-Al.js} +2 -2
  32. package/dist/{index-g2X42srv.js → index-Bw39pbRL.js} +3 -3
  33. package/dist/{index-CIF4qQzR.js → index-CGEgwupi.js} +4 -4
  34. package/dist/{index-Dbi75pKH.js → index-CZmdzLaU.js} +3 -3
  35. package/dist/{index-CR2kGrpY.js → index-CeaT_FBl.js} +3 -3
  36. package/dist/{index-DfLCrnVq.js → index-CefLTKmi.js} +2 -2
  37. package/dist/{index-CLdXUpL8.js → index-CfVHzirA.js} +5 -5
  38. package/dist/{index-D0IZW-Up.js → index-CrBanggA.js} +2 -2
  39. package/dist/{index-BlIc9r0r.js → index-Cx5ThXzs.js} +3 -3
  40. package/dist/{index-CZFx44C7.js → index-D0DQjdsq.js} +2 -2
  41. package/dist/{index-DPgw0Cf_.js → index-DH9e_hqJ.js} +2 -2
  42. package/dist/{index-hbS5PDHj.js → index-DTomeh-p.js} +3 -3
  43. package/dist/{index-GpSpJ3ti.js → index-DZGfsazg.js} +3 -3
  44. package/dist/{index-QAs789O5.js → index-DlLnTKv3.js} +2 -2
  45. package/dist/{index-ABUMl7H3.js → index-DqUiBDRo.js} +3 -3
  46. package/dist/{index-CFGO7LRz.js → index-GDUM7K5V.js} +2 -2
  47. package/dist/{index-Db5-PJG-.js → index-Hro6EPZS.js} +2 -2
  48. package/dist/{index-CG8e3146.js → index-KgumaL1c.js} +1 -1
  49. package/dist/{index-XZeturb3.js → index-TemHfU1M.js} +3 -3
  50. package/dist/{index-DKwEe_Tu.js → index-g_Bs6dNr.js} +4 -4
  51. package/dist/{index-S4ylc8JK.js → index-oO_X5wU0.js} +3 -3
  52. package/dist/{index-BqWO6mvz.js → index-ptbBQ53d.js} +4 -4
  53. package/dist/index.js +5 -5
  54. package/dist/{markdownToPlainText-BOtlQ_BY.js → markdownToPlainText-DN_G-I6g.js} +1 -1
  55. package/dist/{useChatKitLabels-CatQSpfL.js → useChatKitLabels-DxW0N5U-.js} +1 -1
  56. package/dist/{useMessageHandler-nnsort0-.js → useMessageHandler-Bkzrdgfj.js} +1 -1
  57. package/package.json +1 -1
  58. package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +100 -1
  59. package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +3 -1
  60. package/src/components/base/CkCodeEditor/CkCodeEditor.vue +127 -10
  61. package/src/components/base/CkCodeEditor/badgeDecoration.ts +2 -2
  62. package/src/components/base/CkCodeEditor/createCodeMirror.ts +45 -8
  63. package/src/components/base/CkCodeEditor/types.ts +12 -0
  64. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.spec.ts +40 -0
  65. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts +31 -0
  66. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue +3 -0
  67. package/src/components/base/CkMarkdownRenderer/types.ts +13 -0
  68. package/src/components/base/CkMilkdownEditor/milkdown-theme.css +6 -3
  69. package/src/helpers/codemirror/code-palette.css +23 -3
  70. package/src/helpers/codemirror/theme.ts +44 -8
  71. package/src/helpers/unified/remarkBreaks.ts +32 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CkCodeEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAiKpE,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,OAAO,IAAI,MAAM,CAEzB;AAoJD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"CkCodeEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.vue"],"names":[],"mappings":"AAwXA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAgOpE,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,OAAO,IAAI,MAAM,CAEzB;AAmLD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -13,8 +13,8 @@ export interface CkCodeEditorBadgeContent {
13
13
  /** Native tooltip, useful for showing the underlying reference. */
14
14
  title?: string;
15
15
  /**
16
- * Classes replacing the default pill styling, which mirrors `UiBadge`'s
17
- * `outline` variant at `small` size.
16
+ * Classes replacing the default pill styling, which is the secondary badge
17
+ * the ChatKit design file specifies.
18
18
  */
19
19
  class?: string;
20
20
  }
@@ -16,8 +16,12 @@ export interface CreateCodeMirrorOptions {
16
16
  badge?: CkCodeEditorBadgeRule;
17
17
  /** Called synchronously whenever the document changes. */
18
18
  onChange: (value: string) => void;
19
+ /**
20
+ * Called when the editing area takes focus. There is deliberately no `onBlur`
21
+ * counterpart: losing focus to the header's copy button is not leaving the
22
+ * editor, and only the component around this view can tell the difference.
23
+ */
19
24
  onFocus: () => void;
20
- onBlur: () => void;
21
25
  }
22
26
  /** Imperative surface `CkCodeEditor` drives; keeps CodeMirror out of the SFC. */
23
27
  export interface CodeMirrorHandle {
@@ -40,6 +44,16 @@ export interface CodeMirrorHandle {
40
44
  * unhighlighted code instead of throwing.
41
45
  */
42
46
  export declare function resolveLanguage(language: string): Promise<LanguageSupport | null>;
47
+ /**
48
+ * Pick the line ending a document already uses.
49
+ *
50
+ * CodeMirror splits on `\n`, `\r\n` and `\r` alike, but `doc.toString()` always
51
+ * joins with `\n`. Left alone, opening a file with Windows line endings and
52
+ * typing one character would silently rewrite every line ending in it. Telling
53
+ * the editor which separator this document uses keeps it intact, both when
54
+ * reading the value back and when the user presses Enter.
55
+ */
56
+ export declare function detectLineSeparator(doc: string): string;
43
57
  /**
44
58
  * Build a CodeMirror view themed like `UiCodeBlock`. Loaded lazily by
45
59
  * `CkCodeEditor` so CodeMirror stays out of the package's main chunk.
@@ -1 +1 @@
1
- {"version":3,"file":"createCodeMirror.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/createCodeMirror.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,UAAU,EAOX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,8CAA8C,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,0DAA0D;IAC1D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,iFAAiF;AACjF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,E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+96,18 @@ export interface CkCodeEditorProps {
96
96
  * `'24rem'`. Unset, the editor grows with its content.
97
97
  */
98
98
  maxHeight?: string;
99
+ /**
100
+ * Fade the code out at the top and bottom edges when there is more of it
101
+ * scrolled out of view, so a clipped document reads as continuing rather than
102
+ * stopping mid-line.
103
+ *
104
+ * Each edge appears only when that direction can actually scroll, so a
105
+ * document that fits shows no fade at all. Relevant mainly alongside
106
+ * `maxHeight`, which is what makes the editor scroll in the first place.
107
+ *
108
+ * @default true
109
+ */
110
+ scrollFade?: boolean;
99
111
  /**
100
112
  * Move focus into the editor once it has been created.
101
113
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG/D,YAAY,EACV,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,iDAAiD;IACjD,KAAK,EAAE,EAAE,CAAC;IACV,sEAAsE;IACtE,IAAI,EAAE,EAAE,CAAC;IACT,8EAA8E;IAC9E,IAAI,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG/D,YAAY,EACV,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,iDAAiD;IACjD,KAAK,EAAE,EAAE,CAAC;IACV,sEAAsE;IACtE,IAAI,EAAE,EAAE,CAAC;IACT,8EAA8E;IAC9E,IAAI,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB"}
@@ -59,4 +59,11 @@ export declare const WithCitations: Story;
59
59
  * touches code spans — the `[3]` inside `` `arr[3]` `` stays literal.
60
60
  */
61
61
  export declare const WithUnsupportedAndCodeMarkers: Story;
62
+ /**
63
+ * `breaks` keeps single newlines as line breaks. Without it CommonMark treats a
64
+ * lone newline as whitespace, so lines typed separately in an editor run
65
+ * together. A blank line still starts a new paragraph either way, and newlines
66
+ * inside fenced code are never touched.
67
+ */
68
+ export declare const WithLineBreaks: Story;
62
69
  //# sourceMappingURL=CkMarkdownRenderer.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CkMarkdownRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAkBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqHnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA+BrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAwC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC;AAoBF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC;AAiEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,KAwB3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,KAc3C,CAAC"}
1
+ {"version":3,"file":"CkMarkdownRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAkBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgInC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA+BrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAwC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC;AAoBF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC;AAiEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,KAwB3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,KAc3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,KAY5B,CAAC"}
@@ -17,6 +17,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
17
17
  type: PropType<PluggableList>;
18
18
  default: undefined;
19
19
  };
20
+ breaks: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
20
24
  citations: {
21
25
  type: PropType<CkCitationSource[]>;
22
26
  default: undefined;
@@ -38,6 +42,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
38
42
  type: PropType<PluggableList>;
39
43
  default: undefined;
40
44
  };
45
+ breaks: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
41
49
  citations: {
42
50
  type: PropType<CkCitationSource[]>;
43
51
  default: undefined;
@@ -47,6 +55,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
47
55
  }>, {
48
56
  classes: CkMarkdownElementClasses;
49
57
  plugins: PluggableList;
58
+ breaks: boolean;
50
59
  citations: CkCitationSource[];
51
60
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
52
61
  //# sourceMappingURL=CkMarkdownRenderer.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CkMarkdownRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue"],"names":[],"mappings":"AAsKA,OAAO,EAKL,KAAK,QAAQ,EAEb,KAAK,KAAK,EACX,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAO7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;wBA2EnC,OAAO,YAAY;AAAxC,wBAAyC;AAQzC,QAAA,MAAM,YAAY;;;;;;cAKI,QAAQ,CAAC,wBAAwB,CAAC;;;;cAG1B,QAAQ,CAAC,aAAa,CAAC;;;;cAEhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;yBAKxB,MAAM;;;;;;;cAVT,QAAQ,CAAC,wBAAwB,CAAC;;;;cAG1B,QAAQ,CAAC,aAAa,CAAC;;;;cAEhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;;;;4EA0D/C,CAAC"}
1
+ {"version":3,"file":"CkMarkdownRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue"],"names":[],"mappings":"AAyKA,OAAO,EAKL,KAAK,QAAQ,EAEb,KAAK,KAAK,EACX,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;wBA2EnC,OAAO,YAAY;AAAxC,wBAAyC;AAQzC,QAAA,MAAM,YAAY;;;;;;cAKI,QAAQ,CAAC,wBAAwB,CAAC;;;;cAG1B,QAAQ,CAAC,aAAa,CAAC;;;;;;;;cAGhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;yBAKxB,MAAM;;;;;;;cAXT,QAAQ,CAAC,wBAAwB,CAAC;;;;cAG1B,QAAQ,CAAC,aAAa,CAAC;;;;;;;;cAGhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;;;;;4EA2D/C,CAAC"}
@@ -47,6 +47,19 @@ export interface CkMarkdownRendererProps {
47
47
  * generated HTML elements (e.g. `h1`, `p`, `ul`).
48
48
  */
49
49
  classes?: CkMarkdownElementClasses;
50
+ /**
51
+ * Treat a single newline as a line break, so two lines typed in an editor
52
+ * render as two lines.
53
+ *
54
+ * Off by default, because CommonMark says a lone newline is only whitespace
55
+ * and existing content may rely on that. Turn it on wherever people type the
56
+ * markdown themselves and expect their line breaks to survive; a blank line
57
+ * still starts a new paragraph either way, and newlines inside code spans and
58
+ * fenced blocks are never affected.
59
+ *
60
+ * @default false
61
+ */
62
+ breaks?: boolean;
50
63
  /** Extra [unified](https://unifiedjs.com/) plugins to extend parsing. */
51
64
  plugins?: PluggableList;
52
65
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":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CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
@@ -1,4 +1,4 @@
1
- import { _, a, b, c, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, D } from "../CkHistory.vue_vue_type_script_setup_true_lang-B0WUzTHa.js";
1
+ import { _, a, b, c, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, D } from "../CkHistory.vue_vue_type_script_setup_true_lang-BvRIp3m6.js";
2
2
  export {
3
3
  _ as CkAgentMessage,
4
4
  a as CkAgentMessageHeader,
@@ -1,4 +1,4 @@
1
- import { c, d, u, a, b, e } from "../index-CZFx44C7.js";
1
+ import { c, d, u, a, b, e } from "../index-D0DQjdsq.js";
2
2
  export {
3
3
  c as createDocumentUploadProvider,
4
4
  d as defaultDocumentUploadConfig,
@@ -1,4 +1,4 @@
1
- import { J as MatchDecorator, D as Decoration, V as ViewPlugin, E as EditorView, W as WidgetType, K as EditorState, O as Compartment, Q as lineNumbers, U as languages, X as ckCodeMirrorTheme, Y as history, Z as drawSelection, _ as highlightSpecialChars, $ as highlightActiveLine, a0 as bracketMatching, a1 as indentOnInput, k as indentUnit, m as keymap, a2 as defaultKeymap, a3 as historyKeymap, a4 as indentWithTab, a5 as placeholder } from "./code-palette-DH_G7mZ5.js";
1
+ import { J as MatchDecorator, D as Decoration, V as ViewPlugin, E as EditorView, W as WidgetType, K as EditorState, O as Compartment, Q as lineNumbers, U as languages, X as ckCodeMirrorTheme, Y as history, Z as drawSelection, _ as highlightSpecialChars, $ as highlightActiveLine, a0 as bracketMatching, a1 as indentOnInput, k as indentUnit, m as keymap, a2 as defaultKeymap, a3 as historyKeymap, a4 as indentWithTab, a5 as placeholder } from "./code-palette-BWrZDi47.js";
2
2
  import { p as purify } from "./katex.min-md74IFlY.js";
3
3
  const DEFAULT_BADGE_CLASS = "ck-code-badge inline-flex w-fit shrink-0 select-none items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border border-border-surface-default bg-background-button-secondary-button text-content-on-surface-primary px-2 py-0.5 label-12-regular align-middle";
4
4
  class BadgeWidget extends WidgetType {
@@ -76,9 +76,18 @@ async function resolveLanguage(language) {
76
76
  return null;
77
77
  }
78
78
  }
79
+ function detectLineSeparator(doc) {
80
+ const crlf = (doc.match(/\r\n/g) ?? []).length;
81
+ if (crlf === 0) return "\n";
82
+ const bareLf = (doc.match(new RegExp("(?<!\\r)\\n", "g")) ?? []).length;
83
+ return crlf >= bareLf ? "\r\n" : "\n";
84
+ }
79
85
  function readonlyState(readonly) {
80
86
  return [EditorState.readOnly.of(readonly), EditorView.editable.of(!readonly)];
81
87
  }
88
+ function readDoc(state) {
89
+ return state.doc.sliceString(0, state.doc.length, state.lineBreak);
90
+ }
82
91
  function baseExtensions(options) {
83
92
  return [
84
93
  // Deliberately not CodeMirror's `basicSetup`: it also brings autocomplete,
@@ -99,11 +108,8 @@ function baseExtensions(options) {
99
108
  ...options.ariaLabel ? { "aria-label": options.ariaLabel } : {}
100
109
  }),
101
110
  EditorView.updateListener.of((update) => {
102
- if (update.docChanged) options.onChange(update.state.doc.toString());
103
- if (update.focusChanged) {
104
- if (update.view.hasFocus) options.onFocus();
105
- else options.onBlur();
106
- }
111
+ if (update.docChanged) options.onChange(readDoc(update.state));
112
+ if (update.focusChanged && update.view.hasFocus) options.onFocus();
107
113
  }),
108
114
  ...options.placeholder ? [placeholder(options.placeholder)] : []
109
115
  ];
@@ -114,7 +120,9 @@ async function createCodeMirror(options) {
114
120
  const lineNumbersSlot = new Compartment();
115
121
  const wrappingSlot = new Compartment();
116
122
  const badgeSlot = new Compartment();
123
+ const lineSeparatorSlot = new Compartment();
117
124
  const support = await resolveLanguage(options.language);
125
+ let languageRequestId = 0;
118
126
  const view = new EditorView({
119
127
  parent: options.parent,
120
128
  state: EditorState.create({
@@ -125,7 +133,10 @@ async function createCodeMirror(options) {
125
133
  readonlySlot.of(readonlyState(options.readonly)),
126
134
  lineNumbersSlot.of(options.showLineNumbers ? lineNumbers() : []),
127
135
  wrappingSlot.of(options.lineWrapping ? EditorView.lineWrapping : []),
128
- badgeSlot.of(options.badge ? badgeExtension(options.badge) : [])
136
+ badgeSlot.of(options.badge ? badgeExtension(options.badge) : []),
137
+ lineSeparatorSlot.of(
138
+ EditorState.lineSeparator.of(detectLineSeparator(options.doc))
139
+ )
129
140
  ]
130
141
  })
131
142
  });
@@ -134,9 +145,13 @@ async function createCodeMirror(options) {
134
145
  }
135
146
  return {
136
147
  view,
137
- getCode: () => view.state.doc.toString(),
148
+ getCode: () => readDoc(view.state),
138
149
  setCode: (value) => {
139
- if (value === view.state.doc.toString()) return;
150
+ if (value === readDoc(view.state)) return;
151
+ const separator = detectLineSeparator(value);
152
+ if (separator !== view.state.lineBreak) {
153
+ reconfigure(lineSeparatorSlot, EditorState.lineSeparator.of(separator));
154
+ }
140
155
  const cursor = Math.min(view.state.selection.main.head, value.length);
141
156
  view.dispatch({
142
157
  changes: { from: 0, to: view.state.doc.length, insert: value },
@@ -144,7 +159,9 @@ async function createCodeMirror(options) {
144
159
  });
145
160
  },
146
161
  setLanguage: async (language) => {
162
+ const request = ++languageRequestId;
147
163
  const next = await resolveLanguage(language);
164
+ if (request !== languageRequestId) return;
148
165
  reconfigure(languageSlot, next ? [next] : []);
149
166
  },
150
167
  setReadonly: (readonly) => {
@@ -165,5 +182,6 @@ async function createCodeMirror(options) {
165
182
  }
166
183
  export {
167
184
  createCodeMirror,
185
+ detectLineSeparator,
168
186
  resolveLanguage
169
187
  };
@@ -6,12 +6,12 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
6
6
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
7
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
8
  var _marks, _hasText, _maybeMerge, _matchTarget, _runNode, _closeNodeAndPush, _addNodeAndPush, _a, _b, _openMarks, _matchTarget2, _runProseNode, _runProseMark, _orderMarks, _closeEndedMarks, _runNode2, _maybeMergeChildren, _createMarkdownNode, _moveSpaces, _closeNodeAndPush2, _addNodeAndPush2, _openMark, _closeMark, _c;
9
- import { ai as syntaxHighlighting, E as EditorView$1, aj as HighlightStyle, t as tags, ak as keyName, al as base, O as Compartment, K as EditorState$1, Z as drawSelection, m as keymap$4, S as StateEffect, am as getPanel, d as EditorSelection, an as getDialog, ao as showDialog, V as ViewPlugin, D as Decoration$1, l as StateField, ap as showPanel, P as Prec, j as codePointAt, n as codePointSize, F as Facet, u as combineConfig, C as CharCategory, aq as RangeSetBuilder, v as fromCodePoint, ar as crelt, as as runScopeHandlers, at as findClusterBreak, au as activateHover, av as hoverTooltip, W as WidgetType$1, Q as lineNumbers, aw as highlightActiveLineGutter, _ as highlightSpecialChars, Y as history$2, ax as foldGutter, ay as dropCursor, a1 as indentOnInput, az as defaultHighlightStyle, a0 as bracketMatching, aA as rectangularSelection, aB as crosshairCursor, $ as highlightActiveLine, a2 as defaultKeymap, a3 as historyKeymap$1, aC as foldKeymap, U as languages, a4 as indentWithTab, X as ckCodeMirrorTheme } from "./code-palette-DH_G7mZ5.js";
9
+ import { ai as syntaxHighlighting, E as EditorView$1, aj as HighlightStyle, t as tags, ak as keyName, al as base, O as Compartment, K as EditorState$1, Z as drawSelection, m as keymap$4, S as StateEffect, am as getPanel, d as EditorSelection, an as getDialog, ao as showDialog, V as ViewPlugin, D as Decoration$1, l as StateField, ap as showPanel, P as Prec, j as codePointAt, n as codePointSize, F as Facet, u as combineConfig, C as CharCategory, aq as RangeSetBuilder, v as fromCodePoint, ar as crelt, as as runScopeHandlers, at as findClusterBreak, au as activateHover, av as hoverTooltip, W as WidgetType$1, Q as lineNumbers, aw as highlightActiveLineGutter, _ as highlightSpecialChars, Y as history$2, ax as foldGutter, ay as dropCursor, a1 as indentOnInput, az as defaultHighlightStyle, a0 as bracketMatching, aA as rectangularSelection, aB as crosshairCursor, $ as highlightActiveLine, a2 as defaultKeymap, a3 as historyKeymap$1, aC as foldKeymap, U as languages, a4 as indentWithTab, X as ckCodeMirrorTheme } from "./code-palette-BWrZDi47.js";
10
10
  import { p as purify } from "./katex.min-md74IFlY.js";
11
11
  import { h, defineComponent, ref, Fragment as Fragment$1, createApp, watchEffect, watch, computed, onMounted, onUnmounted, shallowRef, nextTick } from "vue";
12
- import { a as closeBrackets, b as autocompletion, d as closeBracketsKeymap, e as completionKeymap } from "./index-CG8e3146.js";
13
- import { h as formatCodeAsIndented, i as formatHeadingAsSetext, j as decodeString, k as encodeCharacterReference, p as patternInScope, n as handle, u as unified, r as remarkParse, v as visit, S as SKIP, d as visitParents, a as remarkGfm } from "./index-CLdXUpL8.js";
14
- import { z as zwitch, c as remarkMath, d as defaultChatKitLabels } from "./useChatKitLabels-CatQSpfL.js";
12
+ import { a as closeBrackets, b as autocompletion, d as closeBracketsKeymap, e as completionKeymap } from "./index-KgumaL1c.js";
13
+ import { h as formatCodeAsIndented, i as formatHeadingAsSetext, j as decodeString, k as encodeCharacterReference, p as patternInScope, n as handle, u as unified, r as remarkParse, v as visit, S as SKIP, e as visitParents, a as remarkGfm } from "./index-CfVHzirA.js";
14
+ import { z as zwitch, c as remarkMath, d as defaultChatKitLabels } from "./useChatKitLabels-DxW0N5U-.js";
15
15
  const own = {}.hasOwnProperty;
16
16
  function configure(base2, extension) {
17
17
  let index = -1;
@@ -1,5 +1,5 @@
1
- import { u } from "../useMessageHandler-nnsort0-.js";
2
- import { C, d, n, p, r, a, u as u2, b } from "../useChatKitLabels-CatQSpfL.js";
1
+ import { u } from "../useMessageHandler-Bkzrdgfj.js";
2
+ import { C, d, n, p, r, a, u as u2, b } from "../useChatKitLabels-DxW0N5U-.js";
3
3
  export {
4
4
  C as CHAT_KIT_LABELS,
5
5
  d as defaultChatKitLabels,
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/helpers/codemirror/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2FAC6D,CAAC;AAO3F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gBAiE3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAgD/B,CAAC"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/helpers/codemirror/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2FAC6D,CAAC;AAO3F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gBA4F3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAyD/B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Plugin } from 'unified';
2
+ /**
3
+ * Turns every soft line break into a hard one, so a single press of Enter shows
4
+ * up as a line break rather than being collapsed into the previous line.
5
+ *
6
+ * This is what chat interfaces usually want: people type a message the way they
7
+ * would in any other text box and expect the lines they made to survive. Strict
8
+ * CommonMark instead requires two trailing spaces, a backslash, or a blank line
9
+ * to force a break.
10
+ *
11
+ * `findAndReplace` only visits `text` nodes, so newlines inside code spans and
12
+ * fenced code blocks are untouched and keep their literal meaning.
13
+ */
14
+ export declare const remarkBreaks: Plugin<[]>;
15
+ //# sourceMappingURL=remarkBreaks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remarkBreaks.d.ts","sourceRoot":"","sources":["../../../src/helpers/unified/remarkBreaks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAUtC;;;;;;;;;;;GAWG;AAGH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,EAAE,CAOnC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { E as EditorView, d as EditorSelection, a as LanguageSupport, p as parseMixed, b as syntaxTree, L as LRLanguage, s as styleTags, t as tags, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp } from "./code-palette-DH_G7mZ5.js";
2
- import { html } from "./index-BqWO6mvz.js";
3
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-Mh3WUU-6.js";
1
+ import { E as EditorView, d as EditorSelection, a as LanguageSupport, p as parseMixed, b as syntaxTree, L as LRLanguage, s as styleTags, t as tags, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp } from "./code-palette-BWrZDi47.js";
2
+ import { html } from "./index-ptbBQ53d.js";
3
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-2YPxXIaf.js";
4
4
  const interpolationStart = 1, commentTagStart = 2, tagStart = 3, text = 155, endrawTagStart = 4, rawText = 156;
5
5
  function wordChar(code) {
6
6
  return code >= 65 && code <= 90 || code >= 97 && code <= 122;
@@ -1,4 +1,4 @@
1
- import { y as Parser, N as NodeSet, z as NodeType, B as DefaultBufferLength, G as NodeProp, H as Tree, I as IterMode } from "./code-palette-DH_G7mZ5.js";
1
+ import { y as Parser, N as NodeSet, z as NodeType, B as DefaultBufferLength, G as NodeProp, H as Tree, I as IterMode } from "./code-palette-BWrZDi47.js";
2
2
  class Stack {
3
3
  /**
4
4
  @internal
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
3
  const RawString = 1, templateArgsEndFallback = 2, MacroName = 3;
4
4
  const R = 82, L = 76, u = 117, U = 85, a = 97, z = 122, A = 65, Z = 90, Underscore = 95, Zero = 48, Quote = 34, ParenL = 40, ParenR = 41, Space = 32, GreaterThan = 62;
5
5
  const rawString = new ExternalTokenizer((input) => {
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
3
  const javaHighlighting = styleTags({
4
4
  null: tags.null,
5
5
  instanceof: tags.operatorKeyword,
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside, b as syntaxTree, a7 as NodeWeakMap, I as IterMode } from "./code-palette-DH_G7mZ5.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-CG8e3146.js";
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside, b as syntaxTree, a7 as NodeWeakMap, I as IterMode } from "./code-palette-BWrZDi47.js";
3
+ import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-KgumaL1c.js";
4
4
  const insertedSemi = 177, space$1 = 179, identifier = 184, String = 12, closeParen$1 = 13, Number = 17, Rune = 20, closeBrace$1 = 25, closeBracket = 53, IncDecOp = 95, _return = 142, _break = 144, _continue = 145, fallthrough = 148;
5
5
  const newline = 10, carriageReturn = 13, space = 32, tab = 9, slash = 47, closeParen = 41, closeBrace = 125;
6
6
  const semicolon = new ExternalTokenizer((input, stack) => {
@@ -1,7 +1,7 @@
1
- import { L as LRLanguage, a as LanguageSupport, p as parseMixed, s as styleTags, t as tags } from "./code-palette-DH_G7mZ5.js";
2
- import { html } from "./index-BqWO6mvz.js";
3
- import { javascriptLanguage } from "./index-BlIc9r0r.js";
4
- import { L as LRParser, a as LocalTokenGroup } from "./index-Mh3WUU-6.js";
1
+ import { L as LRLanguage, a as LanguageSupport, p as parseMixed, s as styleTags, t as tags } from "./code-palette-BWrZDi47.js";
2
+ import { html } from "./index-ptbBQ53d.js";
3
+ import { javascriptLanguage } from "./index-Cx5ThXzs.js";
4
+ import { L as LRParser, a as LocalTokenGroup } from "./index-2YPxXIaf.js";
5
5
  const parser = /* @__PURE__ */ LRParser.deserialize({
6
6
  version: 14,
7
7
  states: "%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, b as syntaxTree, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside, a7 as NodeWeakMap, I as IterMode } from "./code-palette-DH_G7mZ5.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-CG8e3146.js";
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, b as syntaxTree, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside, a7 as NodeWeakMap, I as IterMode } from "./code-palette-BWrZDi47.js";
3
+ import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-KgumaL1c.js";
4
4
  const printKeyword = 1, indent = 194, dedent = 195, newline$1 = 196, blankLineStart = 197, newlineBracketed = 198, eof = 199, stringContent = 200, Escape = 2, replacementStart = 3, stringEnd = 201, ParenL = 24, ParenthesizedExpression = 25, TupleExpression = 49, ComprehensionExpression = 50, BracketL = 55, ArrayExpression = 56, ArrayComprehensionExpression = 57, BraceL = 59, DictionaryExpression = 60, DictionaryComprehensionExpression = 61, SetExpression = 62, SetComprehensionExpression = 63, ArgList = 65, subscript = 238, String$1 = 71, stringStart = 241, stringStartD = 242, stringStartL = 243, stringStartLD = 244, stringStartR = 245, stringStartRD = 246, stringStartRL = 247, stringStartRLD = 248, FormatString = 72, stringStartF = 249, stringStartFD = 250, stringStartFL = 251, stringStartFLD = 252, stringStartFR = 253, stringStartFRD = 254, stringStartFRL = 255, stringStartFRLD = 256, FormatReplacement = 73, nestedFormatReplacement = 77, importList = 263, TypeParamList = 112, ParamList = 130, SequencePattern = 151, MappingPattern = 152, PatternArgList = 155;
5
5
  const newline = 10, carriageReturn = 13, space = 32, tab = 9, hash = 35, parenOpen = 40, dot = 46, braceOpen = 123, braceClose = 125, singleQuote = 39, doubleQuote = 34, backslash = 92, letter_o = 111, letter_x = 120, letter_N = 78, letter_u = 117, letter_U = 85;
6
6
  const bracketed = /* @__PURE__ */ new Set([
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, p as parseMixed, L as LRLanguage, i as indentNodeProp, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
3
- import { html } from "./index-BqWO6mvz.js";
1
+ import { L as LRParser, E as ExternalTokenizer } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, p as parseMixed, L as LRLanguage, i as indentNodeProp, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
+ import { html } from "./index-ptbBQ53d.js";
4
4
  const castOpen = 1, HeredocString = 2, interpolatedStringContent = 276, EscapeSequence = 3, afterInterpolation = 277, automaticSemicolon = 278, eof = 279, abstract = 4, and = 5, array = 6, as = 7, Boolean = 8, _break = 9, _case = 10, _catch = 11, clone = 12, _const = 13, _continue = 14, _default = 15, declare = 16, _do = 17, echo = 18, _else = 19, elseif = 20, enddeclare = 21, endfor = 22, endforeach = 23, endif = 24, endswitch = 25, endwhile = 26, _enum = 27, _extends = 28, final = 29, _finally = 30, fn = 31, _for = 32, foreach = 33, from = 34, _function = 35, global = 36, goto = 37, _if = 38, _implements = 39, include = 40, include_once = 41, _instanceof = 42, insteadof = 43, _interface = 44, list = 45, match = 46, namespace = 47, _new = 48, _null = 49, or = 50, print = 51, readonly = 52, _require = 53, require_once = 54, _return = 55, _switch = 56, _throw = 57, trait = 58, _try = 59, unset = 60, use = 61, _var = 62, Visibility = 63, _while = 64, xor = 65, _yield = 66;
5
5
  const keywordMap = {
6
6
  abstract,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags$1, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside, b as syntaxTree, a7 as NodeWeakMap, I as IterMode } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags$1, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside, b as syntaxTree, a7 as NodeWeakMap, I as IterMode } from "./code-palette-BWrZDi47.js";
3
3
  const descendantOp = 148, Unit = 1, identifier$1 = 149, callee = 150, VariableName = 2, queryIdentifier = 151, queryVariableName = 3, QueryCallee = 4;
4
4
  const space = [
5
5
  9,
@@ -9540,11 +9540,11 @@ export {
9540
9540
  SKIP as S,
9541
9541
  remarkGfm as a,
9542
9542
  asciiAlphanumeric as b,
9543
- convert as c,
9544
- visitParents as d,
9545
- ccount as e,
9546
- factorySpace as f,
9547
- findAndReplace as g,
9543
+ factorySpace as c,
9544
+ convert as d,
9545
+ visitParents as e,
9546
+ findAndReplace as f,
9547
+ ccount as g,
9548
9548
  formatCodeAsIndented as h,
9549
9549
  formatHeadingAsSetext as i,
9550
9550
  decodeString as j,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, E as EditorView, b as syntaxTree, d as EditorSelection, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, f as foldNodeProp, ag as bracketMatchingHandle } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, E as EditorView, b as syntaxTree, d as EditorSelection, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, f as foldNodeProp, ag as bracketMatchingHandle } from "./code-palette-BWrZDi47.js";
3
3
  const StartTag = 1, StartCloseTag = 2, MissingCloseTag = 3, mismatchedStartCloseTag = 4, incompleteStartCloseTag = 5, commentContent$1 = 36, piContent$1 = 37, cdataContent$1 = 38, Element$1 = 11, OpenTag = 13;
4
4
  function nameChar(ch) {
5
5
  return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161;
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, E as EditorView, b as syntaxTree, d as EditorSelection, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside, ah as sublanguageProp, ac as defineLanguageFacet, a7 as NodeWeakMap, I as IterMode } from "./code-palette-DH_G7mZ5.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-CG8e3146.js";
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, E as EditorView, b as syntaxTree, d as EditorSelection, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, a6 as flatIndent, c as continuedIndent, e as delimitedIndent, f as foldNodeProp, g as foldInside, ah as sublanguageProp, ac as defineLanguageFacet, a7 as NodeWeakMap, I as IterMode } from "./code-palette-BWrZDi47.js";
3
+ import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-KgumaL1c.js";
4
4
  const noSemi = 316, noSemiType = 317, incdec = 1, incdecPrefix = 2, questionDot = 3, JSXStartTag = 4, insertSemi = 318, spaces = 320, newline = 321, LineComment = 5, BlockComment = 6, Dialect_jsx = 0;
5
5
  const space = [
6
6
  9,
@@ -1,6 +1,6 @@
1
- import { g as generateId } from "./markdownToPlainText-BOtlQ_BY.js";
1
+ import { g as generateId } from "./markdownToPlainText-DN_G-I6g.js";
2
2
  import { ref, shallowRef, computed, readonly, toRaw, toValue, watch } from "vue";
3
- import { u as useMessageHandler } from "./useMessageHandler-nnsort0-.js";
3
+ import { u as useMessageHandler } from "./useMessageHandler-Bkzrdgfj.js";
4
4
  import "./katex.min-md74IFlY.js";
5
5
  function secondsToDate(seconds) {
6
6
  return new Date(seconds * 1e3);
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, p as parseMixed, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, p as parseMixed, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
3
  const blockEnd = 63, eof = 64, DirectiveEnd = 1, DocEnd = 2, sequenceStartMark = 3, sequenceContinueMark = 4, explicitMapStartMark = 5, explicitMapContinueMark = 6, flowMapMark = 7, mapStartMark = 65, mapContinueMark = 66, Literal = 8, QuotedLiteral = 9, Anchor = 10, Alias = 11, Tag = 12, BlockLiteralContent = 13, BracketL = 19, FlowSequence = 20, Colon = 29, BraceL = 33, FlowMapping = 34, BlockLiteralHeader = 47;
4
4
  const type_Top = 0, type_Seq = 1, type_Map = 2, type_Flow = 3, type_Lit = 4;
5
5
  class Context {
@@ -1,6 +1,6 @@
1
- import { y as Parser, z as NodeType, G as NodeProp, a8 as Tag, N as NodeSet, s as styleTags, H as Tree, p as parseMixed, t as tags, b as syntaxTree, d as EditorSelection, a9 as countColumn, a as LanguageSupport, P as Prec, m as keymap, E as EditorView, aa as Language, k as indentUnit, ab as foldService, ac as defineLanguageFacet, K as EditorState, f as foldNodeProp, i as indentNodeProp, ad as languageDataProp, ae as LanguageDescription, af as ParseContext } from "./code-palette-DH_G7mZ5.js";
2
- import { C as CompletionContext } from "./index-CG8e3146.js";
3
- import { html, htmlCompletionSource } from "./index-BqWO6mvz.js";
1
+ import { y as Parser, z as NodeType, G as NodeProp, a8 as Tag, N as NodeSet, s as styleTags, H as Tree, p as parseMixed, t as tags, b as syntaxTree, d as EditorSelection, a9 as countColumn, a as LanguageSupport, P as Prec, m as keymap, E as EditorView, aa as Language, k as indentUnit, ab as foldService, ac as defineLanguageFacet, K as EditorState, f as foldNodeProp, i as indentNodeProp, ad as languageDataProp, ae as LanguageDescription, af as ParseContext } from "./code-palette-BWrZDi47.js";
2
+ import { C as CompletionContext } from "./index-KgumaL1c.js";
3
+ import { html, htmlCompletionSource } from "./index-ptbBQ53d.js";
4
4
  class CompositeBlock {
5
5
  static create(type, value, from, parentHash, end) {
6
6
  let hash = parentHash + (parentHash << 8) + type + (value << 4) | 0;
@@ -1,6 +1,6 @@
1
- import { L as LRLanguage, a as LanguageSupport, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, s as styleTags, t as tags, b as syntaxTree } from "./code-palette-DH_G7mZ5.js";
2
- import { E as ExternalTokenizer, L as LRParser } from "./index-Mh3WUU-6.js";
3
- import { i as ifNotIn, c as completeFromList } from "./index-CG8e3146.js";
1
+ import { L as LRLanguage, a as LanguageSupport, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, s as styleTags, t as tags, b as syntaxTree } from "./code-palette-BWrZDi47.js";
2
+ import { E as ExternalTokenizer, L as LRParser } from "./index-2YPxXIaf.js";
3
+ import { i as ifNotIn, c as completeFromList } from "./index-KgumaL1c.js";
4
4
  const whitespace = 36, LineComment = 1, BlockComment = 2, String$1 = 3, Number = 4, Bool = 5, Null = 6, ParenL = 7, ParenR = 8, BraceL = 9, BraceR = 10, BracketL = 11, BracketR = 12, Semi = 13, Dot = 14, Operator = 15, Punctuation = 16, SpecialVar = 17, Identifier = 18, QuotedIdentifier = 19, Keyword = 20, Type = 21, Bits = 22, Bytes = 23, Builtin = 24;
5
5
  function isAlpha(ch) {
6
6
  return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 48 && ch <= 57;
@@ -1,5 +1,5 @@
1
- import { a as LanguageSupport, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside, s as styleTags, t as tags } from "./code-palette-DH_G7mZ5.js";
2
- import { L as LRParser } from "./index-Mh3WUU-6.js";
1
+ import { a as LanguageSupport, L as LRLanguage, i as indentNodeProp, e as delimitedIndent, f as foldNodeProp, g as foldInside, s as styleTags, t as tags } from "./code-palette-BWrZDi47.js";
2
+ import { L as LRParser } from "./index-2YPxXIaf.js";
3
3
  const spec_Keyword = { __proto__: null, anyref: 34, dataref: 34, eqref: 34, externref: 34, i31ref: 34, funcref: 34, i8: 34, i16: 34, i32: 34, i64: 34, f32: 34, f64: 34 };
4
4
  const parser = /* @__PURE__ */ LRParser.deserialize({
5
5
  version: 14,
@@ -1,6 +1,6 @@
1
- import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, f as foldNodeProp, g as foldInside, i as indentNodeProp, c as continuedIndent } from "./code-palette-DH_G7mZ5.js";
3
- import { defineCSSCompletionSource } from "./index-DfLCrnVq.js";
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, f as foldNodeProp, g as foldInside, i as indentNodeProp, c as continuedIndent } from "./code-palette-BWrZDi47.js";
3
+ import { defineCSSCompletionSource } from "./index-CefLTKmi.js";
4
4
  const indent = 168, dedent = 169, descendantOp = 170, InterpolationEnd = 1, InterpolationContinue = 2, Unit = 3, callee = 171, identifier = 172, VariableName = 4, queryIdentifier = 173, InterpolationStart = 5, newline = 174, blankLineStart = 175, eof = 176, whitespace = 177, LineComment = 6, Comment = 7, IndentedMixin = 8, IndentedInclude = 9, Dialect_indented = 0;
5
5
  const space = [
6
6
  9,
@@ -1,5 +1,5 @@
1
- import { L as LRParser, E as ExternalTokenizer } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser, E as ExternalTokenizer } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
3
  const closureParamDelim = 1, tpOpen = 2, tpClose = 3, RawString = 4, Float = 5;
4
4
  const _b = 98, _e = 101, _f = 102, _r = 114, _E = 69, Zero = 48, Dot = 46, Plus = 43, Minus = 45, Hash = 35, Quote = 34, Pipe = 124, LessThan = 60, GreaterThan = 62;
5
5
  function isNum(ch) {
@@ -1,5 +1,5 @@
1
- import { L as LRParser } from "./index-Mh3WUU-6.js";
2
- import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-DH_G7mZ5.js";
1
+ import { L as LRParser } from "./index-2YPxXIaf.js";
2
+ import { s as styleTags, t as tags, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside } from "./code-palette-BWrZDi47.js";
3
3
  const jsonHighlighting = styleTags({
4
4
  String: tags.string,
5
5
  Number: tags.number,
@@ -1,4 +1,4 @@
1
- import { b as syntaxTree, T as Transaction, h as Text, S as StateEffect, j as codePointAt, d as EditorSelection, k as indentUnit, A as Annotation, D as Decoration, l as StateField, E as EditorView, P as Prec, m as keymap, n as codePointSize, R as RangeSet, o as showTooltip, V as ViewPlugin, q as logException, r as getTooltip, F as Facet, u as combineConfig, v as fromCodePoint, M as MapMode, W as WidgetType, w as RangeValue, x as Direction, C as CharCategory } from "./code-palette-DH_G7mZ5.js";
1
+ import { b as syntaxTree, T as Transaction, h as Text, S as StateEffect, j as codePointAt, d as EditorSelection, k as indentUnit, A as Annotation, D as Decoration, l as StateField, E as EditorView, P as Prec, m as keymap, n as codePointSize, R as RangeSet, o as showTooltip, V as ViewPlugin, q as logException, r as getTooltip, F as Facet, u as combineConfig, v as fromCodePoint, M as MapMode, W as WidgetType, w as RangeValue, x as Direction, C as CharCategory } from "./code-palette-BWrZDi47.js";
2
2
  class CompletionContext {
3
3
  /**
4
4
  Create a new completion context. (Mostly useful for testing
@@ -1,6 +1,6 @@
1
- import { a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside, s as styleTags, t as tags } from "./code-palette-DH_G7mZ5.js";
2
- import { defineCSSCompletionSource } from "./index-DfLCrnVq.js";
3
- import { L as LRParser, E as ExternalTokenizer } from "./index-Mh3WUU-6.js";
1
+ import { a as LanguageSupport, L as LRLanguage, i as indentNodeProp, c as continuedIndent, f as foldNodeProp, g as foldInside, s as styleTags, t as tags } from "./code-palette-BWrZDi47.js";
2
+ import { defineCSSCompletionSource } from "./index-CefLTKmi.js";
3
+ import { L as LRParser, E as ExternalTokenizer } from "./index-2YPxXIaf.js";
4
4
  const descendantOp = 110, Unit = 1, openArgList = 2;
5
5
  const space = [
6
6
  9,