@fileverse-dev/ddoc 4.8.17-xchacha.0 → 5.0.0-unstable-styles-2
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 +36 -8
- package/dist/headless-editor-utils.es.js +1 -1
- package/dist/{index-BXcU4L-P.mjs → index-CVwMVBPt.mjs} +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.es.js +9745 -10227
- package/dist/{markdown-source-pane-NAKSRtR5.mjs → markdown-source-pane-BxY2Qs_P.mjs} +1 -1
- package/dist/package/sync-local/SyncManager.d.ts +2 -10
- package/dist/package/sync-local/crypto/index.d.ts +2 -6
- package/dist/package/sync-local/crypto/room-key.d.ts +1 -3
- package/dist/package/sync-local/floor.d.ts +0 -8
- package/dist/package/sync-local/socketClient.d.ts +1 -4
- package/dist/package/sync-local/types/index.d.ts +1 -30
- package/dist/package/sync-local/utils/createAwarenessUpdateHandler.d.ts +1 -2
- package/dist/{split-view-toolbar-Dj7hev5y.mjs → split-view-toolbar-Gbnjf427.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-headless-editor-LqOgnUoI.mjs → use-headless-editor-C3wFDi0t.mjs} +1 -1
- package/package.json +11 -7
- package/tailwind.preset.cjs +13 -0
package/README.md
CHANGED
|
@@ -27,17 +27,23 @@ This repository contains:
|
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Prerequisites
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Your app runs Tailwind CSS 3.4 and owns the `@tailwind base/components/utilities` entry. The package ships only editor CSS; preflight, utilities, the `@fileverse/ui` styles, and the KaTeX stylesheet come from your build.
|
|
33
33
|
|
|
34
34
|
### Install & import
|
|
35
35
|
|
|
36
|
-
Add the following imports :
|
|
37
|
-
|
|
38
36
|
```javascript
|
|
39
37
|
import { DdocEditor } from '@fileverse-dev/ddoc';
|
|
40
|
-
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Load stylesheets in this order (Vite emits CSS in import order; in Next put the first two in the root layout and the last two in the editor route):
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import './globals.css'; // your tailwind entry
|
|
44
|
+
import '@fileverse/ui/styles/base'; // tokens and base rules
|
|
45
|
+
import 'katex/dist/katex.min.css'; // math; fonts are served as files
|
|
46
|
+
import '@fileverse-dev/ddoc/styles'; // editor CSS
|
|
41
47
|
```
|
|
42
48
|
|
|
43
49
|
### Peer Dependencies
|
|
@@ -53,19 +59,41 @@ npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @fileverse/ui @fi
|
|
|
53
59
|
| `@dnd-kit/core` | `>=6.3.1` |
|
|
54
60
|
| `@dnd-kit/sortable` | `>=10.0.0` |
|
|
55
61
|
| `@dnd-kit/utilities` | `>=3.2.2` |
|
|
56
|
-
| `@fileverse/ui` |
|
|
62
|
+
| `@fileverse/ui` | `5.4.0` |
|
|
57
63
|
| `@fileverse/crypto` | `>=0.0.21` |
|
|
58
64
|
| `viem` | `>=2.13.8` |
|
|
59
65
|
| `framer-motion` | `>=11.2.10` |
|
|
60
66
|
| `frimousse` | `>=0.3.0` |
|
|
61
67
|
|
|
68
|
+
During the `unstable-styles` prerelease, install `@fileverse/ui@5.4.0-unstable-styles-1` exactly; the stable release pairs with `5.4.0`.
|
|
69
|
+
|
|
62
70
|
These are externalized from the bundle to avoid duplication when your app already uses them. If you don't have them installed, npm (v7+) will auto-install them for you.
|
|
63
71
|
|
|
64
72
|
### Update Tailwind Config
|
|
65
73
|
|
|
66
|
-
|
|
74
|
+
```javascript
|
|
75
|
+
module.exports = {
|
|
76
|
+
presets: [require('@fileverse-dev/ddoc/tailwind')],
|
|
77
|
+
content: [
|
|
78
|
+
'./src/**/*.{js,ts,jsx,tsx}',
|
|
79
|
+
'./node_modules/@fileverse-dev/ddoc/dist/index.es.js',
|
|
80
|
+
'./node_modules/@fileverse/ui/dist/index.es.js',
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The preset composes `@fileverse/ui/tailwind` (class-based dark mode, animate plugin, design-system classes) and adds the `mobile: 960px` screen the editor uses.
|
|
86
|
+
|
|
87
|
+
### Migrating from 4.x
|
|
88
|
+
|
|
89
|
+
5.0 stops shipping preflight, Tailwind utilities, the ui stylesheet, the KaTeX stylesheet, and the `html`, `body`, and `*` resets. To upgrade:
|
|
67
90
|
|
|
68
|
-
|
|
91
|
+
1. Add the preset and the two `content` entries above.
|
|
92
|
+
2. Import `@fileverse/ui/styles/base` and `katex/dist/katex.min.css` yourself, in the order above.
|
|
93
|
+
3. If your shell relied on `html, body { overflow: hidden }` or `body { user-select: none }` from the package, add them to your own global stylesheet.
|
|
94
|
+
4. Remove any workaround that re-declared `mobile:` classes; the preset generates them.
|
|
95
|
+
5. Add `katex` to your own dependencies (`npm install katex@^0.16.11`); the package no longer guarantees it is hoisted.
|
|
96
|
+
6. If you styled anything from the old bundle by class name: `.custom-scrollbar` is now `.ddoc-scrollbar`, and `.highlight-comment-bg`, `.is-active`, `.custom-border-bg`, `.animate-fade-in-out`, `.placeholder-disabled` were removed as unused.
|
|
69
97
|
|
|
70
98
|
You should now be set to use dDocs!
|
|
71
99
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c9 as Ql, ca as Zl, cb as eh } from "./use-headless-editor-
|
|
1
|
+
import { c9 as Ql, ca as Zl, cb as eh } from "./use-headless-editor-C3wFDi0t.mjs";
|
|
2
2
|
let An = [], Xr = [];
|
|
3
3
|
(() => {
|
|
4
4
|
let s = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,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e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((e) => e ? parseInt(e, 36) : 1);
|
package/dist/index.d.ts
CHANGED
|
@@ -15,9 +15,8 @@ export { buildVersionDiffSnapshot } from './package/components/tabs/utils/versio
|
|
|
15
15
|
export type { DdocExportModalProps, ExportFormatOption, ExportTabOption, } from './package/components/export-modal';
|
|
16
16
|
export type { VersionTabSnapshot } from './package/components/tabs/utils/version-diff-snapshot';
|
|
17
17
|
export { Editor } from '@tiptap/react';
|
|
18
|
-
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus,
|
|
18
|
+
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus, } from './package/sync-local/types';
|
|
19
19
|
export { encryptForRoomKey, decryptForRoomKey, } from './package/sync-local/crypto/room-key';
|
|
20
|
-
export { WIRE_TAG, isXChaChaCipher } from './package/sync-local/crypto';
|
|
21
20
|
export { fetchSessionState, seedSession, } from './package/sync-local/session-tools';
|
|
22
21
|
export type { CommentMutationMeta, SuggestionType } from './package/types';
|
|
23
22
|
export type { IComment } from './package/extensions/comment/comment.ts';
|