@formulaxjs/kity-runtime 0.1.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.
@@ -0,0 +1,896 @@
1
+ // src/vendor/legacy-box-type.ts
2
+ var legacyBoxType = {
3
+ DETACHED: 1,
4
+ OVERLAP: 2
5
+ };
6
+
7
+ // src/vendor/legacy-kfevent.ts
8
+ var legacyKfEvent = {
9
+ createEvent(type) {
10
+ return new Event(type, {
11
+ bubbles: true,
12
+ cancelable: true
13
+ });
14
+ }
15
+ };
16
+
17
+ // src/vendor/legacy-event.ts
18
+ var eventListenerStore = {};
19
+ var eventId = 0;
20
+ var beforeResult = true;
21
+ function getLegacyEventId(target) {
22
+ return target.__kfeEventId ?? target.__kfe_eid;
23
+ }
24
+ function setLegacyEventId(target, resolvedEventId) {
25
+ target.__kfeEventId = resolvedEventId;
26
+ if (Object.prototype.hasOwnProperty.call(target, "__kfe_eid")) {
27
+ target.__kfe_eid = resolvedEventId;
28
+ return;
29
+ }
30
+ Object.defineProperty(target, "__kfe_eid", {
31
+ configurable: true,
32
+ enumerable: true,
33
+ get() {
34
+ return target.__kfeEventId;
35
+ },
36
+ set(value) {
37
+ target.__kfeEventId = value;
38
+ }
39
+ });
40
+ }
41
+ var eventHandler = function eventHandler2(event) {
42
+ const type = event.type;
43
+ const target = event.target;
44
+ const eid = getLegacyEventId(this);
45
+ const hasAutoTrigger = /^(?:before|after)/.test(type);
46
+ const handlerList = eventListenerStore[eid]?.[type] ?? [];
47
+ if (!hasAutoTrigger) {
48
+ legacyEventListener.trigger(target, `before${type}`);
49
+ if (beforeResult === false) {
50
+ beforeResult = true;
51
+ return false;
52
+ }
53
+ }
54
+ for (const handler of handlerList) {
55
+ if (handler.call(target, event) === false) {
56
+ beforeResult = false;
57
+ break;
58
+ }
59
+ }
60
+ if (!hasAutoTrigger) {
61
+ legacyEventListener.trigger(target, `after${type}`);
62
+ }
63
+ return true;
64
+ };
65
+ var legacyEventListener = {
66
+ addEvent(target, type, handler) {
67
+ let hasHandler = true;
68
+ if (!getLegacyEventId(target)) {
69
+ hasHandler = false;
70
+ setLegacyEventId(target, ++eventId);
71
+ eventListenerStore[getLegacyEventId(target)] = {};
72
+ }
73
+ const eventCache = eventListenerStore[getLegacyEventId(target)];
74
+ if (!eventCache[type]) {
75
+ hasHandler = false;
76
+ eventCache[type] = [];
77
+ }
78
+ eventCache[type].push(handler);
79
+ if (hasHandler) {
80
+ return;
81
+ }
82
+ target.addEventListener(type, eventHandler, false);
83
+ },
84
+ trigger(target, type, event) {
85
+ const resolvedEvent = event || legacyKfEvent.createEvent(type);
86
+ target.dispatchEvent(resolvedEvent);
87
+ }
88
+ };
89
+
90
+ // src/vendor/legacy-utils.ts
91
+ import { bind, isArray as isArray2, isString as isString2 } from "lodash-es";
92
+
93
+ // src/kity/utils.ts
94
+ import {
95
+ assign,
96
+ cloneDeep,
97
+ forEach,
98
+ isArray,
99
+ isBoolean,
100
+ isFunction,
101
+ isNumber,
102
+ isObject,
103
+ isRegExp,
104
+ isString,
105
+ flattenDeep,
106
+ get,
107
+ defaultTo,
108
+ merge
109
+ } from "lodash-es";
110
+ var utils = {
111
+ each: forEach,
112
+ extend: assign,
113
+ deepExtend: merge,
114
+ clone: cloneDeep,
115
+ copy: cloneDeep,
116
+ queryPath: get,
117
+ getValue: defaultTo,
118
+ flatten: flattenDeep,
119
+ parallel: function parallel(v1, v2, op) {
120
+ if (isArray(v1) && isArray(v2)) {
121
+ return v1.map((item, i) => parallel(item, v2[i], op));
122
+ }
123
+ if (isObject(v1) && isObject(v1) && isObject(v2)) {
124
+ const Class = v1.getClass?.();
125
+ if (Class?.parse) {
126
+ const v1Val = v1.valueOf();
127
+ const v2Val = v2.valueOf();
128
+ const result2 = parallel(v1Val, v2Val, op);
129
+ return Class.parse(result2);
130
+ }
131
+ const result = {};
132
+ for (const name in v1) {
133
+ if (Object.prototype.hasOwnProperty.call(v1, name) && Object.prototype.hasOwnProperty.call(v2, name)) {
134
+ result[name] = parallel(
135
+ v1[name],
136
+ v2[name],
137
+ op
138
+ );
139
+ }
140
+ }
141
+ return result;
142
+ }
143
+ if (!isNaN(Number(v1))) {
144
+ return op(v1, v2);
145
+ }
146
+ return void 0;
147
+ },
148
+ paralle: null,
149
+ parallelize(op) {
150
+ return (v1, v2) => utils.parallel(v1, v2, op);
151
+ },
152
+ isString,
153
+ isFunction,
154
+ isArray,
155
+ isNumber,
156
+ isRegExp,
157
+ isObject,
158
+ isBoolean
159
+ };
160
+ utils.paralle = utils.parallel;
161
+ var utils_default = utils;
162
+
163
+ // src/vendor/legacy-utils.ts
164
+ var legacyBaseUtils = {
165
+ addEvent: legacyEventListener.addEvent,
166
+ trigger: legacyEventListener.trigger,
167
+ each: utils_default.each,
168
+ extend: utils_default.extend,
169
+ clone: utils_default.clone,
170
+ copy: utils_default.copy,
171
+ isArray: isArray2,
172
+ isString: isString2,
173
+ proxy: bind,
174
+ contains(parent, target) {
175
+ if (parent.contains) {
176
+ return parent.contains(target);
177
+ }
178
+ if (parent.compareDocumentPosition) {
179
+ return !!(parent.compareDocumentPosition(target) & 16);
180
+ }
181
+ return false;
182
+ },
183
+ getRect(node) {
184
+ return node.getBoundingClientRect();
185
+ }
186
+ };
187
+
188
+ // src/vendor/legacy-component.ts
189
+ function createLegacyBaseComponent(kity) {
190
+ return kity.createClass("Component", {
191
+ constructor() {
192
+ }
193
+ });
194
+ }
195
+
196
+ // src/vendor/legacy-ele-type.ts
197
+ var legacyEleType = {
198
+ DRAPDOWN_BOX: 1,
199
+ AREA: 2,
200
+ DELIMITER: 3
201
+ };
202
+
203
+ // src/vendor/legacy-group-type.ts
204
+ var legacyGroupType = {
205
+ GROUP: "kf-editor-group",
206
+ VIRTUAL: "kf-editor-virtual-group"
207
+ };
208
+
209
+ // src/vendor/legacy-input-filter.ts
210
+ var replacementMap = {
211
+ "32": "\\,",
212
+ "s+219": "\\{",
213
+ "s+221": "\\}",
214
+ "220": "\\backslash",
215
+ "s+51": "\\#",
216
+ "s+52": "\\$",
217
+ "s+53": "\\%",
218
+ "s+54": "\\^",
219
+ "s+55": "\\&",
220
+ "s+189": "\\_",
221
+ "s+192": "\\~"
222
+ };
223
+ var legacyInputFilter = {
224
+ getReplaceString(key) {
225
+ return replacementMap[String(key)] || null;
226
+ }
227
+ };
228
+
229
+ // src/vendor/legacy-item-type.ts
230
+ var legacyItemType = {
231
+ BIG: 1,
232
+ SMALL: 2
233
+ };
234
+
235
+ // src/vendor/legacy-kf-ext-def.ts
236
+ var legacyKfExtDef = {
237
+ selectColor: "rgba(42, 106, 189, 0.2)",
238
+ allSelectColor: "rgba(42, 106, 189, 0.6)"
239
+ };
240
+
241
+ // src/vendor/legacy-sysconf.ts
242
+ var legacySysconf = {
243
+ cursorCharacter: "\uF155",
244
+ rootPlaceholder: {
245
+ color: "#666",
246
+ content: "Type formula here",
247
+ fontsize: 16
248
+ },
249
+ scrollbar: {
250
+ padding: 5,
251
+ step: 150
252
+ }
253
+ };
254
+
255
+ // src/vendor/legacy-ui-def.ts
256
+ var legacyUiDef = {
257
+ VIEW_STATE: {
258
+ NO_OVERFLOW: 0,
259
+ OVERFLOW: 1
260
+ },
261
+ scrollbar: {
262
+ step: 50,
263
+ thumbMinSize: 50
264
+ }
265
+ };
266
+
267
+ // src/dom-utils.ts
268
+ var topicPool = /* @__PURE__ */ new Map();
269
+ function getMouseButtonCode(event) {
270
+ if (typeof event.which === "number" && event.which > 0) {
271
+ return event.which;
272
+ }
273
+ switch (event.button) {
274
+ case 0:
275
+ return 1;
276
+ case 1:
277
+ return 2;
278
+ case 2:
279
+ return 3;
280
+ default:
281
+ return 0;
282
+ }
283
+ }
284
+ function getWheelDelta(event) {
285
+ if ("wheelDelta" in event && typeof event.wheelDelta === "number") {
286
+ return event.wheelDelta;
287
+ }
288
+ if ("deltaY" in event && typeof event.deltaY === "number") {
289
+ return -event.deltaY * 40;
290
+ }
291
+ return 0;
292
+ }
293
+ function normalizeMouseEvent(event) {
294
+ const wrappedEvent = Object.create(event);
295
+ Object.defineProperties(wrappedEvent, {
296
+ originalEvent: {
297
+ value: event,
298
+ enumerable: false,
299
+ configurable: true
300
+ },
301
+ wheelDelta: {
302
+ value: getWheelDelta(event),
303
+ enumerable: false,
304
+ configurable: true
305
+ },
306
+ which: {
307
+ value: getMouseButtonCode(event),
308
+ enumerable: false,
309
+ configurable: true
310
+ },
311
+ preventDefault: {
312
+ value: event.preventDefault.bind(event),
313
+ enumerable: false,
314
+ configurable: true
315
+ },
316
+ stopPropagation: {
317
+ value: event.stopPropagation.bind(event),
318
+ enumerable: false,
319
+ configurable: true
320
+ },
321
+ stopImmediatePropagation: {
322
+ value: event.stopImmediatePropagation.bind(event),
323
+ enumerable: false,
324
+ configurable: true
325
+ }
326
+ });
327
+ return wrappedEvent;
328
+ }
329
+ function createElement(doc, name, options) {
330
+ if (name === "text") {
331
+ return doc.createTextNode(typeof options === "string" ? options : "");
332
+ }
333
+ const node = doc.createElement(name);
334
+ if (options && typeof options !== "string") {
335
+ if (options.className) {
336
+ node.className = options.className;
337
+ }
338
+ if (options.content) {
339
+ node.innerHTML = options.content;
340
+ }
341
+ }
342
+ return node;
343
+ }
344
+ function addEvent(target, type, listener) {
345
+ if (!target) {
346
+ return;
347
+ }
348
+ target.addEventListener(type, (event) => {
349
+ listener(normalizeMouseEvent(event));
350
+ });
351
+ }
352
+ function delegateEvent(target, selector, type, listener) {
353
+ if (!target) {
354
+ return;
355
+ }
356
+ target.addEventListener(type, (event) => {
357
+ const normalizedEvent = normalizeMouseEvent(event);
358
+ let current = event.target instanceof Element ? event.target : null;
359
+ while (current && current !== target) {
360
+ if (current.matches(selector)) {
361
+ listener.call(current, normalizedEvent);
362
+ return;
363
+ }
364
+ current = current.parentElement;
365
+ }
366
+ });
367
+ }
368
+ function publish(topic, ...args) {
369
+ const callbackList = topicPool.get(topic);
370
+ if (!callbackList) {
371
+ return;
372
+ }
373
+ callbackList.forEach((callback) => callback(...args));
374
+ }
375
+ function subscribe(topic, callback) {
376
+ const callbackList = topicPool.get(topic) ?? [];
377
+ callbackList.push(callback);
378
+ topicPool.set(topic, callbackList);
379
+ }
380
+ function getRectBox(node) {
381
+ return node.getBoundingClientRect();
382
+ }
383
+ function getClassList(node) {
384
+ return node.classList;
385
+ }
386
+
387
+ // src/vendor/legacy-ui-utils.ts
388
+ function createLegacyUiUtils() {
389
+ return {
390
+ ele: createElement,
391
+ getRectBox,
392
+ on(target, type, fn) {
393
+ addEvent(target, type, fn);
394
+ return this;
395
+ },
396
+ delegate(target, selector, type, fn) {
397
+ delegateEvent(target, selector, type, fn);
398
+ return this;
399
+ },
400
+ publish(topic, ...args) {
401
+ publish(topic, ...args);
402
+ },
403
+ subscribe,
404
+ getClassList
405
+ };
406
+ }
407
+
408
+ // src/vendor/other-position.ts
409
+ var legacyOtherPosition = {
410
+ "x=\\frac {-b\\pm\\sqrt {b^2-4ac}}{2a}": {
411
+ "pos": {
412
+ "x": 0,
413
+ "y": 0
414
+ },
415
+ "size": {
416
+ "width": 310,
417
+ "height": 73
418
+ }
419
+ },
420
+ "{\\placeholder/\\placeholder}": {
421
+ "pos": {
422
+ "x": 315,
423
+ "y": 0
424
+ },
425
+ "size": {
426
+ "width": 56,
427
+ "height": 75
428
+ }
429
+ },
430
+ "\\frac \\placeholder\\placeholder": {
431
+ "pos": {
432
+ "x": 376,
433
+ "y": 0
434
+ },
435
+ "size": {
436
+ "width": 56,
437
+ "height": 75
438
+ }
439
+ },
440
+ "a^2+b^2=c^2": {
441
+ "pos": {
442
+ "x": 437,
443
+ "y": 0
444
+ },
445
+ "size": {
446
+ "width": 310,
447
+ "height": 73
448
+ }
449
+ },
450
+ "{\\left(x+a\\right)}^2=\\sum^n_{k=0}{\\left(^n_k\\right)x^ka^{n-k}}": {
451
+ "pos": {
452
+ "x": 752,
453
+ "y": 0
454
+ },
455
+ "size": {
456
+ "width": 310,
457
+ "height": 73
458
+ }
459
+ },
460
+ "\\frac {dy}{dx}": {
461
+ "pos": {
462
+ "x": 1067,
463
+ "y": 0
464
+ },
465
+ "size": {
466
+ "width": 56,
467
+ "height": 75
468
+ }
469
+ },
470
+ "\\frac {\\Delta y}{\\Delta x}": {
471
+ "pos": {
472
+ "x": 1128,
473
+ "y": 0
474
+ },
475
+ "size": {
476
+ "width": 56,
477
+ "height": 75
478
+ }
479
+ },
480
+ "\\frac {\\delta y}{\\delta x}": {
481
+ "pos": {
482
+ "x": 1189,
483
+ "y": 0
484
+ },
485
+ "size": {
486
+ "width": 56,
487
+ "height": 75
488
+ }
489
+ },
490
+ "\\frac \\pi 2": {
491
+ "pos": {
492
+ "x": 1250,
493
+ "y": 0
494
+ },
495
+ "size": {
496
+ "width": 56,
497
+ "height": 75
498
+ }
499
+ },
500
+ "\\placeholder^\\placeholder": {
501
+ "pos": {
502
+ "x": 1311,
503
+ "y": 0
504
+ },
505
+ "size": {
506
+ "width": 56,
507
+ "height": 75
508
+ }
509
+ },
510
+ "\\placeholder^\\placeholder_\\placeholder": {
511
+ "pos": {
512
+ "x": 1372,
513
+ "y": 0
514
+ },
515
+ "size": {
516
+ "width": 56,
517
+ "height": 75
518
+ }
519
+ },
520
+ "\\placeholder_\\placeholder": {
521
+ "pos": {
522
+ "x": 1433,
523
+ "y": 0
524
+ },
525
+ "size": {
526
+ "width": 56,
527
+ "height": 75
528
+ }
529
+ },
530
+ "{^\\placeholder_\\placeholder\\placeholder}": {
531
+ "pos": {
532
+ "x": 1494,
533
+ "y": 0
534
+ },
535
+ "size": {
536
+ "width": 56,
537
+ "height": 75
538
+ }
539
+ },
540
+ "e^{-i\\omega t}": {
541
+ "pos": {
542
+ "x": 1555,
543
+ "y": 0
544
+ },
545
+ "size": {
546
+ "width": 56,
547
+ "height": 75
548
+ }
549
+ },
550
+ "x^2": {
551
+ "pos": {
552
+ "x": 1616,
553
+ "y": 0
554
+ },
555
+ "size": {
556
+ "width": 56,
557
+ "height": 75
558
+ }
559
+ },
560
+ "{}^n_1Y": {
561
+ "pos": {
562
+ "x": 1677,
563
+ "y": 0
564
+ },
565
+ "size": {
566
+ "width": 56,
567
+ "height": 75
568
+ }
569
+ },
570
+ "\\sqrt \\placeholder": {
571
+ "pos": {
572
+ "x": 1738,
573
+ "y": 0
574
+ },
575
+ "size": {
576
+ "width": 56,
577
+ "height": 75
578
+ }
579
+ },
580
+ "\\sqrt [\\placeholder] \\placeholder": {
581
+ "pos": {
582
+ "x": 1799,
583
+ "y": 0
584
+ },
585
+ "size": {
586
+ "width": 56,
587
+ "height": 75
588
+ }
589
+ },
590
+ "\\sqrt [2] \\placeholder": {
591
+ "pos": {
592
+ "x": 1860,
593
+ "y": 0
594
+ },
595
+ "size": {
596
+ "width": 56,
597
+ "height": 75
598
+ }
599
+ },
600
+ "\\sqrt [3] \\placeholder": {
601
+ "pos": {
602
+ "x": 1921,
603
+ "y": 0
604
+ },
605
+ "size": {
606
+ "width": 56,
607
+ "height": 75
608
+ }
609
+ },
610
+ "\\frac {-b\\pm\\sqrt{b^2-4ac}}{2a}": {
611
+ "pos": {
612
+ "x": 1982,
613
+ "y": 0
614
+ },
615
+ "size": {
616
+ "width": 137,
617
+ "height": 75
618
+ }
619
+ },
620
+ "\\sqrt {a^2+b^2}": {
621
+ "pos": {
622
+ "x": 2124,
623
+ "y": 0
624
+ },
625
+ "size": {
626
+ "width": 137,
627
+ "height": 75
628
+ }
629
+ },
630
+ "\\int \\placeholder": {
631
+ "pos": {
632
+ "x": 2266,
633
+ "y": 0
634
+ },
635
+ "size": {
636
+ "width": 56,
637
+ "height": 75
638
+ }
639
+ },
640
+ "\\int^\\placeholder_\\placeholder\\placeholder": {
641
+ "pos": {
642
+ "x": 2327,
643
+ "y": 0
644
+ },
645
+ "size": {
646
+ "width": 56,
647
+ "height": 75
648
+ }
649
+ },
650
+ "\\iint\\placeholder": {
651
+ "pos": {
652
+ "x": 2388,
653
+ "y": 0
654
+ },
655
+ "size": {
656
+ "width": 56,
657
+ "height": 75
658
+ }
659
+ },
660
+ "\\iint^\\placeholder_\\placeholder\\placeholder": {
661
+ "pos": {
662
+ "x": 2449,
663
+ "y": 0
664
+ },
665
+ "size": {
666
+ "width": 56,
667
+ "height": 75
668
+ }
669
+ },
670
+ "\\iiint\\placeholder": {
671
+ "pos": {
672
+ "x": 2510,
673
+ "y": 0
674
+ },
675
+ "size": {
676
+ "width": 56,
677
+ "height": 75
678
+ }
679
+ },
680
+ "\\iiint^\\placeholder_\\placeholder\\placeholder": {
681
+ "pos": {
682
+ "x": 2571,
683
+ "y": 0
684
+ },
685
+ "size": {
686
+ "width": 56,
687
+ "height": 75
688
+ }
689
+ },
690
+ "\\sum\\placeholder": {
691
+ "pos": {
692
+ "x": 2632,
693
+ "y": 0
694
+ },
695
+ "size": {
696
+ "width": 56,
697
+ "height": 75
698
+ }
699
+ },
700
+ "\\sum^\\placeholder_\\placeholder\\placeholder": {
701
+ "pos": {
702
+ "x": 2693,
703
+ "y": 0
704
+ },
705
+ "size": {
706
+ "width": 56,
707
+ "height": 75
708
+ }
709
+ },
710
+ "\\sum_\\placeholder\\placeholder": {
711
+ "pos": {
712
+ "x": 2754,
713
+ "y": 0
714
+ },
715
+ "size": {
716
+ "width": 56,
717
+ "height": 75
718
+ }
719
+ },
720
+ "\\left(\\placeholder\\right)": {
721
+ "pos": {
722
+ "x": 2815,
723
+ "y": 0
724
+ },
725
+ "size": {
726
+ "width": 56,
727
+ "height": 75
728
+ }
729
+ },
730
+ "\\left[\\placeholder\\right]": {
731
+ "pos": {
732
+ "x": 2876,
733
+ "y": 0
734
+ },
735
+ "size": {
736
+ "width": 56,
737
+ "height": 75
738
+ }
739
+ },
740
+ "\\left\\{\\placeholder\\right\\}": {
741
+ "pos": {
742
+ "x": 2937,
743
+ "y": 0
744
+ },
745
+ "size": {
746
+ "width": 56,
747
+ "height": 75
748
+ }
749
+ },
750
+ "\\left|\\placeholder\\right|": {
751
+ "pos": {
752
+ "x": 2998,
753
+ "y": 0
754
+ },
755
+ "size": {
756
+ "width": 56,
757
+ "height": 75
758
+ }
759
+ },
760
+ "\\sin\\placeholder": {
761
+ "pos": {
762
+ "x": 3059,
763
+ "y": 0
764
+ },
765
+ "size": {
766
+ "width": 56,
767
+ "height": 75
768
+ }
769
+ },
770
+ "\\cos\\placeholder": {
771
+ "pos": {
772
+ "x": 3120,
773
+ "y": 0
774
+ },
775
+ "size": {
776
+ "width": 56,
777
+ "height": 75
778
+ }
779
+ },
780
+ "\\tan\\placeholder": {
781
+ "pos": {
782
+ "x": 3181,
783
+ "y": 0
784
+ },
785
+ "size": {
786
+ "width": 56,
787
+ "height": 75
788
+ }
789
+ },
790
+ "\\csc\\placeholder": {
791
+ "pos": {
792
+ "x": 3242,
793
+ "y": 0
794
+ },
795
+ "size": {
796
+ "width": 56,
797
+ "height": 75
798
+ }
799
+ },
800
+ "\\sec\\placeholder": {
801
+ "pos": {
802
+ "x": 3303,
803
+ "y": 0
804
+ },
805
+ "size": {
806
+ "width": 56,
807
+ "height": 75
808
+ }
809
+ },
810
+ "\\cot\\placeholder": {
811
+ "pos": {
812
+ "x": 3364,
813
+ "y": 0
814
+ },
815
+ "size": {
816
+ "width": 56,
817
+ "height": 75
818
+ }
819
+ },
820
+ "\\sin\\theta": {
821
+ "pos": {
822
+ "x": 3425,
823
+ "y": 0
824
+ },
825
+ "size": {
826
+ "width": 56,
827
+ "height": 75
828
+ }
829
+ },
830
+ "\\cos{2x}": {
831
+ "pos": {
832
+ "x": 3486,
833
+ "y": 0
834
+ },
835
+ "size": {
836
+ "width": 56,
837
+ "height": 75
838
+ }
839
+ },
840
+ "\\tan\\theta=\\frac {\\sin\\theta}{\\cos\\theta}": {
841
+ "pos": {
842
+ "x": 3547,
843
+ "y": 0
844
+ },
845
+ "size": {
846
+ "width": 137,
847
+ "height": 75
848
+ }
849
+ }
850
+ };
851
+
852
+ // src/toolbar-assets.ts
853
+ var toolbarAssetFileMap = {};
854
+ function setToolbarAssetUrls(assets) {
855
+ toolbarAssetFileMap = {
856
+ "btn.png": assets.btn,
857
+ "other.png": assets.other
858
+ };
859
+ }
860
+ function resolveToolbarAssetPath(fileName, preferSvg = false) {
861
+ const normalizedFileName = preferSvg && fileName.toLowerCase().endsWith(".png") ? `${fileName.slice(0, -4)}.svg` : fileName;
862
+ const mapped = toolbarAssetFileMap[normalizedFileName];
863
+ if (mapped) {
864
+ return mapped;
865
+ }
866
+ throw new Error(`Missing Kity toolbar asset URL for "${normalizedFileName}".`);
867
+ }
868
+
869
+ export {
870
+ legacyBoxType,
871
+ legacyOtherPosition,
872
+ utils_default,
873
+ legacyKfEvent,
874
+ legacyEventListener,
875
+ legacyBaseUtils,
876
+ createLegacyBaseComponent,
877
+ legacyEleType,
878
+ legacyGroupType,
879
+ legacyInputFilter,
880
+ legacyItemType,
881
+ legacyKfExtDef,
882
+ legacySysconf,
883
+ legacyUiDef,
884
+ normalizeMouseEvent,
885
+ createElement,
886
+ addEvent,
887
+ delegateEvent,
888
+ publish,
889
+ subscribe,
890
+ getRectBox,
891
+ getClassList,
892
+ createLegacyUiUtils,
893
+ setToolbarAssetUrls,
894
+ resolveToolbarAssetPath
895
+ };
896
+ //# sourceMappingURL=chunk-EKIJQ64F.js.map