@docx-editor.dev/react 2.4.1 → 2.6.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/dist/index.d.mts +690 -351
- package/dist/index.d.ts +690 -351
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +7 -7
- package/src/styles/editor.css +6 -0
- package/src/styles/zIndex.ts +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docx-editor.dev/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "React DOCX editor adapter for the @docx-editor.dev editor contract.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.mjs",
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./src/styles/editor.css"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"dist",
|
|
18
|
+
"src/styles",
|
|
17
19
|
"!dist/metafile-*.json",
|
|
18
20
|
"THIRD_PARTY_NOTICES.md"
|
|
19
21
|
],
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
"api:check": "node ../../scripts/api-extractor.mjs --package @docx-editor.dev/react"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"@docx-editor.dev/core": "^2.0
|
|
29
|
+
"@docx-editor.dev/core": "^2.6.0",
|
|
28
30
|
"react": "^18.0.0 || ^19.0.0",
|
|
29
31
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
30
32
|
},
|
|
@@ -63,11 +65,9 @@
|
|
|
63
65
|
"access": "public"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
66
|
-
"@docx-editor.dev/i18n": "^2.
|
|
68
|
+
"@docx-editor.dev/i18n": "^2.6.0",
|
|
67
69
|
"@radix-ui/react-select": "^2.3.3",
|
|
68
70
|
"class-variance-authority": "^0.7.1",
|
|
69
|
-
"clsx": "^2.1.1"
|
|
70
|
-
"emf-converter": "2.0.2",
|
|
71
|
-
"harfbuzzjs": "1.4.0"
|
|
71
|
+
"clsx": "^2.1.1"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* The editor stylesheet is the single source of truth in
|
|
2
|
+
@docx-editor.dev/core, including the one-surface page/overlay/input-host
|
|
3
|
+
layer used by the interactive paginated editor. This adapter imports it and
|
|
4
|
+
adds nothing — there are no React-only CSS rules (enforced by
|
|
5
|
+
`bun run check:adapter-css-thin`). */
|
|
6
|
+
@import '@docx-editor.dev/core/styles/editor.css';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z-index stacking order for editor chrome.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth so layered UI doesn't drift into ad-hoc numbers.
|
|
5
|
+
*
|
|
6
|
+
* Order, low to high:
|
|
7
|
+
* page content (default 0)
|
|
8
|
+
* HF inline editor — sits above page content, below chrome
|
|
9
|
+
* ruler — must stay readable when HF editor is active
|
|
10
|
+
* outline — floating toggle + panel beside the page
|
|
11
|
+
* dropdown / popover — opens from toolbar buttons or HF options
|
|
12
|
+
* toolbar — title bar + formatting bar
|
|
13
|
+
* context menu / modal — top-most, transient surfaces
|
|
14
|
+
*/
|
|
15
|
+
export const Z_INDEX = {
|
|
16
|
+
hfInlineEditor: 10,
|
|
17
|
+
/** Notes / transient chrome banners above the page, below dropdowns. */
|
|
18
|
+
chrome: 50,
|
|
19
|
+
ruler: 30,
|
|
20
|
+
outline: 40,
|
|
21
|
+
dropdown: 100,
|
|
22
|
+
/** Alias for tooltip / hover preview surfaces. */
|
|
23
|
+
popover: 100,
|
|
24
|
+
toolbar: 100,
|
|
25
|
+
contextMenu: 10000,
|
|
26
|
+
/** Alias for dialogs that sit with context menus. */
|
|
27
|
+
modal: 10000,
|
|
28
|
+
} as const;
|