@formulaxjs/kity-runtime 0.3.0 → 0.4.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 +41 -41
- package/dist/{chunk-AOMNUFFB.js → chunk-LIDQRZXL.js} +15 -2
- package/dist/chunk-LIDQRZXL.js.map +1 -0
- package/dist/index.cjs +192 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +189 -84
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +13 -3
- 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/{start-LTYA5XON.js → start-H6H24L6P.js} +123 -17
- package/dist/start-H6H24L6P.js.map +1 -0
- package/package.json +1 -1
- 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/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_FORMULAX_LOCALE,
|
|
3
|
+
FORMULAX_LOCALES,
|
|
2
4
|
addEvent,
|
|
3
5
|
createElement,
|
|
4
6
|
createLegacyBaseComponent,
|
|
@@ -23,12 +25,13 @@ import {
|
|
|
23
25
|
legacySysconf,
|
|
24
26
|
legacyUiDef,
|
|
25
27
|
legacyUiUtils,
|
|
28
|
+
normalizeFormulaXLocale,
|
|
26
29
|
normalizeMouseEvent,
|
|
27
30
|
publish,
|
|
28
31
|
setToolbarAssetUrls,
|
|
29
32
|
subscribe,
|
|
30
33
|
utils_default
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LIDQRZXL.js";
|
|
32
35
|
|
|
33
36
|
// src/vendor/char-position.ts
|
|
34
37
|
var legacyCharPosition = {
|
|
@@ -3589,7 +3592,7 @@ async function ensureKityRuntime() {
|
|
|
3589
3592
|
installKityRuntime(runtimeWindow);
|
|
3590
3593
|
try {
|
|
3591
3594
|
const formulaImportStart = markFormulaXPerf("fx:kity-runtime:formula-import");
|
|
3592
|
-
const { installLegacyKityFormulaRuntime } = await import("./install-
|
|
3595
|
+
const { installLegacyKityFormulaRuntime } = await import("./install-WDCVVIMM.js");
|
|
3593
3596
|
const formulaImportEnd = markFormulaXPerf("fx:kity-runtime:formula-import:end");
|
|
3594
3597
|
measureFormulaXPerf("fx:kity-runtime:formula-import", formulaImportStart, formulaImportEnd);
|
|
3595
3598
|
clearFormulaXPerfMarks(formulaImportStart, formulaImportEnd);
|
|
@@ -3611,7 +3614,7 @@ async function ensureKityRuntime() {
|
|
|
3611
3614
|
clearFormulaXPerfMarks(parserInstallStart, parserInstallEnd);
|
|
3612
3615
|
installLegacyRuntime(runtimeWindow);
|
|
3613
3616
|
const bootImportStart = markFormulaXPerf("fx:kity-runtime:boot-import");
|
|
3614
|
-
const { installKityEditorStart } = await import("./start-
|
|
3617
|
+
const { installKityEditorStart } = await import("./start-H6H24L6P.js");
|
|
3615
3618
|
const bootImportEnd = markFormulaXPerf("fx:kity-runtime:boot-import:end");
|
|
3616
3619
|
measureFormulaXPerf("fx:kity-runtime:boot-import", bootImportStart, bootImportEnd);
|
|
3617
3620
|
clearFormulaXPerfMarks(bootImportStart, bootImportEnd);
|
|
@@ -3632,6 +3635,7 @@ async function createKityEditor(container, options = {}) {
|
|
|
3632
3635
|
const createEditorStart = markFormulaXPerf("fx:create-kity-editor:total");
|
|
3633
3636
|
const fontsize = options.render?.fontsize ?? 40;
|
|
3634
3637
|
const editorHeight = normalizeCssSize(options.height, DEFAULT_EDITOR_HEIGHT);
|
|
3638
|
+
const locale = normalizeFormulaXLocale(options.locale ?? DEFAULT_FORMULAX_LOCALE);
|
|
3635
3639
|
const assets = resolveEditorAssets(options.assets);
|
|
3636
3640
|
try {
|
|
3637
3641
|
const stylesheetInserted = ensureKityStylesheet(document, assets.styles.editor);
|
|
@@ -3660,6 +3664,9 @@ async function createKityEditor(container, options = {}) {
|
|
|
3660
3664
|
render: {
|
|
3661
3665
|
fontsize
|
|
3662
3666
|
},
|
|
3667
|
+
ui: {
|
|
3668
|
+
locale
|
|
3669
|
+
},
|
|
3663
3670
|
resource: {
|
|
3664
3671
|
path: "",
|
|
3665
3672
|
fonts: assets.fonts
|
|
@@ -3748,6 +3755,8 @@ function installLegacyKityData(target = window) {
|
|
|
3748
3755
|
};
|
|
3749
3756
|
}
|
|
3750
3757
|
export {
|
|
3758
|
+
DEFAULT_FORMULAX_LOCALE,
|
|
3759
|
+
FORMULAX_LOCALES,
|
|
3751
3760
|
FormulaXEditor,
|
|
3752
3761
|
addEvent,
|
|
3753
3762
|
createElement,
|
|
@@ -3777,6 +3786,7 @@ export {
|
|
|
3777
3786
|
legacyUiDef,
|
|
3778
3787
|
legacyUiUtils,
|
|
3779
3788
|
mountKityEditor,
|
|
3789
|
+
normalizeFormulaXLocale,
|
|
3780
3790
|
normalizeMouseEvent,
|
|
3781
3791
|
publish,
|
|
3782
3792
|
subscribe
|