@nodex.ui/core 1.0.0 → 1.0.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 +70 -1
- package/README.md +21 -13
- package/bin/create-nodexui-app.mjs +13 -4
- package/bin/docs.mjs +340 -0
- package/dist/nodexui.apidoc.esm.js +45 -29
- package/dist/nodexui.apidoc.min.js +45 -29
- package/dist/nodexui.esm.js +38 -27
- package/dist/nodexui.min.css +1 -1
- package/dist/nodexui.min.js +61 -50
- package/dist/nodexui.pwa.esm.js +9 -5
- package/dist/nodexui.qr.esm.js +3 -3
- package/dist/nodexui.qr.min.js +3 -3
- package/dist/nodexui.registry.json +30 -15
- package/dist/nodexui.templates.xml +22 -6
- package/dist/nodexui.vite.esm.js +12 -8
- package/dist/runtime/lazy/apidoc.logic.js +19 -19
- package/dist/types/index.d.ts +297 -0
- package/dist/types/qr.d.ts +63 -1
- package/docs/analytics.md +6 -8
- package/docs/base-ui-skill.md +1 -1
- package/docs/blocks.md +4 -4
- package/docs/components/chart.md +1 -1
- package/docs/components/data-table.md +49 -5
- package/docs/components/doc-viewer.md +68 -0
- package/docs/components/markdown.md +27 -2
- package/docs/components/readme.md +85 -0
- package/docs/i18n.md +1 -1
- package/docs/icons.md +1 -1
- package/docs/index.md +132 -0
- package/docs/installation.md +2 -2
- package/docs/owl-components.md +1 -1
- package/docs/qr.md +44 -3
- package/docs/readme.md +26 -0
- package/docs/theming.md +2 -2
- package/docs/usage-guide.md +5 -5
- package/package.json +10 -8
- package/dist/nodexui.block-viewer.esm.js +0 -46
- /package/dist/runtime/mermaid/{mermaid.esm.min.mjs → mermaid.esm.min.js} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -56,3 +56,300 @@ export const NodexUITheme: NodexUIThemeController;
|
|
|
56
56
|
export function createThemeController(options?: NodexUIThemeOptions): NodexUIThemeController;
|
|
57
57
|
export function normalizeTheme(value: unknown): "light" | "dark";
|
|
58
58
|
export default NodexUI;
|
|
59
|
+
|
|
60
|
+
/** Owl's Component (with Nodex UI's global component fallback). */
|
|
61
|
+
export class Component<Props extends object = any, Env = any> {
|
|
62
|
+
static template: string;
|
|
63
|
+
static components?: Record<string, any>;
|
|
64
|
+
static props?: any;
|
|
65
|
+
static defaultProps?: Record<string, unknown>;
|
|
66
|
+
props: Props;
|
|
67
|
+
env: Env;
|
|
68
|
+
constructor(props: Props, env: Env, node: unknown);
|
|
69
|
+
setup(): void;
|
|
70
|
+
render(deep?: boolean): void;
|
|
71
|
+
}
|
|
72
|
+
export type ComponentConstructor<Props extends object = any> = new (props: Props, env: any, node: any) => Component<Props>;
|
|
73
|
+
export interface MountConfig {
|
|
74
|
+
env?: object;
|
|
75
|
+
props?: object;
|
|
76
|
+
dev?: boolean;
|
|
77
|
+
translateFn?: (text: string) => string;
|
|
78
|
+
templates?: string | Document;
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
export function mount<C extends ComponentConstructor>(ComponentClass: C, target: HTMLElement, config?: MountConfig): Promise<InstanceType<C>>;
|
|
82
|
+
export const rawMount: typeof mount;
|
|
83
|
+
export function xml(strings: TemplateStringsArray | { raw: readonly string[] }, ...values: unknown[]): string;
|
|
84
|
+
export const rawXml: typeof xml;
|
|
85
|
+
export function loadTemplate(url: string): Promise<string>;
|
|
86
|
+
export function registerGlobalComponents(components: Record<string, unknown>): void;
|
|
87
|
+
export function useState<T extends object>(state: T): T;
|
|
88
|
+
export function useRef<T extends HTMLElement = HTMLElement>(name: string): { el: T | null };
|
|
89
|
+
export function useEnv<E = any>(): E;
|
|
90
|
+
export function useComponent<C = Component>(): C;
|
|
91
|
+
export function useSubEnv(envExtension: object): void;
|
|
92
|
+
export function useChildSubEnv(envExtension: object): void;
|
|
93
|
+
export function useEffect(effect: () => void | (() => void), computeDependencies?: () => unknown[]): void;
|
|
94
|
+
export function useExternalListener(target: EventTarget, eventName: string, handler: (event: any) => void, eventParams?: AddEventListenerOptions): void;
|
|
95
|
+
export function onWillStart(callback: () => void | Promise<void>): void;
|
|
96
|
+
export function onWillUpdateProps(callback: (nextProps: any) => void | Promise<void>): void;
|
|
97
|
+
export function onMounted(callback: () => void): void;
|
|
98
|
+
export function onWillPatch(callback: () => void | Promise<void>): void;
|
|
99
|
+
export function onPatched(callback: () => void): void;
|
|
100
|
+
export function onWillRender(callback: () => void): void;
|
|
101
|
+
export function onRendered(callback: () => void): void;
|
|
102
|
+
export function onWillUnmount(callback: () => void): void;
|
|
103
|
+
export function onWillDestroy(callback: () => void): void;
|
|
104
|
+
export function onError(callback: (error: unknown) => void): void;
|
|
105
|
+
export function reactive<T extends object>(target: T, callback?: () => void): T;
|
|
106
|
+
export function markRaw<T extends object>(value: T): T;
|
|
107
|
+
export function toRaw<T extends object>(value: T): T;
|
|
108
|
+
export function markup(value: string): string;
|
|
109
|
+
export function batched(callback: () => void): () => void;
|
|
110
|
+
export function whenReady(callback?: () => void): Promise<void>;
|
|
111
|
+
export function loadFile(url: string): Promise<string>;
|
|
112
|
+
export function htmlEscape(value: unknown): string;
|
|
113
|
+
export function validate(object: object, schema: object): void;
|
|
114
|
+
export function validateType(value: unknown, validation: unknown): boolean;
|
|
115
|
+
export function status(component: Component): "new" | "mounted" | "cancelled" | "destroyed";
|
|
116
|
+
export class App { constructor(root: ComponentConstructor, config?: MountConfig); mount(target: HTMLElement): Promise<Component>; destroy(): void; }
|
|
117
|
+
export class EventBus extends EventTarget {}
|
|
118
|
+
export class OwlError extends Error {}
|
|
119
|
+
export const __info__: { version: string };
|
|
120
|
+
export function cn(...values: unknown[]): string;
|
|
121
|
+
export function mergeStyle(...values: unknown[]): string;
|
|
122
|
+
export const NodexUIComponents: Record<string, typeof Component>;
|
|
123
|
+
export const Accordion: typeof Component;
|
|
124
|
+
export const AccordionContent: typeof Component;
|
|
125
|
+
export const AccordionItem: typeof Component;
|
|
126
|
+
export const AccordionTrigger: typeof Component;
|
|
127
|
+
export const Alert: typeof Component;
|
|
128
|
+
export const AlertAction: typeof Component;
|
|
129
|
+
export const AlertDescription: typeof Component;
|
|
130
|
+
export const AlertDialog: typeof Component;
|
|
131
|
+
export const AlertDialogAction: typeof Component;
|
|
132
|
+
export const AlertDialogCancel: typeof Component;
|
|
133
|
+
export const AlertDialogContent: typeof Component;
|
|
134
|
+
export const AlertDialogDescription: typeof Component;
|
|
135
|
+
export const AlertDialogFooter: typeof Component;
|
|
136
|
+
export const AlertDialogHeader: typeof Component;
|
|
137
|
+
export const AlertDialogMedia: typeof Component;
|
|
138
|
+
export const AlertDialogTitle: typeof Component;
|
|
139
|
+
export const AlertDialogTrigger: typeof Component;
|
|
140
|
+
export const AlertTitle: typeof Component;
|
|
141
|
+
export const ApiDoc: typeof Component;
|
|
142
|
+
export const ApiDocGroup: typeof Component;
|
|
143
|
+
export const AspectRatio: typeof Component;
|
|
144
|
+
export const Attachment: typeof Component;
|
|
145
|
+
export const AttachmentAction: typeof Component;
|
|
146
|
+
export const AttachmentActions: typeof Component;
|
|
147
|
+
export const AttachmentContent: typeof Component;
|
|
148
|
+
export const AttachmentDescription: typeof Component;
|
|
149
|
+
export const AttachmentDropzone: typeof Component;
|
|
150
|
+
export const AttachmentGroup: typeof Component;
|
|
151
|
+
export const AttachmentMedia: typeof Component;
|
|
152
|
+
export const AttachmentTitle: typeof Component;
|
|
153
|
+
export const AttachmentTrigger: typeof Component;
|
|
154
|
+
export const Avatar: typeof Component;
|
|
155
|
+
export const Badge: typeof Component;
|
|
156
|
+
export const BlockViewer: typeof Component;
|
|
157
|
+
export const Breadcrumb: typeof Component;
|
|
158
|
+
export const BreadcrumbEllipsis: typeof Component;
|
|
159
|
+
export const BreadcrumbItem: typeof Component;
|
|
160
|
+
export const BreadcrumbLink: typeof Component;
|
|
161
|
+
export const BreadcrumbList: typeof Component;
|
|
162
|
+
export const BreadcrumbPage: typeof Component;
|
|
163
|
+
export const BreadcrumbSeparator: typeof Component;
|
|
164
|
+
export const Bubble: typeof Component;
|
|
165
|
+
export const Button: typeof Component;
|
|
166
|
+
export const ButtonGroup: typeof Component;
|
|
167
|
+
export const ButtonGroupSeparator: typeof Component;
|
|
168
|
+
export const ButtonGroupText: typeof Component;
|
|
169
|
+
export const Calendar: typeof Component;
|
|
170
|
+
export const Card: typeof Component;
|
|
171
|
+
export const CardBody: typeof Component;
|
|
172
|
+
export const CardDescription: typeof Component;
|
|
173
|
+
export const CardFooter: typeof Component;
|
|
174
|
+
export const CardHeader: typeof Component;
|
|
175
|
+
export const CardTitle: typeof Component;
|
|
176
|
+
export const Carousel: typeof Component;
|
|
177
|
+
export const CarouselNext: typeof Component;
|
|
178
|
+
export const CarouselPrevious: typeof Component;
|
|
179
|
+
export const CarouselSlide: typeof Component;
|
|
180
|
+
export const Chart: typeof Component;
|
|
181
|
+
export const Checkbox: typeof Component;
|
|
182
|
+
export const ClipboardButton: typeof Component;
|
|
183
|
+
export const CodeEditor: typeof Component;
|
|
184
|
+
export const Collapsible: typeof Component;
|
|
185
|
+
export const CollapsibleContent: typeof Component;
|
|
186
|
+
export const CollapsibleTrigger: typeof Component;
|
|
187
|
+
export const Combobox: typeof Component;
|
|
188
|
+
export const Command: typeof Component;
|
|
189
|
+
export const ContextMenu: typeof Component;
|
|
190
|
+
export const ContextMenuContent: typeof Component;
|
|
191
|
+
export const ContextMenuItem: typeof Component;
|
|
192
|
+
export const ContextMenuTrigger: typeof Component;
|
|
193
|
+
export const DataTable: typeof Component;
|
|
194
|
+
export const DatePicker: typeof Component;
|
|
195
|
+
export const Dialog: typeof Component;
|
|
196
|
+
export const DialogClose: typeof Component;
|
|
197
|
+
export const DialogContent: typeof Component;
|
|
198
|
+
export const DialogDescription: typeof Component;
|
|
199
|
+
export const DialogFooter: typeof Component;
|
|
200
|
+
export const DialogHeader: typeof Component;
|
|
201
|
+
export const DialogTitle: typeof Component;
|
|
202
|
+
export const DialogTrigger: typeof Component;
|
|
203
|
+
export const Direction: typeof Component;
|
|
204
|
+
export const DocViewer: typeof Component;
|
|
205
|
+
export const Drawer: typeof Component;
|
|
206
|
+
export const DrawerClose: typeof Component;
|
|
207
|
+
export const DrawerContent: typeof Component;
|
|
208
|
+
export const DrawerDescription: typeof Component;
|
|
209
|
+
export const DrawerFooter: typeof Component;
|
|
210
|
+
export const DrawerHeader: typeof Component;
|
|
211
|
+
export const DrawerTitle: typeof Component;
|
|
212
|
+
export const DrawerTrigger: typeof Component;
|
|
213
|
+
export const DropdownMenu: typeof Component;
|
|
214
|
+
export const DropdownMenuCheckboxItem: typeof Component;
|
|
215
|
+
export const DropdownMenuContent: typeof Component;
|
|
216
|
+
export const DropdownMenuGroup: typeof Component;
|
|
217
|
+
export const DropdownMenuItem: typeof Component;
|
|
218
|
+
export const DropdownMenuLabel: typeof Component;
|
|
219
|
+
export const DropdownMenuRadioGroup: typeof Component;
|
|
220
|
+
export const DropdownMenuRadioItem: typeof Component;
|
|
221
|
+
export const DropdownMenuSeparator: typeof Component;
|
|
222
|
+
export const DropdownMenuShortcut: typeof Component;
|
|
223
|
+
export const DropdownMenuSub: typeof Component;
|
|
224
|
+
export const DropdownMenuSubContent: typeof Component;
|
|
225
|
+
export const DropdownMenuSubTrigger: typeof Component;
|
|
226
|
+
export const DropdownMenuTrigger: typeof Component;
|
|
227
|
+
export const Empty: typeof Component;
|
|
228
|
+
export const EmptyContent: typeof Component;
|
|
229
|
+
export const EmptyDescription: typeof Component;
|
|
230
|
+
export const EmptyHeader: typeof Component;
|
|
231
|
+
export const EmptyMedia: typeof Component;
|
|
232
|
+
export const EmptyTitle: typeof Component;
|
|
233
|
+
export const Field: typeof Component;
|
|
234
|
+
export const FieldContent: typeof Component;
|
|
235
|
+
export const FieldDescription: typeof Component;
|
|
236
|
+
export const FieldError: typeof Component;
|
|
237
|
+
export const FieldGroup: typeof Component;
|
|
238
|
+
export const FieldLabel: typeof Component;
|
|
239
|
+
export const FieldLegend: typeof Component;
|
|
240
|
+
export const FieldSeparator: typeof Component;
|
|
241
|
+
export const FieldSet: typeof Component;
|
|
242
|
+
export const FieldTitle: typeof Component;
|
|
243
|
+
export const Form: typeof Component;
|
|
244
|
+
export const HoverCard: typeof Component;
|
|
245
|
+
export const HoverCardContent: typeof Component;
|
|
246
|
+
export const HoverCardTrigger: typeof Component;
|
|
247
|
+
export const Icon: typeof Component;
|
|
248
|
+
export const Input: typeof Component;
|
|
249
|
+
export const InputOtp: typeof Component;
|
|
250
|
+
export const Item: typeof Component;
|
|
251
|
+
export const Kbd: typeof Component;
|
|
252
|
+
export const Label: typeof Component;
|
|
253
|
+
export const Markdown: typeof Component;
|
|
254
|
+
export const MarkdownTree: typeof Component;
|
|
255
|
+
export const MarkdownTreeNode: typeof Component;
|
|
256
|
+
export const Marker: typeof Component;
|
|
257
|
+
export const Menubar: typeof Component;
|
|
258
|
+
export const Message: typeof Component;
|
|
259
|
+
export const MessageScroller: typeof Component;
|
|
260
|
+
export const NativeSelect: typeof Component;
|
|
261
|
+
export const NavigationMenu: typeof Component;
|
|
262
|
+
export const NavigationMenuItem: typeof Component;
|
|
263
|
+
export const Pagination: typeof Component;
|
|
264
|
+
export const PaginationItem: typeof Component;
|
|
265
|
+
export const Popover: typeof Component;
|
|
266
|
+
export const PopoverContent: typeof Component;
|
|
267
|
+
export const PopoverTrigger: typeof Component;
|
|
268
|
+
export const Progress: typeof Component;
|
|
269
|
+
export const Pwa: typeof Component;
|
|
270
|
+
export const PwaBody: typeof Component;
|
|
271
|
+
export const PwaClose: typeof Component;
|
|
272
|
+
export const PwaContent: typeof Component;
|
|
273
|
+
export const PwaDescription: typeof Component;
|
|
274
|
+
export const PwaFooter: typeof Component;
|
|
275
|
+
export const PwaHeader: typeof Component;
|
|
276
|
+
export const PwaSteps: typeof Component;
|
|
277
|
+
export const PwaTitle: typeof Component;
|
|
278
|
+
export const PwaTrigger: typeof Component;
|
|
279
|
+
export const QRCard: typeof Component;
|
|
280
|
+
export const Questionnaire: typeof Component;
|
|
281
|
+
export const QuestionnaireNext: typeof Component;
|
|
282
|
+
export const QuestionnairePrevious: typeof Component;
|
|
283
|
+
export const QuestionnaireStep: typeof Component;
|
|
284
|
+
export const RadioGroup: typeof Component;
|
|
285
|
+
export const RadioGroupItem: typeof Component;
|
|
286
|
+
export const Resizable: typeof Component;
|
|
287
|
+
export const ScrollArea: typeof Component;
|
|
288
|
+
export const Select: typeof Component;
|
|
289
|
+
export const SelectContent: typeof Component;
|
|
290
|
+
export const SelectItem: typeof Component;
|
|
291
|
+
export const SelectTrigger: typeof Component;
|
|
292
|
+
export const Separator: typeof Component;
|
|
293
|
+
export const Sheet: typeof Component;
|
|
294
|
+
export const SheetClose: typeof Component;
|
|
295
|
+
export const SheetContent: typeof Component;
|
|
296
|
+
export const SheetDescription: typeof Component;
|
|
297
|
+
export const SheetFooter: typeof Component;
|
|
298
|
+
export const SheetHeader: typeof Component;
|
|
299
|
+
export const SheetTitle: typeof Component;
|
|
300
|
+
export const SheetTrigger: typeof Component;
|
|
301
|
+
export const Shell: typeof Component;
|
|
302
|
+
export const ShellContent: typeof Component;
|
|
303
|
+
export const ShellHeader: typeof Component;
|
|
304
|
+
export const ShellMain: typeof Component;
|
|
305
|
+
export const ShellNav: typeof Component;
|
|
306
|
+
export const ShellSidebar: typeof Component;
|
|
307
|
+
export const ShellSidebarHeader: typeof Component;
|
|
308
|
+
export const ShellUserMenu: typeof Component;
|
|
309
|
+
export const Sidebar: typeof Component;
|
|
310
|
+
export const SidebarClose: typeof Component;
|
|
311
|
+
export const SidebarContent: typeof Component;
|
|
312
|
+
export const SidebarFooter: typeof Component;
|
|
313
|
+
export const SidebarGroup: typeof Component;
|
|
314
|
+
export const SidebarGroupAction: typeof Component;
|
|
315
|
+
export const SidebarGroupCollapsible: typeof Component;
|
|
316
|
+
export const SidebarGroupContent: typeof Component;
|
|
317
|
+
export const SidebarGroupLabel: typeof Component;
|
|
318
|
+
export const SidebarHeader: typeof Component;
|
|
319
|
+
export const SidebarInput: typeof Component;
|
|
320
|
+
export const SidebarInset: typeof Component;
|
|
321
|
+
export const SidebarMenu: typeof Component;
|
|
322
|
+
export const SidebarMenuAction: typeof Component;
|
|
323
|
+
export const SidebarMenuBadge: typeof Component;
|
|
324
|
+
export const SidebarMenuButton: typeof Component;
|
|
325
|
+
export const SidebarMenuItem: typeof Component;
|
|
326
|
+
export const SidebarMenuSkeleton: typeof Component;
|
|
327
|
+
export const SidebarMenuSub: typeof Component;
|
|
328
|
+
export const SidebarMenuSubButton: typeof Component;
|
|
329
|
+
export const SidebarMenuSubItem: typeof Component;
|
|
330
|
+
export const SidebarProvider: typeof Component;
|
|
331
|
+
export const SidebarRail: typeof Component;
|
|
332
|
+
export const SidebarSeparator: typeof Component;
|
|
333
|
+
export const SidebarTrigger: typeof Component;
|
|
334
|
+
export const Skeleton: typeof Component;
|
|
335
|
+
export const Slider: typeof Component;
|
|
336
|
+
export const Spinner: typeof Component;
|
|
337
|
+
export const Switch: typeof Component;
|
|
338
|
+
export const TabContent: typeof Component;
|
|
339
|
+
export const TabTrigger: typeof Component;
|
|
340
|
+
export const Table: typeof Component;
|
|
341
|
+
export const Tabs: typeof Component;
|
|
342
|
+
export const TabsContainer: typeof Component;
|
|
343
|
+
export const TabsList: typeof Component;
|
|
344
|
+
export const TextEditor: typeof Component;
|
|
345
|
+
export const Textarea: typeof Component;
|
|
346
|
+
export const ThemeButton: typeof Component;
|
|
347
|
+
export const Toast: typeof Component;
|
|
348
|
+
export const Toggle: typeof Component;
|
|
349
|
+
export const ToggleGroup: typeof Component;
|
|
350
|
+
export const ToggleGroupItem: typeof Component;
|
|
351
|
+
export const Tooltip: typeof Component;
|
|
352
|
+
export const Typography: typeof Component;
|
|
353
|
+
export const createNamedIcon: typeof Component;
|
|
354
|
+
export const findMarkdownTreeNode: typeof Component;
|
|
355
|
+
export const iconComponentName: typeof Component;
|
package/dist/types/qr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** QR matrix and the VietQR/EMV payload builder (wraps @thebeanfamily/vietqr). */
|
|
1
|
+
/** QR matrix, QR decoder and the VietQR/EMV payload builder (wraps @thebeanfamily/vietqr). */
|
|
2
2
|
export type QrErrorCorrection = "L" | "M" | "Q" | "H";
|
|
3
3
|
export interface QrMatrix {
|
|
4
4
|
/** Modules per side. */
|
|
@@ -42,6 +42,68 @@ export function buildVietQr(options: VietQrOptions): string;
|
|
|
42
42
|
export function qrMatrix(text: string, options?: { ecc?: QrErrorCorrection }): QrMatrix;
|
|
43
43
|
/** Renders text as a standalone SVG string. */
|
|
44
44
|
export function qrSvg(text: string, options?: QrSvgOptions): string;
|
|
45
|
+
/** Reads one QR code from RGBA pixels (e.g. `ctx.getImageData(...).data`); returns the text or null. Works where BarcodeDetector is missing. */
|
|
46
|
+
export function decodeQr(data: Uint8ClampedArray | Uint8Array, width: number, height: number): string | null;
|
|
47
|
+
export type EmvTemplate = { globallyUniqueIdentifier?: string; data?: { [subTag: string]: string } }
|
|
48
|
+
export type Mpm = {
|
|
49
|
+
payloadFormatIndicator?: string
|
|
50
|
+
pointOfInitiationMethod?: string
|
|
51
|
+
/** Tags 02-25: raw string; 26-51: template. */
|
|
52
|
+
merchantAccountInformation?: { [tag: string]: string | EmvTemplate }
|
|
53
|
+
merchantCategoryCode?: string
|
|
54
|
+
transactionCurrency?: string
|
|
55
|
+
transactionAmount?: string
|
|
56
|
+
tipOrConvenienceIndicator?: string
|
|
57
|
+
valueOfConvenienceFeeFixed?: string
|
|
58
|
+
valueOfConvenienceFeePercentage?: string
|
|
59
|
+
countryCode?: string
|
|
60
|
+
merchantName?: string
|
|
61
|
+
merchantCity?: string
|
|
62
|
+
postalCode?: string
|
|
63
|
+
additionalDataField?: {
|
|
64
|
+
billNumber?: string; mobileNumber?: string; storeLabel?: string; loyaltyNumber?: string; referenceLabel?: string
|
|
65
|
+
customerLabel?: string; terminalLabel?: string; purposeTransaction?: string; additionalConsumerDataRequest?: string
|
|
66
|
+
merchantTaxId?: string; merchantChannel?: string
|
|
67
|
+
rfuForEmvco?: { [tag: string]: string }
|
|
68
|
+
paymentSystemSpecific?: { [tag: string]: EmvTemplate }
|
|
69
|
+
}
|
|
70
|
+
merchantInformationLanguage?: { languagePreference?: string; merchantName?: string; merchantCity?: string; rfuForEmvco?: { [tag: string]: string } }
|
|
71
|
+
rfuForEmvco?: { [tag: string]: string }
|
|
72
|
+
unreserved?: { [tag: string]: EmvTemplate }
|
|
73
|
+
/** Read from a decoded code; ignored by encodeMpm (the CRC is computed). */
|
|
74
|
+
crc?: string
|
|
75
|
+
}
|
|
76
|
+
export type CpmFields = {
|
|
77
|
+
applicationDefinitionFileName?: string; applicationLabel?: string; track2EquivalentData?: string; applicationPan?: string
|
|
78
|
+
cardholderName?: string; languagePreference?: string; issuerUrl?: string; applicationVersionNumber?: string
|
|
79
|
+
tokenRequestorId?: string; paymentAccountReference?: string; last4DigitsOfPan?: string; cryptogramInformationData?: string
|
|
80
|
+
applicationTransactionCounter?: string; applicationCryptogram?: string; issuerApplicationData?: string; unpredictableNumber?: string
|
|
81
|
+
/** Unknown tags: hex tag -> hex value. */
|
|
82
|
+
other?: { [hexTag: string]: string }
|
|
83
|
+
}
|
|
84
|
+
export type Cpm = {
|
|
85
|
+
payloadFormatIndicator?: string
|
|
86
|
+
applicationTemplates?: Array<CpmFields & { applicationSpecificTransparentTemplate?: CpmFields }>
|
|
87
|
+
commonDataTemplate?: CpmFields & { commonDataTransparentTemplate?: CpmFields }
|
|
88
|
+
}
|
|
89
|
+
/** Parses an EMV merchant-presented QR string (VietQR, ...). Throws on a bad CRC, repeated tag or malformed data. */
|
|
90
|
+
export function decodeMpm(text: string): Mpm
|
|
91
|
+
/** Builds an EMV merchant-presented QR string; payload format defaults to "01", CRC is computed. */
|
|
92
|
+
export function encodeMpm(mpm: Mpm): string
|
|
93
|
+
/** Parses an EMV consumer-presented QR (base64 text or raw bytes). Throws on malformed data. */
|
|
94
|
+
export function decodeCpm(input: string | Uint8Array): Cpm
|
|
95
|
+
/** Builds an EMV consumer-presented QR as base64 text (or bytes with `{ format: "bytes" }`); payload format defaults to "CPV01". */
|
|
96
|
+
export function encodeCpm(cpm: Cpm): string
|
|
97
|
+
export function encodeCpm(cpm: Cpm, o: { format: 'bytes' }): Uint8Array
|
|
98
|
+
export type VietQrCode = { bank: string; account: string; holder: string; amount: number; purpose: string; dynamic: boolean; service: string }
|
|
99
|
+
/** Reads a VietQR (Napas) code into the fields `buildVietQr` takes, plus `service` ("account" | "card" | raw). Throws if it is not a VietQR code. */
|
|
100
|
+
export function decodeVietQr(text: string): VietQrCode
|
|
101
|
+
/** Identifies scanned text and parses it. Text starting `000201` must be a valid EMV merchant code (bad CRC throws). */
|
|
102
|
+
export function parseQr(text: string):
|
|
103
|
+
| { type: 'vietqr'; vietqr: VietQrCode; mpm: Mpm }
|
|
104
|
+
| { type: 'mpm'; mpm: Mpm }
|
|
105
|
+
| { type: 'cpm'; cpm: Cpm }
|
|
106
|
+
| { type: 'text'; text: string }
|
|
45
107
|
/** The underlying qrcode-generator style function (`qrcode(typeNumber, ecc)`), UTF-8 enabled. */
|
|
46
108
|
export const qrcode: any;
|
|
47
109
|
/** Low-level VietQR/EMV payload class from @thebeanfamily/vietqr. */
|
package/docs/analytics.md
CHANGED
|
@@ -13,12 +13,12 @@ init({ backendUrl: "https://stats.example.com" });
|
|
|
13
13
|
```html
|
|
14
14
|
<!-- ES module from the CDN (or map it as "nodexui/analytics" in an import map) -->
|
|
15
15
|
<script type="module">
|
|
16
|
-
import { init } from "https://cdn.jsdelivr.net/npm/nodexui@1.3.
|
|
16
|
+
import { init } from "https://cdn.jsdelivr.net/npm/nodexui@1.3.6/dist/nodexui.analytics.esm.js";
|
|
17
17
|
init({ backendUrl: "https://stats.example.com" });
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<!-- Classic script tag: sets window.thebase.analytics (load order vs dist/nodexui.min.js doesn't matter) -->
|
|
21
|
-
<script src="https://cdn.jsdelivr.net/npm/nodexui@1.3.
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/nodexui@1.3.6/dist/nodexui.analytics.min.js"></script>
|
|
22
22
|
<script>
|
|
23
23
|
thebase.analytics.init({ backendUrl: "https://stats.example.com" });
|
|
24
24
|
</script>
|
|
@@ -226,19 +226,17 @@ curl -i -X POST http://localhost:8080/api/event -H 'Content-Type: text/plain' \
|
|
|
226
226
|
|
|
227
227
|
## Sample dashboard
|
|
228
228
|
|
|
229
|
-
[`examples/analytics/`](../examples/analytics/
|
|
230
|
-
|
|
231
|
-
The dashboard ([`dashboard/`](../examples/analytics/dashboard/?backend=http://localhost:8080)) is a pure application that loads `nodexui@1.3.1` from jsDelivr: KPI `Card`s, an area `Chart`, top pages/sources/events `Table`s, site and period `NativeSelect`s, and a `ThemeButton`. It refreshes every 30 s and tracks its own visits through `nodexui/analytics`, so a fresh backend has data straight away.
|
|
229
|
+
[`examples/components/analytics/`](../examples/components/analytics/) holds two complete sample backends: [`server-go`](../examples/components/analytics/server-go/main.go) (Fiber v3) and [`server-fastapi`](../examples/components/analytics/server-fastapi/main.py). Each one extends the receivers above with an in-memory store, a daily-salted cookieless visitor hash, a `GET /api/stats` endpoint, and optional static hosting for a dashboard folder (`DASHBOARD_DIR`).
|
|
232
230
|
|
|
233
231
|
```sh
|
|
234
232
|
# Go (1.25+)
|
|
235
|
-
cd examples/analytics/server-go && DEMO_SEED=1 go run .
|
|
233
|
+
cd examples/components/analytics/server-go && DEMO_SEED=1 go run .
|
|
236
234
|
|
|
237
235
|
# or Python (3.10+)
|
|
238
|
-
cd examples/analytics/server-fastapi && pip install -r requirements.txt && DEMO_SEED=1 fastapi run main.py --port 8080
|
|
236
|
+
cd examples/components/analytics/server-fastapi && pip install -r requirements.txt && DEMO_SEED=1 fastapi run main.py --port 8080
|
|
239
237
|
```
|
|
240
238
|
|
|
241
|
-
|
|
239
|
+
`DEMO_SEED=1` preloads 30 days of synthetic traffic for `demo.example.com`. Other environment variables:
|
|
242
240
|
- `ADDR`: the Go listen address.
|
|
243
241
|
- `ALLOWED_ORIGINS`: a comma-separated CORS allow-list (default `*`).
|
|
244
242
|
- `DASHBOARD_DIR`: the folder served at `/`.
|
package/docs/base-ui-skill.md
CHANGED
|
@@ -6,7 +6,7 @@ It is a plain folder of Markdown and scripts, so it is not tied to one tool. It
|
|
|
6
6
|
|
|
7
7
|
## Download
|
|
8
8
|
|
|
9
|
-
[Download base-ui-skill.
|
|
9
|
+
[Download base-ui-skill.zip](https://raw.githubusercontent.com/nodex-ui/nodex-ui.github.io/refs/heads/main/docs/base-ui-skill.zip)
|
|
10
10
|
|
|
11
11
|
The archive contains one `base-ui/` folder: `SKILL.md`, `references/` and `scripts/`.
|
|
12
12
|
|
package/docs/blocks.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Nodex UI blocks are static HTML compositions styled by the same shadcn-aligned tokens as the component library. They are based on the public shadcn/ui blocks page and keep the same sizing landmarks: `min-height: 100svh`, sidebar widths, header heights, `gap-4`/`gap-6`, muted backgrounds, and auth-card widths.
|
|
4
4
|
|
|
5
|
-
Each block has its own source stylesheet in `
|
|
5
|
+
Each block that needs one has its own source stylesheet in `src/blocks/<block-name>.css`, bundled into `dist/nodexui.min.css`. Shared helpers live in `src/blocks/shared.css`; new blocks should not be folded into an all-in-one block stylesheet.
|
|
6
6
|
|
|
7
7
|
Block navigation icons must use Nodex UI's built-in Lucide icon component, for example `<span b-icon="layout-dashboard" b-block-icon></span>`. Do not use placeholder letters inside `b-block-icon`.
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ Blocks are not standalone runtime components. Paste the markup and load the norm
|
|
|
13
13
|
<script src="https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.min.js" defer></script>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
`https://unpkg.com/nodexui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.3.
|
|
16
|
+
`https://unpkg.com/nodexui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.3.6`, or `@1` to take only non-breaking updates) instead of `@latest` for production. Blocks are static markup, so they only need the static `b-ui` runtime above — see [Usage Guide](usage-guide.md) if the surrounding page is itself an application and you'd rather compose the equivalent layout from [Nodex UI Component](owl-components.md).
|
|
17
17
|
|
|
18
18
|
Use `b-block` to select the block style:
|
|
19
19
|
|
|
@@ -26,7 +26,7 @@ Use `b-block` to select the block style:
|
|
|
26
26
|
</section>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
The docs/dev server serves the block gallery at `/blocks` through the shared `examples/index.html` shell.
|
|
29
|
+
The docs/dev server serves the block gallery at `/blocks` through the shared `examples/index.html` shell. Each block is a template in `examples/components/blocks/<block-name>.xml`, rendered inline by the gallery and deep-linked as `#/blocks/<block-name>`.
|
|
30
30
|
|
|
31
31
|
## Included Blocks
|
|
32
32
|
|
|
@@ -39,4 +39,4 @@ The docs/dev server serves the block gallery at `/blocks` through the shared `ex
|
|
|
39
39
|
- `signup-03`: centered signup card kept separate from login while sharing the same 24rem/auth-card sizing.
|
|
40
40
|
- `signup-04`: signup card and media split kept separate from login while sharing the same 56rem split-card sizing.
|
|
41
41
|
|
|
42
|
-
See `/blocks` for the gallery
|
|
42
|
+
See `/blocks` for the gallery.
|
package/docs/components/chart.md
CHANGED
|
@@ -78,7 +78,7 @@ See [Nodex UI Component](/examples/blocks.html#/docs/guide/owl-components) for h
|
|
|
78
78
|
</div>
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
See `examples/
|
|
81
|
+
See the **Chart** tab of the examples app (`examples/components/chart-gallery/`) for the local copy of the shadcn area chart gallery: interactive, default, linear, step, legend, stacked, stacked expanded, icons, gradient, and axes.
|
|
82
82
|
|
|
83
83
|
## Chart.js usage
|
|
84
84
|
|
|
@@ -14,14 +14,29 @@ import { DataTable } from "nodexui";
|
|
|
14
14
|
|
|
15
15
|
```base-ui
|
|
16
16
|
<div class="w-100" style="max-width: 56rem">
|
|
17
|
-
<DataTable
|
|
17
|
+
<DataTable
|
|
18
|
+
searchable="true" sortable="true" selectable="true" columnToggle="true" pagination="true"
|
|
19
|
+
columns="[
|
|
20
|
+
{ key: 'status', label: 'Status', format: 'capitalize' },
|
|
21
|
+
{ key: 'email', label: 'Email', sortable: true, filterable: true },
|
|
22
|
+
{ key: 'amount', label: 'Amount', align: 'right', format: 'currency' }
|
|
23
|
+
]"
|
|
24
|
+
rows="[
|
|
25
|
+
{ id: '728ed52f', status: 'success', email: 'ken99@example.com', amount: 316 },
|
|
26
|
+
{ id: '489e1d42', status: 'success', email: 'abe45@example.com', amount: 242 },
|
|
27
|
+
{ id: '6b0888f6', status: 'processing', email: 'monserrat44@example.com', amount: 837 },
|
|
28
|
+
{ id: 'a1dc8c4e', status: 'success', email: 'silas22@example.com', amount: 874 },
|
|
29
|
+
{ id: '15b96de0', status: 'failed', email: 'carmella@example.com', amount: 721 }
|
|
30
|
+
]"
|
|
31
|
+
rowActions="[{ label: 'Copy payment ID' }, { label: 'View customer' }, { label: 'View payment details' }]"
|
|
32
|
+
/>
|
|
18
33
|
</div>
|
|
19
34
|
```
|
|
20
35
|
|
|
21
36
|
| Component | Prop | Type | Notes |
|
|
22
37
|
| --- | --- | --- | --- |
|
|
23
|
-
| `DataTable` | `columns` | `Array` | optional;
|
|
24
|
-
| `DataTable` | `rows` | `Array` | optional;
|
|
38
|
+
| `DataTable` | `columns` | `Array` | optional; no columns are rendered when omitted |
|
|
39
|
+
| `DataTable` | `rows` | `Array` | optional; when omitted or empty the table shows the `emptyLabel` row |
|
|
25
40
|
| `DataTable` | `variant` | `String` | `default` by default; use `compact` for denser rows or any custom value for a `b-data-table-{variant}` hook |
|
|
26
41
|
| `DataTable` | `searchable` | `Boolean` | `true` by default |
|
|
27
42
|
| `DataTable` | `sortable` | `Boolean` | `true` by default; set `column.sortable = false` per column to disable |
|
|
@@ -128,7 +143,22 @@ const rowActions = [
|
|
|
128
143
|
```
|
|
129
144
|
|
|
130
145
|
```base-ui
|
|
131
|
-
<DataTable
|
|
146
|
+
<DataTable
|
|
147
|
+
pageSize="5"
|
|
148
|
+
columns="[
|
|
149
|
+
{ key: 'card', label: 'Card', filterable: true },
|
|
150
|
+
{ key: 'holder', label: 'Cardholder' },
|
|
151
|
+
{ key: 'amount', label: 'Amount', align: 'right', format: 'currency' },
|
|
152
|
+
{ key: 'status', label: 'Status', format: 'capitalize' },
|
|
153
|
+
{ key: 'date', label: 'Date' }
|
|
154
|
+
]"
|
|
155
|
+
rows="[
|
|
156
|
+
{ id: 'txn_1', card: '•••• 4242', holder: 'Ken Nguyen', amount: 128.5, status: 'success', date: '2026-08-25' },
|
|
157
|
+
{ id: 'txn_2', card: '•••• 1881', holder: 'Abe Tran', amount: 42, status: 'processing', date: '2026-08-26' },
|
|
158
|
+
{ id: 'txn_3', card: '•••• 0356', holder: 'Silas Le', amount: 874.2, status: 'failed', date: '2026-08-26' }
|
|
159
|
+
]"
|
|
160
|
+
rowActions="[{ label: 'View receipt' }, { label: 'Copy transaction ID' }, { label: 'Refund' }, { label: 'Block card' }]"
|
|
161
|
+
/>
|
|
132
162
|
```
|
|
133
163
|
|
|
134
164
|
The kebab (`ellipsis`) button in the actions column is the icon action trigger; clicking it toggles the `rowActions` dropdown menu for that row. Selecting an item calls both that action's own `onSelect(row, rowIndex)` and the table-level `onRowAction(action, row, rowIndex)` if provided — use `onRowAction` for logging/analytics, `onSelect` per action for the actual handler.
|
|
@@ -140,7 +170,21 @@ See `examples/index.html` for a working CDN-style page.
|
|
|
140
170
|
Pass custom buttons into the toolbar via the `toolbarActions` slot — they render next to the Columns toggle — and pass `pageSizeOptions` to control which row-count choices appear in the "Rows per page" select (shown automatically whenever `pagination` is on and `pageSizeOptions` isn't empty).
|
|
141
171
|
|
|
142
172
|
```base-ui
|
|
143
|
-
<DataTable
|
|
173
|
+
<DataTable
|
|
174
|
+
pageSizeOptions="[10, 20, 50, 80]"
|
|
175
|
+
columns="[
|
|
176
|
+
{ key: 'status', label: 'Status', format: 'capitalize' },
|
|
177
|
+
{ key: 'email', label: 'Email', sortable: true, filterable: true },
|
|
178
|
+
{ key: 'amount', label: 'Amount', align: 'right', format: 'currency' }
|
|
179
|
+
]"
|
|
180
|
+
rows="[
|
|
181
|
+
{ id: '728ed52f', status: 'success', email: 'ken99@example.com', amount: 316 },
|
|
182
|
+
{ id: '489e1d42', status: 'success', email: 'abe45@example.com', amount: 242 },
|
|
183
|
+
{ id: '6b0888f6', status: 'processing', email: 'monserrat44@example.com', amount: 837 },
|
|
184
|
+
{ id: 'a1dc8c4e', status: 'success', email: 'silas22@example.com', amount: 874 },
|
|
185
|
+
{ id: '15b96de0', status: 'failed', email: 'carmella@example.com', amount: 721 }
|
|
186
|
+
]"
|
|
187
|
+
>
|
|
144
188
|
<t t-set-slot="toolbarActions">
|
|
145
189
|
<Button icon="'plus'" onClick="() => createRecord()">New record</Button>
|
|
146
190
|
<Button variant="'outline'" onClick="() => exportRows()">Export</Button>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# DocViewer
|
|
2
|
+
|
|
3
|
+
Renders a whole Markdown folder: a navigation tree beside the selected document. It combines `MarkdownTree` (sidebar) and `Markdown` (content), the same pattern the Docs and Concept tabs of the examples app use, so a project only supplies a `tree.json` manifest and the folder's files.
|
|
4
|
+
|
|
5
|
+
## Prepare the folder
|
|
6
|
+
|
|
7
|
+
One command writes everything DocViewer needs: a root `index.md`, a `readme.md` in every folder (the default page for a folder link), and the `tree.json` manifest. Serve the folder and `tree.json` as static files.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx -p nodexui create-nodexui-app docs docs
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
It is idempotent: only the block between the `docs-index` markers is rewritten, so text you add around it is kept. Add `--check` in CI to fail when the files are stale, `--title`, `--description` and `--root-group` to name the index, and `--out <file>` to put `tree.json` elsewhere.
|
|
14
|
+
|
|
15
|
+
Labels and order come from each file's frontmatter (`sidebar_label`, `title`, `sidebar_position`) or its file name. A folder's `readme.md` / `index.md` opens first.
|
|
16
|
+
|
|
17
|
+
To bring an existing, messy folder into shape first, add `--restructure`. It prints a plan and changes nothing until you add `--write`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx -p nodexui create-nodexui-app docs docs --restructure # dry run: the plan
|
|
21
|
+
npx -p nodexui create-nodexui-app docs docs --restructure --write # apply, then index
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- Folders and Markdown files are renamed to clean kebab-case (`User Guide.MD` -> `user-guide.md`, accents removed, `README.md` -> `readme.md`). Other files (images) keep their names. If two names would clash, the original is kept and a warning is printed.
|
|
25
|
+
- Relative links, images and reference definitions in the documents are rewritten so they still point at the renamed files.
|
|
26
|
+
- Missing `title` (first heading, else the file name) and `sidebar_position` (in file-name order) are added to each document's frontmatter. Generated `readme.md` and root `index.md` are left alone.
|
|
27
|
+
|
|
28
|
+
Review the result with `git diff` before committing.
|
|
29
|
+
|
|
30
|
+
## Nodex UI component
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { DocViewer } from "nodexui";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```base-ui
|
|
37
|
+
<DocViewer tree="'/docs/tree.json'" root="'docs/v2'"/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Deep links in the address bar and a callback on every navigation:
|
|
41
|
+
|
|
42
|
+
```xml
|
|
43
|
+
<DocViewer
|
|
44
|
+
tree="'/docs/tree.json'"
|
|
45
|
+
hashPrefix="'#/docs/'"
|
|
46
|
+
onNavigate="(path, hash) => this.onDocChange(path)"
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Props
|
|
51
|
+
|
|
52
|
+
- `tree` (required) — URL of the `tree.json` manifest.
|
|
53
|
+
- `root` — repo-relative folder inside the manifest to show (for example `docs/v2`); defaults to the whole manifest.
|
|
54
|
+
- `base` — URL prefix the manifest's paths are served under (default `/`). A document `docs/a.md` is fetched from `base + "docs/a.md"`.
|
|
55
|
+
- `path` — document to open. Opening order: address-bar hash (when `hashPrefix` is set), `path`, then the folder's `readme.md`/`index.md`, then the first file. Changing the prop later opens that document.
|
|
56
|
+
- `hashPrefix` — for example `#/docs/`. The open document is kept in `location.hash` as `<hashPrefix><path>` so it can be bookmarked and the back button works. Without it the selection lives only in component state.
|
|
57
|
+
- `part` — `"sidebar"` or `"content"` renders only that half, so a host layout (for example `Shell`) can put the tree in its sidebar and the document in its content area. Use one instance per half with the same `tree`/`root`/`path` and a `hashPrefix`; the address bar keeps them in sync.
|
|
58
|
+
- `include` — ordered list of document paths; shows just those files, in that order (for a hand-curated list such as a guides menu).
|
|
59
|
+
- `exclude` — list of document or folder paths to hide.
|
|
60
|
+
- `filter` — text; keeps only documents whose label contains it (case-insensitive), dropping empty folders.
|
|
61
|
+
- `formatLabel(node)` — returns the sidebar label for a document (for translated or custom titles); an empty result keeps the default label (frontmatter `sidebar_label`/`title`, else the file name).
|
|
62
|
+
- `toHash(path)` / `fromHash(hash)` — custom URL shape instead of `hashPrefix`: `toHash` returns the full hash (`#/…`) to navigate to for a document path (it may point at another page of your app), `fromHash` returns the document path for the current `location.hash`, or `""` when the hash is not yours.
|
|
63
|
+
- `onNavigate(path, hash)` — called when the reader picks a document in the tree or follows a relative link to another document in the manifest.
|
|
64
|
+
- `className`, `style` — added to the root element.
|
|
65
|
+
|
|
66
|
+
Mermaid diagrams, live ` ```base-ui ` previews and frontmatter tags/authors render as in `Markdown`. Relative links to documents that are in the manifest open inside the viewer; other links keep the browser default.
|
|
67
|
+
|
|
68
|
+
The layout is a two-column grid that stacks below 768px. For a custom layout, use `part` as above, or `MarkdownTree` and `Markdown` directly.
|