@formulaxjs/kity-runtime 0.3.0 → 0.5.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/README.md +33 -30
- package/README.zh-CN.md +44 -0
- package/dist/base.css +47 -0
- package/dist/{chunk-AOMNUFFB.js → chunk-EQCAHDH7.js} +98 -34
- package/dist/chunk-EQCAHDH7.js.map +1 -0
- package/dist/images/scrollbar/custom/bar-bg.png +0 -0
- package/dist/images/scrollbar/custom/bar.png +0 -0
- package/dist/images/scrollbar/custom/bg.png +0 -0
- package/dist/images/scrollbar/custom/bottom.png +0 -0
- package/dist/images/scrollbar/custom/btn.png +0 -0
- package/dist/images/scrollbar/custom/down.png +0 -0
- package/dist/images/scrollbar/custom/top.png +0 -0
- package/dist/images/scrollbar/custom/up.png +0 -0
- package/dist/images/scrollbar/edit/bar-bg.png +0 -0
- package/dist/images/scrollbar/edit/bar-left.png +0 -0
- package/dist/images/scrollbar/edit/bar-right.png +0 -0
- package/dist/images/scrollbar/edit/thumb-bg.png +0 -0
- package/dist/images/scrollbar/edit/thumb-left.png +0 -0
- package/dist/images/scrollbar/edit/thumb-right.png +0 -0
- package/dist/images/toolbar/btn.png +0 -0
- package/dist/index.cjs +270 -186
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +270 -185
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/{install-TIZBWEFU.js → install-WDCVVIMM.js} +34 -61
- package/dist/install-WDCVVIMM.js.map +1 -0
- package/dist/other.png +0 -0
- package/dist/scrollbar.css +78 -0
- package/dist/{start-LTYA5XON.js → start-N66J24A5.js} +88 -21
- package/dist/start-N66J24A5.js.map +1 -0
- package/dist/ui.css +625 -0
- package/package.json +7 -2
- package/public/assets/styles/ui.css +58 -26
- package/dist/chunk-AOMNUFFB.js.map +0 -1
- package/dist/install-TIZBWEFU.js.map +0 -1
- package/dist/start-LTYA5XON.js.map +0 -1
- /package/dist/{KF_AMS_BB-5QF7FUSO.woff → KF_AMS_BB.woff} +0 -0
- /package/dist/{KF_AMS_CAL-NXRNLAZN.woff → KF_AMS_CAL.woff} +0 -0
- /package/dist/{KF_AMS_FRAK-CO33WWN4.woff → KF_AMS_FRAK.woff} +0 -0
- /package/dist/{KF_AMS_MAIN-25QJVAWY.woff → KF_AMS_MAIN.woff} +0 -0
- /package/dist/{KF_AMS_ROMAN-243BR7HH.woff → KF_AMS_ROMAN.woff} +0 -0
- /package/dist/{btn-5DANP6JY.png → btn.png} +0 -0
- /package/dist/{editor-JT5KLVXX.css → editor.css} +0 -0
- /package/dist/{other-OMWJFGL5.png → images/toolbar/other.png} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_FORMULAX_LOCALE,
|
|
3
|
+
FORMULAX_LOCALES,
|
|
2
4
|
addEvent,
|
|
3
5
|
createElement,
|
|
4
6
|
createLegacyBaseComponent,
|
|
5
7
|
createLegacyUiUtils,
|
|
6
8
|
delegateEvent,
|
|
7
9
|
getClassList,
|
|
10
|
+
getFormulaXRuntimeMessage,
|
|
8
11
|
getRectBox,
|
|
9
12
|
kityAssetManifest,
|
|
10
13
|
kityFontAssets,
|
|
@@ -23,12 +26,14 @@ import {
|
|
|
23
26
|
legacySysconf,
|
|
24
27
|
legacyUiDef,
|
|
25
28
|
legacyUiUtils,
|
|
29
|
+
normalizeFormulaXLocale,
|
|
26
30
|
normalizeMouseEvent,
|
|
27
31
|
publish,
|
|
28
32
|
setToolbarAssetUrls,
|
|
29
33
|
subscribe,
|
|
34
|
+
translateFormulaXText,
|
|
30
35
|
utils_default
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-EQCAHDH7.js";
|
|
32
37
|
|
|
33
38
|
// src/vendor/char-position.ts
|
|
34
39
|
var legacyCharPosition = {
|
|
@@ -3589,7 +3594,7 @@ async function ensureKityRuntime() {
|
|
|
3589
3594
|
installKityRuntime(runtimeWindow);
|
|
3590
3595
|
try {
|
|
3591
3596
|
const formulaImportStart = markFormulaXPerf("fx:kity-runtime:formula-import");
|
|
3592
|
-
const { installLegacyKityFormulaRuntime } = await import("./install-
|
|
3597
|
+
const { installLegacyKityFormulaRuntime } = await import("./install-WDCVVIMM.js");
|
|
3593
3598
|
const formulaImportEnd = markFormulaXPerf("fx:kity-runtime:formula-import:end");
|
|
3594
3599
|
measureFormulaXPerf("fx:kity-runtime:formula-import", formulaImportStart, formulaImportEnd);
|
|
3595
3600
|
clearFormulaXPerfMarks(formulaImportStart, formulaImportEnd);
|
|
@@ -3611,7 +3616,7 @@ async function ensureKityRuntime() {
|
|
|
3611
3616
|
clearFormulaXPerfMarks(parserInstallStart, parserInstallEnd);
|
|
3612
3617
|
installLegacyRuntime(runtimeWindow);
|
|
3613
3618
|
const bootImportStart = markFormulaXPerf("fx:kity-runtime:boot-import");
|
|
3614
|
-
const { installKityEditorStart } = await import("./start-
|
|
3619
|
+
const { installKityEditorStart } = await import("./start-N66J24A5.js");
|
|
3615
3620
|
const bootImportEnd = markFormulaXPerf("fx:kity-runtime:boot-import:end");
|
|
3616
3621
|
measureFormulaXPerf("fx:kity-runtime:boot-import", bootImportStart, bootImportEnd);
|
|
3617
3622
|
clearFormulaXPerfMarks(bootImportStart, bootImportEnd);
|
|
@@ -3632,8 +3637,10 @@ async function createKityEditor(container, options = {}) {
|
|
|
3632
3637
|
const createEditorStart = markFormulaXPerf("fx:create-kity-editor:total");
|
|
3633
3638
|
const fontsize = options.render?.fontsize ?? 40;
|
|
3634
3639
|
const editorHeight = normalizeCssSize(options.height, DEFAULT_EDITOR_HEIGHT);
|
|
3640
|
+
const locale = normalizeFormulaXLocale(options.locale ?? DEFAULT_FORMULAX_LOCALE);
|
|
3635
3641
|
const assets = resolveEditorAssets(options.assets);
|
|
3636
3642
|
try {
|
|
3643
|
+
legacySysconf.rootPlaceholder.content = getFormulaXRuntimeMessage("editor.placeholder.root", locale);
|
|
3637
3644
|
const stylesheetInserted = ensureKityStylesheet(document, assets.styles.editor);
|
|
3638
3645
|
if (stylesheetInserted) {
|
|
3639
3646
|
const stylesheetInsertedMark = markFormulaXPerf("fx:kity-css:link-inserted");
|
|
@@ -3660,6 +3667,9 @@ async function createKityEditor(container, options = {}) {
|
|
|
3660
3667
|
render: {
|
|
3661
3668
|
fontsize
|
|
3662
3669
|
},
|
|
3670
|
+
ui: {
|
|
3671
|
+
locale
|
|
3672
|
+
},
|
|
3663
3673
|
resource: {
|
|
3664
3674
|
path: "",
|
|
3665
3675
|
fonts: assets.fonts
|
|
@@ -3748,6 +3758,8 @@ function installLegacyKityData(target = window) {
|
|
|
3748
3758
|
};
|
|
3749
3759
|
}
|
|
3750
3760
|
export {
|
|
3761
|
+
DEFAULT_FORMULAX_LOCALE,
|
|
3762
|
+
FORMULAX_LOCALES,
|
|
3751
3763
|
FormulaXEditor,
|
|
3752
3764
|
addEvent,
|
|
3753
3765
|
createElement,
|
|
@@ -3757,6 +3769,7 @@ export {
|
|
|
3757
3769
|
delegateEvent,
|
|
3758
3770
|
ensureKityRuntime,
|
|
3759
3771
|
getClassList,
|
|
3772
|
+
getFormulaXRuntimeMessage,
|
|
3760
3773
|
getRectBox,
|
|
3761
3774
|
installLegacyKityData,
|
|
3762
3775
|
kityAssetManifest,
|
|
@@ -3777,8 +3790,10 @@ export {
|
|
|
3777
3790
|
legacyUiDef,
|
|
3778
3791
|
legacyUiUtils,
|
|
3779
3792
|
mountKityEditor,
|
|
3793
|
+
normalizeFormulaXLocale,
|
|
3780
3794
|
normalizeMouseEvent,
|
|
3781
3795
|
publish,
|
|
3782
|
-
subscribe
|
|
3796
|
+
subscribe,
|
|
3797
|
+
translateFormulaXText
|
|
3783
3798
|
};
|
|
3784
3799
|
//# sourceMappingURL=index.js.map
|