docblocks-react-ui 0.19.2 → 0.20.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 +14 -0
- package/dist/{Editor-D8w1VbeT.mjs → Editor-Oia-HUin.mjs} +4 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/mermaid/index.mjs +1 -1
- package/dist/styles.css +20 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# docblocks-react-ui
|
|
2
2
|
|
|
3
|
+
## 0.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 931b1ee: The divider's block box: the line stands centered over the block's box
|
|
8
|
+
(`min-height: 2 × --docblocks-divider-margin + the line's width`) instead
|
|
9
|
+
of the collapsed margin's 1px row — the row's hover zone stands the full
|
|
10
|
+
box, and the row's gutter controls (the grip, the plus, the delete) center
|
|
11
|
+
over the box's axis (the line's axis) instead of the first line's box.
|
|
12
|
+
The slotted element (`docblocks/divider`) stands the box — the line is
|
|
13
|
+
the inner `<hr>` (the former slotted `hr`). The `--docblocks-divider-margin`
|
|
14
|
+
token stands a single length (the spacing over the line, the default
|
|
15
|
+
16px → 20px) — the former two-value's shorthand stands removed.
|
|
16
|
+
|
|
3
17
|
## 0.19.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -31172,12 +31172,13 @@ function dispatchBuiltIn(id, block, nested, collapsible, flat, number) {
|
|
|
31172
31172
|
flat,
|
|
31173
31173
|
number
|
|
31174
31174
|
});
|
|
31175
|
-
case "divider": return /* @__PURE__ */ jsx("
|
|
31175
|
+
case "divider": return /* @__PURE__ */ jsx("div", {
|
|
31176
31176
|
"data-slot": "docblocks/divider",
|
|
31177
31177
|
"data-block-type": "divider",
|
|
31178
31178
|
"data-block-id": id,
|
|
31179
31179
|
contentEditable: false,
|
|
31180
|
-
className: "\n
|
|
31180
|
+
className: "\n flex min-h-[calc(2*var(--docblocks-divider-margin)+var(--docblocks-divider-border-width))] w-full\n items-center\n ",
|
|
31181
|
+
children: /* @__PURE__ */ jsx("hr", { className: "\n w-full border-t-(length:--docblocks-divider-border-width) border-t-(--docblocks-divider-border-color)\n " })
|
|
31181
31182
|
});
|
|
31182
31183
|
case "image": return /* @__PURE__ */ jsx(ImageBlock, {
|
|
31183
31184
|
id,
|
|
@@ -38332,6 +38333,7 @@ const RowItem = memo(function RowItem({ node, layoutSlide, isDragged, animated,
|
|
|
38332
38333
|
ref: rowRef,
|
|
38333
38334
|
"data-slot": "docblocks/row",
|
|
38334
38335
|
"data-selected": selected ? "true" : void 0,
|
|
38336
|
+
"data-divider": block !== void 0 && block.type === "divider" ? "true" : void 0,
|
|
38335
38337
|
value: node.id,
|
|
38336
38338
|
initial: animated ? ENTER : false,
|
|
38337
38339
|
animate: ANIMATE,
|
package/dist/index.d.mts
CHANGED
|
@@ -427,7 +427,7 @@ declare function AlertDescription({ className, ...props }: React$1.ComponentProp
|
|
|
427
427
|
//#endregion
|
|
428
428
|
//#region src/shared/ui/Badge.d.ts
|
|
429
429
|
declare const badgeVariants: (props?: ({
|
|
430
|
-
variant?: "default" | "destructive" | "
|
|
430
|
+
variant?: "default" | "destructive" | "custom" | "secondary" | "outline" | null | undefined;
|
|
431
431
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
432
432
|
declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
433
433
|
asChild?: boolean;
|
|
@@ -438,7 +438,7 @@ declare function BareSelect({ className, children, ...props }: React$1.Component
|
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region src/shared/ui/Button.d.ts
|
|
440
440
|
declare const buttonVariants: (props?: ({
|
|
441
|
-
variant?: "link" | "default" | "destructive" | "
|
|
441
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
442
442
|
size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
|
|
443
443
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
444
444
|
declare function Button({ className, variant, size, asChild, type, ...props }: React$1.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as UnknownSlashCommandError, S as UnhandledValueError, _ as CanvasPasteError, b as HookMisuseError, g as BlobNotFoundError, s as preventDefault, v as DocBlocksUiError, w as cn, x as PdfFetchError, y as EditorProviderError } from "./constants-D_3p65rk.mjs";
|
|
2
|
-
import { $ as DropdownMenuShortcut, $t as DocblocksI18nProvider, A as Select, B as Label, Bt as CardFooter, C as cellValueEqual, Ct as isBridgeError, D as filterIsComplete, Dt as parseCellValue, E as emptyFilter, Et as conditionMatches, F as SelectScrollDownButton, Ft as Skeleton, G as DropdownMenuContent, Gt as useBlock, H as Input, Ht as CardTitle, I as SelectScrollUpButton, It as Card, J as DropdownMenuLabel, Jt as usePresence, K as DropdownMenuGroup, Kt as useDoc, L as SelectSeparator, Lt as CardAction, M as SelectGroup, Mt as Eye, N as SelectItem, O as SegmentSelector, Ot as TEXT_TYPES, P as SelectLabel, Pt as BookOpen, Q as DropdownMenuSeparator, Qt as useText, R as SelectTrigger, Rt as CardContent, S as useDatabaseTable, St as BridgeError, T as FilterBuilder, Tt as toBridgeError, U as DropdownMenu, Ut as Badge, V as InlineEditInput, Vt as CardHeader, W as DropdownMenuCheckboxItem, Wt as badgeVariants, X as DropdownMenuRadioGroup, Xt as useSelection, Y as DropdownMenuPortal, Yt as usePresenceSharing, Z as DropdownMenuRadioItem, Zt as useSelectionView, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as Popover, b as renderRuns, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverDescription, d as FORMAT_PALETTE, dt as PopoverTrigger, en as createMemoryBlobStore, et as DropdownMenuSub, ft as Checkbox, g as parseFrontmatter, gt as AlertTitle, h as mdToBlocks, ht as AlertDescription, i as useEditorContext, it as Separator, j as SelectContent, jt as Pen, k as ScrollArea, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverHeader, m as insertNative, mt as Alert, n as useCoverAverageColor, nn as Button, nt as DropdownMenuSubTrigger, ot as PopoverAnchor, p as htmlToBlocks, pt as BareSelect, q as DropdownMenuItem, qt as useMeta, r as EditorProvider, rn as buttonVariants, rt as DropdownMenuTrigger, st as PopoverContent, t as Editor, tn as EditorErrorBoundary, tt as DropdownMenuSubContent, ut as PopoverTitle, v as markToggleAction, vt as PROTOCOL_VERSION, w as newMutationContext, wt as isBridgeErrorCode, x as GridBody, xt as BRIDGE_ERROR_CODES, yt as isDatabaseBridge, z as SelectValue, zt as CardDescription } from "./Editor-
|
|
2
|
+
import { $ as DropdownMenuShortcut, $t as DocblocksI18nProvider, A as Select, B as Label, Bt as CardFooter, C as cellValueEqual, Ct as isBridgeError, D as filterIsComplete, Dt as parseCellValue, E as emptyFilter, Et as conditionMatches, F as SelectScrollDownButton, Ft as Skeleton, G as DropdownMenuContent, Gt as useBlock, H as Input, Ht as CardTitle, I as SelectScrollUpButton, It as Card, J as DropdownMenuLabel, Jt as usePresence, K as DropdownMenuGroup, Kt as useDoc, L as SelectSeparator, Lt as CardAction, M as SelectGroup, Mt as Eye, N as SelectItem, O as SegmentSelector, Ot as TEXT_TYPES, P as SelectLabel, Pt as BookOpen, Q as DropdownMenuSeparator, Qt as useText, R as SelectTrigger, Rt as CardContent, S as useDatabaseTable, St as BridgeError, T as FilterBuilder, Tt as toBridgeError, U as DropdownMenu, Ut as Badge, V as InlineEditInput, Vt as CardHeader, W as DropdownMenuCheckboxItem, Wt as badgeVariants, X as DropdownMenuRadioGroup, Xt as useSelection, Y as DropdownMenuPortal, Yt as usePresenceSharing, Z as DropdownMenuRadioItem, Zt as useSelectionView, _ as mapFrontmatter, _t as BASELINE_CAPABILITIES, a as DEFAULT_EMBED_SANDBOX, at as Popover, b as renderRuns, bt as validateProtocolDescriptor, c as SHAPE_FONT_OPTIONS, ct as PopoverDescription, d as FORMAT_PALETTE, dt as PopoverTrigger, en as createMemoryBlobStore, et as DropdownMenuSub, ft as Checkbox, g as parseFrontmatter, gt as AlertTitle, h as mdToBlocks, ht as AlertDescription, i as useEditorContext, it as Separator, j as SelectContent, jt as Pen, k as ScrollArea, kt as columnAnnotation, l as SHAPE_FONT_STACKS, lt as PopoverHeader, m as insertNative, mt as Alert, n as useCoverAverageColor, nn as Button, nt as DropdownMenuSubTrigger, ot as PopoverAnchor, p as htmlToBlocks, pt as BareSelect, q as DropdownMenuItem, qt as useMeta, r as EditorProvider, rn as buttonVariants, rt as DropdownMenuTrigger, st as PopoverContent, t as Editor, tn as EditorErrorBoundary, tt as DropdownMenuSubContent, ut as PopoverTitle, v as markToggleAction, vt as PROTOCOL_VERSION, w as newMutationContext, wt as isBridgeErrorCode, x as GridBody, xt as BRIDGE_ERROR_CODES, yt as isDatabaseBridge, z as SelectValue, zt as CardDescription } from "./Editor-Oia-HUin.mjs";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
package/dist/mermaid/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as clamp, d as Plus, f as Minus, p as LoaderCircle, s as preventDefault, u as TriangleAlert } from "../constants-D_3p65rk.mjs";
|
|
2
|
-
import { At as RotateCcw, Ft as Skeleton, Mt as Eye, Nt as CodeXml, O as SegmentSelector, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, nn as Button, o as childrenSlot, s as CodeHeader, u as TextBlock, y as INLINE_CODE_CLASS } from "../Editor-
|
|
2
|
+
import { At as RotateCcw, Ft as Skeleton, Mt as Eye, Nt as CodeXml, O as SegmentSelector, f as textOf, gt as AlertTitle, ht as AlertDescription, i as useEditorContext, mt as Alert, nn as Button, o as childrenSlot, s as CodeHeader, u as TextBlock, y as INLINE_CODE_CLASS } from "../Editor-Oia-HUin.mjs";
|
|
3
3
|
import { t as Maximize } from "../Maximize-BBHnCDWL.mjs";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
package/dist/styles.css
CHANGED
|
@@ -428,9 +428,6 @@
|
|
|
428
428
|
max-width: 96rem;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
.m-\(--docblocks-divider-margin\) {
|
|
432
|
-
margin: var(--docblocks-divider-margin);
|
|
433
|
-
}
|
|
434
431
|
.m-0 {
|
|
435
432
|
margin: 0px;
|
|
436
433
|
}
|
|
@@ -754,6 +751,9 @@
|
|
|
754
751
|
.min-h-\[1em\] {
|
|
755
752
|
min-height: 1em;
|
|
756
753
|
}
|
|
754
|
+
.min-h-\[calc\(2\*var\(--docblocks-divider-margin\)\+var\(--docblocks-divider-border-width\)\)\] {
|
|
755
|
+
min-height: calc(2 * var(--docblocks-divider-margin) + var(--docblocks-divider-border-width));
|
|
756
|
+
}
|
|
757
757
|
.w-\(--cell-size\) {
|
|
758
758
|
width: var(--cell-size);
|
|
759
759
|
}
|
|
@@ -3764,7 +3764,10 @@
|
|
|
3764
3764
|
/* Divider. */
|
|
3765
3765
|
--docblocks-divider-border-color: var(--border, rgba(175, 184, 193, 0.4));
|
|
3766
3766
|
--docblocks-divider-border-width: 1px;
|
|
3767
|
-
|
|
3767
|
+
/* The spacing over the line (the block's box's min-height: the line
|
|
3768
|
+
stands centered over the box — the hover zone's stand; the margin
|
|
3769
|
+
stands 0, so the spacing never collapses out of the row's box). */
|
|
3770
|
+
--docblocks-divider-margin: 20px;
|
|
3768
3771
|
|
|
3769
3772
|
/* Table. */
|
|
3770
3773
|
--docblocks-table-border-color: var(--border, rgba(175, 184, 193, 0.4));
|
|
@@ -4084,6 +4087,19 @@
|
|
|
4084
4087
|
opacity: 0;
|
|
4085
4088
|
}
|
|
4086
4089
|
|
|
4090
|
+
/*
|
|
4091
|
+
* The divider row's gutter controls: the row's box is the line's centered
|
|
4092
|
+
* stand (the box's min-height — the first-line's offset stands the text
|
|
4093
|
+
* rows only), so the controls center over the row (the line's axis). The
|
|
4094
|
+
* unlayered rule outranks the utility's top offset.
|
|
4095
|
+
*/
|
|
4096
|
+
[data-slot="docblocks/row"][data-divider="true"] > [data-slot="docblocks/gutter"],
|
|
4097
|
+
[data-slot="docblocks/row"][data-divider="true"] > [data-slot="docblocks/gutter-plus"],
|
|
4098
|
+
[data-slot="docblocks/row"][data-divider="true"] > [data-slot="docblocks/gutter-delete"] {
|
|
4099
|
+
top: 50%;
|
|
4100
|
+
transform: translateY(-50%);
|
|
4101
|
+
}
|
|
4102
|
+
|
|
4087
4103
|
/*
|
|
4088
4104
|
* The code highlight layer's token colors (the background layer's hljs
|
|
4089
4105
|
* classes read the tokens — the light and dark sets flip with the theme).
|
package/package.json
CHANGED