@hankchen/canvas-editor-vue 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/theme.css ADDED
@@ -0,0 +1,428 @@
1
+ /**
2
+ * 编辑器外观设计令牌——单源(editor-theme-light-dark spec §2,ADR 0001)。
3
+ *
4
+ * 铁律:凡随主题变色的 --cn-* 令牌一律且只能在本文件定义;组件 scoped 样式
5
+ * 零硬编码色、只 var() 消费。原因:Vue scoped 样式带 [data-v-x] 提升特异性、
6
+ * 且注入时序晚于入口 css——组件内定义色令牌会压过下面的日间覆盖。
7
+ * 几何/尺寸类局部变量(如 --cn-ruler-thickness)不在此列,留组件。
8
+ *
9
+ * 结构:
10
+ * ① 夜间(缺省)调色板块——定义在全部主题消费根类上(清单见 spec §2.3);
11
+ * 无任何主题信号时走这里,观感 = 收口前的现网值(零回归)。
12
+ * ② 日间整组覆盖——三种信号写法等价([data-cn-theme='light'] ∥
13
+ * [data-theme='light'] ∥ html class light),信号前缀 :where() 降权
14
+ * 保宿主逃生口两态对称(见块前注);信号只设 html 一处
15
+ * (body 级 portal 浮层经 html 祖先链继承),多处设置属未定义行为。
16
+ * ③ 结构性规则——select 箭头双态 data-URI + 原 panel-theme.css 的面板
17
+ * 控件族规则整体迁入(本文件内容即其超集;panel-theme.css 已退化为
18
+ * @import 本文件的兼容 shim,旧 import 路径不破坏)。
19
+ *
20
+ * 宿主接入(Tailwind v4):工具类(bg-cn-bg、text-cn-muted…)由宿主编译器经
21
+ * @source 扫描本包源码生成,@theme inline 把 --cn-* 映射成 --color-cn-* 颜色族
22
+ * (接线样例见 playground/src/style.css);shadow 类令牌用 Tailwind v4 变量
23
+ * 任意值语法 shadow-(--cn-shadow-md) 直接引用运行时变量。接入 css 三步:
24
+ * 1. devDeps 加 tailwindcss + @tailwindcss/vite,vite 插件启用;
25
+ * 2. 应用 css:@import "tailwindcss"; @source "<本包 src 路径>";
26
+ * 3. import '@hankchen/canvas-editor-vue/theme.css'
27
+ * (或旧路径 './panel-theme.css',等价)。
28
+ *
29
+ * 换肤:宿主可在根类上覆盖 --cn-* 单令牌——主题整组值之上、宿主覆盖之下。
30
+ * 主题方向:夜间 = 暗色「精密仪器」检视面板(深蓝灰底、发丝线、天蓝 accent);
31
+ * 日间 = 板岩灰系(accent 加深保白底对比,spec §3)。
32
+ */
33
+
34
+ /* ------------------------------------------------------------------ */
35
+ /* ① 夜间(缺省)调色板块——spec §3 令牌表「夜间」列,值 = 现网收口 */
36
+ /* ------------------------------------------------------------------ */
37
+
38
+ .cn-props,
39
+ .cn-statusbar,
40
+ .cn-surface,
41
+ .cn-ruler,
42
+ .cn-context-menu,
43
+ .cn-find-bar,
44
+ .cn-align-float,
45
+ .cn-edit-toolbar,
46
+ .cn-guides,
47
+ .cn-text-overlay,
48
+ .cn-help,
49
+ .cn-tooltip,
50
+ /* Tooltip 气泡是 Teleport 到 body 的独立 portal 根(spec §2.2),带自己的根类 */
51
+ .cn-tooltip__bubble,
52
+ .cn-dropdown {
53
+ /* 表面与文字 */
54
+ --cn-bg: #0b1220;
55
+ --cn-bg-elevated: #101a2e;
56
+ --cn-hover: #16223a;
57
+ --cn-fg: #e6edf7;
58
+ --cn-fg-2: #c3cddd;
59
+ --cn-fg-3: #aab6c8;
60
+ --cn-muted: #7c8ca5;
61
+
62
+ /* 边界:容器发丝线 / 壳层强线 / 输入框描边 / 图层行卡片描边 */
63
+ --cn-line: #1e2a40;
64
+ --cn-line-strong: #2a3a58;
65
+ --cn-field-line: #2a3a57;
66
+ --cn-card-line: #23324d;
67
+
68
+ /* 输入底(半透明石板,叠在面板底色上) */
69
+ --cn-field: rgba(148,163,184,.07);
70
+
71
+ /* 半透明条底(标尺/查找条/对齐浮条等浮于纸面的条状 chrome) */
72
+ --cn-bar-bg: rgb(11 18 32 / .92);
73
+
74
+ /* accent(天蓝)及其派生:淡底 / 选中辉光 / 60% 描边 / 其上的可读前景 */
75
+ --cn-accent: #38bdf8;
76
+ --cn-accent-soft: rgba(56,189,248,.12);
77
+ --cn-accent-glow: rgba(56,189,248,.35);
78
+ --cn-accent-line: rgba(56,189,248,.6);
79
+ --cn-on-accent: #06283d;
80
+
81
+ /* 表达式前置色(layer-panel-expression-prefix 工单 02):带标记内容层行内
82
+ 片段串的用色(图层面板 .cn-layers__prefix 消费);原型 .ex 色值为参考值 */
83
+ --cn-expression: #5dd3b0;
84
+
85
+ /* 危险/告警(danger-soft = 危险态淡底,ContextMenu 删除项 hover 用) */
86
+ --cn-danger: #f87171;
87
+ --cn-danger-soft: rgba(248,113,113,.12);
88
+
89
+ /* 画布对齐辅助线(GuidesOverlay 迁入,editor-theme 工票 02):参考线实线
90
+ 天青 + 同族辉光,拖回删除转红、吸附线玫红虚线(根 CONTEXT.md 两概念必须
91
+ 可区分)。几何量(--cn-snap-dash/--cn-guide-hit/--cn-guide-clip-radius)
92
+ 不随主题,留组件 scoped */
93
+ --cn-guide-line: #38bdf8;
94
+ --cn-guide-glow: rgba(56,189,248,.4);
95
+ --cn-guide-will-delete: #f87171;
96
+ --cn-guide-will-delete-glow: rgba(248,113,113,.45);
97
+ --cn-snap-line: #fb7185;
98
+ --cn-snap-glow: rgba(251,113,133,.45);
99
+
100
+ /* 投影三档(几何统一一套)+ 模态遮罩 */
101
+ --cn-shadow-sm: 0 4px 16px rgba(2,6,23,.4);
102
+ --cn-shadow-md: 0 12px 32px rgba(2,6,23,.55);
103
+ --cn-shadow-lg: 0 24px 64px rgba(2,6,23,.6);
104
+ --cn-backdrop: rgba(2,6,23,.55);
105
+
106
+ /* 数字/代码用等宽字族(面板的「仪器刻度」字形);静态不随主题 */
107
+ --cn-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
108
+ monospace;
109
+
110
+ /* 原生控件(number 步进器、color、checkbox)走暗色渲染 */
111
+ color-scheme: dark;
112
+ }
113
+
114
+ /* 面板底色/前景(原 panel-theme.css 的 .cn-props 表面涂装,原样收口;
115
+ 其余根类的表面涂装由各自组件 scoped 样式承担,此处不代劳) */
116
+ .cn-props {
117
+ background-color: var(--cn-bg);
118
+ color: var(--cn-fg);
119
+ }
120
+
121
+ /* ------------------------------------------------------------------ */
122
+ /* ② 日间整组覆盖——spec §3 令牌表「日间」列;信号只设 html 一处 */
123
+ /* ------------------------------------------------------------------ */
124
+
125
+ /* 信号前缀用 :where() 零化特异性:本块与 ① 夜间块同为 (0,1,0),靠源序后者胜;
126
+ 宿主换肤逃生口(根类上覆盖 --cn-* 单令牌,同特异性后加载)两态都在主题之上
127
+ (spec §8.3)——若用 :is() 前缀,日间块 (0,2,0) 会压过宿主覆盖,级联不对称 */
128
+ :where([data-cn-theme='light'], [data-theme='light'], html.light)
129
+ :is(
130
+ .cn-props,
131
+ .cn-statusbar,
132
+ .cn-surface,
133
+ .cn-ruler,
134
+ .cn-context-menu,
135
+ .cn-find-bar,
136
+ .cn-align-float,
137
+ .cn-edit-toolbar,
138
+ .cn-guides,
139
+ .cn-text-overlay,
140
+ .cn-help,
141
+ .cn-tooltip,
142
+ .cn-tooltip__bubble,
143
+ .cn-dropdown) {
144
+ /* 表面与文字(板岩灰系) */
145
+ --cn-bg: #ffffff;
146
+ --cn-bg-elevated: #f8fafc;
147
+ --cn-hover: #eef2f7;
148
+ --cn-fg: #0f172a;
149
+ --cn-fg-2: #334155;
150
+ --cn-fg-3: #475569;
151
+ --cn-muted: #64748b;
152
+
153
+ /* 边界 */
154
+ --cn-line: #e2e8f0;
155
+ --cn-line-strong: #cbd5e1;
156
+ --cn-field-line: #cbd5e1;
157
+ --cn-card-line: #e2e8f0;
158
+
159
+ /* 输入底 */
160
+ --cn-field: rgba(15,23,42,.04);
161
+
162
+ /* 半透明条底 */
163
+ --cn-bar-bg: rgb(255 255 255 / .92);
164
+
165
+ /* accent 加深保白底对比 */
166
+ --cn-accent: #0284c7;
167
+ --cn-accent-soft: rgba(2,132,199,.10);
168
+ --cn-accent-glow: rgba(2,132,199,.30);
169
+ --cn-accent-line: rgba(2,132,199,.55);
170
+ --cn-on-accent: #ffffff;
171
+
172
+ /* 表达式前置色 */
173
+ --cn-expression: #0d9488;
174
+
175
+ /* 危险/告警(soft 变体随 danger 同步换 hue,alpha 沿 accent-soft 同款 .12→.10) */
176
+ --cn-danger: #dc2626;
177
+ --cn-danger-soft: rgba(220,38,38,.10);
178
+
179
+ /* 画布对齐辅助线:will-delete/snap 配 #dc2626/#e11d48 系亮色(spec §3 注);
180
+ 辉光随各自线色同族换 hue,alpha 与夜间一致 */
181
+ --cn-guide-line: #0284c7;
182
+ --cn-guide-glow: rgba(2,132,199,.4);
183
+ --cn-guide-will-delete: #dc2626;
184
+ --cn-guide-will-delete-glow: rgba(220,38,38,.45);
185
+ --cn-snap-line: #e11d48;
186
+ --cn-snap-glow: rgba(225,29,72,.45);
187
+
188
+ /* 投影三档(几何同夜间,色改石板灰)+ 模态遮罩 */
189
+ --cn-shadow-sm: 0 4px 16px rgba(15,23,42,.12);
190
+ --cn-shadow-md: 0 12px 32px rgba(15,23,42,.18);
191
+ --cn-shadow-lg: 0 24px 64px rgba(15,23,42,.22);
192
+ --cn-backdrop: rgba(15,23,42,.35);
193
+
194
+ /* 原生控件走日间渲染;--cn-font-mono 静态不随主题,不在此重定义 */
195
+ color-scheme: light;
196
+ }
197
+
198
+ /* ------------------------------------------------------------------ */
199
+ /* ③ 结构性规则 */
200
+ /* ------------------------------------------------------------------ */
201
+
202
+ /* SelectField 的自绘箭头(appearance-none 后由背景 svg 补上指示)——
203
+ 箭头描边色随主题:夜间 = --cn-muted 现值,日间 = --cn-muted 日间值 */
204
+ .cn-props .cn-select {
205
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8ca5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
206
+ background-repeat: no-repeat;
207
+ background-position: right 6px center;
208
+ background-size: 10px;
209
+ }
210
+
211
+ :is([data-cn-theme='light'], [data-theme='light'], html.light) .cn-props .cn-select {
212
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
213
+ }
214
+
215
+ .cn-props .cn-select option {
216
+ background-color: var(--cn-bg-elevated);
217
+ color: var(--cn-fg);
218
+ }
219
+
220
+ /* 数据字段表达式态输入框描边(工单 02 落地、工单 06 保留):取值方式切换已
221
+ 升级为分段选择器(ValueTypeSegmented,tailwind 配方在组件模板),原 {{ }}
222
+ 徽章令牌随控件退役。双类名选择器压过控件上的单类 tailwind border 色 */
223
+ .cn-props .cn-field--expression {
224
+ border-color: var(--cn-accent);
225
+ }
226
+
227
+ /* pair 自适应 prefix 切换钮(工票 03):徽章方钮视觉语言(原 {{ }} 徽章钮同族,
228
+ 该钮已于工单 06 升级为分段选择器)的「自」字徽章。
229
+ 双类名选择器压过控件上的单类 tailwind border 色,无需 !important */
230
+ .cn-props .cn-props__auto-toggle {
231
+ font-size: 9px;
232
+ line-height: 1;
233
+ padding: 3px 3px;
234
+ border-radius: 4px;
235
+ border: 1px solid var(--cn-field-line);
236
+ color: var(--cn-muted);
237
+ background: transparent;
238
+ cursor: pointer;
239
+ }
240
+
241
+ .cn-props .cn-props__auto-toggle:hover {
242
+ color: var(--cn-fg);
243
+ border-color: var(--cn-muted);
244
+ }
245
+
246
+ .cn-props .cn-props__auto-toggle--active {
247
+ border-color: var(--cn-accent);
248
+ color: var(--cn-accent);
249
+ background: var(--cn-accent-soft);
250
+ }
251
+
252
+ /* 简写控件的模式循环钮(工单 04):1/2/4 值模式单按钮循环,徽章方钮视觉语言
253
+ 的图标方钮。双类名选择器压过控件上的单类 tailwind
254
+ border 色,无需 !important */
255
+ .cn-props .cn-props__mode-toggle {
256
+ display: inline-flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ width: 20px;
260
+ height: 20px;
261
+ padding: 0;
262
+ border-radius: 4px;
263
+ border: 1px solid var(--cn-field-line);
264
+ color: var(--cn-muted);
265
+ background: transparent;
266
+ cursor: pointer;
267
+ }
268
+
269
+ .cn-props .cn-props__mode-toggle:hover {
270
+ color: var(--cn-fg);
271
+ border-color: var(--cn-muted);
272
+ }
273
+
274
+ /* 自适应禁用态的预览值区分展示(工票 03):模板子树的解析盒非文档权威值,
275
+ 斜体 + 弱化提示(悬停有完整说明),与声明值一眼可辨 */
276
+ .cn-props .cn-field--preview {
277
+ font-style: italic;
278
+ }
279
+
280
+ /* ---- 图层行卡片 + 根层拖拽把手(工单 08)----
281
+ 行 = 独立描边卡片条目(非行间分隔线);描边走令牌 --cn-card-line。行卡片的
282
+ 选中/悬停/落点提示状态与把手样式收口在本文件(类名由 LayerPanel.vue 按 ui
283
+ 分支绑定),不依赖宿主 tailwind 令牌映射;行的几何(内距/字号/行距 gap)
284
+ 仍以 tailwind utility 留在组件模板。 */
285
+ .cn-props .cn-layers__row {
286
+ border: 1px solid var(--cn-card-line);
287
+ border-radius: 6px;
288
+ }
289
+
290
+ .cn-props .cn-layers__row--hovered {
291
+ border-color: var(--cn-field-line);
292
+ background-color: var(--cn-field);
293
+ }
294
+
295
+ .cn-props .cn-layers__row--selected {
296
+ border-color: var(--cn-accent);
297
+ background-color: var(--cn-accent-soft);
298
+ color: var(--cn-accent);
299
+ }
300
+
301
+ /* 拖放落点提示:插入边点亮(行上半 = 顶边 before,下半 = 底边 after) */
302
+ .cn-props .cn-layers__row--drop-before {
303
+ border-top-color: var(--cn-accent);
304
+ }
305
+
306
+ .cn-props .cn-layers__row--drop-after {
307
+ border-bottom-color: var(--cn-accent);
308
+ }
309
+
310
+ /* 六点把手:根层行常显(非 hover 门控),拖拽仅从此处发起;行/格不加把手 */
311
+ .cn-props .cn-layers__handle {
312
+ display: inline-flex;
313
+ align-items: center;
314
+ justify-content: center;
315
+ width: 14px;
316
+ height: 20px;
317
+ border-radius: 3px;
318
+ color: var(--cn-muted);
319
+ cursor: grab;
320
+ }
321
+
322
+ .cn-props .cn-layers__handle:hover {
323
+ color: var(--cn-fg);
324
+ background-color: var(--cn-field);
325
+ }
326
+
327
+ .cn-props .cn-layers__handle:active {
328
+ cursor: grabbing;
329
+ }
330
+
331
+ /* 行内重命名输入框(工单 09):覆盖行标签同槽(flex-1 由模板 utility 承担)——
332
+ accent 描边 + 抬升底色标识编辑态,字号/字族与 .cn-layers__label 对齐 */
333
+ .cn-props .cn-layers__rename-input {
334
+ padding: 0 3px;
335
+ font-family: var(--cn-font-mono);
336
+ font-size: 11px;
337
+ line-height: 16px;
338
+ color: var(--cn-fg);
339
+ background-color: var(--cn-bg-elevated);
340
+ border: 1px solid var(--cn-accent);
341
+ border-radius: 3px;
342
+ outline: none;
343
+ }
344
+
345
+ /* 表达式前置(layer-panel-expression-prefix 工单 02):带标记内容层行内、拖柄
346
+ 与标签之间的等宽小字片段串(内容与全文提示都由内核投影携带,面板零计算)。
347
+ 溢出契约(spec 决策 7):名称 flex-1 truncate 先截,前置 flex:none + max-width
348
+ 封顶后自身省略——title 提示完整片段串。字号 10.5px 为原型 .ex 参考值,
349
+ line-height 对齐行标签 leading-4,行高不因前置变化 */
350
+ .cn-props .cn-layers__prefix {
351
+ flex: none;
352
+ max-width: 96px;
353
+ overflow: hidden;
354
+ text-overflow: ellipsis;
355
+ white-space: nowrap;
356
+ font-family: var(--cn-font-mono);
357
+ font-size: 10.5px;
358
+ line-height: 16px;
359
+ color: var(--cn-expression);
360
+ }
361
+
362
+ /* 隐藏行(layer-panel-ux 工单 10):降不透明度示意不可见态(与闭眼钮常显同源),
363
+ 约 50%——选中/悬停描边保持可辨(隐藏 ≠ 不可操作,显隐/属性编辑照常) */
364
+ .cn-props .cn-layers__row--hidden {
365
+ opacity: 0.5;
366
+ }
367
+
368
+ /* 模板子树行(模板创作 spec §2.2 D1):虚线描边卡片区分「声明态结构」与实体
369
+ 行/格——选中/悬停态换 accent 虚线(意图锁定,具体令牌与 layer-panel-ux 协调) */
370
+ .cn-props .cn-layers__row--template {
371
+ border-style: dashed;
372
+ border-color: var(--cn-field-line);
373
+ }
374
+
375
+ .cn-props .cn-layers__row--template.cn-layers__row--hovered {
376
+ border-color: var(--cn-accent);
377
+ border-style: dashed;
378
+ background-color: var(--cn-field);
379
+ }
380
+
381
+ .cn-props .cn-layers__row--template.cn-layers__row--selected {
382
+ border-color: var(--cn-accent);
383
+ border-style: dashed;
384
+ }
385
+
386
+ /* 非空校验标错(模板创作 spec §2.4 P4):拦截期红框——空串永不落库 */
387
+ .cn-props .cn-field--invalid {
388
+ border-color: var(--cn-danger);
389
+ }
390
+
391
+ /* ---- 表达式补全浮层(content-completion 工单 04)----
392
+ portal 到 body(躲 288px 面板 overflow 裁剪)后脱离面板 DOM 子树,根元素
393
+ 自带 .cn-props 重建令牌命名空间;此处只收抬升底色/投影与高亮态(option
394
+ 几何以 tailwind utility 留在组件模板)。投影走共享 --cn-shadow-md
395
+ (editor-theme 工票 01:面板原 0 16px 40px -12px 并入,几何统一取一套)。 */
396
+ .cn-props.cn-completion {
397
+ background-color: var(--cn-bg-elevated);
398
+ box-shadow: var(--cn-shadow-md);
399
+ }
400
+
401
+ .cn-props .cn-completion__option--active {
402
+ background-color: var(--cn-accent-soft);
403
+ color: var(--cn-accent);
404
+ }
405
+
406
+ /* ---- 资源路径选择器浮层(resource-expression-single-ref 工单 05)----
407
+ portal 到 body 后脱离面板 DOM 子树,根元素自带 .cn-props 重建令牌命名空间;
408
+ 抬升底色/投影与高亮态与补全浮层同语言(option 几何以 tailwind utility 留在
409
+ 组件模板)。只读展示框的盒子视觉(bg/border/圆角)同 cn-field 输入框族。 */
410
+ .cn-props.cn-pathpicker__menu {
411
+ background-color: var(--cn-bg-elevated);
412
+ box-shadow: var(--cn-shadow-md);
413
+ }
414
+
415
+ .cn-props .cn-pathpicker__option--active {
416
+ background-color: var(--cn-accent-soft);
417
+ }
418
+
419
+ /* 选择器的状态描边(工单 05):PropertyField 的状态类(cn-field--expression/
420
+ cn-field--invalid)经 fallthrough 落在选择器根盒(flex 容器无边框),描边经
421
+ 后代选择器落到只读展示框——与 cn-field--invalid 单类规则同值的定向版 */
422
+ .cn-props .cn-field--expression .cn-pathpicker__value {
423
+ border-color: var(--cn-accent);
424
+ }
425
+
426
+ .cn-props .cn-field--invalid .cn-pathpicker__value {
427
+ border-color: var(--cn-danger);
428
+ }
@@ -1,5 +1,5 @@
1
- import { a as e, r as t } from "./layerPath-uy2ywyld.js";
2
- import { _ as n, d as r, f as i, g as a, h as o, i as s, m as c, p as l, v as u, y as d } from "./ExpressionPathPicker-DchGsK70.js";
1
+ import { a as e, s as t } from "./_plugin-vue_export-helper-CBNdHDnS.js";
2
+ import { _ as n, a as r, d as i, f as a, g as o, h as s, m as c, p as l, v as u, y as d } from "./Tooltip-9lQOwB7r.js";
3
3
  import { Fragment as f, Teleport as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, defineComponent as y, inject as b, nextTick as x, normalizeClass as S, normalizeStyle as C, onMounted as w, onScopeDispose as T, openBlock as E, reactive as ee, ref as D, renderList as O, shallowRef as k, toDisplayString as A, toValue as j, watch as M, withModifiers as N } from "vue";
