@aleph-alpha/chat-kit 6.3.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 (73) hide show
  1. package/dist/{CkHistory.vue_vue_type_script_setup_true_lang-gV-lp0ZB.js → CkHistory.vue_vue_type_script_setup_true_lang-BvRIp3m6.js} +79 -16
  2. package/dist/adapters/responses-api.js +1 -1
  3. package/dist/chat-kit.css +81 -11
  4. package/dist/{code-palette-DAJUTnR-.js → code-palette-BWrZDi47.js} +156 -119
  5. package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts +8 -1
  6. package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts.map +1 -1
  7. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +2 -0
  8. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts.map +1 -1
  9. package/dist/components/base/CkCodeEditor/badgeDecoration.d.ts +47 -0
  10. package/dist/components/base/CkCodeEditor/badgeDecoration.d.ts.map +1 -0
  11. package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts +19 -1
  12. package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts.map +1 -1
  13. package/dist/components/base/CkCodeEditor/types.d.ts +32 -0
  14. package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -1
  15. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +7 -0
  16. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
  17. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts +9 -0
  18. package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts.map +1 -1
  19. package/dist/components/base/CkMarkdownRenderer/types.d.ts +13 -0
  20. package/dist/components/base/CkMarkdownRenderer/types.d.ts.map +1 -1
  21. package/dist/components/index.js +1 -1
  22. package/dist/composables/index.js +1 -1
  23. package/dist/createCodeMirror-BO-TWTzn.js +187 -0
  24. package/dist/{createCrepeEditor-Ci5FHHIV.js → createCrepeEditor-BGSlwmKn.js} +4 -4
  25. package/dist/handlers/index.js +2 -2
  26. package/dist/helpers/codemirror/theme.d.ts.map +1 -1
  27. package/dist/helpers/unified/remarkBreaks.d.ts +15 -0
  28. package/dist/helpers/unified/remarkBreaks.d.ts.map +1 -0
  29. package/dist/{index-w2yzH7vs.js → index--Yonjzfi.js} +3 -3
  30. package/dist/{index-CN8d3yl1.js → index-2YPxXIaf.js} +1 -1
  31. package/dist/{index-BoUJGvvQ.js → index-B4uqe-fL.js} +2 -2
  32. package/dist/{index-gYt3E3Cp.js → index-Bfo4U-Al.js} +2 -2
  33. package/dist/{index-BtY1uxn6.js → index-Bw39pbRL.js} +3 -3
  34. package/dist/{index-Dl24CCB3.js → index-CGEgwupi.js} +4 -4
  35. package/dist/{index-MfXW4ZyN.js → index-CZmdzLaU.js} +3 -3
  36. package/dist/{index-DgCcFC3N.js → index-CeaT_FBl.js} +3 -3
  37. package/dist/{index-BhvbqYsK.js → index-CefLTKmi.js} +2 -2
  38. package/dist/{index-CLdXUpL8.js → index-CfVHzirA.js} +5 -5
  39. package/dist/{index-BUCqcTPA.js → index-CrBanggA.js} +2 -2
  40. package/dist/{index-DufAP1JF.js → index-Cx5ThXzs.js} +3 -3
  41. package/dist/{index-CZFx44C7.js → index-D0DQjdsq.js} +2 -2
  42. package/dist/{index-DqGDenO9.js → index-DH9e_hqJ.js} +2 -2
  43. package/dist/{index-BvG6l44n.js → index-DTomeh-p.js} +3 -3
  44. package/dist/{index-ZHg2R9iD.js → index-DZGfsazg.js} +3 -3
  45. package/dist/{index-BLVAx_f8.js → index-DlLnTKv3.js} +2 -2
  46. package/dist/{index-Cxs6kPho.js → index-DqUiBDRo.js} +3 -3
  47. package/dist/{index-DhwsowEf.js → index-GDUM7K5V.js} +2 -2
  48. package/dist/{index-CB6xZVsf.js → index-Hro6EPZS.js} +2 -2
  49. package/dist/{index-D6ftdiLa.js → index-KgumaL1c.js} +1 -1
  50. package/dist/{index-CIF93PZF.js → index-TemHfU1M.js} +3 -3
  51. package/dist/{index-CYk7AB8M.js → index-g_Bs6dNr.js} +4 -4
  52. package/dist/{index-B2tew8uf.js → index-oO_X5wU0.js} +3 -3
  53. package/dist/{index-DxTzaHLr.js → index-ptbBQ53d.js} +4 -4
  54. package/dist/index.js +5 -5
  55. package/dist/{markdownToPlainText-BOtlQ_BY.js → markdownToPlainText-DN_G-I6g.js} +1 -1
  56. package/dist/{useChatKitLabels-CatQSpfL.js → useChatKitLabels-DxW0N5U-.js} +1 -1
  57. package/dist/{useMessageHandler-nnsort0-.js → useMessageHandler-Bkzrdgfj.js} +1 -1
  58. package/package.json +3 -3
  59. package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +161 -1
  60. package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +97 -1
  61. package/src/components/base/CkCodeEditor/CkCodeEditor.vue +135 -12
  62. package/src/components/base/CkCodeEditor/badgeDecoration.ts +173 -0
  63. package/src/components/base/CkCodeEditor/createCodeMirror.ts +54 -8
  64. package/src/components/base/CkCodeEditor/types.ts +38 -0
  65. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.spec.ts +40 -0
  66. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts +31 -0
  67. package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue +3 -0
  68. package/src/components/base/CkMarkdownRenderer/types.ts +13 -0
  69. package/src/components/base/CkMilkdownEditor/milkdown-theme.css +6 -3
  70. package/src/helpers/codemirror/code-palette.css +23 -3
  71. package/src/helpers/codemirror/theme.ts +44 -8
  72. package/src/helpers/unified/remarkBreaks.ts +32 -0
  73. package/dist/createCodeMirror-BkV6FEPn.js +0 -101
