@pixerate/editor 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +96 -1
  2. package/THIRD_PARTY_NOTICES.md +51 -0
  3. package/dist/agent/index.cjs +9 -8
  4. package/dist/agent/index.cjs.map +1 -1
  5. package/dist/agent/index.d.cts +4 -3
  6. package/dist/agent/index.d.ts +4 -3
  7. package/dist/agent/index.js +3 -2
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/canvas/index.cjs +1210 -17
  10. package/dist/canvas/index.cjs.map +1 -1
  11. package/dist/canvas/index.d.cts +318 -1
  12. package/dist/canvas/index.d.ts +318 -1
  13. package/dist/canvas/index.js +1199 -6
  14. package/dist/canvas/index.js.map +1 -1
  15. package/dist/{chunk-QBJ22YZR.js → chunk-3CN2WD3X.js} +1354 -206
  16. package/dist/chunk-3CN2WD3X.js.map +1 -0
  17. package/dist/{chunk-JJDLPEWL.js → chunk-3LV6RRPH.js} +2 -2
  18. package/dist/{chunk-MJZBNWG7.js → chunk-5S3Z4PPF.js} +78 -557
  19. package/dist/chunk-5S3Z4PPF.js.map +1 -0
  20. package/dist/chunk-664LQYFJ.js +115 -0
  21. package/dist/chunk-664LQYFJ.js.map +1 -0
  22. package/dist/{chunk-AA4ZEVCC.cjs → chunk-D27YFC46.cjs} +101 -580
  23. package/dist/chunk-D27YFC46.cjs.map +1 -0
  24. package/dist/chunk-D6FH2YAX.cjs +131 -0
  25. package/dist/chunk-D6FH2YAX.cjs.map +1 -0
  26. package/dist/{chunk-4SUNJZWB.cjs → chunk-FD4LPFAE.cjs} +48 -200
  27. package/dist/chunk-FD4LPFAE.cjs.map +1 -0
  28. package/dist/chunk-FODNLX5N.js +749 -0
  29. package/dist/chunk-FODNLX5N.js.map +1 -0
  30. package/dist/{chunk-OYXSKQFR.js → chunk-FPENXAEJ.js} +35 -187
  31. package/dist/chunk-FPENXAEJ.js.map +1 -0
  32. package/dist/chunk-HLIMTC6N.js +1 -0
  33. package/dist/chunk-HLIMTC6N.js.map +1 -0
  34. package/dist/{chunk-QGHGJ56O.js → chunk-ITBSKI26.js} +1483 -19
  35. package/dist/chunk-ITBSKI26.js.map +1 -0
  36. package/dist/{chunk-XDMXXC4Z.cjs → chunk-MA2F5KHF.cjs} +350 -227
  37. package/dist/chunk-MA2F5KHF.cjs.map +1 -0
  38. package/dist/{chunk-RIKBJLS2.cjs → chunk-MCSJFWAO.cjs} +1356 -208
  39. package/dist/chunk-MCSJFWAO.cjs.map +1 -0
  40. package/dist/chunk-MKA3AHLV.cjs +256 -0
  41. package/dist/chunk-MKA3AHLV.cjs.map +1 -0
  42. package/dist/chunk-OLZJXL4R.cjs +749 -0
  43. package/dist/chunk-OLZJXL4R.cjs.map +1 -0
  44. package/dist/chunk-OXSV64JX.js +689 -0
  45. package/dist/chunk-OXSV64JX.js.map +1 -0
  46. package/dist/chunk-P3RQ5UJE.cjs +689 -0
  47. package/dist/chunk-P3RQ5UJE.cjs.map +1 -0
  48. package/dist/chunk-P6ODPZ4W.js +256 -0
  49. package/dist/chunk-P6ODPZ4W.js.map +1 -0
  50. package/dist/chunk-PGNZKFQS.js +685 -0
  51. package/dist/chunk-PGNZKFQS.js.map +1 -0
  52. package/dist/chunk-PL4JB3BF.cjs +1 -0
  53. package/dist/chunk-PL4JB3BF.cjs.map +1 -0
  54. package/dist/{chunk-GVSMRPHB.cjs → chunk-SBCZ6RN5.cjs} +1568 -104
  55. package/dist/chunk-SBCZ6RN5.cjs.map +1 -0
  56. package/dist/{chunk-CL37JGFW.cjs → chunk-SML64VJG.cjs} +4 -4
  57. package/dist/{chunk-CL37JGFW.cjs.map → chunk-SML64VJG.cjs.map} +1 -1
  58. package/dist/chunk-TNNJXF46.cjs +115 -0
  59. package/dist/chunk-TNNJXF46.cjs.map +1 -0
  60. package/dist/chunk-U5HZSFCS.js +131 -0
  61. package/dist/chunk-U5HZSFCS.js.map +1 -0
  62. package/dist/{chunk-K3R5NG2D.js → chunk-U5KWZU4X.js} +251 -128
  63. package/dist/chunk-U5KWZU4X.js.map +1 -0
  64. package/dist/chunk-XNORY7M6.cjs +685 -0
  65. package/dist/chunk-XNORY7M6.cjs.map +1 -0
  66. package/dist/commands/index.d.cts +5 -353
  67. package/dist/commands/index.d.ts +5 -353
  68. package/dist/comment-store-BEMgVlAA.d.cts +135 -0
  69. package/dist/comment-store-BEMgVlAA.d.ts +135 -0
  70. package/dist/compare/index.cjs +15 -0
  71. package/dist/compare/index.cjs.map +1 -0
  72. package/dist/compare/index.d.cts +58 -0
  73. package/dist/compare/index.d.ts +58 -0
  74. package/dist/compare/index.js +15 -0
  75. package/dist/compare/index.js.map +1 -0
  76. package/dist/{controller-pePCJLT1.d.cts → controller-BhLLAoi8.d.cts} +45 -4
  77. package/dist/{controller-pePCJLT1.d.ts → controller-BhLLAoi8.d.ts} +45 -4
  78. package/dist/documents-BQjzJNe2.d.ts +76 -0
  79. package/dist/documents-KRTPhvst.d.cts +76 -0
  80. package/dist/extensions/index.cjs +53 -5
  81. package/dist/extensions/index.cjs.map +1 -1
  82. package/dist/extensions/index.d.cts +7 -3
  83. package/dist/extensions/index.d.ts +7 -3
  84. package/dist/extensions/index.js +52 -4
  85. package/dist/generation/index.cjs +1373 -0
  86. package/dist/generation/index.cjs.map +1 -0
  87. package/dist/generation/index.d.cts +554 -0
  88. package/dist/generation/index.d.ts +554 -0
  89. package/dist/generation/index.js +1373 -0
  90. package/dist/generation/index.js.map +1 -0
  91. package/dist/grammar/index.cjs +48 -3
  92. package/dist/grammar/index.cjs.map +1 -1
  93. package/dist/grammar/index.d.cts +322 -100
  94. package/dist/grammar/index.d.ts +322 -100
  95. package/dist/grammar/index.js +54 -9
  96. package/dist/image-editor/index.cjs +1831 -30
  97. package/dist/image-editor/index.cjs.map +1 -1
  98. package/dist/image-editor/index.d.cts +590 -3
  99. package/dist/image-editor/index.d.ts +590 -3
  100. package/dist/image-editor/index.js +1807 -6
  101. package/dist/image-editor/index.js.map +1 -1
  102. package/dist/{index-CCr_z9kF.d.cts → index-BhJBSm2d.d.cts} +370 -4
  103. package/dist/{index-Ck6ajwXh.d.ts → index-fJrlkJCd.d.ts} +370 -4
  104. package/dist/index.cjs +162 -25
  105. package/dist/index.cjs.map +1 -1
  106. package/dist/index.d.cts +14 -8
  107. package/dist/index.d.ts +14 -8
  108. package/dist/index.js +174 -37
  109. package/dist/index.js.map +1 -1
  110. package/dist/migrate-iTlm3a8h.d.cts +112 -0
  111. package/dist/migrate-iTlm3a8h.d.ts +112 -0
  112. package/dist/persistence/index.cjs +676 -0
  113. package/dist/persistence/index.cjs.map +1 -0
  114. package/dist/persistence/index.d.cts +347 -0
  115. package/dist/persistence/index.d.ts +347 -0
  116. package/dist/persistence/index.js +676 -0
  117. package/dist/persistence/index.js.map +1 -0
  118. package/dist/{registry-D5-R90p0.d.cts → registry-BDe-vlv3.d.ts} +2 -40
  119. package/dist/registry-D32LpIc4.d.cts +354 -0
  120. package/dist/{registry-D5-R90p0.d.ts → registry-DnzpgY27.d.cts} +2 -40
  121. package/dist/registry-evKTP4ls.d.ts +354 -0
  122. package/dist/schema-DYDGdYL9.d.cts +41 -0
  123. package/dist/schema-DYDGdYL9.d.ts +41 -0
  124. package/dist/serializers/index.cjs +4 -3
  125. package/dist/serializers/index.cjs.map +1 -1
  126. package/dist/serializers/index.d.cts +2 -1
  127. package/dist/serializers/index.d.ts +2 -1
  128. package/dist/serializers/index.js +3 -2
  129. package/dist/sourcemap-C8AH3MBQ.d.cts +91 -0
  130. package/dist/sourcemap-DA1Evhrv.d.ts +91 -0
  131. package/dist/spreadsheet/index.cjs +37 -3
  132. package/dist/spreadsheet/index.cjs.map +1 -1
  133. package/dist/spreadsheet/index.d.cts +188 -17
  134. package/dist/spreadsheet/index.d.ts +188 -17
  135. package/dist/spreadsheet/index.js +43 -9
  136. package/dist/{tokens-CyLZmIei.d.cts → tokens-D7yXvUU6.d.cts} +15 -2
  137. package/dist/{tokens-CyLZmIei.d.ts → tokens-D7yXvUU6.d.ts} +15 -2
  138. package/dist/{track-changes-BSF58RK0.d.ts → track-changes-BK5sVf4_.d.cts} +18 -136
  139. package/dist/{track-changes-BSF58RK0.d.cts → track-changes-CDjCrwKe.d.ts} +18 -136
  140. package/package.json +16 -1
  141. package/dist/chunk-4SUNJZWB.cjs.map +0 -1
  142. package/dist/chunk-AA4ZEVCC.cjs.map +0 -1
  143. package/dist/chunk-AXV2ZW34.cjs +0 -118
  144. package/dist/chunk-AXV2ZW34.cjs.map +0 -1
  145. package/dist/chunk-B2ZRLN4S.js +0 -118
  146. package/dist/chunk-B2ZRLN4S.js.map +0 -1
  147. package/dist/chunk-GVSMRPHB.cjs.map +0 -1
  148. package/dist/chunk-K3R5NG2D.js.map +0 -1
  149. package/dist/chunk-MJZBNWG7.js.map +0 -1
  150. package/dist/chunk-OYXSKQFR.js.map +0 -1
  151. package/dist/chunk-QBJ22YZR.js.map +0 -1
  152. package/dist/chunk-QGHGJ56O.js.map +0 -1
  153. package/dist/chunk-RIKBJLS2.cjs.map +0 -1
  154. package/dist/chunk-XDMXXC4Z.cjs.map +0 -1
  155. /package/dist/{chunk-JJDLPEWL.js.map → chunk-3LV6RRPH.js.map} +0 -0
