docblocks-react-ui 0.0.0-stage → 0.1.1

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 (89) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/LICENSE +21 -0
  3. package/README.md +592 -2
  4. package/dist/Editor-CiJY5R4v.mjs +26587 -0
  5. package/dist/Editor-DT7RkRXf.d.mts +32 -0
  6. package/dist/LoaderCircle-AGVFE4IP.mjs +19 -0
  7. package/dist/Skeleton-D922Ths5.mjs +13 -0
  8. package/dist/constants-D4FTL0ph.mjs +81 -0
  9. package/dist/fonts/OFL.txt +162 -0
  10. package/dist/fonts/inter-300-c.woff2 +0 -0
  11. package/dist/fonts/inter-300-l.woff2 +0 -0
  12. package/dist/fonts/inter-300i-c.woff2 +0 -0
  13. package/dist/fonts/inter-300i-l.woff2 +0 -0
  14. package/dist/fonts/inter-400-c.woff2 +0 -0
  15. package/dist/fonts/inter-400-l.woff2 +0 -0
  16. package/dist/fonts/inter-400i-c.woff2 +0 -0
  17. package/dist/fonts/inter-400i-l.woff2 +0 -0
  18. package/dist/fonts/inter-600-c.woff2 +0 -0
  19. package/dist/fonts/inter-600-l.woff2 +0 -0
  20. package/dist/fonts/inter-600i-c.woff2 +0 -0
  21. package/dist/fonts/inter-600i-l.woff2 +0 -0
  22. package/dist/fonts/jetbrains-mono-300-c.woff2 +0 -0
  23. package/dist/fonts/jetbrains-mono-300-l.woff2 +0 -0
  24. package/dist/fonts/jetbrains-mono-300i-c.woff2 +0 -0
  25. package/dist/fonts/jetbrains-mono-300i-l.woff2 +0 -0
  26. package/dist/fonts/jetbrains-mono-400-c.woff2 +0 -0
  27. package/dist/fonts/jetbrains-mono-400-l.woff2 +0 -0
  28. package/dist/fonts/jetbrains-mono-400i-c.woff2 +0 -0
  29. package/dist/fonts/jetbrains-mono-400i-l.woff2 +0 -0
  30. package/dist/fonts/jetbrains-mono-600-c.woff2 +0 -0
  31. package/dist/fonts/jetbrains-mono-600-l.woff2 +0 -0
  32. package/dist/fonts/jetbrains-mono-600i-c.woff2 +0 -0
  33. package/dist/fonts/jetbrains-mono-600i-l.woff2 +0 -0
  34. package/dist/fonts/lora-400-c.woff2 +0 -0
  35. package/dist/fonts/lora-400-l.woff2 +0 -0
  36. package/dist/fonts/lora-400i-c.woff2 +0 -0
  37. package/dist/fonts/lora-400i-l.woff2 +0 -0
  38. package/dist/fonts/lora-600-c.woff2 +0 -0
  39. package/dist/fonts/lora-600-l.woff2 +0 -0
  40. package/dist/fonts/lora-600i-c.woff2 +0 -0
  41. package/dist/fonts/lora-600i-l.woff2 +0 -0
  42. package/dist/fonts/lora-700-c.woff2 +0 -0
  43. package/dist/fonts/lora-700-l.woff2 +0 -0
  44. package/dist/fonts/lora-700i-c.woff2 +0 -0
  45. package/dist/fonts/lora-700i-l.woff2 +0 -0
  46. package/dist/fonts/open-sans-300-c.woff2 +0 -0
  47. package/dist/fonts/open-sans-300-l.woff2 +0 -0
  48. package/dist/fonts/open-sans-300i-c.woff2 +0 -0
  49. package/dist/fonts/open-sans-300i-l.woff2 +0 -0
  50. package/dist/fonts/open-sans-400-c.woff2 +0 -0
  51. package/dist/fonts/open-sans-400-l.woff2 +0 -0
  52. package/dist/fonts/open-sans-400i-c.woff2 +0 -0
  53. package/dist/fonts/open-sans-400i-l.woff2 +0 -0
  54. package/dist/fonts/open-sans-600-c.woff2 +0 -0
  55. package/dist/fonts/open-sans-600-l.woff2 +0 -0
  56. package/dist/fonts/open-sans-600i-c.woff2 +0 -0
  57. package/dist/fonts/open-sans-600i-l.woff2 +0 -0
  58. package/dist/fonts/pt-sans-400-c.woff2 +0 -0
  59. package/dist/fonts/pt-sans-400-l.woff2 +0 -0
  60. package/dist/fonts/pt-sans-400i-c.woff2 +0 -0
  61. package/dist/fonts/pt-sans-400i-l.woff2 +0 -0
  62. package/dist/fonts/pt-sans-700-c.woff2 +0 -0
  63. package/dist/fonts/pt-sans-700-l.woff2 +0 -0
  64. package/dist/fonts/pt-sans-700i-c.woff2 +0 -0
  65. package/dist/fonts/pt-sans-700i-l.woff2 +0 -0
  66. package/dist/fonts/pt-serif-400-c.woff2 +0 -0
  67. package/dist/fonts/pt-serif-400-l.woff2 +0 -0
  68. package/dist/fonts/pt-serif-400i-c.woff2 +0 -0
  69. package/dist/fonts/pt-serif-400i-l.woff2 +0 -0
  70. package/dist/fonts/pt-serif-700-c.woff2 +0 -0
  71. package/dist/fonts/pt-serif-700-l.woff2 +0 -0
  72. package/dist/fonts/pt-serif-700i-c.woff2 +0 -0
  73. package/dist/fonts/pt-serif-700i-l.woff2 +0 -0
  74. package/dist/index-D6_ysSmQ.d.mts +1075 -0
  75. package/dist/index-YJcgf8Hh.d.mts +39 -0
  76. package/dist/index.d.mts +388 -0
  77. package/dist/index.mjs +641 -0
  78. package/dist/mermaid/index.d.mts +10 -0
  79. package/dist/mermaid/index.mjs +252 -0
  80. package/dist/motion/index.d.mts +8 -0
  81. package/dist/motion/index.mjs +1009 -0
  82. package/dist/pdf/index.d.mts +5 -0
  83. package/dist/pdf/index.mjs +164 -0
  84. package/dist/pdf/jbig2.wasm +0 -0
  85. package/dist/pdf/jbig2_nowasm_fallback.js +15 -0
  86. package/dist/pdf/pdf.worker.min.mjs +28 -0
  87. package/dist/styles.css +4562 -0
  88. package/package.json +99 -4
  89. package/theme.css +128 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,107 @@
