docblocks-react-ui 0.3.0 → 0.3.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.
- package/CHANGELOG.md +13 -0
- package/README.md +6 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +14 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# docblocks-react-ui
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bb5df92: The standalone `DatabaseTable` now anchors the package's `--docblocks-*`
|
|
8
|
+
token scope over its own root (the `data-slot="docblocks/editor"` stand).
|
|
9
|
+
The token mapping is declared on the editor root over the shipped CSS,
|
|
10
|
+
and the standalone table renders outside any document — without the
|
|
11
|
+
scope the grid's token-driven utilities (the borders, the paddings, the
|
|
12
|
+
row's heights) stood unresolved over the consumer's page. The
|
|
13
|
+
`readOnly` stand sets the root's `data-readonly` attribute (the page
|
|
14
|
+
mode's `user-select`'s suppression parity).
|
|
15
|
+
|
|
3
16
|
## 0.3.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -429,7 +429,12 @@ function TablesSection({ bridge }: { bridge: DatabaseBridge }) {
|
|
|
429
429
|
the optional `view` prop at mount); `onViewChange(patch)` receives one
|
|
430
430
|
patch per change for the consumer's persistence (the controlled mode
|
|
431
431
|
stands absent — the state is never external). `readOnly` gates the
|
|
432
|
-
editing's paths (the read-only block's parity).
|
|
432
|
+
editing's paths (the read-only block's parity). The component is
|
|
433
|
+
self-contained: it wraps itself in the package's i18n scope and anchors
|
|
434
|
+
the `--docblocks-*` token scope over its own root, so it themes
|
|
435
|
+
standalone over the consumer's page (the `dark` class over an ancestor
|
|
436
|
+
follows the shipped dark set — the package's `styles.css` import is the
|
|
437
|
+
only requirement).
|
|
433
438
|
- `useTableList(bridge)` — `{ tables, loading, error, refresh, create,
|
|
434
439
|
rename }`: the `listTables` catalog (the system tables stand out), the
|
|
435
440
|
`createTable` / `renameTable` mutations (the fresh `operationId` per op;
|
package/dist/index.d.mts
CHANGED
|
@@ -294,7 +294,7 @@ declare function AlertDescription({ className, ...props }: React.ComponentProps<
|
|
|
294
294
|
//#endregion
|
|
295
295
|
//#region src/shared/ui/Badge.d.ts
|
|
296
296
|
declare const badgeVariants: (props?: ({
|
|
297
|
-
variant?: "default" | "
|
|
297
|
+
variant?: "default" | "custom" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
298
298
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
299
299
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
300
300
|
asChild?: boolean;
|
|
@@ -305,7 +305,7 @@ declare function BareSelect({ className, children, ...props }: React.ComponentPr
|
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/shared/ui/Button.d.ts
|
|
307
307
|
declare const buttonVariants: (props?: ({
|
|
308
|
-
variant?: "link" | "default" | "
|
|
308
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
309
309
|
size?: "default" | "icon" | "sm" | "lg" | "xl" | null | undefined;
|
|
310
310
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
311
311
|
declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
package/dist/index.mjs
CHANGED
|
@@ -406,16 +406,20 @@ function DatabaseTable({ bridge, tableId, readOnly = false, view, onViewChange }
|
|
|
406
406
|
}));
|
|
407
407
|
if (onViewChange !== void 0) onViewChange(typed);
|
|
408
408
|
}, [onViewChange]);
|
|
409
|
-
return /* @__PURE__ */ jsx(DocblocksI18nProvider, { children: /* @__PURE__ */ jsx(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
409
|
+
return /* @__PURE__ */ jsx(DocblocksI18nProvider, { children: /* @__PURE__ */ jsx("div", {
|
|
410
|
+
"data-slot": "docblocks/editor",
|
|
411
|
+
"data-readonly": readOnly ? "true" : void 0,
|
|
412
|
+
children: /* @__PURE__ */ jsx(GridBody, {
|
|
413
|
+
bridge,
|
|
414
|
+
tableId,
|
|
415
|
+
filter: viewState.filter,
|
|
416
|
+
columnOrder: viewState.columnOrder,
|
|
417
|
+
hiddenColumns: viewState.hiddenColumns,
|
|
418
|
+
columnWidths: viewState.columnWidths,
|
|
419
|
+
onViewChange: handleViewChange,
|
|
420
|
+
readColumnOrder: () => viewRef.current.columnOrder,
|
|
421
|
+
readOnly
|
|
422
|
+
})
|
|
419
423
|
}) });
|
|
420
424
|
}
|
|
421
425
|
//#endregion
|
package/package.json
CHANGED