@@ -0,0 +1,354 @@
1
+ import { J as JsonSchema, S as SchemaValidationError } from './schema-DYDGdYL9.js';
2
+
3
+ /**
4
+ * Keyboard chords in a platform-neutral notation.
5
+ *
6
+ * | token | macOS | Windows / Linux |
7
+ * |---|---|---|
8
+ * | `Mod` | ⌘ Command | Ctrl |
9
+ * | `Ctrl` | ⌃ Control | Ctrl (same key as `Mod`: conflicts are reported) |
10
+ * | `Meta` / `Cmd` | ⌘ Command | Win / Super |
11
+ * | `Alt` / `Option` | ⌥ Option | Alt |
12
+ * | `Shift` | ⇧ Shift | Shift |
13
+ *
14
+ * Keys are stored as `KeyboardEvent.code` values (`KeyZ`, `Digit1`, `BracketRight`,
15
+ * `PageDown`), so Option/Alt chords work on macOS (where Option changes `event.key`).
16
+ */
17
+ type Platform = 'mac' | 'windows' | 'linux';
18
+ declare const PLATFORMS: readonly Platform[];
19
+ /** A parsed chord. `mod` is the platform's primary modifier. */
20
+ interface Chord {
21
+ /** `KeyboardEvent.code` of the key, e.g. `KeyZ`. */
22
+ key: string;
23
+ mod?: boolean;
24
+ ctrl?: boolean;
25
+ meta?: boolean;
26
+ alt?: boolean;
27
+ shift?: boolean;
28
+ }
29
+ /** The modifiers a chord needs on one platform (`mod` resolved to `meta` or `ctrl`). */
30
+ interface EffectiveChord {
31
+ key: string;
32
+ ctrl: boolean;
33
+ meta: boolean;
34
+ alt: boolean;
35
+ shift: boolean;
36
+ }
37
+ /** The current platform from `navigator` (`linux` when unknown, e.g. in Node). */
38
+ declare function detectPlatform(): Platform;
39
+ /** `KeyboardEvent.code` for a key token (`Z`, `1`, `]`, `PageDown`, `F5`, `KeyZ`), or `null`. */
40
+ declare function keyToCode(token: string): string | null;
41
+ /** Neutral text for a code: `KeyZ` → `Z`, `BracketRight` → `]`, `ArrowUp` → `Up`. */
42
+ declare function codeToKeyText(code: string): string;
43
+ /**
44
+ * Parses chord text (`Mod+Shift+Z`, `Alt+]`, `⌥⇧⌘K`, `CmdOrCtrl+K`). Throws on unknown
45
+ * modifiers or keys. The last `+`-separated token is the key (`+` itself is `Plus`).
46
+ */
47
+ declare function parseChord(text: string): Chord;
48
+ /** Canonical platform-neutral text: `Mod+Ctrl+Meta+Alt+Shift+<key>`. */
49
+ declare function chordToString(chord: Chord): string;
50
+ /** Canonical spelling of chord text (`shift+cmdorctrl+z` → `Mod+Shift+Z`). Throws when invalid. */
51
+ declare function normalizeChord(text: string): string;
52
+ /** The modifiers a chord needs on `platform`: `Mod` is ⌘ (meta) on macOS and Ctrl elsewhere. */
53
+ declare function effectiveChord(chord: string | Chord, platform: Platform): EffectiveChord;
54
+ /** Identity of an effective chord, for conflict detection (`Ctrl+Shift+KeyZ`). */
55
+ declare function effectiveChordKey(chord: string | Chord, platform: Platform): string;
56
+ /**
57
+ * Display text: `⌥⇧⌘K` on macOS, `Ctrl+Alt+Shift+K` on Windows / Linux (`Meta` shows as
58
+ * `Win` / `Super`). Invalid text is returned unchanged.
59
+ */
60
+ declare function formatShortcut(chord: string | Chord, platform?: Platform): string;
61
+ /** Minimal keyboard event surface (DOM `KeyboardEvent` satisfies it). */
62
+ interface KeyboardEventLike {
63
+ key?: string;
64
+ code?: string;
65
+ ctrlKey?: boolean;
66
+ metaKey?: boolean;
67
+ altKey?: boolean;
68
+ shiftKey?: boolean;
69
+ target?: EventTarget | null | unknown;
70
+ defaultPrevented?: boolean;
71
+ preventDefault?: () => void;
72
+ }
73
+ /** `event.code`, or one derived from `event.key` for synthetic events without a code. */
74
+ declare function eventCode(event: KeyboardEventLike): string;
75
+ /**
76
+ * The key code a shortcut event is matched by: `event.code` (layout-independent, so
77
+ * Option/Alt chords work on macOS and punctuation chords follow the physical key),
78
+ * except that a letter key producing a different Latin letter without Alt (AZERTY,
79
+ * QWERTZ, Dvorak) uses the produced letter, as browsers and operating systems do.
80
+ */
81
+ declare function shortcutCode(event: KeyboardEventLike): string;
82
+ /** The code a printable `event.key` names on a US layout (`z` → `KeyZ`, `]` → `BracketRight`). */
83
+ declare function codeFromKey(key: string): string | null;
84
+ /**
85
+ * Whether a keyboard event comes from a text-entry element: `<input>`, `<textarea>`,
86
+ * `<select>`, a `contenteditable` element (or a descendant) or a ProseMirror editor.
87
+ * Falls back to `document.activeElement` when the event has no element target.
88
+ */
89
+ declare function isEditableEventTarget(event: {
90
+ target?: unknown;
91
+ }): boolean;
92
+
93
+ /** One key binding: a chord that runs `command`, optionally only in one scope / on some platforms. */
94
+ interface ShortcutBinding {
95
+ command: string;
96
+ /** Chord text (`Mod+Shift+Z`) or a parsed chord. */
97
+ chord: string | Chord;
98
+ /** Scope (e.g. `canvas`, `spreadsheet`); scoped bindings win over global ones. Omit for global. */
99
+ scope?: string;
100
+ /** Platforms the binding exists on (default: all). E.g. `Mod+Y` redo only off macOS. */
101
+ platforms?: readonly Platform[];
102
+ /** Also fire while focus is in an input, textarea or contenteditable (default `false`). */
103
+ allowInEditable?: boolean;
104
+ }
105
+ /** Shortcut declaration on a command: chord text, or an object for platform / scope specifics. */
106
+ type ShortcutInput = string | Omit<ShortcutBinding, 'command'> | ReadonlyArray<string | Omit<ShortcutBinding, 'command'>>;
107
+ /** Expands a command's `shortcut` declaration into bindings. */
108
+ declare function toShortcutBindings(command: string, input: ShortcutInput | undefined, scope?: string): ShortcutBinding[];
109
+ interface ShortcutConflict {
110
+ /** Scope shared by the bindings (`undefined` = global). */
111
+ scope?: string;
112
+ /** Effective chord, e.g. `Ctrl+KeyZ`. */
113
+ chord: string;
114
+ /** Commands bound to it (two or more). */
115
+ commands: string[];
116
+ }
117
+ interface ShortcutMatch {
118
+ command: string;
119
+ binding: ShortcutBinding;
120
+ }
121
+ interface ShortcutResolveOptions {
122
+ /** Active scopes, most specific first. Bindings in these scopes win over global ones. */
123
+ scopes?: string | readonly string[];
124
+ /** Resolve even when the event comes from a text input (default: per binding). */
125
+ allowInEditable?: boolean;
126
+ /** Override the map's platform. */
127
+ platform?: Platform;
128
+ }
129
+ interface ShortcutMapOptions {
130
+ /** Platform used to resolve `Mod` (default: detected from `navigator` on every resolve). */
131
+ platform?: Platform;
132
+ /**
133
+ * `platform` (default): `Mod` means ⌘ on macOS and Ctrl elsewhere, exactly.
134
+ * `either`: `Mod` (and `Ctrl` / `Meta`) match ⌘ or Ctrl on every platform.
135
+ */
136
+ modifierMode?: 'platform' | 'either';
137
+ }
138
+ /**
139
+ * Keyboard shortcuts as data: default bindings plus user overrides, resolved from
140
+ * `KeyboardEvent`s by `event.code` (so Option/Alt chords work on macOS), with scopes
141
+ * (scoped bindings win), conflict detection per platform and display formatting.
142
+ */
143
+ declare class ShortcutMap {
144
+ private defaults;
145
+ private overrides;
146
+ private readonly listeners;
147
+ private readonly options;
148
+ constructor(bindings?: readonly ShortcutBinding[], options?: ShortcutMapOptions);
149
+ get platform(): Platform;
150
+ private entry;
151
+ private changed;
152
+ /** Subscribes to binding changes. Returns an unsubscribe function. */
153
+ subscribe(listener: () => void): () => void;
154
+ /** Adds default bindings (throws on invalid chord text). Returns a function removing them. */
155
+ bind(bindings: ShortcutBinding | readonly ShortcutBinding[]): () => void;
156
+ /**
157
+ * User override for a command: replaces all of its default bindings with `chords`
158
+ * (an empty list unbinds it). Throws on invalid chord text.
159
+ */
160
+ setOverride(command: string, chords: string | Chord | ReadonlyArray<string | Chord | Omit<ShortcutBinding, 'command'>>): void;
161
+ /** Removes a user override (the defaults apply again). */
162
+ clearOverride(command: string): void;
163
+ /** User overrides as plain data (`{ command: ['Mod+K'] }`), e.g. to persist them. */
164
+ getOverrides(): Record<string, string[]>;
165
+ /** Restores overrides saved with `getOverrides` (replacing the current ones). */
166
+ setOverrides(overrides: Record<string, readonly string[]>): void;
167
+ private active;
168
+ /** Effective bindings on `platform` (defaults without overridden commands, plus overrides). */
169
+ bindings(platform?: Platform): ShortcutBinding[];
170
+ /** Canonical chord text bound to `command` on `platform` (first = primary). */
171
+ forCommand(command: string, platform?: Platform): string[];
172
+ /**
173
+ * The command a keydown event runs, or `null`. Events from text inputs are ignored
174
+ * unless the binding (or `options`) allows them. Bindings in the active scopes
175
+ * (in order) win over global bindings; bindings in other scopes never match.
176
+ * Keys are matched by `event.code`, except that a letter key producing another Latin
177
+ * letter (AZERTY, QWERTZ, Dvorak) matches that letter when Alt is not held, so
178
+ * `Mod+Z` follows the Z label (see `shortcutCode`).
179
+ */
180
+ resolve(event: KeyboardEventLike, options?: ShortcutResolveOptions): ShortcutMatch | null;
181
+ private matches;
182
+ /**
183
+ * Groups of bindings that share an effective chord in one scope on `platform`
184
+ * (e.g. `Mod+Y` and `Ctrl+Y` collide off macOS). A scoped binding shadowing a
185
+ * global one is not a conflict.
186
+ */
187
+ findConflicts(platform?: Platform): ShortcutConflict[];
188
+ /** Conflicts on every platform, keyed by platform (only platforms with conflicts). */
189
+ findAllConflicts(): Partial<Record<Platform, ShortcutConflict[]>>;
190
+ }
191
+
192
+ /** Object JSON Schema describing a command's parameters. */
193
+ type CommandParamsSchema = JsonSchema & {
194
+ type: 'object';
195
+ };
196
+ /**
197
+ * Metadata and implementation of one command. Menus, shortcuts, the palette and agent
198
+ * tools all run commands by id, so every entry point shares enablement and validation.
199
+ */
200
+ interface CommandSpec<TContext = any, TParams = any, TResult = unknown> {
201
+ /** Unique id, e.g. `history.undo` or `canvas.alignLeft`. */
202
+ id: string;
203
+ label: string;
204
+ /** Group / menu name shown next to the label, e.g. `Edit` or `Arrange`. */
205
+ group?: string;
206
+ /** Extra search terms for the palette. */
207
+ keywords?: readonly string[];
208
+ description?: string;
209
+ /** Object JSON Schema for `params`. Unknown keys are rejected unless `additionalProperties` allows them. */
210
+ params?: CommandParamsSchema;
211
+ /** Default shortcut(s): platform-neutral chord text such as `Mod+Shift+Z`. */
212
+ shortcut?: ShortcutInput;
213
+ /** Scope the command (and its shortcuts) belong to, e.g. `canvas`. Omit for global commands. */
214
+ scope?: string;
215
+ /**
216
+ * Whether the command can run: `true` (or `undefined`), `false`, or a reason string
217
+ * ("Nothing to undo"). Receives the params a caller named, so a command acting on the
218
+ * selection can still run on targets passed explicitly (`params` is `undefined` for menus).
219
+ */
220
+ enabled?: (context: TContext, params: TParams | undefined) => boolean | string | undefined;
221
+ run: (context: TContext, params: TParams) => TResult;
222
+ /**
223
+ * Runs inside the registry's `history.batch(label, …)`, so all history entries the
224
+ * command records become one undo step and a throw rolls back its partial changes.
225
+ */
226
+ undoable?: boolean;
227
+ /** The command only reads state (agent tools mark it read-only). */
228
+ readOnly?: boolean;
229
+ /** Hide from the palette and `list()` unless `includeHidden` (still runnable by id). */
230
+ hidden?: boolean;
231
+ }
232
+ type CommandErrorCode = 'unknown_command' | 'disabled' | 'invalid_params' | 'failed';
233
+ type CommandResult<T = unknown> = {
234
+ ok: true;
235
+ id: string;
236
+ result: T;
237
+ } | {
238
+ ok: false;
239
+ id: string;
240
+ code: CommandErrorCode;
241
+ message: string;
242
+ details?: SchemaValidationError[];
243
+ };
244
+ /** A command as listed for menus, palettes and agents. */
245
+ interface CommandEntry {
246
+ id: string;
247
+ label: string;
248
+ group?: string;
249
+ keywords?: readonly string[];
250
+ description?: string;
251
+ params?: CommandParamsSchema;
252
+ scope?: string;
253
+ /** Canonical chord text bound on the registry's platform (first = primary). */
254
+ shortcuts: string[];
255
+ enabled: boolean;
256
+ /** Why the command is disabled (only when `enabled` is false). */
257
+ disabledReason?: string;
258
+ undoable: boolean;
259
+ readOnly: boolean;
260
+ }
261
+ interface CommandListOptions<TContext = any> {
262
+ /** Only global commands plus commands of these scopes. */
263
+ scope?: string | readonly string[];
264
+ enabledOnly?: boolean;
265
+ includeHidden?: boolean;
266
+ /** Context for the enablement check (default: the registry's context). */
267
+ context?: TContext;
268
+ }
269
+ /** Minimal history surface (`HistoryManager` satisfies it). */
270
+ interface CommandHistoryTarget {
271
+ batch(name: string, fn: () => void): void;
272
+ }
273
+ interface CommandRegistryOptions<TContext = any> {
274
+ /** Default context passed to `enabled` / `run` (a value or a getter). */
275
+ context?: TContext | (() => TContext);
276
+ /** Wraps `undoable` commands in one history step (see `CommandSpec.undoable`). */
277
+ history?: CommandHistoryTarget;
278
+ /** Options for the registry's `ShortcutMap`. */
279
+ shortcuts?: ShortcutMapOptions;
280
+ }
281
+ declare class CommandRegistryError extends Error {
282
+ readonly code: 'duplicate_command' | 'invalid_command';
283
+ constructor(code: CommandRegistryError['code'], message: string);
284
+ }
285
+ /**
286
+ * Registry of commands: one id per action, shared by shortcuts (`shortcuts`), the
287
+ * command palette (`list` + `rankCommands`) and agent tools (`createCommandToolProvider`).
288
+ */
289
+ declare class CommandRegistry<TContext = any> {
290
+ /** Shortcut bindings of the registered commands (plus any user overrides). */
291
+ readonly shortcuts: ShortcutMap;
292
+ private readonly commands;
293
+ private readonly listeners;
294
+ private readonly options;
295
+ private version;
296
+ private muted;
297
+ constructor(options?: CommandRegistryOptions<TContext>);
298
+ /** Monotonic counter bumped on every change (useful as a snapshot key). */
299
+ getVersion(): number;
300
+ /** The default context. */
301
+ get context(): TContext;
302
+ /**
303
+ * Registers a command (or several) and returns a function that unregisters it.
304
+ * Throws a `CommandRegistryError` for a duplicate or invalid id, or invalid chord text.
305
+ */
306
+ register(spec: CommandSpec<TContext> | readonly CommandSpec<TContext>[]): () => void;
307
+ /** Removes a command by id. Returns whether it was registered. */
308
+ unregister(id: string): boolean;
309
+ private unbindQuietly;
310
+ has(id: string): boolean;
311
+ get(id: string): CommandSpec<TContext> | undefined;
312
+ /** Registered ids in registration order. */
313
+ ids(): string[];
314
+ /** Whether `id` can run now (`{ enabled, reason }`); `params` are the targets a caller named. */
315
+ isEnabled(id: string, params?: unknown, context?: TContext): {
316
+ enabled: boolean;
317
+ reason?: string;
318
+ };
319
+ /** Commands for menus, palettes and agents, with their current enablement. */
320
+ list(options?: CommandListOptions<TContext>): CommandEntry[];
321
+ private check;
322
+ private invoke;
323
+ /**
324
+ * Runs a command synchronously and returns a structured result; never throws.
325
+ * A command whose `run` returns a promise yields `{ ok: true, result: promise }`
326
+ * (use `executeAsync` to await it and catch its rejection).
327
+ */
328
+ execute<T = unknown>(id: string, params?: unknown, context?: TContext): CommandResult<T>;
329
+ /** Like `execute`, but awaits async commands (rejections become `failed` results). */
330
+ executeAsync<T = unknown>(id: string, params?: unknown, context?: TContext): Promise<CommandResult<T>>;
331
+ /**
332
+ * Resolves a keydown event to a command (see `ShortcutMap.resolve`) and runs it when
333
+ * enabled, calling `preventDefault()`. Disabled commands leave the event alone, so the
334
+ * browser or a focused editor can still handle it. Returns the result, or `null`.
335
+ */
336
+ handleKeyDown(event: KeyboardEventLike, options?: ShortcutResolveOptions & {
337
+ context?: TContext;
338
+ }): CommandResult | null;
339
+ /** Display-ready primary shortcut of a command (`⇧⌘Z` / `Ctrl+Shift+Z`), or `undefined`. */
340
+ shortcutFor(id: string, platform?: Platform): string | undefined;
341
+ /**
342
+ * Subscribes to changes: commands registered or removed, shortcut overrides, executed
343
+ * commands and `invalidate()` calls (e.g. when enablement inputs change).
344
+ */
345
+ subscribe(listener: () => void): () => void;
346
+ /** Tells subscribers that enablement may have changed (e.g. the selection changed). */
347
+ invalidate(): void;
348
+ private notify;
349
+ }
350
+ declare function createCommandRegistry<TContext = any>(options?: CommandRegistryOptions<TContext>): CommandRegistry<TContext>;
351
+ /** Identity helper that types a command spec. */
352
+ declare function defineCommand<TContext = any, TParams = any, TResult = unknown>(spec: CommandSpec<TContext, TParams, TResult>): CommandSpec<TContext, TParams, TResult>;
353
+
354
+ export { formatShortcut as A, isEditableEventTarget as B, CommandRegistry as C, keyToCode as D, type EffectiveChord as E, normalizeChord as F, parseChord as G, shortcutCode as H, toShortcutBindings as I, type KeyboardEventLike as K, type Platform as P, type ShortcutBinding as S, type CommandResult as a, type CommandEntry as b, type CommandSpec as c, type Chord as d, type CommandErrorCode as e, type CommandHistoryTarget as f, type CommandListOptions as g, type CommandParamsSchema as h, CommandRegistryError as i, type CommandRegistryOptions as j, PLATFORMS as k, type ShortcutConflict as l, type ShortcutInput as m, ShortcutMap as n, type ShortcutMapOptions as o, type ShortcutMatch as p, type ShortcutResolveOptions as q, chordToString as r, codeFromKey as s, codeToKeyText as t, createCommandRegistry as u, defineCommand as v, detectPlatform as w, effectiveChord as x, effectiveChordKey as y, eventCode as z };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * JSON-Schema-lite: the subset of JSON Schema used by MCP tool `inputSchema`s,
3
+ * plus a small validator for tool-call arguments. Unknown keywords are ignored.
4
+ */
5
+ type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
6
+ interface JsonSchema {
7
+ type?: JsonSchemaType | readonly JsonSchemaType[];
8
+ description?: string;
9
+ title?: string;
10
+ enum?: readonly unknown[];
11
+ const?: unknown;
12
+ default?: unknown;
13
+ properties?: {
14
+ readonly [key: string]: JsonSchema;
15
+ };
16
+ required?: readonly string[];
17
+ additionalProperties?: boolean | JsonSchema;
18
+ items?: JsonSchema;
19
+ minItems?: number;
20
+ maxItems?: number;
21
+ minimum?: number;
22
+ maximum?: number;
23
+ minLength?: number;
24
+ maxLength?: number;
25
+ pattern?: string;
26
+ [keyword: string]: unknown;
27
+ }
28
+ interface SchemaValidationError {
29
+ /** JSON-pointer-like path to the offending value, e.g. `/node/id` (`""` is the root). */
30
+ path: string;
31
+ message: string;
32
+ }
33
+ /**
34
+ * Validates `value` against `schema` and returns every error found (an empty
35
+ * array means valid). Supports `type` (incl. arrays of types), `enum`, `const`,
36
+ * `properties`, `required`, `additionalProperties`, `items`, `minItems`,
37
+ * `maxItems`, `minimum`, `maximum`, `minLength`, `maxLength` and `pattern`.
38
+ */
39
+ declare function validateJsonSchema(value: unknown, schema: JsonSchema | undefined, path?: string): SchemaValidationError[];
40
+
41
+ export { type JsonSchema as J, type SchemaValidationError as S, type JsonSchemaType as a, validateJsonSchema as v };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * JSON-Schema-lite: the subset of JSON Schema used by MCP tool `inputSchema`s,
3
+ * plus a small validator for tool-call arguments. Unknown keywords are ignored.
4
+ */
5
+ type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
6
+ interface JsonSchema {
7
+ type?: JsonSchemaType | readonly JsonSchemaType[];
8
+ description?: string;
9
+ title?: string;
10
+ enum?: readonly unknown[];
11
+ const?: unknown;
12
+ default?: unknown;
13
+ properties?: {
14
+ readonly [key: string]: JsonSchema;
15
+ };
16
+ required?: readonly string[];
17
+ additionalProperties?: boolean | JsonSchema;
18
+ items?: JsonSchema;
19
+ minItems?: number;
20
+ maxItems?: number;
21
+ minimum?: number;
22
+ maximum?: number;
23
+ minLength?: number;
24
+ maxLength?: number;
25
+ pattern?: string;
26
+ [keyword: string]: unknown;
27
+ }
28
+ interface SchemaValidationError {
29
+ /** JSON-pointer-like path to the offending value, e.g. `/node/id` (`""` is the root). */
30
+ path: string;
31
+ message: string;
32
+ }
33
+ /**
34
+ * Validates `value` against `schema` and returns every error found (an empty
35
+ * array means valid). Supports `type` (incl. arrays of types), `enum`, `const`,
36
+ * `properties`, `required`, `additionalProperties`, `items`, `minItems`,
37
+ * `maxItems`, `minimum`, `maximum`, `minLength`, `maxLength` and `pattern`.
38
+ */
39
+ declare function validateJsonSchema(value: unknown, schema: JsonSchema | undefined, path?: string): SchemaValidationError[];
40
+
41
+ export { type JsonSchema as J, type SchemaValidationError as S, type JsonSchemaType as a, validateJsonSchema as v };
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkCL37JGFWcjs = require('../chunk-CL37JGFW.cjs');
12
+ var _chunkSML64VJGcjs = require('../chunk-SML64VJG.cjs');
13
13
 
