oasis-editor 0.0.114 → 0.0.116

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.
Files changed (51) hide show
  1. package/dist/{OasisEditorApp-XloOiKSu.js → OasisEditorApp-DY_N4M54.js} +424 -366
  2. package/dist/adapters/react.d.ts +11 -0
  3. package/dist/adapters/ui.d.ts +2 -0
  4. package/dist/adapters/vue.d.ts +23 -0
  5. package/dist/assets/{importDocxWorker-D0F0jbcF.js → importDocxWorker-nIS-zjkj.js} +1 -1
  6. package/dist/core/decorationGeometry.d.ts +10 -0
  7. package/dist/core/gradientAxis.d.ts +11 -0
  8. package/dist/core/html/inlineImageParser.d.ts +7 -0
  9. package/dist/core/layoutConstants.d.ts +18 -0
  10. package/dist/core/textStyleMappings.d.ts +2 -0
  11. package/dist/export/pdf/draw/drawFragment.d.ts +4 -4
  12. package/dist/export/pdf/draw/fragment/pdfColor.d.ts +1 -0
  13. package/dist/export/pdf/draw/fragment/pdfEmphasisAndTabLeaders.d.ts +5 -0
  14. package/dist/export/pdf/draw/fragment/pdfGradient.d.ts +4 -0
  15. package/dist/export/pdf/draw/fragment/pdfRunBackground.d.ts +12 -0
  16. package/dist/export/pdf/draw/fragment/pdfTextChunks.d.ts +25 -0
  17. package/dist/export/pdf/draw/fragment/pdfTextDecoration.d.ts +4 -0
  18. package/dist/{index-CwpzM--5.js → index-DLKF27_V.js} +1211 -1121
  19. package/dist/layoutProjection/blocksPaginationTypes.d.ts +2 -0
  20. package/dist/layoutProjection/headerFooterLayoutContext.d.ts +2 -0
  21. package/dist/layoutProjection/paginationTrack.d.ts +2 -0
  22. package/dist/layoutProjection/paragraphPagination.d.ts +8 -3
  23. package/dist/layoutProjection/sectionPagination.d.ts +3 -0
  24. package/dist/layoutProjection/tableRowSlicing.d.ts +2 -1
  25. package/dist/oasis-editor.js +55 -55
  26. package/dist/oasis-editor.umd.cjs +4 -4
  27. package/dist/react.d.ts +7 -8
  28. package/dist/react.js +18 -22
  29. package/dist/ui/canvas/CanvasTableLayout.d.ts +12 -63
  30. package/dist/ui/canvas/canvasParagraphPainter.d.ts +4 -22
  31. package/dist/ui/canvas/paragraph/canvasEmphasis.d.ts +3 -0
  32. package/dist/ui/canvas/paragraph/canvasInlineImage.d.ts +26 -0
  33. package/dist/ui/canvas/paragraph/canvasRunBackground.d.ts +13 -0
  34. package/dist/ui/canvas/paragraph/canvasTabLeaders.d.ts +4 -0
  35. package/dist/ui/canvas/paragraph/canvasTextDecoration.d.ts +4 -0
  36. package/dist/ui/canvas/paragraph/canvasTextEffects.d.ts +43 -0
  37. package/dist/ui/canvas/table/assembleCellEntries.d.ts +15 -0
  38. package/dist/ui/canvas/table/prepareCells.d.ts +53 -0
  39. package/dist/ui/canvas/table/resolveRowHeights.d.ts +9 -0
  40. package/dist/ui/canvas/table/tableCellGeometry.d.ts +37 -0
  41. package/dist/ui/canvas/table/types.d.ts +63 -0
  42. package/dist/ui/components/FindReplace/FindReplaceDialog.d.ts +1 -2
  43. package/dist/ui/components/Menubar/Menubar.d.ts +1 -2
  44. package/dist/ui/components/PageBreak.d.ts +1 -1
  45. package/dist/ui.d.ts +2 -42
  46. package/dist/ui.js +19 -18
  47. package/dist/utils/performanceMetrics.d.ts +0 -6
  48. package/dist/utils/round.d.ts +7 -0
  49. package/dist/vue.d.ts +22 -8
  50. package/dist/vue.js +18 -24
  51. package/package.json +9 -6
