@pihanga2/shadcn 0.2.2 → 0.2.4
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 +3 -12
- package/cards/badge/badge.component.js +1 -1
- package/cards/box/box.component.js +1 -1
- package/cards/button/button.component.js +13 -13
- package/cards/chart/chart.types.d.ts +63 -0
- package/cards/checkbox/checkbox.component.js +1 -1
- package/cards/conditional/conditional.component.js +5 -5
- package/cards/dataTable/dataTable.component.js +8 -8
- package/cards/dataTable/dataTableRowDetail.component.js +1 -1
- package/cards/dialog/dialog.component.js +7 -7
- package/cards/dropDownMenu/drop-down.component.js +7 -7
- package/cards/field/field.component.js +4 -4
- package/cards/fileDrop/fileDrop.component.js +15 -15
- package/cards/flexGrid/flexGrid.component.js +1 -1
- package/cards/form/form.component.js +6 -6
- package/cards/framework/framework.component.js +4 -4
- package/cards/graphin/graphin.types.d.ts +106 -0
- package/cards/graphin/legend.component.d.ts +6 -0
- package/cards/input/input.component.js +1 -1
- package/cards/jsonViewer/index.js +13 -0
- package/cards/jsonViewer/index.js.map +1 -0
- package/cards/jsonViewer/jsonViewer.component.js +89 -0
- package/cards/jsonViewer/jsonViewer.component.js.map +1 -0
- package/cards/jsonViewer/jsonViewer.types.js +7 -0
- package/cards/jsonViewer/jsonViewer.types.js.map +1 -0
- package/cards/list/list.component.js +32 -32
- package/cards/list/list.types.js +1 -1
- package/cards/loadingOverlay/loadingOverlay.component.js +1 -1
- package/cards/loadingSkeleton/loading-skeleton.component.js +1 -1
- package/cards/pageWithNavbar/pageWithNavbar.component.js +43 -43
- package/cards/resizable/index.js +12 -0
- package/cards/resizable/index.js.map +1 -0
- package/cards/resizable/resizable.component.js +42 -0
- package/cards/resizable/resizable.component.js.map +1 -0
- package/cards/resizable/resizable.types.js +10 -0
- package/cards/resizable/resizable.types.js.map +1 -0
- package/cards/select/select.component.js +1 -1
- package/cards/slider/slider.component.js +1 -1
- package/cards/sliderValue/sliderValue.component.js +1 -1
- package/cards/stack/stack.component.js +4 -4
- package/cards/stepper/stepper.component.js +7 -7
- package/cards/switch/switch.component.js +1 -1
- package/cards/tabs/tabs.component.js +6 -6
- package/cards/textField/textField.component.js +1 -1
- package/cards/toast/toast.component.js +12 -12
- package/cards/toggleGroup/toggleGroup.component.js +1 -1
- package/cards/typography/typography.component.js +4 -4
- package/cards/typography/typography.types.js +1 -1
- package/components/ui/resizable.js +34 -0
- package/components/ui/resizable.js.map +1 -0
- package/package.json +13 -7
- package/pihanga-shadcn.css +1 -1
- package/cards/core-index.js +0 -68
|
@@ -208,12 +208,87 @@ export type GraphinProps = {
|
|
|
208
208
|
* @default "style"
|
|
209
209
|
*/
|
|
210
210
|
nodeStyleKey?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Legend overlay rendered as an absolutely-positioned panel over the graph.
|
|
213
|
+
*
|
|
214
|
+
* Two content modes:
|
|
215
|
+
* - **`items`** — built-in swatch list (colour + shape + label).
|
|
216
|
+
* - **`cardName`** — any registered Pihanga card used as a fully custom legend.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* legend: {
|
|
221
|
+
* position: "bottom-left",
|
|
222
|
+
* items: [
|
|
223
|
+
* { label: "Gateway", fill: "#e67e22", shape: "star" },
|
|
224
|
+
* { label: "Service", fill: "#2980b9", shape: "circle" },
|
|
225
|
+
* { label: "Database", fill: "#8e44ad", shape: "rect" },
|
|
226
|
+
* ],
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
legend?: GraphinLegend;
|
|
211
231
|
style?: {
|
|
212
232
|
root?: React.CSSProperties;
|
|
213
233
|
item?: React.CSSProperties;
|
|
214
234
|
};
|
|
215
235
|
className?: string;
|
|
216
236
|
};
|
|
237
|
+
/**
|
|
238
|
+
* A single item in the built-in legend.
|
|
239
|
+
*/
|
|
240
|
+
export type GraphinLegendItem = {
|
|
241
|
+
/** Text label displayed beside the shape swatch. */
|
|
242
|
+
label: string;
|
|
243
|
+
/** Fill colour of the swatch. Defaults to `"#4793AF"`. */
|
|
244
|
+
fill?: string;
|
|
245
|
+
/** Stroke / border colour of the swatch. */
|
|
246
|
+
stroke?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Shape of the swatch marker. Mirrors the values accepted by `nodeStyles`.
|
|
249
|
+
* Use `"line"` for edge/connector legend entries.
|
|
250
|
+
* @default "circle"
|
|
251
|
+
*/
|
|
252
|
+
shape?: "circle" | "rect" | "diamond" | "star" | "triangle" | "hexagon" | "ellipse" | "line";
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Legend overlay configuration.
|
|
256
|
+
*
|
|
257
|
+
* Two mutually-exclusive content modes:
|
|
258
|
+
* - **`items`** — serialisable list of `{ label, fill, stroke, shape }` entries
|
|
259
|
+
* rendered as a built-in swatch list.
|
|
260
|
+
* - **`cardName`** — name of any registered Pihanga card whose component is
|
|
261
|
+
* rendered as the legend body. Takes priority over `items` when both are set.
|
|
262
|
+
* Use this for fully custom legends (images, interactive filters, etc.).
|
|
263
|
+
*/
|
|
264
|
+
export type GraphinLegend = {
|
|
265
|
+
/**
|
|
266
|
+
* Built-in legend items — each rendered as a small SVG shape swatch + label.
|
|
267
|
+
* Ignored when `cardName` is also provided.
|
|
268
|
+
*/
|
|
269
|
+
items?: GraphinLegendItem[];
|
|
270
|
+
/**
|
|
271
|
+
* Registered pihanga card name to use as the legend body.
|
|
272
|
+
* The card is rendered inside the legend wrapper div; it receives no special
|
|
273
|
+
* context props — source its data from Redux state as usual.
|
|
274
|
+
*/
|
|
275
|
+
cardName?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Corner of the graph container where the legend is anchored.
|
|
278
|
+
* @default "bottom-left"
|
|
279
|
+
*/
|
|
280
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
281
|
+
/**
|
|
282
|
+
* Extra CSS class name(s) applied to the legend wrapper `<div>`.
|
|
283
|
+
* @example "rounded-xl shadow-lg"
|
|
284
|
+
*/
|
|
285
|
+
className?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Inline style overrides for the legend wrapper `<div>`.
|
|
288
|
+
* Merged on top of the built-in positioning styles.
|
|
289
|
+
*/
|
|
290
|
+
style?: React.CSSProperties;
|
|
291
|
+
};
|
|
217
292
|
export type GraphinTooltip = {
|
|
218
293
|
/** Registered card name whose component is rendered inside the floating panel. */
|
|
219
294
|
node?: string;
|
|
@@ -331,6 +406,7 @@ export declare const GRAPHIN_OP_ACTION: {
|
|
|
331
406
|
CLEAR_NODE_STYLES: string;
|
|
332
407
|
ZOOM_TO_NODE: string;
|
|
333
408
|
UPDATE_NODE_STYLE_MAP: string;
|
|
409
|
+
FIT_VIEW: string;
|
|
334
410
|
};
|
|
335
411
|
/**
|
|
336
412
|
* Payload for `GRAPHIN_OP_ACTION.SET_NODE_STYLES`.
|
|
@@ -470,6 +546,36 @@ export type GraphinUpdateNodeStyleMapAction = {
|
|
|
470
546
|
* ```
|
|
471
547
|
*/
|
|
472
548
|
export declare const dispatchGraphinUpdateNodeStyleMap: (dispatch: DispatchF, payload: GraphinUpdateNodeStyleMapAction) => string;
|
|
549
|
+
/**
|
|
550
|
+
* Payload for `GRAPHIN_OP_ACTION.FIT_VIEW`.
|
|
551
|
+
*
|
|
552
|
+
* Fits (and optionally re-centres) the entire graph within the visible
|
|
553
|
+
* container — the same effect as the initial `autoFit: 'view'`.
|
|
554
|
+
*/
|
|
555
|
+
export type GraphinFitViewAction = {
|
|
556
|
+
cardName: string;
|
|
557
|
+
/**
|
|
558
|
+
* - `"view"` — zoom + pan so all nodes fit inside the viewport (default).
|
|
559
|
+
* - `"center"` — pan to centre the graph without changing the zoom level.
|
|
560
|
+
*/
|
|
561
|
+
mode?: "view" | "center";
|
|
562
|
+
};
|
|
563
|
+
/**
|
|
564
|
+
* Fit the entire graph into the available canvas area.
|
|
565
|
+
*
|
|
566
|
+
* - `mode: "view"` (default) — zoom + pan so every node is visible.
|
|
567
|
+
* - `mode: "center"` — pan to the graph centroid without changing zoom.
|
|
568
|
+
*
|
|
569
|
+
* @example
|
|
570
|
+
* ```ts
|
|
571
|
+
* // Zoom-to-fit after the user has panned/zoomed away
|
|
572
|
+
* dispatchGraphinFitView(dispatch, { cardName: "myGraph" });
|
|
573
|
+
*
|
|
574
|
+
* // Re-centre without changing zoom
|
|
575
|
+
* dispatchGraphinFitView(dispatch, { cardName: "myGraph", mode: "center" });
|
|
576
|
+
* ```
|
|
577
|
+
*/
|
|
578
|
+
export declare const dispatchGraphinFitView: (dispatch: DispatchF, payload: GraphinFitViewAction) => string;
|
|
473
579
|
export type { ReduxAction };
|
|
474
580
|
export type GraphinEvents = {
|
|
475
581
|
/** Fired when the pointer enters a node */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext as e } from "../form/form.context.js";
|
|
2
2
|
import { Label as t } from "../../components/ui/label.js";
|
|
3
3
|
import { Input as n } from "../../components/ui/input.js";
|
|
4
|
-
import "@pihanga2/core";
|
|
5
4
|
import r from "react";
|
|
5
|
+
import "@pihanga2/core";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/cards/input/input.component.tsx
|
|
8
8
|
var o = (o) => {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSON_VIEWER_ACTION as e, JSON_VIEWER_CARD as t, JsonViewer as n, onJsonViewerClicked as r, onJsonViewerCopied as i } from "./jsonViewer.types.js";
|
|
2
|
+
import { JsonViewerComponent as a } from "./jsonViewer.component.js";
|
|
3
|
+
import { actionTypesToEvents as o, registerCardComponent as s } from "@pihanga2/core";
|
|
4
|
+
//#region src/cards/jsonViewer/index.ts
|
|
5
|
+
s({
|
|
6
|
+
name: t,
|
|
7
|
+
component: a,
|
|
8
|
+
events: o(e)
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as JSON_VIEWER_ACTION, t as JSON_VIEWER_CARD, n as JsonViewer, r as onJsonViewerClicked, i as onJsonViewerCopied };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/jsonViewer/index.ts"],"sourcesContent":["import {registerCardComponent, actionTypesToEvents} from \"@pihanga2/core\";\n\nimport {JSON_VIEWER_CARD, JSON_VIEWER_ACTION} from \"./jsonViewer.types\";\nimport {JsonViewerComponent} from \"./jsonViewer.component\";\n\nexport * from \"./jsonViewer.types\";\n\nregisterCardComponent({\n name: JSON_VIEWER_CARD,\n component: JsonViewerComponent,\n events: actionTypesToEvents(JSON_VIEWER_ACTION),\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;CACX,QAAQ,EAAoB,CAAkB;AAChD,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { getIconElement as e } from "../icons.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useCallback as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Check as s, Copy as c } from "lucide-react";
|
|
7
|
+
import { JsonView as l, allExpanded as u, defaultStyles as d } from "react-json-view-lite";
|
|
8
|
+
//#region src/cards/jsonViewer/jsonViewer.component.tsx
|
|
9
|
+
function f(e) {
|
|
10
|
+
if (e === !1) return u;
|
|
11
|
+
if (e === !0) return () => !1;
|
|
12
|
+
let t = e ?? 1;
|
|
13
|
+
return (e) => e < t;
|
|
14
|
+
}
|
|
15
|
+
var p = {
|
|
16
|
+
...d,
|
|
17
|
+
container: "jv-container",
|
|
18
|
+
basicChildStyle: "jv-basic-child",
|
|
19
|
+
label: "jv-label",
|
|
20
|
+
clickableLabel: "jv-clickable-label",
|
|
21
|
+
nullValue: "jv-null",
|
|
22
|
+
undefinedValue: "jv-undefined",
|
|
23
|
+
numberValue: "jv-number",
|
|
24
|
+
stringValue: "jv-string",
|
|
25
|
+
booleanValue: "jv-boolean",
|
|
26
|
+
otherValue: "jv-other",
|
|
27
|
+
punctuation: "jv-punctuation",
|
|
28
|
+
expandIcon: "jv-expand-icon",
|
|
29
|
+
collapseIcon: "jv-collapse-icon",
|
|
30
|
+
collapsedContent: "jv-collapsed-content",
|
|
31
|
+
childFieldsContainer: "jv-child-fields-container"
|
|
32
|
+
};
|
|
33
|
+
function m(t) {
|
|
34
|
+
if (t) {
|
|
35
|
+
let n = e(t);
|
|
36
|
+
if (n) return n;
|
|
37
|
+
}
|
|
38
|
+
return c;
|
|
39
|
+
}
|
|
40
|
+
async function h(e) {
|
|
41
|
+
if (typeof ClipboardItem < "u") {
|
|
42
|
+
let t = new Blob([e], { type: "text/plain" });
|
|
43
|
+
await navigator.clipboard.write([new ClipboardItem({ "text/plain": t })]);
|
|
44
|
+
} else await navigator.clipboard.writeText(e);
|
|
45
|
+
}
|
|
46
|
+
var g = (e) => {
|
|
47
|
+
let { source: c, collapsed: u = 1, modifyFn: d, style: g, className: _, cardName: v, _cls: y, copyToClipboard: b, copyIcon: x, onCopied: S } = e, C = r(null), [w, T] = i(!1);
|
|
48
|
+
n(() => {
|
|
49
|
+
d && d(c, C.current);
|
|
50
|
+
}, [d, c]);
|
|
51
|
+
let E = f(u), D = t(async () => {
|
|
52
|
+
let e = JSON.stringify(c, null, 2), t = !1;
|
|
53
|
+
try {
|
|
54
|
+
await h(e), t = !0, T(!0), setTimeout(() => T(!1), 2e3);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
console.warn("[JsonViewer] clipboard write failed:", e);
|
|
57
|
+
}
|
|
58
|
+
S?.({ success: t });
|
|
59
|
+
}, [c, S]), O = m(x), k = s;
|
|
60
|
+
return /* @__PURE__ */ o("div", {
|
|
61
|
+
className: [y("root", _), "jv-wrapper"].join(" "),
|
|
62
|
+
ref: C,
|
|
63
|
+
"data-pihanga": v,
|
|
64
|
+
style: g,
|
|
65
|
+
children: [b && /* @__PURE__ */ a("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
"aria-label": w ? "Copied!" : "Copy JSON to clipboard",
|
|
68
|
+
title: w ? "Copied!" : "Copy JSON to clipboard",
|
|
69
|
+
className: `jv-copy-btn${w ? " jv-copy-btn--done" : ""}`,
|
|
70
|
+
onClick: D,
|
|
71
|
+
children: w ? /* @__PURE__ */ a(k, {
|
|
72
|
+
size: 13,
|
|
73
|
+
strokeWidth: 2.5
|
|
74
|
+
}) : /* @__PURE__ */ a(O, {
|
|
75
|
+
size: 13,
|
|
76
|
+
strokeWidth: 2
|
|
77
|
+
})
|
|
78
|
+
}), /* @__PURE__ */ a(l, {
|
|
79
|
+
data: c,
|
|
80
|
+
shouldExpandNode: E,
|
|
81
|
+
style: p,
|
|
82
|
+
clickToExpandNode: !0
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { g as JsonViewerComponent };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=jsonViewer.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonViewer.component.js","names":[],"sources":["../../../src/cards/jsonViewer/jsonViewer.component.tsx"],"sourcesContent":["import React, {useLayoutEffect, useRef, useState, useCallback} from \"react\";\nimport type {PiCardProps} from \"@pihanga2/core\";\nimport {JsonView, allExpanded, defaultStyles} from \"react-json-view-lite\";\nimport {Copy, Check} from \"lucide-react\";\nimport \"react-json-view-lite/dist/index.css\";\nimport \"./jsonViewer.css\";\n\nimport {getIconElement} from \"@/cards/icons\";\nimport type {JsonViewerProps, JsonViewerEvents} from \"./jsonViewer.types\";\n\n/**\n * Converts the `collapsed` prop (from the react-json-view API) into a\n * `shouldExpandNode` predicate for react-json-view-lite.\n *\n * - `false` → expand everything\n * - `true` → collapse everything\n * - number N → expand nodes at depth < N (root is depth 0)\n */\nfunction toShouldExpandNode(\n collapsed: boolean | number | undefined,\n): (level: number) => boolean {\n if (collapsed === false) return allExpanded;\n if (collapsed === true) return () => false;\n // default: collapsed = 1 → only root level expanded\n const depth = collapsed ?? 1;\n return (level: number) => level < depth;\n}\n\n/**\n * Compact, code-editor style for react-json-view-lite.\n *\n * The expand/collapse icon is positioned absolutely inside a fixed left gutter\n * (via padding-left on `.jv-basic-child`), so the opening `{` and closing `}`\n * always start at the same column — fixing the original misalignment where the\n * icon pushed the open-brace further right than the close-brace.\n */\nconst compactStyles = {\n // spread defaultStyles first to satisfy required fields (ariaLables, stringifyStringValues, …)\n ...defaultStyles,\n container: \"jv-container\",\n basicChildStyle: \"jv-basic-child\",\n label: \"jv-label\",\n clickableLabel: \"jv-clickable-label\",\n nullValue: \"jv-null\",\n undefinedValue: \"jv-undefined\",\n numberValue: \"jv-number\",\n stringValue: \"jv-string\",\n booleanValue: \"jv-boolean\",\n otherValue: \"jv-other\",\n punctuation: \"jv-punctuation\",\n expandIcon: \"jv-expand-icon\",\n collapseIcon: \"jv-collapse-icon\",\n collapsedContent: \"jv-collapsed-content\",\n childFieldsContainer: \"jv-child-fields-container\",\n};\n\n/**\n * Resolve the icon element to use for the copy button.\n *\n * Resolution order:\n * 1. `iconName` looked up in the global icon registry\n * 2. Lucide `Copy` as the built-in fallback\n */\nfunction resolveCopyIcon(iconName?: string): React.ElementType {\n if (iconName) {\n const registered = getIconElement(iconName);\n if (registered) return registered;\n }\n return Copy;\n}\n\n/** Write `text` to the clipboard, preferring `ClipboardItem` for explicit MIME. */\nasync function writeToClipboard(text: string): Promise<void> {\n if (typeof ClipboardItem !== \"undefined\") {\n const blob = new Blob([text], {type: \"text/plain\"});\n await navigator.clipboard.write([new ClipboardItem({\"text/plain\": blob})]);\n } else {\n // Fallback for browsers without ClipboardItem support\n await navigator.clipboard.writeText(text);\n }\n}\n\nexport const JsonViewerComponent = (\n props: PiCardProps<JsonViewerProps, JsonViewerEvents>,\n): React.ReactNode => {\n const {\n source,\n collapsed = 1,\n modifyFn,\n style,\n className,\n cardName,\n _cls,\n copyToClipboard,\n copyIcon,\n onCopied,\n } = props;\n\n const elRef = useRef<HTMLDivElement>(null);\n const [copied, setCopied] = useState(false);\n\n useLayoutEffect(() => {\n if (modifyFn) {\n modifyFn(source, elRef.current);\n }\n }, [modifyFn, source]);\n\n const shouldExpandNode = toShouldExpandNode(collapsed);\n\n const handleCopy = useCallback(async () => {\n const text = JSON.stringify(source, null, 2);\n let success = false;\n try {\n await writeToClipboard(text);\n success = true;\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.warn(\"[JsonViewer] clipboard write failed:\", err);\n }\n onCopied?.({success});\n }, [source, onCopied]);\n\n const CopyIconEl = resolveCopyIcon(copyIcon);\n const ConfirmIconEl = Check;\n\n return (\n <div\n className={[_cls(\"root\", className), \"jv-wrapper\"].join(\" \")}\n ref={elRef}\n data-pihanga={cardName}\n style={style as React.CSSProperties | undefined}\n >\n {copyToClipboard && (\n <button\n type=\"button\"\n aria-label={copied ? \"Copied!\" : \"Copy JSON to clipboard\"}\n title={copied ? \"Copied!\" : \"Copy JSON to clipboard\"}\n className={`jv-copy-btn${copied ? \" jv-copy-btn--done\" : \"\"}`}\n onClick={handleCopy}\n >\n {copied ? (\n <ConfirmIconEl size={13} strokeWidth={2.5} />\n ) : (\n <CopyIconEl size={13} strokeWidth={2} />\n )}\n </button>\n )}\n <JsonView\n data={source as object | unknown[]}\n shouldExpandNode={shouldExpandNode}\n style={compactStyles}\n clickToExpandNode\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAkBA,SAAS,EACP,GAC4B;CAC5B,IAAI,MAAc,IAAO,OAAO;CAChC,IAAI,MAAc,IAAM,aAAa;CAErC,IAAM,IAAQ,KAAa;CAC3B,QAAQ,MAAkB,IAAQ;AACpC;AAUA,IAAM,IAAgB;CAEpB,GAAG;CACH,WAAW;CACX,iBAAiB;CACjB,OAAO;CACP,gBAAgB;CAChB,WAAW;CACX,gBAAgB;CAChB,aAAa;CACb,aAAa;CACb,cAAc;CACd,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,cAAc;CACd,kBAAkB;CAClB,sBAAsB;AACxB;AASA,SAAS,EAAgB,GAAsC;CAC7D,IAAI,GAAU;EACZ,IAAM,IAAa,EAAe,CAAQ;EAC1C,IAAI,GAAY,OAAO;CACzB;CACA,OAAO;AACT;AAGA,eAAe,EAAiB,GAA6B;CAC3D,IAAI,OAAO,gBAAkB,KAAa;EACxC,IAAM,IAAO,IAAI,KAAK,CAAC,CAAI,GAAG,EAAC,MAAM,aAAY,CAAC;EAClD,MAAM,UAAU,UAAU,MAAM,CAAC,IAAI,cAAc,EAAC,cAAc,EAAI,CAAC,CAAC,CAAC;CAC3E,OAEE,MAAM,UAAU,UAAU,UAAU,CAAI;AAE5C;AAEA,IAAa,KACX,MACoB;CACpB,IAAM,EACJ,WACA,eAAY,GACZ,aACA,UACA,cACA,aACA,SACA,oBACA,aACA,gBACE,GAEE,IAAQ,EAAuB,IAAI,GACnC,CAAC,GAAQ,KAAa,EAAS,EAAK;CAE1C,QAAsB;EACpB,AAAI,KACF,EAAS,GAAQ,EAAM,OAAO;CAElC,GAAG,CAAC,GAAU,CAAM,CAAC;CAErB,IAAM,IAAmB,EAAmB,CAAS,GAE/C,IAAa,EAAY,YAAY;EACzC,IAAM,IAAO,KAAK,UAAU,GAAQ,MAAM,CAAC,GACvC,IAAU;EACd,IAAI;GAIF,AAHA,MAAM,EAAiB,CAAI,GAC3B,IAAU,IACV,EAAU,EAAI,GACd,iBAAiB,EAAU,EAAK,GAAG,GAAI;EACzC,SAAS,GAAK;GACZ,QAAQ,KAAK,wCAAwC,CAAG;EAC1D;EACA,IAAW,EAAC,WAAO,CAAC;CACtB,GAAG,CAAC,GAAQ,CAAQ,CAAC,GAEf,IAAa,EAAgB,CAAQ,GACrC,IAAgB;CAEtB,OACE,kBAAC,OAAD;EACE,WAAW,CAAC,EAAK,QAAQ,CAAS,GAAG,YAAY,EAAE,KAAK,GAAG;EAC3D,KAAK;EACL,gBAAc;EACP;YAJT,CAMG,KACC,kBAAC,UAAD;GACE,MAAK;GACL,cAAY,IAAS,YAAY;GACjC,OAAO,IAAS,YAAY;GAC5B,WAAW,cAAc,IAAS,uBAAuB;GACzD,SAAS;aAER,IACC,kBAAC,GAAD;IAAe,MAAM;IAAI,aAAa;GAAM,CAAA,IAE5C,kBAAC,GAAD;IAAY,MAAM;IAAI,aAAa;GAAI,CAAA;EAEnC,CAAA,GAEV,kBAAC,GAAD;GACE,MAAM;GACY;GAClB,OAAO;GACP,mBAAA;EACD,CAAA,CACE;;AAET"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
|
|
2
|
+
//#region src/cards/jsonViewer/jsonViewer.types.ts
|
|
3
|
+
var r = "json-viewer", i = e(r), a = n(r, ["clicked", "copied"]), o = t(a.CLICKED), s = t(a.COPIED);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { a as JSON_VIEWER_ACTION, r as JSON_VIEWER_CARD, i as JsonViewer, o as onJsonViewerClicked, s as onJsonViewerCopied };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=jsonViewer.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonViewer.types.js","names":[],"sources":["../../../src/cards/jsonViewer/jsonViewer.types.ts"],"sourcesContent":["import {\n createCardDeclaration,\n createOnAction,\n registerActions,\n} from \"@pihanga2/core\";\n\nexport const JSON_VIEWER_CARD = \"json-viewer\";\n\nexport const JsonViewer = createCardDeclaration<\n JsonViewerProps,\n JsonViewerEvents\n>(JSON_VIEWER_CARD);\n\nexport const JSON_VIEWER_ACTION = registerActions(JSON_VIEWER_CARD, [\n \"clicked\",\n \"copied\",\n]);\n\nexport const onJsonViewerClicked = createOnAction<ClickedEvent>(\n JSON_VIEWER_ACTION.CLICKED,\n);\n\nexport const onJsonViewerCopied = createOnAction<CopiedEvent>(\n JSON_VIEWER_ACTION.COPIED,\n);\n\nexport type JsonViewerProps<S = object> = {\n /** The JSON value to display. */\n source: unknown;\n /**\n * Theme name. Maps loosely to a visual style.\n * Use \"monokai\", \"solarized\", \"ocean\", etc. (visual only — actual theming\n * is done via className / global CSS since react-json-view-lite uses CSS\n * variables rather than named themes).\n */\n theme?: string;\n iconStyle?: \"circle\" | \"triangle\" | \"square\";\n /**\n * When `true`, all nodes are collapsed.\n * When `false`, all nodes are expanded.\n * When a number N, nodes at depth >= N are collapsed (root is depth 0).\n * Default: 1 (expand root only).\n */\n collapsed?: boolean | number;\n /** When `true`, a click-to-expand interaction is enabled on node labels. */\n enableClipboard?: boolean;\n /** When `true`, removes quotes from object keys in display. */\n removeQuotesOnKeys?: boolean;\n /** When `true`, objects and arrays are labelled with their size. */\n displayObjectSize?: boolean;\n /** When `true`, data-type labels prefix values. */\n displayDataTypes?: boolean;\n /**\n * Called after the JSON is rendered, allowing post-render DOM modifications.\n * Receives the raw `source` value and the container element.\n */\n modifyFn?: ModifyFn;\n\n /**\n * When `true`, shows a copy-to-clipboard icon button in the top-right\n * corner of the viewer. Clicking it copies the pretty-printed JSON to the\n * clipboard using `ClipboardItem` with `text/plain` MIME type.\n */\n copyToClipboard?: boolean;\n\n /**\n * Icon name resolved via the global icon registry (`getIconElement`).\n * If omitted or the name is not registered, falls back to the Lucide\n * `Copy` icon automatically.\n *\n * @example\n * // Register your own icon first:\n * registerIcon(\"my-copy\", MyCustomCopyIcon);\n * // Then pass the name to the card:\n * JsonViewer({ copyToClipboard: true, copyIcon: \"my-copy\", ... })\n */\n copyIcon?: string;\n\n /** Inline style for the react-json-view-lite container. */\n style?: S;\n /** Additional CSS class for the outer wrapper. */\n className?: string;\n};\n\nexport type ModifyFn = (source: unknown, el: HTMLElement | null) => void;\n\nexport type ClickedEvent = Record<string, never>;\n\nexport type CopiedEvent = {\n /** `true` when the clipboard write succeeded, `false` on error. */\n success: boolean;\n};\n\nexport type JsonViewerEvents = {\n onClicked: ClickedEvent;\n onCopied: CopiedEvent;\n};\n"],"mappings":";;AAMA,IAAa,IAAmB,eAEnB,IAAa,EAGxB,CAAgB,GAEL,IAAqB,EAAgB,GAAkB,CAClE,WACA,QACF,CAAC,GAEY,IAAsB,EACjC,EAAmB,OACrB,GAEa,IAAqB,EAChC,EAAmB,MACrB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getIcon as e } from "../icons.js";
|
|
2
|
+
import { Badge as t } from "../../components/ui/badge.js";
|
|
3
|
+
import { cn as n } from "../../lib/utils.js";
|
|
4
4
|
import { Avatar as r, AvatarFallback as i, AvatarImage as a } from "../../components/ui/avatar.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { Card as s } from "@pihanga2/core";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
import { ChevronDown as u } from "lucide-react";
|
|
9
9
|
//#region src/cards/list/list.component.tsx
|
|
@@ -20,75 +20,75 @@ var d = {
|
|
|
20
20
|
md: "size-6",
|
|
21
21
|
lg: "size-7"
|
|
22
22
|
};
|
|
23
|
-
function m(
|
|
24
|
-
if (!
|
|
25
|
-
switch (
|
|
23
|
+
function m(o, u, d) {
|
|
24
|
+
if (!o) return null;
|
|
25
|
+
switch (o.type) {
|
|
26
26
|
case "icon": return /* @__PURE__ */ c("span", {
|
|
27
|
-
className:
|
|
28
|
-
children:
|
|
27
|
+
className: n("flex shrink-0 items-center [&>svg]:size-4", o.className),
|
|
28
|
+
children: e(o.name)
|
|
29
29
|
});
|
|
30
30
|
case "avatar": return /* @__PURE__ */ l(r, {
|
|
31
|
-
className:
|
|
32
|
-
children: [/* @__PURE__ */ c(a, { src:
|
|
31
|
+
className: n(p[u], o.className),
|
|
32
|
+
children: [/* @__PURE__ */ c(a, { src: o.src }), /* @__PURE__ */ c(i, { children: o.fallback ?? "" })]
|
|
33
33
|
});
|
|
34
|
-
case "chip": return /* @__PURE__ */ c(
|
|
34
|
+
case "chip": return /* @__PURE__ */ c(t, {
|
|
35
35
|
variant: "secondary",
|
|
36
|
-
className:
|
|
37
|
-
children:
|
|
36
|
+
className: o.className,
|
|
37
|
+
children: o.text
|
|
38
38
|
});
|
|
39
|
-
case "card": return /* @__PURE__ */ c(
|
|
40
|
-
cardName:
|
|
39
|
+
case "card": return /* @__PURE__ */ c(s, {
|
|
40
|
+
cardName: o.cardName,
|
|
41
41
|
parentCard: d
|
|
42
42
|
});
|
|
43
43
|
default: return null;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function h({ item: e, size:
|
|
47
|
-
let [a,
|
|
46
|
+
function h({ item: e, size: t, onItemClicked: r, cardName: i }) {
|
|
47
|
+
let [a, s] = o.useState(!1), p = !!e.nested?.length;
|
|
48
48
|
function g() {
|
|
49
|
-
p ?
|
|
49
|
+
p ? s((e) => !e) : r({ itemID: e.id });
|
|
50
50
|
}
|
|
51
51
|
return /* @__PURE__ */ l("li", { children: [/* @__PURE__ */ l("button", {
|
|
52
52
|
type: "button",
|
|
53
|
-
className:
|
|
53
|
+
className: n("flex w-full items-center rounded-sm outline-none transition-colors", "hover:bg-accent hover:text-accent-foreground", "focus-visible:ring-1 focus-visible:ring-ring", e.isSelected && "bg-accent text-accent-foreground font-medium", d[t], e.className),
|
|
54
54
|
onClick: g,
|
|
55
55
|
"aria-expanded": p ? a : void 0,
|
|
56
56
|
"data-selected": e.isSelected || void 0,
|
|
57
57
|
children: [
|
|
58
|
-
m(e.startDecorator,
|
|
58
|
+
m(e.startDecorator, t, i),
|
|
59
59
|
/* @__PURE__ */ l("span", {
|
|
60
60
|
className: "flex min-w-0 flex-1 flex-col items-start",
|
|
61
61
|
children: [/* @__PURE__ */ c("span", {
|
|
62
62
|
className: "truncate leading-none",
|
|
63
63
|
children: e.title
|
|
64
64
|
}), e.subTitle && /* @__PURE__ */ c("span", {
|
|
65
|
-
className:
|
|
65
|
+
className: n("mt-0.5 truncate text-muted-foreground", f[t]),
|
|
66
66
|
children: e.subTitle
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
!p && m(e.endDecorator,
|
|
70
|
-
p && /* @__PURE__ */ c(u, { className:
|
|
69
|
+
!p && m(e.endDecorator, t, i),
|
|
70
|
+
p && /* @__PURE__ */ c(u, { className: n("ml-auto size-4 shrink-0 text-muted-foreground transition-transform duration-200", a && "rotate-180") })
|
|
71
71
|
]
|
|
72
72
|
}), p && a && /* @__PURE__ */ c("ul", {
|
|
73
|
-
className:
|
|
74
|
-
children: e.nested.map((e,
|
|
73
|
+
className: n("ml-3 mt-0.5 flex flex-col gap-0.5 border-l border-border pl-2", "list-none p-0", t === "lg" ? "ml-4 pl-3" : "ml-3 pl-2"),
|
|
74
|
+
children: e.nested.map((e, n) => /* @__PURE__ */ c(h, {
|
|
75
75
|
item: e,
|
|
76
|
-
size:
|
|
76
|
+
size: t,
|
|
77
77
|
onItemClicked: r,
|
|
78
78
|
cardName: i
|
|
79
|
-
}, e.id ??
|
|
79
|
+
}, e.id ?? n))
|
|
80
80
|
})] });
|
|
81
81
|
}
|
|
82
82
|
var g = (e) => {
|
|
83
|
-
let { items:
|
|
83
|
+
let { items: t, size: r = "md", marker: i, className: a, style: o, onItemClicked: s, cardName: l } = e, u = {
|
|
84
84
|
...o,
|
|
85
85
|
...i && i !== "none" ? { listStyleType: i } : void 0
|
|
86
86
|
};
|
|
87
87
|
return /* @__PURE__ */ c("ul", {
|
|
88
|
-
className:
|
|
88
|
+
className: n("flex flex-col gap-0.5 p-0", i && i !== "none" ? "list-inside" : "list-none", a),
|
|
89
89
|
style: u,
|
|
90
90
|
"data-pihanga": l,
|
|
91
|
-
children:
|
|
91
|
+
children: t.map((e, t) => /* @__PURE__ */ c(h, {
|
|
92
92
|
item: e,
|
|
93
93
|
size: r,
|
|
94
94
|
onItemClicked: s,
|
package/cards/list/list.types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
|
|
2
1
|
import "react";
|
|
2
|
+
import { createCardDeclaration as e, createOnAction as t, registerActions as n } from "@pihanga2/core";
|
|
3
3
|
//#region src/cards/list/list.types.ts
|
|
4
4
|
var r = "shad/list", i = e(r), a = n(r, ["item_clicked"]), o = t(a.ITEM_CLICKED);
|
|
5
5
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Spinner as e } from "../../components/ui/spinner.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { Card as t } from "@pihanga2/core";
|
|
4
3
|
import "react";
|
|
4
|
+
import { Card as t } from "@pihanga2/core";
|
|
5
5
|
import n from "clsx";
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
7
|
//#region src/cards/loadingOverlay/loadingOverlay.component.tsx
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getIconElement as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { SCREEN_SIZE_ORDER as e, SCREEN_SIZE_WIDTHS as t, ScreenSize as n } from "../types.js";
|
|
2
|
+
import { getIconElement as r } from "../icons.js";
|
|
3
|
+
import { Button as i } from "../../components/ui/button.js";
|
|
4
|
+
import { Sheet as a, SheetContent as o, SheetTrigger as s } from "../../components/ui/sheet.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
7
|
+
import { Card as d } from "@pihanga2/core";
|
|
8
8
|
import f from "clsx";
|
|
9
9
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
import { Menu as h } from "lucide-react";
|
|
11
11
|
//#region src/cards/pageWithNavbar/pageWithNavbar.component.tsx
|
|
12
12
|
function g() {
|
|
13
|
-
let
|
|
14
|
-
for (let
|
|
15
|
-
let
|
|
16
|
-
if (
|
|
13
|
+
let r = typeof window < "u" ? window.innerWidth : 0;
|
|
14
|
+
for (let n = e.length - 1; n >= 0; n--) {
|
|
15
|
+
let i = e[n];
|
|
16
|
+
if (r >= t[i]) return i;
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return n.XS;
|
|
19
19
|
}
|
|
20
20
|
function _() {
|
|
21
|
-
let [e, t] =
|
|
22
|
-
return
|
|
21
|
+
let [e, t] = u(g);
|
|
22
|
+
return c(() => {
|
|
23
23
|
let e = () => t(g());
|
|
24
24
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
25
25
|
}, []), e;
|
|
@@ -27,19 +27,19 @@ function _() {
|
|
|
27
27
|
function v(e) {
|
|
28
28
|
return typeof e == "object" && !!e;
|
|
29
29
|
}
|
|
30
|
-
function y(
|
|
31
|
-
if (!
|
|
32
|
-
if (!v(
|
|
33
|
-
let
|
|
34
|
-
for (let
|
|
35
|
-
let
|
|
36
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
30
|
+
function y(t, n) {
|
|
31
|
+
if (!t) return;
|
|
32
|
+
if (!v(t)) return t;
|
|
33
|
+
let r = e.indexOf(n);
|
|
34
|
+
for (let n = r; n >= 0; n--) {
|
|
35
|
+
let r = e[n];
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r] ?? void 0;
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return t.default ?? void 0;
|
|
39
39
|
}
|
|
40
|
-
var b = (
|
|
41
|
-
let { title:
|
|
42
|
-
|
|
40
|
+
var b = (e) => {
|
|
41
|
+
let { title: t, iconName: n, main: u, footer: g, navLinks: v = [], scrollResetKey: b, headerLeftCard: S, headerRightCard: C, style: w, onNavigateTo: T, cardName: E } = e, D = _(), O = w ?? {}, k = l(null);
|
|
42
|
+
c(() => {
|
|
43
43
|
k.current?.scrollTo({
|
|
44
44
|
top: 0,
|
|
45
45
|
behavior: "auto"
|
|
@@ -47,15 +47,15 @@ var b = (a) => {
|
|
|
47
47
|
}, [b]);
|
|
48
48
|
let A = y(S, D), j = y(C, D), M = v.length > 0;
|
|
49
49
|
function N({ className: e }) {
|
|
50
|
-
let
|
|
50
|
+
let i = n ? r(n) : void 0;
|
|
51
51
|
return /* @__PURE__ */ m("div", {
|
|
52
52
|
className: f("title-section", e),
|
|
53
|
-
children: [
|
|
53
|
+
children: [i && /* @__PURE__ */ p(i, {
|
|
54
54
|
className: "title-icon",
|
|
55
55
|
"aria-hidden": !0
|
|
56
56
|
}), /* @__PURE__ */ p("span", {
|
|
57
57
|
className: "title-text",
|
|
58
|
-
children:
|
|
58
|
+
children: t
|
|
59
59
|
})]
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -63,18 +63,18 @@ var b = (a) => {
|
|
|
63
63
|
return /* @__PURE__ */ m("nav", {
|
|
64
64
|
className: "nav-md",
|
|
65
65
|
"aria-label": "Main navigation",
|
|
66
|
-
children: [/* @__PURE__ */ p(N, {}), v.map((
|
|
67
|
-
onClick: () => T({ id:
|
|
66
|
+
children: [/* @__PURE__ */ p(N, {}), v.map((e) => /* @__PURE__ */ p(i, {
|
|
67
|
+
onClick: () => T({ id: e.id }),
|
|
68
68
|
variant: "link",
|
|
69
69
|
className: "nav-link",
|
|
70
|
-
children:
|
|
71
|
-
},
|
|
70
|
+
children: e.title ?? x(e.id)
|
|
71
|
+
}, e.id))]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
function F() {
|
|
75
|
-
return /* @__PURE__ */ m(
|
|
75
|
+
return /* @__PURE__ */ m(a, { children: [/* @__PURE__ */ p(s, {
|
|
76
76
|
asChild: !0,
|
|
77
|
-
children: /* @__PURE__ */ p(
|
|
77
|
+
children: /* @__PURE__ */ p(i, {
|
|
78
78
|
variant: "outline",
|
|
79
79
|
size: "icon",
|
|
80
80
|
className: "shrink-0 md:hidden",
|
|
@@ -84,17 +84,17 @@ var b = (a) => {
|
|
|
84
84
|
"aria-hidden": !0
|
|
85
85
|
})
|
|
86
86
|
})
|
|
87
|
-
}), /* @__PURE__ */ p(
|
|
87
|
+
}), /* @__PURE__ */ p(o, {
|
|
88
88
|
side: "left",
|
|
89
89
|
children: /* @__PURE__ */ m("nav", {
|
|
90
90
|
className: "nav-sm",
|
|
91
91
|
"aria-label": "Mobile navigation",
|
|
92
|
-
children: [/* @__PURE__ */ p(N, {}), v.map((
|
|
93
|
-
onClick: () => T({ id:
|
|
92
|
+
children: [/* @__PURE__ */ p(N, {}), v.map((e) => /* @__PURE__ */ p(i, {
|
|
93
|
+
onClick: () => T({ id: e.id }),
|
|
94
94
|
variant: "link",
|
|
95
95
|
className: "nav-link",
|
|
96
|
-
children:
|
|
97
|
-
},
|
|
96
|
+
children: e.title ?? x(e.id)
|
|
97
|
+
}, e.id))]
|
|
98
98
|
})
|
|
99
99
|
})] });
|
|
100
100
|
}
|
|
@@ -115,10 +115,10 @@ var b = (a) => {
|
|
|
115
115
|
}),
|
|
116
116
|
/* @__PURE__ */ m("div", {
|
|
117
117
|
className: "header-actions",
|
|
118
|
-
children: [A && /* @__PURE__ */ p(
|
|
118
|
+
children: [A && /* @__PURE__ */ p(d, {
|
|
119
119
|
cardName: A,
|
|
120
120
|
parentCard: E
|
|
121
|
-
}), j && /* @__PURE__ */ p(
|
|
121
|
+
}), j && /* @__PURE__ */ p(d, {
|
|
122
122
|
cardName: j,
|
|
123
123
|
parentCard: E
|
|
124
124
|
})]
|
|
@@ -128,14 +128,14 @@ var b = (a) => {
|
|
|
128
128
|
/* @__PURE__ */ p("main", {
|
|
129
129
|
className: f("main", O.main),
|
|
130
130
|
ref: k,
|
|
131
|
-
children: /* @__PURE__ */ p(
|
|
132
|
-
cardName:
|
|
131
|
+
children: /* @__PURE__ */ p(d, {
|
|
132
|
+
cardName: u,
|
|
133
133
|
parentCard: E
|
|
134
134
|
})
|
|
135
135
|
}),
|
|
136
136
|
g && /* @__PURE__ */ p("footer", {
|
|
137
137
|
className: f("footer", O.footer),
|
|
138
|
-
children: /* @__PURE__ */ p(
|
|
138
|
+
children: /* @__PURE__ */ p(d, {
|
|
139
139
|
cardName: g,
|
|
140
140
|
parentCard: E
|
|
141
141
|
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefResizableHandle as e, RESIZABLE_CARD as t, Resizable as n, SdResizable as r } from "./resizable.types.js";
|
|
2
|
+
import { ResizableComponent as i } from "./resizable.component.js";
|
|
3
|
+
import { registerCardComponent as a } from "@pihanga2/core";
|
|
4
|
+
//#region src/cards/resizable/index.ts
|
|
5
|
+
a({
|
|
6
|
+
name: t,
|
|
7
|
+
component: i
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as DefResizableHandle, t as RESIZABLE_CARD, n as Resizable, r as SdResizable };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/cards/resizable/index.ts"],"sourcesContent":["import {registerCardComponent} from \"@pihanga2/core\";\n\nimport {ResizableComponent} from \"./resizable.component\";\nimport {RESIZABLE_CARD} from \"./resizable.types\";\n\nexport * from \"./resizable.types\";\n\nregisterCardComponent({\n name: RESIZABLE_CARD,\n component: ResizableComponent,\n});\n"],"mappings":";;;;AAOA,EAAsB;CACpB,MAAM;CACN,WAAW;AACb,CAAC"}
|