1
+ # docblocks-react-ui
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The README stands the `styles.css`'s import's ambient `*.css` declaration's
8
+ note and the `DocHeader`'s stand over the `viewer`'s level.
9
+
10
+ ## 0.1.0
11
+
12
+ ### Added
13
+
14
+ - The initial release of the React rendering + editing layer (peer
15
+ dependencies: `docblocks-core`, `react`, `react-dom`; the optional
16
+ peers `framer-motion`, `mermaid`, and `pdfjs-dist` stand behind the
17
+ optional subpaths; the package builds strictly on the core's public
18
+ API — it never imports `yjs`).
19
+ - `EditorProvider` + `Editor`: the page view (the block flow over the
20
+ flat model) and the canvas view (`view: "canvas"` — the page
21
+ miniature plus the root-level surfaces), and the per-instance store
22
+ with the reference-stability re-render contract (the `useBlock`
23
+ re-renders only for the changed blocks).
24
+ - The editing layer: the text blocks (the contenteditable inner managed
25
+ from the store runs, the single-transaction input commits), the
26
+ selection (gutter / mouse / cross-block text range), the slash menu,
27
+ the floating format toolbar, the markdown + multi-block `text/html`
28
+ paste, the gutter quick-insert, the keyboard and clipboard
29
+ conventions, the undo / redo with the selection re-seat, and the `@`
30
+ mention picker (the consumer's `mentionProvider`).
31
+ - The block-renderer registry — the consumer extension point: a custom
32
+ renderer per block type stands over the built-in renderers (which
33
+ cover every v1 block type).
34
+ - The canvas: the five block types, the zoom / pan viewport + the
35
+ bottom dock, the move / resize / nudge / fit / connector-draw /
36
+ copy-paste sessions, the connectors (the endpoint system, the ports,
37
+ the orthogonal avoidance, the labels, the style), and the explicit
38
+ `zIndex` (the arrange menu). The frame stands the viewport window —
39
+ moving the frame pans the window, not the content, and the frame
40
+ renders behind the other surface elements; the page frame block
41
+ stands the inline live window into the referenced canvas frame (the
42
+ `/frame` slash picker). The canvas-text stands the ghost double-click
43
+ entry and the shape-parity press contract (the press selects and
44
+ moves, the double-click edits).
45
+ - The native `table` block: the cells as the mini-docs, the row and
46
+ column commands, the handles and menus, the seam resize, and the
47
+ add-row / add-column chips.
48
+ - The `database` block: the inline form and the external form over the
49
+ versioned `DatabaseBridge` contract — the ordered row wire, the
50
+ snapshot → subscribe → replay → live bootstrap, the append-only
51
+ per-table envelope stream (one transaction → one `seq` / `prevSeq`),
52
+ the idempotent writes (the fresh `operationId` per op), the atomic
53
+ mixed `batchRows`, the structured `BridgeError` codes, and the
54
+ protocol negotiation (`describeProtocol` + the capability gate). The
55
+ package ships the contract and the UI only — the in-memory reference
56
+ bridge is the consumer's own implementation (the playground harness's
57
+ `memory-bridge` directory is the reference stand); without a
58
+ `databaseBridge` prop the external-form block renders the
59
+ not-connected placeholder and the `/database` slash command is
60
+ hidden. `TEXT_TYPES` (the set of the bridge column types that hold
61
+ text) is exported from the package root.
62
+ - The `embed` / `sync-embed` blocks: the consumer's `syncEmbedResolver`
63
+ mounts a nested `EditorProvider` over the master doc (its own
64
+ selection and undo; the cycle guarded by the ancestor-doc chain +
65
+ the depth limit), and the `image` block over the blob bridge (the
66
+ consumer's `BlobStore`, the opaque `src` key, the subtype from
67
+ `resolve.meta` — never guessed; the legacy view-only `blobResolver`
68
+ is wrapped as a store).
69
+ - The optional subpaths with the optional peer dependencies:
70
+ `./motion` (`framer-motion` — the drag-reorder and the row
71
+ animations), `./mermaid` (the mermaid preview over the `code`
72
+ blocks), and `./pdf` (`pdfjs-dist` — the first-page PDF preview, the
73
+ worker bundled to `dist/pdf/`).
74
+ - `DocHeader` — the consumer-placed panel (rendered in the consumer's
75
+ chrome, outside the editor): the page / canvas switcher, the
76
+ document mode's switcher (Edit / View / Published — consumer-
77
+ controlled over the `mode` + `onModeChange` props), the avatar, and
78
+ the title (the inline edit commits one core command each).
79
+ - The consumer-controlled access modes and publishing: `accessLevel`
80
+ (`viewer` / `editor`, default `editor`), `mode` (`edit` / `view` /
81
+ `published`, default `edit`), and `publishedDoc` (the hydrated
82
+ snapshot) on the `EditorProvider` — the consumer session state,
83
+ never document data, never on the wire. The `viewer` stands the
84
+ security model: the reader's browser receives only the published
85
+ snapshot (passed as the `doc` — no live document, no sync
86
+ transport), and an absent stand renders the "not published yet"
87
+ placeholder; `view` is the read-only live document (the sync stays
88
+ live); the editor's `published` renders the snapshot read-only (its
89
+ own store and selection, static over the live edits; a new snapshot
90
+ is a remount via `key`). Over the read-only modes the editing
91
+ surfaces are off (the text inners, the gutter / drag / hotkeys / the
92
+ format toolbar, the table and database chrome, the canvas sessions
93
+ and dock, the attribute menus) and the observing gestures keep
94
+ (scroll, the embed pan / zoom, the canvas wheel zoom / pan); the
95
+ consecutive empty text blocks render as one (the document data
96
+ untouched).
97
+ - The theming: the `--docblocks-*` custom properties mapped onto the
98
+ optional shadcn standard tokens on the editor root (a themed consumer
99
+ themes the editor automatically, dark included; the fallbacks equal
100
+ the unthemed literals — zero visual diff without a theme), the
101
+ optional seed `docblocks-react-ui/theme.css`, and the self-hosted
102
+ `Inter` UI font.
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies
107
+ - docblocks-core@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 wereintouch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.