14
14
 
15
15
 
@@ -27,7 +27,8 @@ var _chunkCL37JGFWcjs = require('../chunk-CL37JGFW.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkAA4ZEVCCcjs = require('../chunk-AA4ZEVCC.cjs');
30
+ var _chunkXNORY7M6cjs = require('../chunk-XNORY7M6.cjs');
31
+ require('../chunk-D27YFC46.cjs');
31
32
 
32
33
 
33
34
 
@@ -54,5 +55,5 @@ var _chunkAA4ZEVCCcjs = require('../chunk-AA4ZEVCC.cjs');
54
55
 
55
56
 
56
57
 
57
- exports.MARKDOWN_MENTION_SPLIT_REGEX = _chunkAA4ZEVCCcjs.MARKDOWN_MENTION_SPLIT_REGEX; exports.MENTION_REGEX = _chunkAA4ZEVCCcjs.MENTION_REGEX; exports.PIXERATE_DOCUMENT_MIME = _chunkCL37JGFWcjs.PIXERATE_DOCUMENT_MIME; exports.escapeHtml = _chunkAA4ZEVCCcjs.escapeHtml; exports.extractMentions = _chunkAA4ZEVCCcjs.extractMentions; exports.extractMentionsFromDoc = _chunkAA4ZEVCCcjs.extractMentionsFromDoc; exports.getClipboardData = _chunkCL37JGFWcjs.getClipboardData; exports.getEditorMarkdown = _chunkAA4ZEVCCcjs.getEditorMarkdown; exports.getEditorText = _chunkAA4ZEVCCcjs.getEditorText; exports.getSchemaSignature = _chunkCL37JGFWcjs.getSchemaSignature; exports.htmlToPlainText = _chunkAA4ZEVCCcjs.htmlToPlainText; exports.markdownToTipTapHtml = _chunkAA4ZEVCCcjs.markdownToTipTapHtml; exports.parseMentionSegments = _chunkAA4ZEVCCcjs.parseMentionSegments; exports.parseRichClipboardPayload = _chunkCL37JGFWcjs.parseRichClipboardPayload; exports.plainTextToParagraphHtml = _chunkCL37JGFWcjs.plainTextToParagraphHtml; exports.plainTextToSlice = _chunkAA4ZEVCCcjs.plainTextToSlice; exports.plainTextToTipTapHtml = _chunkAA4ZEVCCcjs.plainTextToTipTapHtml; exports.preprocessMarkdownFileLinks = _chunkAA4ZEVCCcjs.preprocessMarkdownFileLinks; exports.preprocessMarkdownMentions = _chunkAA4ZEVCCcjs.preprocessMarkdownMentions; exports.readRichClipboard = _chunkCL37JGFWcjs.readRichClipboard; exports.rtfToPlainText = _chunkCL37JGFWcjs.rtfToPlainText; exports.sanitizeHtml = _chunkAA4ZEVCCcjs.sanitizeHtml; exports.sanitizeImportedHtml = _chunkCL37JGFWcjs.sanitizeImportedHtml; exports.serializeRichClipboardPayload = _chunkCL37JGFWcjs.serializeRichClipboardPayload; exports.stripMarkdownCode = _chunkAA4ZEVCCcjs.stripMarkdownCode;
58
+ exports.MARKDOWN_MENTION_SPLIT_REGEX = _chunkXNORY7M6cjs.MARKDOWN_MENTION_SPLIT_REGEX; exports.MENTION_REGEX = _chunkXNORY7M6cjs.MENTION_REGEX; exports.PIXERATE_DOCUMENT_MIME = _chunkSML64VJGcjs.PIXERATE_DOCUMENT_MIME; exports.escapeHtml = _chunkXNORY7M6cjs.escapeHtml; exports.extractMentions = _chunkXNORY7M6cjs.extractMentions; exports.extractMentionsFromDoc = _chunkXNORY7M6cjs.extractMentionsFromDoc; exports.getClipboardData = _chunkSML64VJGcjs.getClipboardData; exports.getEditorMarkdown = _chunkXNORY7M6cjs.getEditorMarkdown; exports.getEditorText = _chunkXNORY7M6cjs.getEditorText; exports.getSchemaSignature = _chunkSML64VJGcjs.getSchemaSignature; exports.htmlToPlainText = _chunkXNORY7M6cjs.htmlToPlainText; exports.markdownToTipTapHtml = _chunkXNORY7M6cjs.markdownToTipTapHtml; exports.parseMentionSegments = _chunkXNORY7M6cjs.parseMentionSegments; exports.parseRichClipboardPayload = _chunkSML64VJGcjs.parseRichClipboardPayload; exports.plainTextToParagraphHtml = _chunkSML64VJGcjs.plainTextToParagraphHtml; exports.plainTextToSlice = _chunkXNORY7M6cjs.plainTextToSlice; exports.plainTextToTipTapHtml = _chunkXNORY7M6cjs.plainTextToTipTapHtml; exports.preprocessMarkdownFileLinks = _chunkXNORY7M6cjs.preprocessMarkdownFileLinks; exports.preprocessMarkdownMentions = _chunkXNORY7M6cjs.preprocessMarkdownMentions; exports.readRichClipboard = _chunkSML64VJGcjs.readRichClipboard; exports.rtfToPlainText = _chunkSML64VJGcjs.rtfToPlainText; exports.sanitizeHtml = _chunkXNORY7M6cjs.sanitizeHtml; exports.sanitizeImportedHtml = _chunkSML64VJGcjs.sanitizeImportedHtml; exports.serializeRichClipboardPayload = _chunkSML64VJGcjs.serializeRichClipboardPayload; exports.stripMarkdownCode = _chunkXNORY7M6cjs.stripMarkdownCode;
58
59
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/serializers/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,gsDAAC","file":"/home/runner/work/editor/editor/packages/core/dist/serializers/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/serializers/index.cjs"],"names":[],"mappings":"AAAA,0GAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,gsDAAC","file":"/home/runner/work/editor/editor/packages/core/dist/serializers/index.cjs"}
@@ -1,9 +1,10 @@
1
1
  import { Schema, Slice } from '@tiptap/pm/model';
2
- import { t as TrackedChangesView, h as MentionEntity } from '../track-changes-BSF58RK0.cjs';
2
+ import { n as TrackedChangesView, a as MentionEntity } from '../track-changes-BK5sVf4_.cjs';
3
3
  import '@tiptap/core';
4
4
  import '@tiptap/extension-mention';
5
5
  import '@tiptap/suggestion';
6
6
  import '@tiptap/pm/state';
7
+ import '../comment-store-BEMgVlAA.cjs';
7
8
 
8
9
  interface PlainTextOptions {
9
10
  /**
@@ -1,9 +1,10 @@
1
1
  import { Schema, Slice } from '@tiptap/pm/model';
2
- import { t as TrackedChangesView, h as MentionEntity } from '../track-changes-BSF58RK0.js';
2
+ import { n as TrackedChangesView, a as MentionEntity } from '../track-changes-CDjCrwKe.js';
3
3
  import '@tiptap/core';
4
4
  import '@tiptap/extension-mention';
5
5
  import '@tiptap/suggestion';
6
6
  import '@tiptap/pm/state';
7
+ import '../comment-store-BEMgVlAA.js';
7
8
 
8
9
  interface PlainTextOptions {
9
10
  /**
@@ -9,7 +9,7 @@ import {
9
9
  rtfToPlainText,
10
10
  sanitizeImportedHtml,
11
11
  serializeRichClipboardPayload
12
- } from "../chunk-JJDLPEWL.js";
12
+ } from "../chunk-3LV6RRPH.js";
13
13
  import {
14
14
  MARKDOWN_MENTION_SPLIT_REGEX,
15
15
  MENTION_REGEX,
@@ -27,7 +27,8 @@ import {
27
27
  preprocessMarkdownMentions,
28
28
  sanitizeHtml,
29
29
  stripMarkdownCode
30
- } from "../chunk-MJZBNWG7.js";
30
+ } from "../chunk-PGNZKFQS.js";
31
+ import "../chunk-5S3Z4PPF.js";
31
32
  export {
32
33
  MARKDOWN_MENTION_SPLIT_REGEX,
33
34
  MENTION_REGEX,
@@ -0,0 +1,91 @@
1
+ import { P as PromptValues, T as Template, a as PromptDiagnostic } from './tokens-D7yXvUU6.cjs';
2
+
3
+ interface ResolveTemplatesOptions {
4
+ bindings?: Record<string, string>;
5
+ maxDepth?: number;
6
+ /**
7
+ * Values for `{variable}` slots and `{?variable}` sections. When omitted,
8
+ * variables, defaults and section tags are left exactly as written.
9
+ */
10
+ values?: PromptValues;
11
+ }
12
+ /**
13
+ * Recursively resolves template tags `{{template_name}}` in a given text.
14
+ * A tag that would recurse into itself is replaced with `TEMPLATE_LOOP_ERROR`,
15
+ * and a tag nested deeper than `maxDepth` with `TEMPLATE_DEPTH_ERROR`; the rest
16
+ * of the text still resolves normally.
17
+ *
18
+ * Pass `options.values` to also fill variables (falling back to their
19
+ * `{name|default}`) and evaluate `{?name}…{/name}` / `{!name}…{/name}`
20
+ * sections, including those inside template bodies. See `resolvePrompt` for
21
+ * the source map and diagnostics.
22
+ */
23
+ declare function resolveTemplates(text: string, templates?: Template[], options?: ResolveTemplatesOptions): string;
24
+ /**
25
+ * Replaces `{variableName}` with values from a dictionary, falling back to a
26
+ * `{variableName|default}` when no value is supplied, and evaluates
27
+ * `{?name}…{/name}` / `{!name}…{/name}` sections. Variables with neither a
28
+ * value nor a default are left as written. Templates are not expanded.
29
+ */
30
+ declare function resolveVariables(text: string, values: PromptValues): string;
31
+ /**
32
+ * Extracts unique template names referenced in text.
33
+ */
34
+ declare function extractTemplateNames(text: string): string[];
35
+ /**
36
+ * Extracts unique variable names referenced in text, including names used by
37
+ * conditional section tags (`amount` for `{?amount>100}…{/amount}`).
38
+ * Defaults and descriptions are stripped.
39
+ */
40
+ declare function extractVariableNames(text: string): string[];
41
+ /**
42
+ * Extracts unique instruction names referenced in text.
43
+ */
44
+ declare function extractInstructionNames(text: string): string[];
45
+
46
+ /**
47
+ * One contiguous piece of resolved output and the raw range it came from.
48
+ *
49
+ * - `raw`: copied verbatim; offsets map character by character.
50
+ * - `template`: the expansion of a `{{template}}` tag.
51
+ * - `variable`: a substituted value or `|default` for a `{variable}` tag.
52
+ * - `conditional`: a section tag, or a whole removed section. These segments
53
+ * are empty in the resolved text (`resolvedStart === resolvedEnd`).
54
+ *
55
+ * Offsets inside non-raw segments map to the start of their raw range.
56
+ */
57
+ interface SourceMapSegment {
58
+ resolvedStart: number;
59
+ resolvedEnd: number;
60
+ source: "raw" | "template" | "variable" | "conditional";
61
+ rawStart: number;
62
+ rawEnd: number;
63
+ templateName?: string;
64
+ /** Variable substituted (`variable`) or tested (`conditional`). */
65
+ variableName?: string;
66
+ /** For `variable` segments: whether a supplied value or the default was used. */
67
+ valueSource?: "value" | "default";
68
+ }
69
+ /**
70
+ * Resolves templates in text while tracking character offset mapping
71
+ * between the raw input and the fully resolved output.
72
+ *
73
+ * Pass `options.values` to also substitute variables and evaluate conditional
74
+ * sections (see `resolvePrompt`); without it the output is unchanged from the
75
+ * template-only behavior.
76
+ */
77
+ declare function resolveTemplatesWithMapping(text: string, templates?: Template[], templateBindings?: Record<string, string>, options?: Pick<ResolveTemplatesOptions, "maxDepth" | "values">): {
78
+ text: string;
79
+ map: SourceMapSegment[];
80
+ diagnostics: PromptDiagnostic[];
81
+ };
82
+ /**
83
+ * Maps an offset in resolved text back to the corresponding offset in raw text.
84
+ */
85
+ declare function mapResolvedOffsetToRaw(resolvedOffset: number, map: SourceMapSegment[]): number;
86
+ /**
87
+ * Maps an offset in raw text to the corresponding offset in resolved text.
88
+ */
89
+ declare function mapRawOffsetToResolved(rawOffset: number, map: SourceMapSegment[]): number;
90
+
91
+ export { type ResolveTemplatesOptions as R, type SourceMapSegment as S, extractTemplateNames as a, extractVariableNames as b, mapResolvedOffsetToRaw as c, resolveTemplatesWithMapping as d, extractInstructionNames as e, resolveVariables as f, mapRawOffsetToResolved as m, resolveTemplates as r };