@@ -1,3 +1,5 @@
1
+ import type { CkCodeEditorBadgeRule } from './badgeDecoration';
2
+ export type { CkCodeEditorBadgeContent, CkCodeEditorBadgeRule, } from './badgeDecoration';
1
3
  /**
2
4
  * Single-document code editor built on [CodeMirror 6](https://codemirror.net/).
3
5
  * Its surface is the one `UiCodeBlock` renders for fenced code inside
@@ -94,12 +96,42 @@ export interface CkCodeEditorProps {
94
96
  * `'24rem'`. Unset, the editor grows with its content.
95
97
  */
96
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;
97
111
  /**
98
112
  * Move focus into the editor once it has been created.
99
113
  *
100
114
  * @default false
101
115
  */
102
116
  autofocus?: boolean;
117
+ /**
118
+ * Draws matched text as an inline pill, the way a mention renders in prose.
119
+ * Give a pattern and a callback mapping each match to a label and optional
120
+ * icon; return `null` from the callback to leave an occurrence alone.
121
+ *
122
+ * The document keeps the original text, so `getCode()`, copying and pasting
123
+ * still yield the raw reference. A pill behaves as one unit for the caret,
124
+ * so backspace removes the whole reference.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const badge = {
129
+ * pattern: /@collection:([\w-]+)/g,
130
+ * render: (m) => ({ label: m[1], icon: folderSvg }),
131
+ * };
132
+ * ```
133
+ */
134
+ badge?: CkCodeEditorBadgeRule;
103
135
  /**
104
136
  * Clipboard writer for the copy button. Injected for tests and for hosts that
105
137
  * proxy clipboard access; defaults to `navigator.clipboard.writeText`.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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;;;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,K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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":["../../../../src/components/base/CkMarkdownRenderer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,wBAAwB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,E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vue_vue_type_script_setup_true_lang-gV-lp0ZB.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,
@@ -0,0 +1,187 @@
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
+ import { p as purify } from "./katex.min-md74IFlY.js";
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
+ class BadgeWidget extends WidgetType {
5
+ constructor(content) {
6
+ super();
7
+ this.content = content;
8
+ }
9
+ // Decorations are rebuilt on every document and viewport change. Without a
10
+ // real comparison here every pill would be torn down and recreated on each
11
+ // keystroke, which flickers and drops any focus inside the widget.
12
+ eq(other) {
13
+ return other.content.label === this.content.label && other.content.icon === this.content.icon && other.content.title === this.content.title && other.content.class === this.content.class;
14
+ }
15
+ toDOM() {
16
+ const el = document.createElement("span");
17
+ el.className = this.content.class ?? DEFAULT_BADGE_CLASS;
18
+ if (this.content.title) el.title = this.content.title;
19
+ if (this.content.icon) {
20
+ const icon = document.createElement("span");
21
+ icon.className = "ck-code-badge__icon inline-flex shrink-0";
22
+ icon.innerHTML = purify.sanitize(this.content.icon, {
23
+ USE_PROFILES: { svg: true, svgFilters: true }
24
+ });
25
+ el.append(icon);
26
+ }
27
+ el.append(document.createTextNode(this.content.label));
28
+ return el;
29
+ }
30
+ /** The pill is decorative; let the editor handle every event over it. */
31
+ ignoreEvent() {
32
+ return false;
33
+ }
34
+ }
35
+ function toGlobal(pattern) {
36
+ const flags = pattern.flags.includes("g") ? pattern.flags : `${pattern.flags}g`;
37
+ return new RegExp(pattern.source, flags);
38
+ }
39
+ function badgeExtension(rule) {
40
+ const matcher = new MatchDecorator({
41
+ regexp: toGlobal(rule.pattern),
42
+ decoration: (match) => {
43
+ const content = rule.render(match);
44
+ return content ? Decoration.replace({ widget: new BadgeWidget(content) }) : null;
45
+ }
46
+ });
47
+ return ViewPlugin.fromClass(
48
+ class {
49
+ badges;
50
+ constructor(view) {
51
+ this.badges = matcher.createDeco(view);
52
+ }
53
+ update(update) {
54
+ this.badges = matcher.updateDeco(update, this.badges);
55
+ }
56
+ },
57
+ {
58
+ decorations: (plugin) => plugin.badges,
59
+ provide: (plugin) => EditorView.atomicRanges.of(
60
+ (view) => view.plugin(plugin)?.badges ?? Decoration.none
61
+ )
62
+ }
63
+ );
64
+ }
65
+ const PLAIN_ALIASES = /* @__PURE__ */ new Set(["text", "txt", "plain", "plaintext", ""]);
66
+ async function resolveLanguage(language) {
67
+ const id = language.trim().toLowerCase();
68
+ if (PLAIN_ALIASES.has(id)) return null;
69
+ const description = languages.find(
70
+ (candidate) => candidate.name.toLowerCase() === id || candidate.alias.includes(id) || candidate.extensions.includes(id)
71
+ );
72
+ if (!description) return null;
73
+ try {
74
+ return await description.load();
75
+ } catch {
76
+ return null;
77
+ }
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
+ }
85
+ function readonlyState(readonly) {
86
+ return [EditorState.readOnly.of(readonly), EditorView.editable.of(!readonly)];
87
+ }
88
+ function readDoc(state) {
89
+ return state.doc.sliceString(0, state.doc.length, state.lineBreak);
90
+ }
91
+ function baseExtensions(options) {
92
+ return [
93
+ // Deliberately not CodeMirror's `basicSetup`: it also brings autocomplete,
94
+ // search, folding and bracket closing, none of which suit a snippet field,
95
+ // and its fold gutter would sit next to the line numbers.
96
+ history(),
97
+ drawSelection(),
98
+ highlightSpecialChars(),
99
+ highlightActiveLine(),
100
+ bracketMatching(),
101
+ indentOnInput(),
102
+ indentUnit.of(" "),
103
+ keymap.of([...defaultKeymap, ...historyKeymap, indentWithTab]),
104
+ ckCodeMirrorTheme,
105
+ EditorView.contentAttributes.of({
106
+ role: "textbox",
107
+ "aria-multiline": "true",
108
+ ...options.ariaLabel ? { "aria-label": options.ariaLabel } : {}
109
+ }),
110
+ EditorView.updateListener.of((update) => {
111
+ if (update.docChanged) options.onChange(readDoc(update.state));
112
+ if (update.focusChanged && update.view.hasFocus) options.onFocus();
113
+ }),
114
+ ...options.placeholder ? [placeholder(options.placeholder)] : []
115
+ ];
116
+ }
117
+ async function createCodeMirror(options) {
118
+ const languageSlot = new Compartment();
119
+ const readonlySlot = new Compartment();
120
+ const lineNumbersSlot = new Compartment();
121
+ const wrappingSlot = new Compartment();
122
+ const badgeSlot = new Compartment();
123
+ const lineSeparatorSlot = new Compartment();
124
+ const support = await resolveLanguage(options.language);
125
+ let languageRequestId = 0;
126
+ const view = new EditorView({
127
+ parent: options.parent,
128
+ state: EditorState.create({
129
+ doc: options.doc,
130
+ extensions: [
131
+ ...baseExtensions(options),
132
+ languageSlot.of(support ? [support] : []),
133
+ readonlySlot.of(readonlyState(options.readonly)),
134
+ lineNumbersSlot.of(options.showLineNumbers ? lineNumbers() : []),
135
+ wrappingSlot.of(options.lineWrapping ? EditorView.lineWrapping : []),
136
+ badgeSlot.of(options.badge ? badgeExtension(options.badge) : []),
137
+ lineSeparatorSlot.of(
138
+ EditorState.lineSeparator.of(detectLineSeparator(options.doc))
139
+ )
140
+ ]
141
+ })
142
+ });
143
+ function reconfigure(slot, extension) {
144
+ view.dispatch({ effects: slot.reconfigure(extension) });
145
+ }
146
+ return {
147
+ view,
148
+ getCode: () => readDoc(view.state),
149
+ setCode: (value) => {
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
+ }
155
+ const cursor = Math.min(view.state.selection.main.head, value.length);
156
+ view.dispatch({
157
+ changes: { from: 0, to: view.state.doc.length, insert: value },
158
+ selection: { anchor: cursor }
159
+ });
160
+ },
161
+ setLanguage: async (language) => {
162
+ const request = ++languageRequestId;
163
+ const next = await resolveLanguage(language);
164
+ if (request !== languageRequestId) return;
165
+ reconfigure(languageSlot, next ? [next] : []);
166
+ },
167
+ setReadonly: (readonly) => {
168
+ reconfigure(readonlySlot, readonlyState(readonly));
169
+ },
170
+ setShowLineNumbers: (show) => {
171
+ reconfigure(lineNumbersSlot, show ? lineNumbers() : []);
172
+ },
173
+ setLineWrapping: (wrap) => {
174
+ reconfigure(wrappingSlot, wrap ? EditorView.lineWrapping : []);
175
+ },
176
+ setBadge: (rule) => {
177
+ reconfigure(badgeSlot, rule ? badgeExtension(rule) : []);
178
+ },
179
+ focus: () => view.focus(),
180
+ destroy: () => view.destroy()
181
+ };
182
+ }
183
+ export {
184
+ createCodeMirror,
185
+ detectLineSeparator,
186
+ resolveLanguage
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 { ah as syntaxHighlighting, E as EditorView$1, ai as HighlightStyle, v as tags, aj as keyName, ak as base, C as Compartment, a as EditorState$1, d as drawSelection, k as keymap$4, S as StateEffect, al as getPanel, x as EditorSelection, am as getDialog, an as showDialog, V as ViewPlugin, G as Decoration$1, H as StateField, ao as showPanel, P as Prec, D as codePointAt, I as codePointSize, N as Facet, O as combineConfig, Z as CharCategory, ap as RangeSetBuilder, Q as fromCodePoint, aq as crelt, ar as runScopeHandlers, as as findClusterBreak, at as activateHover, au as hoverTooltip, W as WidgetType$1, l as lineNumbers, av as highlightActiveLineGutter, e as highlightSpecialChars, h as history$2, aw as foldGutter, ax as dropCursor, i as indentOnInput, ay as defaultHighlightStyle, g as bracketMatching, az as rectangularSelection, aA as crosshairCursor, f as highlightActiveLine, m as defaultKeymap, n as historyKeymap$1, aB as foldKeymap, b as languages, o as indentWithTab, c as ckCodeMirrorTheme } from "./code-palette-DAJUTnR-.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-D6ftdiLa.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, x as EditorSelection, q as LanguageSupport, y as parseMixed, w as syntaxTree, L as LRLanguage, u as styleTags, v as tags, r as indentNodeProp, z as delimitedIndent, t as foldNodeProp } from "./code-palette-DAJUTnR-.js";
2
- import { html } from "./index-DxTzaHLr.js";
3
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup } from "./index-CN8d3yl1.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 { _ as Parser, $ as NodeSet, a0 as NodeType, a1 as DefaultBufferLength, a2 as NodeProp, a3 as Tree, a4 as IterMode } from "./code-palette-DAJUTnR-.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, a5 as flatIndent, s as continuedIndent, z as delimitedIndent, t as foldNodeProp, A as foldInside } from "./code-palette-DAJUTnR-.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, a5 as flatIndent, s as continuedIndent, z as delimitedIndent, t as foldNodeProp, A as foldInside } from "./code-palette-DAJUTnR-.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, a5 as flatIndent, s as continuedIndent, z as delimitedIndent, t as foldNodeProp, A as foldInside, w as syntaxTree, a6 as NodeWeakMap, a4 as IterMode } from "./code-palette-DAJUTnR-.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-D6ftdiLa.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, q as LanguageSupport, y as parseMixed, u as styleTags, v as tags } from "./code-palette-DAJUTnR-.js";
2
- import { html } from "./index-DxTzaHLr.js";
3
- import { javascriptLanguage } from "./index-DufAP1JF.js";
4
- import { L as LRParser, a as LocalTokenGroup } from "./index-CN8d3yl1.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, w as syntaxTree, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, z as delimitedIndent, t as foldNodeProp, A as foldInside, a6 as NodeWeakMap, a4 as IterMode } from "./code-palette-DAJUTnR-.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-D6ftdiLa.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, q as LanguageSupport, y as parseMixed, L as LRLanguage, r as indentNodeProp, s as continuedIndent, z as delimitedIndent, t as foldNodeProp, A as foldInside } from "./code-palette-DAJUTnR-.js";
3
- import { html } from "./index-DxTzaHLr.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags$1, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, s as continuedIndent, t as foldNodeProp, A as foldInside, w as syntaxTree, a6 as NodeWeakMap, a4 as IterMode } from "./code-palette-DAJUTnR-.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, E as EditorView, w as syntaxTree, x as EditorSelection, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, t as foldNodeProp, af as bracketMatchingHandle } from "./code-palette-DAJUTnR-.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, E as EditorView, w as syntaxTree, x as EditorSelection, q as LanguageSupport, L as LRLanguage, r as indentNodeProp, a5 as flatIndent, s as continuedIndent, z as delimitedIndent, t as foldNodeProp, A as foldInside, ag as sublanguageProp, ab as defineLanguageFacet, a6 as NodeWeakMap, a4 as IterMode } from "./code-palette-DAJUTnR-.js";
3
- import { i as ifNotIn, c as completeFromList, s as snippetCompletion } from "./index-D6ftdiLa.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-CN8d3yl1.js";
2
- import { u as styleTags, v as tags, q as LanguageSupport, y as parseMixed, L as LRLanguage, r as indentNodeProp, z as delimitedIndent, t as foldNodeProp, A as foldInside } from "./code-palette-DAJUTnR-.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 { _ as Parser, a0 as NodeType, a2 as NodeProp, a7 as Tag, $ as NodeSet, u as styleTags, a3 as Tree, y as parseMixed, v as tags, w as syntaxTree, x as EditorSelection, a8 as countColumn, q as LanguageSupport, P as Prec, k as keymap, E as EditorView, a9 as Language, j as indentUnit, aa as foldService, ab as defineLanguageFacet, a as EditorState, t as foldNodeProp, r as indentNodeProp, ac as languageDataProp, ad as LanguageDescription, ae as ParseContext } from "./code-palette-DAJUTnR-.js";
2
- import { C as CompletionContext } from "./index-D6ftdiLa.js";
3
- import { html, htmlCompletionSource } from "./index-DxTzaHLr.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, q as LanguageSupport, r as indentNodeProp, s as continuedIndent, t as foldNodeProp, u as styleTags, v as tags, w as syntaxTree } from "./code-palette-DAJUTnR-.js";
2
- import { E as ExternalTokenizer, L as LRParser } from "./index-CN8d3yl1.js";
3
- import { i as ifNotIn, c as completeFromList } from "./index-D6ftdiLa.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 { q as LanguageSupport, L as LRLanguage, r as indentNodeProp, z as delimitedIndent, t as foldNodeProp, A as foldInside, u as styleTags, v as tags } from "./code-palette-DAJUTnR-.js";
2
- import { L as LRParser } from "./index-CN8d3yl1.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,