package/dist/vue.js CHANGED
@@ -1,33 +1,27 @@
1
- import { defineComponent, onBeforeUnmount, onMounted, ref, h } from "vue";
2
- import { mount } from "oasis-editor";
3
-
4
- export const OasisEditor = defineComponent({
1
+ import { defineComponent as l, ref as i, onMounted as u, onBeforeUnmount as f, h as c } from "vue";
2
+ import { mount as m } from "oasis-editor";
3
+ const a = l({
5
4
  name: "OasisEditor",
6
5
  props: {
7
6
  config: {
8
7
  type: Object,
9
- default: () => ({}),
8
+ default: () => ({})
10
9
  },
11
10
  class: String,
12
11
  style: [String, Object],
13
- onClient: Function,
14
- },
15
- setup(props) {
16
- const root = ref(null);
17
- let instance = null;
18
-
19
- onMounted(() => {
20
- if (root.value) {
21
- instance = mount(root.value, props.config);
22
- props.onClient?.(instance);
23
- }
24
- });
25
-
26
- onBeforeUnmount(() => {
27
- instance?.unmount();
28
- instance = null;
29
- });
30
-
31
- return () => h("div", { ref: root, class: props.class, style: props.style });
12
+ onClient: Function
32
13
  },
14
+ setup(t) {
15
+ const e = i(null);
16
+ let n = null;
17
+ return u(() => {
18
+ var o;
19
+ e.value && (n = m(e.value, t.config), (o = t.onClient) == null || o.call(t, n));
20
+ }), f(() => {
21
+ n == null || n.unmount(), n = null;
22
+ }), () => c("div", { ref: e, class: t.class, style: t.style });
23
+ }
33
24
  });
25
+ export {
26
+ a as OasisEditor
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  }
31
31
  },
32
32
  "peerDependencies": {
33
- "react": ">=18",
33
+ "react": ">=17",
34
34
  "vue": ">=3"
35
35
  },
36
36
  "peerDependenciesMeta": {
@@ -47,7 +47,7 @@
47
47
  "scripts": {
48
48
  "brand:generate": "node ./scripts/generate-brand-assets.mjs",
49
49
  "dev": "vite",
50
- "build:lib": "vite build --mode lib && node ./scripts/build-adapters.mjs",
50
+ "build:lib": "vite build --mode lib && vite build --config vite.adapters.config.js",
51
51
  "build:app": "vite build",
52
52
  "build": "npm run build:lib && npm run build:app",
53
53
  "prepack": "npm run build:lib",
@@ -59,13 +59,15 @@
59
59
  "test": "vitest run",
60
60
  "test:word-parity": "vitest run --config vitest.word-parity.config.js",
61
61
  "check:imports": "node ./scripts/check-import-graph.mjs",
62
- "lint": "eslint src --ext .ts",
63
- "format": "prettier --write \"src/**/*.ts\""
62
+ "typecheck": "tsc --noEmit",
63
+ "lint": "eslint src --ext .ts,.tsx",
64
+ "format": "prettier --write \"src/**/*.{ts,tsx}\""
64
65
  },
65
66
  "devDependencies": {
66
67
  "@playwright/test": "^1.59.1",
67
68
  "@types/jszip": "^3.4.0",
68
69
  "@types/node": "^20.0.0",
70
+ "@types/react": "^19.2.17",
69
71
  "@types/web": "^0.0.115",
70
72
  "@typescript-eslint/eslint-plugin": "^7.0.0",
71
73
  "@typescript-eslint/parser": "^7.0.0",
@@ -82,7 +84,8 @@
82
84
  "vite": "^5.4.19",
83
85
  "vite-plugin-dts": "^3.7.3",
84
86
  "vite-plugin-solid": "^2.11.12",
85
- "vitest": "^1.3.1"
87
+ "vitest": "^1.3.1",
88
+ "vue": "^3.5.39"
86
89
  },
87
90
  "dependencies": {
88
91
  "@xmldom/xmldom": "^0.9.10",