@fileverse-dev/ddoc 6.0.0-drop-in.3 → 6.0.1-dist-slim.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.
Files changed (51) hide show
  1. package/README.md +18 -89
  2. package/dist/data-BCRDUrcS.mjs +59842 -0
  3. package/dist/ddoc-persistence-DLdSviUr.mjs +371 -0
  4. package/dist/headless-editor-utils.es.js +1 -1
  5. package/dist/index--ObnXdbg.mjs +14053 -0
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.es.js +10734 -21551
  8. package/dist/markdown-source-pane-BJbpMXo2.mjs +143 -0
  9. package/dist/package/components/editor-toolbar.d.ts +1 -2
  10. package/dist/package/components/fullscreen-toolbar.d.ts +2 -2
  11. package/dist/package/components/mobile-toolbar.d.ts +1 -2
  12. package/dist/package/components/tabs/document-mobile-tab-panel.d.ts +1 -3
  13. package/dist/package/components/tabs/document-tabs-sidebar.d.ts +1 -2
  14. package/dist/package/components/toc/document-outline.d.ts +1 -1
  15. package/dist/package/components/toc/toc.d.ts +1 -1
  16. package/dist/package/components/toc/types.d.ts +0 -7
  17. package/dist/package/extensions/emoji/components/emoji-utils.d.ts +2 -2
  18. package/dist/package/hooks/use-export-headless-editor-content.d.ts +6 -2
  19. package/dist/package/hooks/use-focus-mode.d.ts +3 -1
  20. package/dist/package/hooks/use-headless-editor.d.ts +12 -4
  21. package/dist/package/hooks/use-tab-editor.d.ts +1 -4
  22. package/dist/package/hooks/use-tab-manager.d.ts +3 -1
  23. package/dist/package/hooks/use-yjs-setup.d.ts +7 -1
  24. package/dist/package/persistence/compaction.d.ts +27 -0
  25. package/dist/package/persistence/content-fingerprint.d.ts +27 -0
  26. package/dist/package/persistence/ddoc-persistence.d.ts +96 -0
  27. package/dist/package/persistence/index.d.ts +2 -0
  28. package/dist/package/persistence/provider-lifecycle.d.ts +37 -0
  29. package/dist/package/sync-local/SyncManager.d.ts +8 -1
  30. package/dist/package/sync-local/types/index.d.ts +2 -0
  31. package/dist/package/types.d.ts +25 -43
  32. package/dist/package/use-ddoc-editor.d.ts +1 -3
  33. package/dist/package/utils/responsive.d.ts +1 -3
  34. package/dist/persistence.d.ts +1 -0
  35. package/dist/persistence.es.js +10 -0
  36. package/dist/{split-view-toolbar-NTimkQK1.mjs → split-view-toolbar-6aBSjsO2.mjs} +47 -46
  37. package/dist/style.css +1 -1
  38. package/dist/tab-utils-BNFvrUAj.mjs +284 -0
  39. package/dist/use-headless-editor-fZCM6BjV.mjs +43828 -0
  40. package/package.json +11 -4
  41. package/tailwind.preset.cjs +0 -42
  42. package/dist/index-eP_xxZsk.mjs +0 -13126
  43. package/dist/markdown-source-pane-D-8OmL1r.mjs +0 -6069
  44. package/dist/package/components/editor-navbar.d.ts +0 -12
  45. package/dist/package/hooks/use-canvas-metrics.d.ts +0 -16
  46. package/dist/package/hooks/use-controllable-state.d.ts +0 -3
  47. package/dist/package/hooks/use-editor-media-query.d.ts +0 -4
  48. package/dist/package/utils/container-query-support.d.ts +0 -1
  49. package/dist/package/utils/editor-width-store.d.ts +0 -6
  50. package/dist/package/utils/stats-publisher.d.ts +0 -8
  51. package/dist/use-headless-editor-KdKS6vWp.mjs +0 -162186
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "6.0.0-drop-in.3",
5
+ "version": "6.0.1-dist-slim.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-ddocs.git"
@@ -18,6 +18,10 @@
18
18
  "import": "./dist/headless-editor-utils.es.js",
19
19
  "types": "./dist/headless-editor-utils.d.ts"
20
20
  },
21
+ "./persistence": {
22
+ "import": "./dist/persistence.es.js",
23
+ "types": "./dist/persistence.d.ts"
24
+ },
21
25
  "./styles": "./dist/style.css",
22
26
  "./types": "./dist/package/types.d.ts",
23
27
  "./tailwind": "./tailwind.preset.cjs"
@@ -114,16 +118,19 @@
114
118
  "lib0": "^0.2.95",
115
119
  "lowlight": "^3.3.0",
116
120
  "mammoth": "^1.10.0",
121
+ "markdown-it": "^14.1.0",
117
122
  "markdown-it-footnote": "^4.0.0",
118
123
  "odf-kit": "^0.9.3",
119
124
  "ollama": "^0.5.14",
120
125
  "platform": "^1.3.6",
126
+ "prettier": "^3.4.2",
121
127
  "prosemirror-model": "^1.21.0",
122
128
  "prosemirror-state": "^1.4.3",
123
129
  "react-tweet": "^3.2.2",
124
130
  "react-uuid": "^2.0.0",
