@bwlng/blocks 0.1.0-fork.2e294b1
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/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +971 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +3 -0
- package/dist/validation-BG2u9jAE.d.ts +450 -0
- package/dist/validation-BG2u9jAE.d.ts.map +1 -0
- package/dist/validation-DAttVLF0.js +1051 -0
- package/dist/validation-DAttVLF0.js.map +1 -0
- package/package.json +53 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { A as ImageBlock, B as TableBlock, C as Element, D as FormField, E as FormBlock, F as SecretInputElement, H as TextInputElement, I as SectionBlock, L as SelectElement, M as NumberInputElement, N as PageLoad, O as FormSubmit, P as RadioElement, R as StatItem, S as DividerBlock, T as FieldsBlock, U as TimeseriesChartConfig, V as TableColumn, W as ToggleElement, _ as ComboboxElement, a as BannerBlock, b as CustomChartConfig, c as BlockInteraction, d as ChartBlock, f as ChartConfig, g as ColumnsBlock, h as CodeBlock, i as ActionsBlock, j as MeterBlock, k as HeaderBlock, l as BlockResponse, m as CheckboxElement, n as blocks$1, o as Block, p as ChartSeries, r as elements, s as BlockAction, t as validateBlocks, u as ButtonElement, v as ConfirmDialog, w as FieldCondition, x as DateInputElement, y as ContextBlock, z as StatsBlock } from "./validation-BG2u9jAE.js";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "clsx";
|
|
4
|
+
|
|
5
|
+
//#region src/renderer.d.ts
|
|
6
|
+
interface BlockRendererProps {
|
|
7
|
+
blocks: Block[];
|
|
8
|
+
onAction: (interaction: BlockInteraction) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function BlockRenderer({
|
|
11
|
+
blocks,
|
|
12
|
+
onAction
|
|
13
|
+
}: BlockRendererProps): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/render-element.d.ts
|
|
16
|
+
declare function renderElement(element: Element, onAction: (interaction: BlockInteraction) => void, onChange?: (actionId: string, value: unknown) => void): React.ReactNode;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/utils.d.ts
|
|
19
|
+
declare function cn(...inputs: Parameters<typeof clsx>): string;
|
|
20
|
+
declare function formatRelativeTime(iso: string): string;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { type ActionsBlock, type BannerBlock, type Block, type BlockAction, type BlockInteraction, BlockRenderer, type BlockRendererProps, type BlockResponse, type ButtonElement, type ChartBlock, type ChartConfig, type ChartSeries, type CheckboxElement, type CodeBlock, type ColumnsBlock, type ComboboxElement, type ConfirmDialog, type ContextBlock, type CustomChartConfig, type DateInputElement, type DividerBlock, type Element, type FieldCondition, type FieldsBlock, type FormBlock, type FormField, type FormSubmit, type HeaderBlock, type ImageBlock, type MeterBlock, type NumberInputElement, type PageLoad, type RadioElement, type SecretInputElement, type SectionBlock, type SelectElement, type StatItem, type StatsBlock, type TableBlock, type TableColumn, type TextInputElement, type TimeseriesChartConfig, type ToggleElement, blocks$1 as blocks, cn, elements, formatRelativeTime, renderElement, validateBlocks };
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/renderer.tsx","../src/render-element.tsx","../src/utils.ts"],"mappings":";;;;;UA2DiB,kBAAA;EAChB,MAAA,EAAQ,KAAA;EACR,QAAA,GAAW,WAAA,EAAa,gBAAA;AAAA;AAAA,iBAGT,aAAA,CAAA;EAAgB,MAAA;EAAQ;AAAA,GAAY,kBAAA,GAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;iBCpDtD,aAAA,CACf,OAAA,EAAS,OAAA,EACT,QAAA,GAAW,WAAA,EAAa,gBAAA,WACxB,QAAA,IAAY,QAAA,UAAkB,KAAA,qBAC5B,KAAA,CAAM,SAAA;;;iBCZO,EAAA,CAAA,GAAM,MAAA,EAAQ,UAAA,QAAkB,IAAA;AAAA,iBAuDhC,kBAAA,CAAmB,GAAA"}
|