docblocks-react-ui 0.1.1 → 0.2.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/CHANGELOG.md +170 -0
- package/README.md +79 -11
- package/dist/{Editor-CiJY5R4v.mjs → Editor-YAlRhGNW.mjs} +2862 -499
- package/dist/{index-D6_ysSmQ.d.mts → index-DOKS86aH.d.mts} +85 -7
- package/dist/index.d.mts +54 -8
- package/dist/index.mjs +134 -24
- package/dist/mermaid/index.mjs +5 -4
- package/dist/pdf/index.d.mts +1 -1
- package/dist/pdf/index.mjs +8 -7
- package/dist/styles.css +14 -0
- package/package.json +4 -17
- package/dist/Editor-DT7RkRXf.d.mts +0 -32
- package/dist/Skeleton-D922Ths5.mjs +0 -13
- package/dist/motion/index.d.mts +0 -8
- package/dist/motion/index.mjs +0 -1009
package/dist/styles.css
CHANGED
|
@@ -3673,6 +3673,20 @@
|
|
|
3673
3673
|
overscroll-behavior: contain;
|
|
3674
3674
|
}
|
|
3675
3675
|
|
|
3676
|
+
/*
|
|
3677
|
+
* The editor root's focus-ring stand: the root is a focus PARK (the
|
|
3678
|
+
* gestures' contract — the drag's release and the gutter's delete park
|
|
3679
|
+
* the focus there so the keyboard's input stays scoped over the editor).
|
|
3680
|
+
* It is reached programmatically only (tabIndex -1 — no Tab focus), so
|
|
3681
|
+
* the browser's default focus ring would stand the visible ring over the
|
|
3682
|
+
* whole document after a drag's release. The ring is suppressed; the
|
|
3683
|
+
* focus itself stays (the keyboard's scoping needs it), and the
|
|
3684
|
+
* individual controls keep their own focus styles.
|
|
3685
|
+
*/
|
|
3686
|
+
[data-slot="docblocks/editor"]:focus {
|
|
3687
|
+
outline: none;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3676
3690
|
/*
|
|
3677
3691
|
* The read-only stand (view / published modes): the editor's content is
|
|
3678
3692
|
* read-only — the text selection stands no stand (the native range's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docblocks-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React rendering + editing layer for docblocks: hooks, block renderers, caret/selection, keyboard, clipboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,10 +27,6 @@
|
|
|
27
27
|
"types": "./dist/pdf/index.d.mts",
|
|
28
28
|
"import": "./dist/pdf/index.mjs"
|
|
29
29
|
},
|
|
30
|
-
"./motion": {
|
|
31
|
-
"types": "./dist/motion/index.d.mts",
|
|
32
|
-
"import": "./dist/motion/index.mjs"
|
|
33
|
-
},
|
|
34
30
|
"./styles.css": "./dist/styles.css",
|
|
35
31
|
"./theme.css": "./theme.css"
|
|
36
32
|
},
|
|
@@ -38,24 +34,13 @@
|
|
|
38
34
|
"access": "public"
|
|
39
35
|
},
|
|
40
36
|
"peerDependencies": {
|
|
41
|
-
"docblocks-core": "
|
|
37
|
+
"docblocks-core": "^0.1.2",
|
|
42
38
|
"framer-motion": "^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
|
|
43
39
|
"mermaid": "^12.0.0",
|
|
44
40
|
"pdfjs-dist": "^6.0.0",
|
|
45
41
|
"react": "^19.0.0",
|
|
46
42
|
"react-dom": "^19.0.0"
|
|
47
43
|
},
|
|
48
|
-
"peerDependenciesMeta": {
|
|
49
|
-
"framer-motion": {
|
|
50
|
-
"optional": true
|
|
51
|
-
},
|
|
52
|
-
"mermaid": {
|
|
53
|
-
"optional": true
|
|
54
|
-
},
|
|
55
|
-
"pdfjs-dist": {
|
|
56
|
-
"optional": true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
44
|
"dependencies": {
|
|
60
45
|
"@radix-ui/react-checkbox": "^1.3.11",
|
|
61
46
|
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
@@ -69,7 +54,9 @@
|
|
|
69
54
|
"clsx": "^2.1.1",
|
|
70
55
|
"date-fns": "^4.4.0",
|
|
71
56
|
"highlight.js": "^11.12.0",
|
|
57
|
+
"i18next": "^27.0.1",
|
|
72
58
|
"react-day-picker": "^10.0.2",
|
|
59
|
+
"react-i18next": "^18.0.1",
|
|
73
60
|
"tailwind-merge": "^3.7.0",
|
|
74
61
|
"zustand": "^5.0.15"
|
|
75
62
|
},
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region src/Editor.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The document's view mode: the page flow (the root's children in reading
|
|
4
|
-
* order) or the canvas (the page as a miniature rectangle plus the surface
|
|
5
|
-
* elements on one canvas). View state — switching writes nothing to the
|
|
6
|
-
* data (like the selection).
|
|
7
|
-
*/
|
|
8
|
-
type EditorView = "page" | "canvas";
|
|
9
|
-
interface EditorProps {
|
|
10
|
-
view?: EditorView;
|
|
11
|
-
/** The format toolbar's color palette (the default six colors). */
|
|
12
|
-
formatPalette?: readonly string[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Renders the document's entry list in reading order (the document root's
|
|
16
|
-
* children, or a single subtree block when the provider got a
|
|
17
|
-
* `rootBlockId`). The root is the editor's focus/keyboard scope: the
|
|
18
|
-
* undo/redo hotkeys only fire for keys targeted inside it. The root block
|
|
19
|
-
* context is provided for every entry: the entry list's siblings, and the
|
|
20
|
-
* entry root's sequence container as the gestures' command parent (a
|
|
21
|
-
* subtree entry root is a page block — structurally childless, so its
|
|
22
|
-
* commands target the container of its sequence, not itself).
|
|
23
|
-
*
|
|
24
|
-
* The `view` prop selects the rendering: "page" (default) is the entry
|
|
25
|
-
* list; "canvas" renders the document's page as a page miniature and the
|
|
26
|
-
* root-level surfaces' elements on one canvas (see CanvasView). The
|
|
27
|
-
* `formatPalette` prop overrides the floating format toolbar's color
|
|
28
|
-
* palette.
|
|
29
|
-
*/
|
|
30
|
-
declare function Editor({ view, formatPalette }: EditorProps): import("react").JSX.Element;
|
|
31
|
-
//#endregion
|
|
32
|
-
export { EditorView as n, Editor as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { c as cn } from "./constants-D4FTL0ph.mjs";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
//#region src/shared/ui/Skeleton.tsx
|
|
5
|
-
function Skeleton({ className, ...props }) {
|
|
6
|
-
return /* @__PURE__ */ jsx("div", {
|
|
7
|
-
"data-slot": "skeleton",
|
|
8
|
-
className: cn("animate-pulse rounded-md bg-gray-300 dark:bg-gray-700", className),
|
|
9
|
-
...props
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Skeleton as t };
|
package/dist/motion/index.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { n as EditorView } from "../Editor-DT7RkRXf.mjs";
|
|
2
|
-
//#region src/motion/MotionEditor.d.ts
|
|
3
|
-
declare function MotionEditor({ view, formatPalette }: {
|
|
4
|
-
view?: EditorView;
|
|
5
|
-
formatPalette?: readonly string[];
|
|
6
|
-
}): import("react").JSX.Element;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { MotionEditor };
|