125
131
  "react-window": "^2.2.7",
126
132
  "socket.io-client": "^4.7.5",
133
+ "tippy.js": "^6.3.7",
127
134
  "tiptap-markdown": "^0.9.0",
128
135
  "turndown": "^7.2.0",
129
136
  "usehooks-ts": "^3.1.1",
@@ -131,7 +138,7 @@
131
138
  "vaul": "^0.9.1",
132
139
  "vite-plugin-dts": "^3.6.3",
133
140
  "ws": "^8.18.0",
134
- "y-indexeddb": "^9.0.12",
141
+ "y-indexeddb": "9.0.12",
135
142
  "y-prosemirror": "^1.2.5",
136
143
  "y-protocols": "^1.0.6",
137
144
  "zustand": "^5.0.12"
@@ -163,7 +170,6 @@
163
170
  "file-entry-cache": "6.0.1"
164
171
  },
165
172
  "devDependencies": {
166
- "fake-indexeddb": "^6.2.5",
167
173
  "@testing-library/jest-dom": "^6.4.0",
168
174
  "@testing-library/react": "^16.0.0",
169
175
  "@types/dompurify": "^3.0.5",
@@ -178,18 +184,19 @@
178
184
  "@typescript-eslint/parser": "^6.10.0",
179
185
  "@vitejs/plugin-react": "^4.2.0",
180
186
  "autoprefixer": "^10.4.19",
187
+ "emojibase": "^17.0.0",
181
188
  "eslint": "^8.53.0",
182
189
  "eslint-config-prettier": "^9.1.0",
183
190
  "eslint-plugin-prettier": "^5.2.1",
184
191
  "eslint-plugin-react-hooks": "^4.6.0",
185
192
  "eslint-plugin-react-refresh": "^0.4.4",
193
+ "fake-indexeddb": "^6.2.5",
186
194
  "husky": "^9.1.7",
187
195
  "jsdom": "^25.0.0",
188
196
  "lint-staged": "^15.2.10",
189
197
  "postcss": "^8.4.38",
190
198
  "postcss-nested": "^6.2.0",
191
199
  "postcss-selector-parser": "^6.1.4",
192
- "prettier": "^3.4.2",
193
200
  "react": "^18.2.0",
194
201
  "react-dom": "^18.2.0",
195
202
  "tailwindcss": "^3.4.3",
@@ -1,16 +1,8 @@
1
1
  // This file is the `@fileverse-dev/ddoc/tailwind` preset. It composes the ui preset
2
2
  // (dark mode, theme, design-system classes) and adds the `mobile` screen.
3
- // It also adds the ddoc-* variants (docs/DROP_IN_EDITOR.md §2.9).
4
3
  // Consumers: `presets: [require('@fileverse-dev/ddoc/tailwind')]` and add
5
4
  // node_modules/@fileverse-dev/ddoc/dist/**/*.{js,mjs} plus
6
5
  // node_modules/@fileverse/ui/dist/**/*.{js,mjs} to `content` (the dist is chunked).
7
- const plugin = require('tailwindcss/plugin');
8
-
9
- // Same widths as the screens, evaluated against the editor root when the
10
- // element is inside one and against the window otherwise. :where() keeps the
11
- // window form at the specificity of a screen variant.
12
- const DDOC_BREAKPOINTS = { sm: 640, md: 768, mobile: 960, lg: 1024, xl: 1280 };
13
-
14
6
  module.exports = {
15
7
  presets: [require('@fileverse/ui/tailwind')],
16
8
  theme: {
@@ -20,38 +12,4 @@ module.exports = {
20
12
  },
21
13
  },
22
14
  },
23
- plugins: [
24
- plugin(({ addVariant, matchVariant }) => {
25
- const breakpoints = Object.entries(DDOC_BREAKPOINTS);
26
- // Registration order is CSS order. Like Tailwind's screens: max variants
27
- // first, widest first, so the narrower one wins; then min, ascending.
28
- for (const [name, px] of [...breakpoints].reverse()) {
29
- addVariant(`ddoc-max-${name}`, [
30
- `@container ddoc-editor (max-width: ${px - 0.02}px)`,
31
- `@media (max-width: ${px - 0.02}px) { &:where(:not(.ddoc-editor-cq *)) }`,
32
- ]);
33
- }
34
- for (const [name, px] of breakpoints) {
35
- addVariant(`ddoc-${name}`, [
36
- `@container ddoc-editor (min-width: ${px}px)`,
37
- `@media (min-width: ${px}px) { &:where(:not(.ddoc-editor-cq *)) }`,
38
- ]);
39
- }
40
- // One-off widths: ddoc-min-[1410px]: and ddoc-max-[1280px]: (inclusive).
41
- for (const bound of ['min', 'max']) {
42
- matchVariant(
43
- `ddoc-${bound}`,
44
- (value) => [
45
- `@container ddoc-editor (${bound}-width: ${value})`,
46
- `@media (${bound}-width: ${value}) { &:where(:not(.ddoc-editor-cq *)) }`,
47
- ],
48
- {
49
- sort: (a, z) =>
50
- (parseFloat(a.value) - parseFloat(z.value)) *
51
- (bound === 'min' ? 1 : -1),
52
- },
53
- );
54
- }
55
- }),
56
- ],
57
15
  };