4
4
  //#region ../canvas-editor/src/shared/expressionDiagnostics.ts
5
5
  function P(e) {
@@ -141,7 +141,7 @@ function ae(e, t) {
141
141
  partial: n.text,
142
142
  candidates: ie()
143
143
  };
144
- if (n.index === 0 && !o(n.text)) {
144
+ if (n.index === 0 && !s(n.text)) {
145
145
  let r = H(e, t, n.text, !1);
146
146
  return r.ok ? r : {
147
147
  ok: !0,
@@ -164,8 +164,8 @@ function H(e, t, n, r) {
164
164
  partial: "",
165
165
  candidates: []
166
166
  };
167
- let i = n.endsWith("."), o = i ? n.slice(0, -1) : n;
168
- if (o === "") return n === "" ? {
167
+ let i = n.endsWith("."), a = i ? n.slice(0, -1) : n;
168
+ if (a === "") return n === "" ? {
169
169
  ok: !0,
170
170
  prefix: "",
171
171
  partial: "",
@@ -174,7 +174,7 @@ function H(e, t, n, r) {
174
174
  ok: !1,
175
175
  reason: "expression_syntax_error"
176
176
  };
177
- let s = a(o);
177
+ let s = o(a);
178
178
  if (!s.ok) return {
179
179
  ok: !1,
180
180
  reason: "expression_syntax_error"
@@ -229,7 +229,7 @@ function oe(e, t) {
229
229
  prefix: "",
230
230
  partial: "",
231
231
  candidates: []
232
- } : o(t.expr) ? ae(e, t) : H(e, t, t.expr, !0);
232
+ } : s(t.expr) ? ae(e, t) : H(e, t, t.expr, !0);
233
233
  }
234
234
  //#endregion
235
235
  //#region src/shared/ExpressionCompletionPopup.vue?vue&type=script&setup=true&lang.ts
@@ -282,17 +282,17 @@ var se = {
282
282
  });
283
283
  //#endregion
284
284
  //#region src/shared/expressionContext.ts
285
- function ue(t, r, i) {
285
+ function ue(e, r, i) {
286
286
  let a = null;
287
287
  for (let o = 0; o < r.length; o += 1) {
288
288
  if (r[o] !== "template") continue;
289
- let s = e(t, r.slice(0, o));
289
+ let s = t(e, r.slice(0, o));
290
290
  if (s === null || s.type !== "TableLayer" || (a = n(a ?? i, s.rowsPath), a === null)) return null;
291
291
  }
292
292
  return a;
293
293
  }
294
- function de(e) {
295
- return e[e.length - 1] === "content" && t(e);
294
+ function de(t) {
295
+ return t[t.length - 1] === "content" && e(t);
296
296
  }
297
297
  function fe(e, t, n) {
298
298
  return e === null || t === null || n === null || !de(n) ? {
@@ -417,22 +417,22 @@ function ve(e) {
417
417
  activeIndex: 0,
418
418
  top: 0,
419
419
  left: 0
420
- }), n = null, a = !1, o = null;
420
+ }), n = null, o = !1, s = null;
421
421
  function c() {
422
- t.open = !1, t.items = [], t.activeIndex = 0, o = null;
422
+ t.open = !1, t.items = [], t.activeIndex = 0, s = null;
423
423
  }
424
424
  function u() {
425
425
  if (!t.open || !n) return;
426
- let r = Z(n, j(e.scale ?? 1)), i = e.popupEl ? j(e.popupEl) : null, a = s({
427
- anchor: r,
428
- popupWidth: i?.offsetWidth ?? 0,
429
- popupHeight: i?.offsetHeight ?? 0,
426
+ let i = Z(n, j(e.scale ?? 1)), a = e.popupEl ? j(e.popupEl) : null, o = r({
427
+ anchor: i,
428
+ popupWidth: a?.offsetWidth ?? 0,
429
+ popupHeight: a?.offsetHeight ?? 0,
430
430
  viewportWidth: window.innerWidth,
431
431
  viewportHeight: window.innerHeight
432
432
  });
433
- t.top = a.top, t.left = a.left;
433
+ t.top = o.top, t.left = o.left;
434
434
  }
435
- function d(a, s = !1) {
435
+ function d(r, o = !1) {
436
436
  if (!j(e.enabled)) {
437
437
  c();
438
438
  return;
@@ -442,38 +442,38 @@ function ve(e) {
442
442
  c();
443
443
  return;
444
444
  }
445
- let f = d.value, p = d.selectionStart ?? f.length, m = r(l(f), p);
445
+ let f = d.value, p = d.selectionStart ?? f.length, m = i(l(f), p);
446
446
  if (!m) {
447
447
  c();
448
448
  return;
449
449
  }
450
- let h = m.kind === "open" ? m.end : m.end - 2, g = e.resolve(i(f.slice(m.start + 2, Math.min(p, h))));
450
+ let h = m.kind === "open" ? m.end : m.end - 2, g = e.resolve(a(f.slice(m.start + 2, Math.min(p, h))));
451
451
  if (!g) {
452
452
  c();
453
453
  return;
454
454
  }
455
- let _ = s ? g.candidates : g.candidates.filter((e) => (e.filterKey ?? e.segment).startsWith(g.partial));
455
+ let _ = o ? g.candidates : g.candidates.filter((e) => (e.filterKey ?? e.segment).startsWith(g.partial));
456
456
  if (_.length === 0) {
457
457
  c();
458
458
  return;
459
459
  }
460
- o = {
460
+ s = {
461
461
  fragment: m,
462
462
  partial: g.partial,
463
463
  cursor: p
464
- }, (t.open || a) && (t.items = _, t.activeIndex = 0, t.open = !0, u(), x(u));
464
+ }, (t.open || r) && (t.items = _, t.activeIndex = 0, t.open = !0, u(), x(u));
465
465
  }
466
466
  function f(e) {
467
467
  let r = n;
468
- if (!t.open || a || !r || !o) return;
468
+ if (!t.open || o || !r || !s) return;
469
469
  let i = t.items[e ?? t.activeIndex];
470
470
  if (!i) return;
471
- let s = K(r.value, o.fragment, o.cursor, o.partial, i);
472
- if (!s) {
471
+ let a = K(r.value, s.fragment, s.cursor, s.partial, i);
472
+ if (!a) {
473
473
  c();
474
474
  return;
475
475
  }
476
- r.value = s.value, r.setSelectionRange(s.cursor, s.cursor), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 })), c();
476
+ r.value = a.value, r.setSelectionRange(a.cursor, a.cursor), r.dispatchEvent(new Event("input", { bubbles: !0 })), r.dispatchEvent(new Event("change", { bubbles: !0 })), c();
477
477
  }
478
478
  function p() {
479
479
  return j(e.pairing ?? e.enabled);
@@ -511,16 +511,16 @@ function ve(e) {
511
511
  return r === null || t.value[r] !== "}" ? !1 : (e.preventDefault(), t.setSelectionRange(r + 1, r + 1), d(!1), !0);
512
512
  }
513
513
  function y(e) {
514
- a || e.isComposing || (g(e), d(!0));
514
+ o || e.isComposing || (g(e), d(!0));
515
515
  }
516
516
  function b() {
517
- a = !0;
517
+ o = !0;
518
518
  }
519
519
  function S() {
520
- a = !1, d(!0);
520
+ o = !1, d(!0);
521
521
  }
522
522
  function C(e) {
523
- return a || e.isComposing || e.keyCode === 229;
523
+ return o || e.isComposing || e.keyCode === 229;
524
524
  }
525
525
  function E(e) {
526
526
  if (!C(e)) {
@@ -547,7 +547,7 @@ function ve(e) {
547
547
  t.open && !C(e) && _e.includes(e.key) && d(!1);
548
548
  }
549
549
  function O() {
550
- a || d(!1);
550
+ o || d(!1);
551
551
  }
552
552
  function k() {
553
553
  c();