@fileverse-dev/ddoc 5.0.0-unstable-styles-2 → 5.0.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 CHANGED
@@ -59,13 +59,13 @@ npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @fileverse/ui @fi
59
59
  | `@dnd-kit/core` | `>=6.3.1` |
60
60
  | `@dnd-kit/sortable` | `>=10.0.0` |
61
61
  | `@dnd-kit/utilities` | `>=3.2.2` |
62
- | `@fileverse/ui` | `5.4.0` |
62
+ | `@fileverse/ui` | `^5.4.0` |
63
63
  | `@fileverse/crypto` | `>=0.0.21` |
64
64
  | `viem` | `>=2.13.8` |
65
65
  | `framer-motion` | `>=11.2.10` |
66
66
  | `frimousse` | `>=0.3.0` |
67
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`.
68
+ The peer range is `@fileverse/ui@^5.4.0`. If you ever test a prerelease pairing, pin both packages exactly: a prerelease never satisfies a caret range.
69
69
 
70
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.
71
71
 
@@ -76,12 +76,16 @@ module.exports = {
76
76
  presets: [require('@fileverse-dev/ddoc/tailwind')],
77
77
  content: [
78
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',
79
+ './node_modules/@fileverse-dev/ddoc/dist/**/*.{js,mjs}',
80
+ './node_modules/@fileverse/ui/dist/**/*.{js,mjs}',
81
81
  ],
82
82
  };
83
83
  ```
84
84
 
85
+ Both dist globs are required, not the single `index.es.js` entry: the dist is chunked (`index.es.js`
86
+ statically imports `use-headless-editor-<hash>.mjs`), so a single-file entry leaves that chunk's
87
+ classes ungenerated.
88
+
85
89
  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
90
 
87
91
  ### Migrating from 4.x
@@ -90,10 +94,27 @@ The preset composes `@fileverse/ui/tailwind` (class-based dark mode, animate plu
90
94
 
91
95
  1. Add the preset and the two `content` entries above.
92
96
  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.
97
+ 3. The package no longer ships these global declarations:
98
+ - `* { margin: 0; padding: 0 }`
99
+ - `html, body { height: 100%; width: 100% }`
100
+ - `html, body { overflow: hidden }`
101
+ - `body { position: static; user-select: none; -moz-osx-font-smoothing: grayscale }`
102
+ - `*, ::before, ::after { border-color: hsl(var(--color-border-default)) }`
103
+
104
+ If your shell relied on `overflow: hidden` or `user-select: none`, add them to your own
105
+ global stylesheet. The rest are covered by Tailwind preflight or the `@fileverse/ui/styles/base`
106
+ sheet.
94
107
  4. Remove any workaround that re-declared `mobile:` classes; the preset generates them.
95
108
  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.
109
+ 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`, `.tooltip:before` were removed as unused.
110
+ 7. The composed `@fileverse/ui` preset defines `rounded-sm` as `calc(var(--radius) - 4px)` (4px)
111
+ instead of Tailwind's default 2px, so any surface using ddoc's `rounded-sm` utilities now
112
+ renders 4px corners.
113
+ 8. Third-party CSS ddoc imports (the highlight.js theme, tippy) still ships global `.hljs*` and
114
+ `.tippy-box` selectors — this is outside the package's own selector-ownership guarantee.
115
+ 9. List rules (`ul`, `ol`, and the nested-list counters) are now scoped to
116
+ `:where(.ProseMirror, .presentation-mode)` and no longer style `ol`/`ul` outside the editor or
117
+ presentation surfaces. If your app relied on ddoc's global list rules elsewhere, own them yourself.
97
118
 
98
119
  You should now be set to use dDocs!
99
120
 
package/dist/index.d.ts CHANGED
@@ -15,8 +15,9 @@ 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, } from './package/sync-local/types';
18
+ export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabError, CollabErrorCode, CollabStatus, WireFormat, WireTelemetryEvent, } 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';
20
21
  export { fetchSessionState, seedSession, } from './package/sync-local/session-tools';
21
22
  export type { CommentMutationMeta, SuggestionType } from './package/types';
22
23
  export type { IComment } from './package/extensions/comment/comment.ts';