@arbidocs/blocks 0.4.0 → 0.4.2
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 +22 -0
- package/dist/{chunk-7G3JNSJB.cjs → chunk-2K33YGM6.cjs} +51 -14
- package/dist/chunk-2K33YGM6.cjs.map +1 -0
- package/dist/{chunk-S5T7ZTX2.js → chunk-2ORA62OF.js} +3 -3
- package/dist/{chunk-S5T7ZTX2.js.map → chunk-2ORA62OF.js.map} +1 -1
- package/dist/{chunk-RBXZYNVB.js → chunk-6P6AEQJB.js} +195 -35
- package/dist/chunk-6P6AEQJB.js.map +1 -0
- package/dist/{chunk-5TYEJOXY.js → chunk-7PEELPMA.js} +52 -15
- package/dist/chunk-7PEELPMA.js.map +1 -0
- package/dist/{chunk-KUA3BCT2.cjs → chunk-AE5FHFZ5.cjs} +6 -6
- package/dist/{chunk-KUA3BCT2.cjs.map → chunk-AE5FHFZ5.cjs.map} +1 -1
- package/dist/{chunk-FZQJ2S6P.cjs → chunk-DREI7EQ2.cjs} +197 -33
- package/dist/chunk-DREI7EQ2.cjs.map +1 -0
- package/dist/chunk-J2BGSWXM.cjs +990 -0
- package/dist/chunk-J2BGSWXM.cjs.map +1 -0
- package/dist/{chunk-6ALISABK.cjs → chunk-LRUCMZK6.cjs} +7 -4
- package/dist/{chunk-6ALISABK.cjs.map → chunk-LRUCMZK6.cjs.map} +1 -1
- package/dist/chunk-OBLSURHV.js +973 -0
- package/dist/chunk-OBLSURHV.js.map +1 -0
- package/dist/{chunk-DVLEQURC.js → chunk-QXEJXIP4.js} +7 -4
- package/dist/{chunk-DVLEQURC.js.map → chunk-QXEJXIP4.js.map} +1 -1
- package/dist/collaboration/index.cjs +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/components/Chart.d.ts +9 -1
- package/dist/components/ContactForm.d.ts +15 -3
- package/dist/components/TeamGrid.d.ts +14 -2
- package/dist/components/editorial/ArticleList.d.ts +32 -0
- package/dist/components/editorial/Bands.d.ts +29 -0
- package/dist/components/editorial/EditorialHeading.d.ts +17 -0
- package/dist/components/editorial/EditorialHero.d.ts +46 -0
- package/dist/components/editorial/EditorialSection.d.ts +47 -0
- package/dist/components/editorial/Eyebrow.d.ts +14 -0
- package/dist/components/editorial/PanelGrid.d.ts +45 -0
- package/dist/components/editorial/ProfileCard.d.ts +27 -0
- package/dist/components/editorial/PullQuote.d.ts +17 -0
- package/dist/components/editorial/Reveal.d.ts +15 -0
- package/dist/components/editorial/index.d.ts +12 -0
- package/dist/components/editorial/lists.d.ts +42 -0
- package/dist/components/editorial/tone.d.ts +33 -0
- package/dist/facts/FactsViewToggle.d.ts +3 -1
- package/dist/facts/fact-row.d.ts +32 -0
- package/dist/facts/index.cjs +34 -5
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.d.ts +1 -0
- package/dist/facts/index.js +31 -4
- package/dist/facts/index.js.map +1 -1
- package/dist/files/ViewToggle.d.ts +6 -2
- package/dist/files/ViewerChrome.d.ts +11 -14
- package/dist/files/index.cjs +20 -54
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.js +17 -51
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +161 -101
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -6
- package/dist/shell/ActionCluster.d.ts +7 -2
- package/dist/shell/AskField.d.ts +6 -1
- package/dist/shell/index.cjs +42 -42
- package/dist/shell/index.js +1 -1
- package/dist/site/index.cjs +107 -47
- package/dist/site/index.d.ts +1 -0
- package/dist/site/index.js +2 -2
- package/dist/studio/index.cjs +71 -71
- package/dist/studio/index.js +3 -3
- package/package.json +3 -3
- package/src/blocks.css +17 -0
- package/dist/chunk-5TYEJOXY.js.map +0 -1
- package/dist/chunk-7G3JNSJB.cjs.map +0 -1
- package/dist/chunk-FZQJ2S6P.cjs.map +0 -1
- package/dist/chunk-MMYCZRKT.cjs +0 -168
- package/dist/chunk-MMYCZRKT.cjs.map +0 -1
- package/dist/chunk-RBXZYNVB.js.map +0 -1
- package/dist/chunk-UTWX2X2A.js +0 -165
- package/dist/chunk-UTWX2X2A.js.map +0 -1
|
@@ -11,12 +11,14 @@ export interface ViewToggleOption {
|
|
|
11
11
|
value: string;
|
|
12
12
|
icon: ReactNode;
|
|
13
13
|
label: string;
|
|
14
|
+
/** Overrides this item's test id (default `${testIdPrefix}-${value}-button`). */
|
|
15
|
+
testId?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface ViewToggleProps {
|
|
16
18
|
options: ViewToggleOption[];
|
|
17
19
|
value: string;
|
|
18
20
|
onChange: (value: string) => void;
|
|
19
|
-
/** Item test ids are `${testIdPrefix}-${value}-button`. */
|
|
21
|
+
/** Item test ids are `${testIdPrefix}-${value}-button` unless an option sets its own `testId`. */
|
|
20
22
|
testIdPrefix?: string;
|
|
21
23
|
showLabels?: boolean;
|
|
22
24
|
hideTooltips?: boolean;
|
|
@@ -39,6 +41,8 @@ export interface DocumentViewToggleProps {
|
|
|
39
41
|
labels?: Partial<DocumentViewToggleLabels>;
|
|
40
42
|
/** Overrides the segmented items' prefix (default `documents-layout`: `<prefix>-<mode>-button`). */
|
|
41
43
|
testIdPrefix?: string;
|
|
44
|
+
/** Per-mode item ids, for hosts that keep their own (e.g. `documents-view-gallery`). */
|
|
45
|
+
testIds?: Partial<Record<DocumentViewMode, string>>;
|
|
42
46
|
/** Overrides the compact select test ids (defaults keep the current ids). */
|
|
43
47
|
compactTestIds?: Partial<{
|
|
44
48
|
select: string;
|
|
@@ -46,4 +50,4 @@ export interface DocumentViewToggleProps {
|
|
|
46
50
|
}>;
|
|
47
51
|
}
|
|
48
52
|
/** The Documents page's Gallery / Table / Review / Smart Search switch. */
|
|
49
|
-
export declare function DocumentViewToggle({ viewMode, onChange, compact, labels, testIdPrefix, compactTestIds, }: DocumentViewToggleProps): import("react").JSX.Element;
|
|
53
|
+
export declare function DocumentViewToggle({ viewMode, onChange, compact, labels, testIdPrefix, testIds, compactTestIds, }: DocumentViewToggleProps): import("react").JSX.Element;
|
|
@@ -19,9 +19,8 @@ export interface ViewerLabels {
|
|
|
19
19
|
cropTitle: string;
|
|
20
20
|
previousPage: string;
|
|
21
21
|
nextPage: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
zoomReset: (level: string) => string;
|
|
22
|
+
/** The zoom button's accessible name; `level` is the current zoom, e.g. "150%". */
|
|
23
|
+
zoom: (level: string) => string;
|
|
25
24
|
pageInput: string;
|
|
26
25
|
pageOfTitle: string;
|
|
27
26
|
pageOf: (page: number, total: number) => string;
|
|
@@ -137,19 +136,17 @@ export declare function PdfPageNav({ canPrev, canNext, onPrev, onNext, counter,
|
|
|
137
136
|
export interface ViewerZoomControlProps {
|
|
138
137
|
/** Multiplier of the fit-width size (1 = fit width). */
|
|
139
138
|
zoom: number;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
onZoomIn: () => void;
|
|
143
|
-
onZoomOut: () => void;
|
|
144
|
-
/** Back to fit width (the level readout is the button). */
|
|
145
|
-
onReset: () => void;
|
|
139
|
+
/** Steps to the next zoom level (and back to fit width after the last). */
|
|
140
|
+
onCycle: () => void;
|
|
146
141
|
labels?: Partial<ViewerLabels>;
|
|
147
142
|
testIds?: Partial<{
|
|
148
|
-
|
|
149
|
-
in: string;
|
|
150
|
-
out: string;
|
|
143
|
+
button: string;
|
|
151
144
|
level: string;
|
|
152
145
|
}>;
|
|
153
146
|
}
|
|
154
|
-
/**
|
|
155
|
-
|
|
147
|
+
/**
|
|
148
|
+
* One small zoom button for touch devices (desktop has no zoom control: the page already fits
|
|
149
|
+
* the width). It stays quiet at fit width and shows the level once zoomed; pinch and double-tap
|
|
150
|
+
* work alongside it.
|
|
151
|
+
*/
|
|
152
|
+
export declare function ViewerZoomControl({ zoom, onCycle, labels, testIds }: ViewerZoomControlProps): import("react").JSX.Element;
|
package/dist/files/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@ var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
|
6
6
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
7
7
|
var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
8
8
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkLRUCMZK6_cjs = require('../chunk-LRUCMZK6.cjs');
|
|
10
10
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
11
11
|
require('../chunk-PPCATBOY.cjs');
|
|
12
12
|
require('../chunk-C54XEN5T.cjs');
|
|
@@ -1479,9 +1479,7 @@ var DEFAULT_VIEWER_LABELS = {
|
|
|
1479
1479
|
cropTitle: "Crop and save as a new version",
|
|
1480
1480
|
previousPage: "Previous page",
|
|
1481
1481
|
nextPage: "Next page",
|
|
1482
|
-
|
|
1483
|
-
zoomOut: "Zoom out",
|
|
1484
|
-
zoomReset: (level) => `Zoom ${level}. Click to fit the page width.`,
|
|
1482
|
+
zoom: (level) => `Zoom ${level}. Tap to zoom in further, then back to fit the page width.`,
|
|
1485
1483
|
pageInput: "Page number input",
|
|
1486
1484
|
pageOfTitle: "Click to go to page",
|
|
1487
1485
|
pageOf: (page, total) => `Page ${page} of ${total}. Click to navigate.`,
|
|
@@ -1758,60 +1756,28 @@ function PdfPageNav({
|
|
|
1758
1756
|
}
|
|
1759
1757
|
);
|
|
1760
1758
|
}
|
|
1761
|
-
function ViewerZoomControl({
|
|
1762
|
-
zoom,
|
|
1763
|
-
canZoomIn,
|
|
1764
|
-
canZoomOut,
|
|
1765
|
-
onZoomIn,
|
|
1766
|
-
onZoomOut,
|
|
1767
|
-
onReset,
|
|
1768
|
-
labels,
|
|
1769
|
-
testIds
|
|
1770
|
-
}) {
|
|
1759
|
+
function ViewerZoomControl({ zoom, onCycle, labels, testIds }) {
|
|
1771
1760
|
const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
|
|
1772
1761
|
const level = `${Math.round(zoom * 100)}%`;
|
|
1762
|
+
const isZoomed = Math.abs(zoom - 1) > 0.02;
|
|
1773
1763
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1774
|
-
|
|
1764
|
+
ui.Button,
|
|
1775
1765
|
{
|
|
1776
|
-
|
|
1777
|
-
|
|
1766
|
+
type: "button",
|
|
1767
|
+
variant: "ghost",
|
|
1768
|
+
onClick: onCycle,
|
|
1769
|
+
"aria-label": l.zoom(level),
|
|
1770
|
+
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.button, { testId: "viewer-zoom-button" }),
|
|
1771
|
+
className: "absolute right-3 bottom-4 z-10 hidden h-11 min-w-11 items-center justify-center gap-1 rounded-full border border-border bg-background/95 px-2.5 shadow-md backdrop-blur pointer-coarse:inline-flex",
|
|
1778
1772
|
children: [
|
|
1779
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
variant: "ghost",
|
|
1783
|
-
size: "icon",
|
|
1784
|
-
className: "size-7 shrink-0 pointer-coarse:size-11",
|
|
1785
|
-
onClick: onZoomOut,
|
|
1786
|
-
disabled: !canZoomOut,
|
|
1787
|
-
"aria-label": l.zoomOut,
|
|
1788
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.out, { testId: "viewer-zoom-out" }),
|
|
1789
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "size-4" })
|
|
1790
|
-
}
|
|
1791
|
-
),
|
|
1792
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1793
|
-
"button",
|
|
1773
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomIn, { className: "size-4" }),
|
|
1774
|
+
isZoomed && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1775
|
+
"span",
|
|
1794
1776
|
{
|
|
1795
|
-
|
|
1796
|
-
onClick: onReset,
|
|
1797
|
-
className: "min-w-12 rounded px-1 text-center text-sm font-medium tabular-nums hover:bg-muted pointer-coarse:min-h-11",
|
|
1798
|
-
"aria-label": l.zoomReset(level),
|
|
1777
|
+
className: "text-xs font-medium tabular-nums",
|
|
1799
1778
|
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.level, { testId: "viewer-zoom-level" }),
|
|
1800
1779
|
children: level
|
|
1801
1780
|
}
|
|
1802
|
-
),
|
|
1803
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1804
|
-
ui.Button,
|
|
1805
|
-
{
|
|
1806
|
-
variant: "ghost",
|
|
1807
|
-
size: "icon",
|
|
1808
|
-
className: "size-7 shrink-0 pointer-coarse:size-11",
|
|
1809
|
-
onClick: onZoomIn,
|
|
1810
|
-
disabled: !canZoomIn,
|
|
1811
|
-
"aria-label": l.zoomIn,
|
|
1812
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.in, { testId: "viewer-zoom-in" }),
|
|
1813
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" })
|
|
1814
|
-
}
|
|
1815
1781
|
)
|
|
1816
1782
|
]
|
|
1817
1783
|
}
|
|
@@ -1971,7 +1937,7 @@ var DOCUMENT_GRID_CLASS = "w-full [&_.cell-empty]:text-muted-foreground [&_.ag-r
|
|
|
1971
1937
|
function DocumentGrid({
|
|
1972
1938
|
layout,
|
|
1973
1939
|
presets,
|
|
1974
|
-
GridComponent =
|
|
1940
|
+
GridComponent = chunkLRUCMZK6_cjs.GridView,
|
|
1975
1941
|
emptyWorkspace,
|
|
1976
1942
|
showEmptyWorkspace,
|
|
1977
1943
|
testId = "documents-grid",
|
|
@@ -7371,19 +7337,19 @@ function ExplorerDragPreview({ icon, title, count }) {
|
|
|
7371
7337
|
|
|
7372
7338
|
Object.defineProperty(exports, "DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS", {
|
|
7373
7339
|
enumerable: true,
|
|
7374
|
-
get: function () { return
|
|
7340
|
+
get: function () { return chunkLRUCMZK6_cjs.DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS; }
|
|
7375
7341
|
});
|
|
7376
7342
|
Object.defineProperty(exports, "DocumentViewToggle", {
|
|
7377
7343
|
enumerable: true,
|
|
7378
|
-
get: function () { return
|
|
7344
|
+
get: function () { return chunkLRUCMZK6_cjs.DocumentViewToggle; }
|
|
7379
7345
|
});
|
|
7380
7346
|
Object.defineProperty(exports, "GridView", {
|
|
7381
7347
|
enumerable: true,
|
|
7382
|
-
get: function () { return
|
|
7348
|
+
get: function () { return chunkLRUCMZK6_cjs.GridView; }
|
|
7383
7349
|
});
|
|
7384
7350
|
Object.defineProperty(exports, "ViewToggle", {
|
|
7385
7351
|
enumerable: true,
|
|
7386
|
-
get: function () { return
|
|
7352
|
+
get: function () { return chunkLRUCMZK6_cjs.ViewToggle; }
|
|
7387
7353
|
});
|
|
7388
7354
|
Object.defineProperty(exports, "DEFAULT_SELECTION_BAR_LABELS", {
|
|
7389
7355
|
enumerable: true,
|