@tempots/beatui 0.68.0 → 0.71.0

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.
Files changed (98) hide show
  1. package/dist/{ar-aMLQTGVh.js → ar-BbgpGwJp.js} +1 -1
  2. package/dist/auth/index.cjs.js +1 -1
  3. package/dist/auth/index.es.js +106 -105
  4. package/dist/beatui.css +401 -0
  5. package/dist/beatui.tailwind.css +401 -0
  6. package/dist/{de-DBFOC44R.js → de-R7lPfyZ4.js} +1 -1
  7. package/dist/deep-merge-CQQCMLwG.js +1636 -0
  8. package/dist/deep-merge-DZxfgKqX.cjs +1 -0
  9. package/dist/duration-input-D-SIoDoo.cjs +1 -0
  10. package/dist/duration-input-DKxZ6OCa.js +277 -0
  11. package/dist/{es-C4xOThaT.js → es-DV0Jr_BZ.js} +1 -1
  12. package/dist/{fa-B7X_xydY.js → fa-DXvHejs9.js} +1 -1
  13. package/dist/{fr-AmjzbxN_.js → fr-D8FOMX0o.js} +1 -1
  14. package/dist/{he-DY-9yiOC.js → he-B19Qsx-u.js} +1 -1
  15. package/dist/{hi-Clkyp5Fu.js → hi-DozFnE3b.js} +1 -1
  16. package/dist/{index-GLoRnI6r.js → index-CYb1YxDX.js} +1 -1
  17. package/dist/{index-CzuXAuLZ.js → index-DdpYvBeh.js} +3 -3
  18. package/dist/index.cjs.js +4 -4
  19. package/dist/index.es.js +2830 -3079
  20. package/dist/{it-BC32WmGF.js → it-But8uzNi.js} +1 -1
  21. package/dist/{ja-JNSZS_Hv.js → ja-DkwTnFdU.js} +1 -1
  22. package/dist/json-schema/index.cjs.js +6 -6
  23. package/dist/json-schema/index.es.js +3459 -3333
  24. package/dist/json-structure/index.cjs.js +1 -0
  25. package/dist/json-structure/index.es.js +3157 -0
  26. package/dist/{ko-B8l0TJp0.js → ko-Cqv-IjhX.js} +1 -1
  27. package/dist/modal-5P9mU_a4.cjs +1 -0
  28. package/dist/{modal-DJWj5M5e.js → modal-MofsfmAe.js} +2 -2
  29. package/dist/{nl-BpYESHP8.js → nl-YSiU3rFI.js} +1 -1
  30. package/dist/notice-Cqq8g17n.js +209 -0
  31. package/dist/notice-DP209Ed8.cjs +1 -0
  32. package/dist/{pl-_sWhGdrs.js → pl-DXmHc2Nh.js} +1 -1
  33. package/dist/prosemirror/index.es.js +1 -1
  34. package/dist/{pt-BmiQvHUz.js → pt-Bf3z_-26.js} +1 -1
  35. package/dist/{ru-DacnqexG.js → ru-Sy00qUeG.js} +1 -1
  36. package/dist/tailwind/vite-plugin.es.js +1 -0
  37. package/dist/{toolbar-Bk5-22ln.js → toolbar-C_Ec0_XC.js} +1 -1
  38. package/dist/{tr-BSS5b_v6.js → tr-BDxG3qd6.js} +1 -1
  39. package/dist/{translations-zGwuSQWQ.js → translations-BmsRhth7.js} +1 -1
  40. package/dist/{translations-BUTBIDsS.js → translations-DQxouiBG.js} +24 -24
  41. package/dist/types/components/form/index.d.ts +1 -0
  42. package/dist/types/components/form/utils/deep-merge.d.ts +27 -0
  43. package/dist/types/components/form/utils/index.d.ts +1 -0
  44. package/dist/types/components/json-schema/controls/generic-control.d.ts +2 -1
  45. package/dist/types/components/json-schema/controls/shared-utils.d.ts +17 -1
  46. package/dist/types/components/json-schema/index.d.ts +2 -0
  47. package/dist/types/components/json-schema/json-schema-form.d.ts +25 -3
  48. package/dist/types/components/json-schema/schema-context.d.ts +3 -0
  49. package/dist/types/components/json-schema/schema-defaults.d.ts +39 -0
  50. package/dist/types/components/json-schema/widgets/widget-customization.d.ts +55 -0
  51. package/dist/types/components/json-structure/controls/any-control.d.ts +15 -0
  52. package/dist/types/components/json-structure/controls/array-control.d.ts +15 -0
  53. package/dist/types/components/json-structure/controls/binary-control.d.ts +15 -0
  54. package/dist/types/components/json-structure/controls/boolean-control.d.ts +15 -0
  55. package/dist/types/components/json-structure/controls/choice-control.d.ts +19 -0
  56. package/dist/types/components/json-structure/controls/decimal-control.d.ts +17 -0
  57. package/dist/types/components/json-structure/controls/deprecation-utils.d.ts +14 -0
  58. package/dist/types/components/json-structure/controls/enum-const-controls.d.ts +22 -0
  59. package/dist/types/components/json-structure/controls/generic-control.d.ts +31 -0
  60. package/dist/types/components/json-structure/controls/index.d.ts +21 -0
  61. package/dist/types/components/json-structure/controls/integer-control.d.ts +18 -0
  62. package/dist/types/components/json-structure/controls/map-control.d.ts +17 -0
  63. package/dist/types/components/json-structure/controls/object-control.d.ts +17 -0
  64. package/dist/types/components/json-structure/controls/set-control.d.ts +15 -0
  65. package/dist/types/components/json-structure/controls/string-control.d.ts +15 -0
  66. package/dist/types/components/json-structure/controls/temporal-control.d.ts +18 -0
  67. package/dist/types/components/json-structure/controls/tuple-control.d.ts +19 -0
  68. package/dist/types/components/json-structure/controls/union-control.d.ts +15 -0
  69. package/dist/types/components/json-structure/controls/uri-control.d.ts +15 -0
  70. package/dist/types/components/json-structure/controls/uuid-control.d.ts +15 -0
  71. package/dist/types/components/json-structure/extends-utils.d.ts +36 -0
  72. package/dist/types/components/json-structure/index.d.ts +25 -0
  73. package/dist/types/components/json-structure/json-structure-form.d.ts +96 -0
  74. package/dist/types/components/json-structure/ref-utils.d.ts +55 -0
  75. package/dist/types/components/json-structure/structure-context.d.ts +176 -0
  76. package/dist/types/components/json-structure/structure-defaults.d.ts +46 -0
  77. package/dist/types/components/json-structure/structure-types.d.ts +173 -0
  78. package/dist/types/components/json-structure/validation/error-transform.d.ts +56 -0
  79. package/dist/types/components/json-structure/validation/index.d.ts +5 -0
  80. package/dist/types/components/json-structure/validation/sdk-validator.d.ts +46 -0
  81. package/dist/types/components/json-structure/widgets/default-widgets.d.ts +27 -0
  82. package/dist/types/components/json-structure/widgets/index.d.ts +6 -0
  83. package/dist/types/components/json-structure/widgets/widget-registry.d.ts +143 -0
  84. package/dist/types/components/json-structure/widgets/widget-utils.d.ts +79 -0
  85. package/dist/types/index.d.ts +1 -0
  86. package/dist/types/json-structure/index.d.ts +9 -0
  87. package/dist/{ur-C6Ky6OCl.js → ur-55zdT2TQ.js} +1 -1
  88. package/dist/{notice-Um1LwKBF.js → use-form-B7A865EM.js} +329 -532
  89. package/dist/use-form-DVJXMMoN.cjs +2 -0
  90. package/dist/{vi-Bx2gx2S0.js → vi-C7K7W0hM.js} +1 -1
  91. package/dist/widget-customization-29Hl2gKT.js +1171 -0
  92. package/dist/widget-customization-BXiewbt-.cjs +1 -0
  93. package/dist/{zh-eixtg-Ce.js → zh-DvJBV9D8.js} +1 -1
  94. package/package.json +10 -2
  95. package/dist/modal-D_paG9Sr.cjs +0 -1
  96. package/dist/notice-CgT9ma2m.cjs +0 -2
  97. package/dist/utils-7JQljUYX.js +0 -2554
  98. package/dist/utils-CPtkOy9f.cjs +0 -1
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Widget Resolution Utilities
3
+ *
4
+ * Utilities for resolving and configuring widgets based on structure context.
5
+ */
6
+ import type { StructureContext } from '../structure-context';
7
+ import type { WidgetRegistry, ResolvedWidget } from './widget-registry';
8
+ /**
9
+ * Options extracted from widget configuration
10
+ */
11
+ export interface WidgetOptions {
12
+ /** Widget-specific options from definition */
13
+ options?: Record<string, unknown>;
14
+ /** Priority override */
15
+ priority?: number;
16
+ }
17
+ /**
18
+ * Resolve the best widget for a given context
19
+ *
20
+ * Resolution order:
21
+ * 1. Form-scoped registry (if provided in context)
22
+ * 2. Global registry
23
+ * 3. Returns null if no matching widget found
24
+ *
25
+ * @param ctx - Structure context containing type information
26
+ * @param registry - Optional form-scoped registry (overrides global)
27
+ * @returns Resolved widget or null if no match
28
+ */
29
+ export declare function resolveWidget(ctx: StructureContext, registry?: WidgetRegistry): ResolvedWidget | null;
30
+ /**
31
+ * Extract widget options from context definition
32
+ *
33
+ * Looks for widget configuration in:
34
+ * - `x:ui` extension field
35
+ * - `widget` field (legacy)
36
+ * - Direct widget options
37
+ *
38
+ * @param ctx - Structure context
39
+ * @returns Widget options if found
40
+ */
41
+ export declare function getWidgetOptions(ctx: StructureContext): WidgetOptions | undefined;
42
+ /**
43
+ * Get widget name from explicit definition override
44
+ *
45
+ * Checks for explicit widget name in:
46
+ * - `x:ui.widget` (if string)
47
+ * - `widget.type` (legacy)
48
+ *
49
+ * @param ctx - Structure context
50
+ * @returns Explicit widget name or undefined
51
+ */
52
+ export declare function getExplicitWidgetName(ctx: StructureContext): string | undefined;
53
+ /**
54
+ * Check if a context has a custom widget override
55
+ *
56
+ * @param ctx - Structure context
57
+ * @returns True if an explicit widget is specified
58
+ */
59
+ export declare function hasCustomWidget(ctx: StructureContext): boolean;
60
+ /**
61
+ * Resolve widget with explicit name override
62
+ *
63
+ * If the context specifies an explicit widget name, tries to resolve
64
+ * that widget directly. Otherwise, falls back to automatic resolution.
65
+ *
66
+ * @param ctx - Structure context
67
+ * @param registry - Optional form-scoped registry
68
+ * @returns Resolved widget or null
69
+ */
70
+ export declare function resolveWidgetWithOverride(ctx: StructureContext, registry?: WidgetRegistry): ResolvedWidget | null;
71
+ /**
72
+ * Merge widget options from multiple sources
73
+ *
74
+ * @param baseOptions - Base options from widget registration
75
+ * @param contextOptions - Options from context definition
76
+ * @param userOptions - User-provided options
77
+ * @returns Merged options (user > context > base)
78
+ */
79
+ export declare function mergeWidgetOptions(baseOptions?: Record<string, unknown>, contextOptions?: Record<string, unknown>, userOptions?: Record<string, unknown>): Record<string, unknown>;
@@ -18,3 +18,4 @@ export * from './tokens';
18
18
  export * from './tailwind';
19
19
  export * from './utils';
20
20
  export * from './temporal';
21
+ export { type CustomWidgets, type CustomWidgetRegistration, type WidgetFactory, forXUI, forFormat, forTypeAndFormat, } from './components/json-schema/widgets/widget-customization';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * JSON Structure Form Components
3
+ *
4
+ * Entry point for the json-structure subpackage.
5
+ * Import from '@tempots/beatui/json-structure'
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export * from '../components/json-structure';
@@ -1,4 +1,4 @@
1
- import { f as r } from "./translations-BUTBIDsS.js";
1
+ import { f as r } from "./translations-DQxouiBG.js";
2
2
  const d = {
3
3
  loadingExtended: "لوڈ ہو رہا ہے، براہ کرم انتظار کریں",
4
4
  loadingShort: "لوڈ ہو رہا ہے...",