@formulaxjs/kity-runtime 0.1.0 → 0.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/README.md +2 -2
- package/dist/index.cjs +68 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +13 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +48 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
- package/public/assets/images/scrollbar/custom/bar-bg.png +0 -0
- package/public/assets/images/scrollbar/custom/bar.png +0 -0
- package/public/assets/images/scrollbar/custom/bg.png +0 -0
- package/public/assets/images/scrollbar/custom/bottom.png +0 -0
- package/public/assets/images/scrollbar/custom/btn.png +0 -0
- package/public/assets/images/scrollbar/custom/down.png +0 -0
- package/public/assets/images/scrollbar/custom/top.png +0 -0
- package/public/assets/images/scrollbar/custom/up.png +0 -0
- package/public/assets/images/scrollbar/edit/bar-bg.png +0 -0
- package/public/assets/images/scrollbar/edit/bar-left.png +0 -0
- package/public/assets/images/scrollbar/edit/bar-right.png +0 -0
- package/public/assets/images/scrollbar/edit/thumb-bg.png +0 -0
- package/public/assets/images/scrollbar/edit/thumb-left.png +0 -0
- package/public/assets/images/scrollbar/edit/thumb-right.png +0 -0
- package/public/assets/images/toolbar/btn.png +0 -0
- package/public/assets/images/toolbar/other.png +0 -0
- package/public/assets/styles/base.css +47 -0
- package/public/assets/styles/editor.css +3 -0
- package/public/assets/styles/page.css +12 -0
- package/public/assets/styles/scrollbar.css +78 -0
- package/public/assets/styles/ui.css +593 -0
- package/public/assets/theme/default/fui.css +540 -0
- package/public/assets/theme/default/images/close.png +0 -0
- package/public/assets/theme/default/images/down.png +0 -0
- package/public/assets/theme/default/images/open.png +0 -0
- package/public/assets/theme/default/images/up.png +0 -0
- package/public/resource/KF_AMS_BB.woff +0 -0
- package/public/resource/KF_AMS_CAL.woff +0 -0
- package/public/resource/KF_AMS_FRAK.woff +0 -0
- package/public/resource/KF_AMS_MAIN.woff +0 -0
- package/public/resource/KF_AMS_ROMAN.woff +0 -0
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Legacy KityFormula runtime adapter for FormulaX.
|
|
4
4
|
|
|
5
|
-
`@formulaxjs/kity-runtime` packages the compatibility runtime that powers FormulaX's Kity-based editing and rendering flows. It
|
|
5
|
+
`@formulaxjs/kity-runtime` packages the compatibility runtime that powers FormulaX's Kity-based editing and rendering flows. It now includes the legacy fonts, toolbar images, and stylesheet assets needed by the runtime, and provides helpers for mounting the editor in browser applications.
|
|
6
6
|
|
|
7
7
|
> Status: experimental. Public APIs may change before the first stable release.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pnpm add @formulaxjs/kity-runtime
|
|
12
|
+
pnpm add @formulaxjs/kity-runtime
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Highlights
|
package/dist/index.cjs
CHANGED
|
@@ -10878,7 +10878,7 @@ function getService(serviceName) {
|
|
|
10878
10878
|
}
|
|
10879
10879
|
return serviceObject;
|
|
10880
10880
|
}
|
|
10881
|
-
var defaultOptions, components, kity2, kf, KFEditor,
|
|
10881
|
+
var defaultOptions, components, kity2, kf, KFEditor, editor_default2;
|
|
10882
10882
|
var init_editor = __esm({
|
|
10883
10883
|
"src/legacy/editor.ts"() {
|
|
10884
10884
|
"use strict";
|
|
@@ -10990,7 +10990,7 @@ var init_editor = __esm({
|
|
|
10990
10990
|
components[name] = component;
|
|
10991
10991
|
}
|
|
10992
10992
|
});
|
|
10993
|
-
|
|
10993
|
+
editor_default2 = KFEditor;
|
|
10994
10994
|
}
|
|
10995
10995
|
});
|
|
10996
10996
|
|
|
@@ -11005,7 +11005,7 @@ var init_factory = __esm({
|
|
|
11005
11005
|
callbacks = [];
|
|
11006
11006
|
editor;
|
|
11007
11007
|
constructor(container, options) {
|
|
11008
|
-
this.editor = new
|
|
11008
|
+
this.editor = new editor_default2(container, options);
|
|
11009
11009
|
this.editor.ready(() => {
|
|
11010
11010
|
this.trigger();
|
|
11011
11011
|
});
|
|
@@ -15930,26 +15930,26 @@ var init_printer = __esm({
|
|
|
15930
15930
|
var start_exports = {};
|
|
15931
15931
|
__export(start_exports, {
|
|
15932
15932
|
Factory: () => factory_default,
|
|
15933
|
-
KFEditor: () =>
|
|
15933
|
+
KFEditor: () => editor_default2,
|
|
15934
15934
|
default: () => start_default,
|
|
15935
15935
|
installKityEditorStart: () => installKityEditorStart
|
|
15936
15936
|
});
|
|
15937
15937
|
function installKityEditorStart(target = window) {
|
|
15938
15938
|
const runtimeTarget = target;
|
|
15939
15939
|
if (!installed3) {
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15940
|
+
editor_default2.registerComponents("ui", ui_default);
|
|
15941
|
+
editor_default2.registerComponents("parser", parser_default);
|
|
15942
|
+
editor_default2.registerComponents("render", render_default);
|
|
15943
|
+
editor_default2.registerComponents("position", position_default);
|
|
15944
|
+
editor_default2.registerComponents("syntax", syntax_default);
|
|
15945
|
+
editor_default2.registerComponents("control", controller_default);
|
|
15946
|
+
editor_default2.registerComponents("print", printer_default);
|
|
15947
15947
|
installed3 = true;
|
|
15948
15948
|
}
|
|
15949
15949
|
runtimeTarget.kf = runtimeTarget.kf ?? {};
|
|
15950
15950
|
runtimeTarget.kf.EditorFactory = factory_default;
|
|
15951
15951
|
return {
|
|
15952
|
-
KFEditor:
|
|
15952
|
+
KFEditor: editor_default2,
|
|
15953
15953
|
Factory: factory_default
|
|
15954
15954
|
};
|
|
15955
15955
|
}
|
|
@@ -15985,6 +15985,10 @@ __export(index_exports, {
|
|
|
15985
15985
|
getClassList: () => getClassList,
|
|
15986
15986
|
getRectBox: () => getRectBox,
|
|
15987
15987
|
installLegacyKityData: () => installLegacyKityData,
|
|
15988
|
+
kityAssetManifest: () => kityAssetManifest,
|
|
15989
|
+
kityFontAssets: () => kityFontAssets,
|
|
15990
|
+
kityStyleAssets: () => kityStyleAssets,
|
|
15991
|
+
kityToolbarAssets: () => kityToolbarAssets,
|
|
15988
15992
|
legacyBaseUtils: () => legacyBaseUtils,
|
|
15989
15993
|
legacyBoxType: () => legacyBoxType,
|
|
15990
15994
|
legacyCommonUtils: () => legacyCommonUtils,
|
|
@@ -16004,8 +16008,52 @@ __export(index_exports, {
|
|
|
16004
16008
|
});
|
|
16005
16009
|
module.exports = __toCommonJS(index_exports);
|
|
16006
16010
|
|
|
16011
|
+
// public/assets/images/toolbar/btn.png
|
|
16012
|
+
var btn_default = "./btn-5DANP6JY.png";
|
|
16013
|
+
|
|
16014
|
+
// public/assets/images/toolbar/other.png
|
|
16015
|
+
var other_default = "./other-OMWJFGL5.png";
|
|
16016
|
+
|
|
16017
|
+
// public/assets/styles/editor.css?url
|
|
16018
|
+
var editor_default = "./editor-JT5KLVXX.css?url";
|
|
16019
|
+
|
|
16020
|
+
// public/resource/KF_AMS_BB.woff
|
|
16021
|
+
var KF_AMS_BB_default = "./KF_AMS_BB-5QF7FUSO.woff";
|
|
16022
|
+
|
|
16023
|
+
// public/resource/KF_AMS_CAL.woff
|
|
16024
|
+
var KF_AMS_CAL_default = "./KF_AMS_CAL-NXRNLAZN.woff";
|
|
16025
|
+
|
|
16026
|
+
// public/resource/KF_AMS_FRAK.woff
|
|
16027
|
+
var KF_AMS_FRAK_default = "./KF_AMS_FRAK-CO33WWN4.woff";
|
|
16028
|
+
|
|
16029
|
+
// public/resource/KF_AMS_MAIN.woff
|
|
16030
|
+
var KF_AMS_MAIN_default = "./KF_AMS_MAIN-25QJVAWY.woff";
|
|
16031
|
+
|
|
16032
|
+
// public/resource/KF_AMS_ROMAN.woff
|
|
16033
|
+
var KF_AMS_ROMAN_default = "./KF_AMS_ROMAN-243BR7HH.woff";
|
|
16034
|
+
|
|
16035
|
+
// src/asset-manifest.ts
|
|
16036
|
+
var kityFontAssets = {
|
|
16037
|
+
KF_AMS_BB: KF_AMS_BB_default,
|
|
16038
|
+
KF_AMS_CAL: KF_AMS_CAL_default,
|
|
16039
|
+
KF_AMS_FRAK: KF_AMS_FRAK_default,
|
|
16040
|
+
KF_AMS_MAIN: KF_AMS_MAIN_default,
|
|
16041
|
+
KF_AMS_ROMAN: KF_AMS_ROMAN_default
|
|
16042
|
+
};
|
|
16043
|
+
var kityToolbarAssets = {
|
|
16044
|
+
btn: btn_default,
|
|
16045
|
+
other: other_default
|
|
16046
|
+
};
|
|
16047
|
+
var kityStyleAssets = {
|
|
16048
|
+
editor: editor_default
|
|
16049
|
+
};
|
|
16050
|
+
var kityAssetManifest = {
|
|
16051
|
+
fonts: kityFontAssets,
|
|
16052
|
+
toolbar: kityToolbarAssets,
|
|
16053
|
+
styles: kityStyleAssets
|
|
16054
|
+
};
|
|
16055
|
+
|
|
16007
16056
|
// src/create-editor.ts
|
|
16008
|
-
var import_kity_assets = require("@formulaxjs/kity-assets");
|
|
16009
16057
|
init_legacy_box_type();
|
|
16010
16058
|
|
|
16011
16059
|
// src/vendor/char-position.ts
|
|
@@ -19433,15 +19481,15 @@ function normalizeCssSize(value, fallback) {
|
|
|
19433
19481
|
function resolveEditorAssets(assets) {
|
|
19434
19482
|
return {
|
|
19435
19483
|
fonts: {
|
|
19436
|
-
...
|
|
19484
|
+
...kityAssetManifest.fonts,
|
|
19437
19485
|
...assets?.fonts
|
|
19438
19486
|
},
|
|
19439
19487
|
toolbar: {
|
|
19440
|
-
...
|
|
19488
|
+
...kityAssetManifest.toolbar,
|
|
19441
19489
|
...assets?.toolbar
|
|
19442
19490
|
},
|
|
19443
19491
|
styles: {
|
|
19444
|
-
...
|
|
19492
|
+
...kityAssetManifest.styles,
|
|
19445
19493
|
...assets?.styles
|
|
19446
19494
|
}
|
|
19447
19495
|
};
|
|
@@ -19656,6 +19704,10 @@ init_legacy_utils();
|
|
|
19656
19704
|
getClassList,
|
|
19657
19705
|
getRectBox,
|
|
19658
19706
|
installLegacyKityData,
|
|
19707
|
+
kityAssetManifest,
|
|
19708
|
+
kityFontAssets,
|
|
19709
|
+
kityStyleAssets,
|
|
19710
|
+
kityToolbarAssets,
|
|
19659
19711
|
legacyBaseUtils,
|
|
19660
19712
|
legacyBoxType,
|
|
19661
19713
|
legacyCommonUtils,
|