resuxjs 0.4.0-beta.7 → 0.4.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 (185) hide show
  1. package/README.md +4 -2
  2. package/dist/_virtual/_rolldown/runtime.js +4 -0
  3. package/dist/build/index.d.ts +1 -2
  4. package/dist/cli.d.ts +3 -3
  5. package/dist/cli.js +125 -31
  6. package/dist/cli.js.map +1 -1
  7. package/dist/compiler/adapter.d.ts +2 -3
  8. package/dist/compiler/adapter.js +2 -2
  9. package/dist/compiler/dev-warnings.d.ts +1 -2
  10. package/dist/compiler/directives.d.ts +1 -2
  11. package/dist/compiler/directives.js +7 -3
  12. package/dist/compiler/directives.js.map +1 -1
  13. package/dist/compiler/implementation.d.ts +4 -2
  14. package/dist/compiler/implementation.js +101 -43
  15. package/dist/compiler/index.d.ts +2 -3
  16. package/dist/compiler/index.js +2 -2
  17. package/dist/compiler/index.js.map +1 -1
  18. package/dist/core/config.d.ts +1 -2
  19. package/dist/core/hooks.d.ts +10 -2
  20. package/dist/core/hooks.js.map +1 -1
  21. package/dist/core/index.d.ts +2 -2
  22. package/dist/core/module-container.d.ts +1 -2
  23. package/dist/core/module-container.js +2 -1
  24. package/dist/core/module-container.js.map +1 -1
  25. package/dist/core/resux.d.ts +1 -2
  26. package/dist/create.d.ts +1 -2
  27. package/dist/create.js +110 -33
  28. package/dist/create.js.map +1 -1
  29. package/dist/deploy/cloudflare.d.ts +1 -2
  30. package/dist/deploy/common.d.ts +1 -2
  31. package/dist/deploy/common.js +19 -3
  32. package/dist/deploy/common.js.map +1 -1
  33. package/dist/deploy/framework-runtime.d.ts +1 -2
  34. package/dist/deploy/index.d.ts +1 -2
  35. package/dist/deploy/netlify.d.ts +1 -2
  36. package/dist/deploy/node.d.ts +1 -2
  37. package/dist/deploy/production-report.d.ts +1 -2
  38. package/dist/deploy/runtime-dependencies.d.ts +1 -2
  39. package/dist/deploy/static.d.ts +1 -2
  40. package/dist/deploy/types.d.ts +1 -2
  41. package/dist/deploy/vercel.d.ts +1 -2
  42. package/dist/deploy/vercel.js +3 -3
  43. package/dist/deploy/vercel.js.map +1 -1
  44. package/dist/fonts/index.d.ts +1 -2
  45. package/dist/fonts/index.js.map +1 -1
  46. package/dist/globals.d.ts +1 -2
  47. package/dist/halal-core/ai/classifyProject.d.ts +1 -2
  48. package/dist/halal-core/ai/classifyRuntimeContent.d.ts +1 -2
  49. package/dist/halal-core/ai/createProjectSummary.d.ts +1 -2
  50. package/dist/halal-core/ai/halalClassifierPrompt.d.ts +1 -2
  51. package/dist/halal-core/ai/redactSensitiveData.d.ts +1 -2
  52. package/dist/halal-core/ai/validateAiResponse.d.ts +1 -2
  53. package/dist/halal-core/cli/check.d.ts +1 -2
  54. package/dist/halal-core/cli/explain.d.ts +1 -2
  55. package/dist/halal-core/cli/report.d.ts +1 -2
  56. package/dist/halal-core/cli/submitReview.d.ts +1 -2
  57. package/dist/halal-core/cli/verifyReview.d.ts +1 -2
  58. package/dist/halal-core/config.d.ts +2 -2
  59. package/dist/halal-core/config.js.map +1 -1
  60. package/dist/halal-core/crypto/integrity.d.ts +1 -2
  61. package/dist/halal-core/crypto/integrity.js +1 -1
  62. package/dist/halal-core/crypto/integrity.js.map +1 -1
  63. package/dist/halal-core/enforce.d.ts +4 -3
  64. package/dist/halal-core/enforce.js +31 -4
  65. package/dist/halal-core/enforce.js.map +1 -1
  66. package/dist/halal-core/lifecycle.d.ts +1 -2
  67. package/dist/halal-core/policy.d.ts +1 -2
  68. package/dist/halal-core/report/formatBrowserOverlay.d.ts +1 -2
  69. package/dist/halal-core/report/formatTerminalReport.d.ts +1 -2
  70. package/dist/halal-core/report/generateHalalReport.d.ts +1 -2
  71. package/dist/halal-core/report/signReport.d.ts +1 -2
  72. package/dist/halal-core/report/verifyReport.d.ts +1 -2
  73. package/dist/halal-core/review/createReviewRequest.d.ts +1 -2
  74. package/dist/halal-core/review/reviewPolicy.d.ts +1 -2
  75. package/dist/halal-core/review/signedReviewFile.d.ts +1 -2
  76. package/dist/halal-core/review/verifyReviewApproval.d.ts +1 -2
  77. package/dist/halal-core/rules/adultContentRules.d.ts +1 -2
  78. package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +1 -2
  79. package/dist/halal-core/rules/childSafetyRules.d.ts +1 -2
  80. package/dist/halal-core/rules/coreCategories.d.ts +1 -2
  81. package/dist/halal-core/rules/cyberAbuseRules.d.ts +1 -2
  82. package/dist/halal-core/rules/defaultBlockedRules.d.ts +1 -2
  83. package/dist/halal-core/rules/dependencyRules.d.ts +1 -2
  84. package/dist/halal-core/rules/endpointRules.d.ts +1 -2
  85. package/dist/halal-core/rules/environmentalHarmRules.d.ts +1 -2
  86. package/dist/halal-core/rules/financeRibaRules.d.ts +1 -2
  87. package/dist/halal-core/rules/gamblingRules.d.ts +1 -2
  88. package/dist/halal-core/rules/generalHarmRules.d.ts +1 -2
  89. package/dist/halal-core/rules/healthHarmRules.d.ts +1 -2
  90. package/dist/halal-core/rules/keywordRules.d.ts +1 -2
  91. package/dist/halal-core/rules/privacyAbuseRules.d.ts +1 -2
  92. package/dist/halal-core/rules/scamFraudRules.d.ts +1 -2
  93. package/dist/halal-core/rules/selfHarmRules.d.ts +1 -2
  94. package/dist/halal-core/rules/violenceExtremismRules.d.ts +1 -2
  95. package/dist/halal-core/runtime/guard.d.ts +1 -2
  96. package/dist/halal-core/runtime/guard.js.map +1 -1
  97. package/dist/halal-core/runtime/reviewedMemory.d.ts +1 -2
  98. package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +1 -2
  99. package/dist/halal-core/runtime/types.d.ts +1 -2
  100. package/dist/halal-core/scanner/scanApiRoutes.d.ts +1 -2
  101. package/dist/halal-core/scanner/scanComponents.d.ts +1 -2
  102. package/dist/halal-core/scanner/scanContent.d.ts +1 -2
  103. package/dist/halal-core/scanner/scanDependencies.d.ts +1 -2
  104. package/dist/halal-core/scanner/scanDomains.d.ts +1 -2
  105. package/dist/halal-core/scanner/scanEnvNames.d.ts +1 -2
  106. package/dist/halal-core/scanner/scanMetadata.d.ts +1 -2
  107. package/dist/halal-core/scanner/scanPages.d.ts +1 -2
  108. package/dist/halal-core/scanner/scanProject.d.ts +1 -2
  109. package/dist/halal-core/scanner/scanRoutes.d.ts +1 -2
  110. package/dist/halal-core/scanner/scanTranslations.d.ts +1 -2
  111. package/dist/halal-core/status.d.ts +1 -2
  112. package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +1 -2
  113. package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +1 -2
  114. package/dist/halal-core/tamper/verifyReportSignature.d.ts +1 -2
  115. package/dist/head/utils.d.ts +15 -0
  116. package/dist/head/utils.js +52 -0
  117. package/dist/head/utils.js.map +1 -0
  118. package/dist/i18n/index.d.ts +1 -2
  119. package/dist/i18n/index.js.map +1 -1
  120. package/dist/i18n/shared.d.ts +1 -2
  121. package/dist/icons/api-fetcher.d.ts +1 -2
  122. package/dist/icons/cache.d.ts +1 -2
  123. package/dist/icons/cache.js.map +1 -1
  124. package/dist/icons/component.d.ts +7 -8
  125. package/dist/icons/constants.d.ts +1 -2
  126. package/dist/icons/css-mode.d.ts +1 -2
  127. package/dist/icons/index.d.ts +1 -2
  128. package/dist/icons/index.js.map +1 -1
  129. package/dist/icons/local-svg.d.ts +1 -2
  130. package/dist/icons/normalize.d.ts +1 -2
  131. package/dist/icons/offline-loader.d.ts +1 -2
  132. package/dist/icons/parser.d.ts +1 -2
  133. package/dist/icons/registry.d.ts +1 -2
  134. package/dist/icons/resolver.d.ts +1 -2
  135. package/dist/icons/svg-mode.d.ts +1 -2
  136. package/dist/icons/transform.d.ts +1 -2
  137. package/dist/icons/types.d.ts +1 -2
  138. package/dist/index.d.ts +2 -2
  139. package/dist/index.js +2 -2
  140. package/dist/kit/index.d.ts +1 -2
  141. package/dist/nitro-server/index.d.ts +1 -2
  142. package/dist/node.d.ts +1 -2
  143. package/dist/reactivity/computed.d.ts +1 -2
  144. package/dist/reactivity/computed.js.map +1 -1
  145. package/dist/reactivity/effect.d.ts +3 -3
  146. package/dist/reactivity/effect.js +8 -3
  147. package/dist/reactivity/effect.js.map +1 -1
  148. package/dist/reactivity/reactive.d.ts +1 -2
  149. package/dist/reactivity/reactive.js +221 -11
  150. package/dist/reactivity/reactive.js.map +1 -1
  151. package/dist/reactivity/ref.d.ts +1 -2
  152. package/dist/reactivity/ref.js.map +1 -1
  153. package/dist/reactivity/scheduler.d.ts +1 -2
  154. package/dist/reactivity/scheduler.js +2 -0
  155. package/dist/reactivity/scheduler.js.map +1 -1
  156. package/dist/reactivity/types.d.ts +1 -2
  157. package/dist/reactivity/utils.d.ts +1 -2
  158. package/dist/reactivity/watch.d.ts +1 -2
  159. package/dist/reactivity/watch.js.map +1 -1
  160. package/dist/runtime/core.d.ts +1 -2
  161. package/dist/runtime/core.js.map +1 -1
  162. package/dist/runtime/index.d.ts +19 -2
  163. package/dist/runtime/index.js +921 -170
  164. package/dist/runtime/index.js.map +1 -1
  165. package/dist/runtime/resume.d.ts +1 -2
  166. package/dist/runtime/resume.js.map +1 -1
  167. package/dist/runtime/router.d.ts +1 -2
  168. package/dist/runtime/router.js.map +1 -1
  169. package/dist/runtime/streaming.d.ts +1 -2
  170. package/dist/runtime/streaming.js.map +1 -1
  171. package/dist/runtime/view-transitions/detect.d.ts +1 -2
  172. package/dist/runtime/view-transitions/transition.d.ts +1 -2
  173. package/dist/runtime/view-transitions/types.d.ts +1 -2
  174. package/dist/security/media-fetch.d.ts +1 -2
  175. package/dist/security/media-fetch.js.map +1 -1
  176. package/dist/security/path-boundary.d.ts +1 -2
  177. package/dist/security/path-boundary.js +10 -4
  178. package/dist/security/path-boundary.js.map +1 -1
  179. package/dist/ui/index.d.ts +41 -42
  180. package/dist/ui/verification-code.d.ts +9 -10
  181. package/dist/ui/verification-code.js.map +1 -1
  182. package/dist/vite-builder/index.d.ts +1 -2
  183. package/package.json +2 -2
  184. package/templates/default/.env.example +3 -0
  185. package/templates/default/nitro.config.ts +16 -4
@@ -197,9 +197,9 @@ export declare const RxButton: import("vue").DefineComponent<import("vue").Extra
197
197
  };
198
198
  }>> & Readonly<{}>, {
199
199
  type: string;
200
- size: string;
201
200
  disabled: boolean;
202
201
  unstyled: boolean;
202
+ size: string;
203
203
  variant: string;
204
204
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
205
205
  export declare const RxCard: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -297,9 +297,9 @@ export declare const RxInput: import("vue").DefineComponent<import("vue").Extrac
297
297
  }>> & Readonly<{
298
298
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
299
299
  }>, {
300
+ modelValue: string | number;
300
301
  type: string;
301
302
  disabled: boolean;
302
- modelValue: string | number;
303
303
  unstyled: boolean;
304
304
  placeholder: string;
305
305
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -358,8 +358,8 @@ export declare const RxSelect: import("vue").DefineComponent<import("vue").Extra
358
358
  }>> & Readonly<{
359
359
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
360
360
  }>, {
361
- disabled: boolean;
362
361
  modelValue: string | number;
362
+ disabled: boolean;
363
363
  unstyled: boolean;
364
364
  placeholder: string;
365
365
  options: (string | {
@@ -407,8 +407,8 @@ export declare const RxDatePicker: import("vue").DefineComponent<import("vue").E
407
407
  }>> & Readonly<{
408
408
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
409
409
  }>, {
410
- disabled: boolean;
411
410
  modelValue: string | Date;
411
+ disabled: boolean;
412
412
  unstyled: boolean;
413
413
  placeholder: string;
414
414
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -435,8 +435,8 @@ export declare const RxPopover: import("vue").DefineComponent<import("vue").Extr
435
435
  }>> & Readonly<{
436
436
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
437
437
  }>, {
438
- open: boolean;
439
438
  unstyled: boolean;
439
+ open: boolean;
440
440
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
441
441
  export declare const RxIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
442
442
  name: {
@@ -476,9 +476,9 @@ export declare const RxIcon: import("vue").DefineComponent<import("vue").Extract
476
476
  };
477
477
  }>> & Readonly<{}>, {
478
478
  name: string;
479
+ unstyled: boolean;
479
480
  size: string | number;
480
481
  color: string;
481
- unstyled: boolean;
482
482
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
483
483
  export declare const RxAvatar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
484
484
  src: {
@@ -525,9 +525,9 @@ export declare const RxAvatar: import("vue").DefineComponent<import("vue").Extra
525
525
  default: boolean;
526
526
  };
527
527
  }>> & Readonly<{}>, {
528
- size: string;
529
528
  status: string;
530
529
  unstyled: boolean;
530
+ size: string;
531
531
  src: string;
532
532
  alt: string;
533
533
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -570,8 +570,8 @@ export declare const RxAlert: import("vue").DefineComponent<import("vue").Extrac
570
570
  }>> & Readonly<{
571
571
  onDismiss?: ((...args: any[]) => any) | undefined;
572
572
  }>, {
573
- title: string;
574
573
  unstyled: boolean;
574
+ title: string;
575
575
  variant: string;
576
576
  dismissible: boolean;
577
577
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -604,9 +604,9 @@ export declare const RxAccordion: import("vue").DefineComponent<import("vue").Ex
604
604
  default: boolean;
605
605
  };
606
606
  }>> & Readonly<{}>, {
607
+ unstyled: boolean;
607
608
  title: string;
608
609
  open: boolean;
609
- unstyled: boolean;
610
610
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
611
611
  export declare const RxTooltip: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
612
612
  text: {
@@ -637,8 +637,8 @@ export declare const RxTooltip: import("vue").DefineComponent<import("vue").Extr
637
637
  default: boolean;
638
638
  };
639
639
  }>> & Readonly<{}>, {
640
- text: string;
641
640
  unstyled: boolean;
641
+ text: string;
642
642
  placement: string;
643
643
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
644
644
  export declare const RxDropdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -678,8 +678,8 @@ export declare const RxDropdown: import("vue").DefineComponent<import("vue").Ext
678
678
  }>> & Readonly<{
679
679
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
680
680
  }>, {
681
- open: boolean;
682
681
  unstyled: boolean;
682
+ open: boolean;
683
683
  items: {
684
684
  label: string;
685
685
  action?: () => void;
@@ -776,8 +776,8 @@ export declare const RxTextarea: import("vue").DefineComponent<import("vue").Ext
776
776
  }>> & Readonly<{
777
777
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
778
778
  }>, {
779
- disabled: boolean;
780
779
  modelValue: string;
780
+ disabled: boolean;
781
781
  unstyled: boolean;
782
782
  placeholder: string;
783
783
  rows: number;
@@ -813,8 +813,8 @@ export declare const RxSwitch: import("vue").DefineComponent<import("vue").Extra
813
813
  }>> & Readonly<{
814
814
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
815
815
  }>, {
816
- disabled: boolean;
817
816
  modelValue: boolean;
817
+ disabled: boolean;
818
818
  unstyled: boolean;
819
819
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
820
820
  export declare const RxSkeleton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -854,9 +854,9 @@ export declare const RxSkeleton: import("vue").DefineComponent<import("vue").Ext
854
854
  default: boolean;
855
855
  };
856
856
  }>> & Readonly<{}>, {
857
+ unstyled: boolean;
857
858
  width: string;
858
859
  height: string;
859
- unstyled: boolean;
860
860
  rounded: string;
861
861
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
862
862
  export declare const RxDivider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -888,8 +888,8 @@ export declare const RxDivider: import("vue").DefineComponent<import("vue").Extr
888
888
  default: boolean;
889
889
  };
890
890
  }>> & Readonly<{}>, {
891
- label: string;
892
891
  unstyled: boolean;
892
+ label: string;
893
893
  orientation: string;
894
894
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
895
895
  export declare const RxKbd: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -939,9 +939,9 @@ export declare const RxModal: import("vue").DefineComponent<import("vue").Extrac
939
939
  onClose?: ((...args: any[]) => any) | undefined;
940
940
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
941
941
  }>, {
942
+ unstyled: boolean;
942
943
  title: string;
943
944
  open: boolean;
944
- unstyled: boolean;
945
945
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
946
946
  export declare const ResuxMotion: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
947
947
  tag: {
@@ -1106,9 +1106,9 @@ export declare const ResuxButton: import("vue").DefineComponent<import("vue").Ex
1106
1106
  };
1107
1107
  }>> & Readonly<{}>, {
1108
1108
  type: string;
1109
- size: string;
1110
1109
  disabled: boolean;
1111
1110
  unstyled: boolean;
1111
+ size: string;
1112
1112
  variant: string;
1113
1113
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1114
1114
  export declare const ResuxCard: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1206,9 +1206,9 @@ export declare const ResuxInput: import("vue").DefineComponent<import("vue").Ext
1206
1206
  }>> & Readonly<{
1207
1207
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1208
1208
  }>, {
1209
+ modelValue: string | number;
1209
1210
  type: string;
1210
1211
  disabled: boolean;
1211
- modelValue: string | number;
1212
1212
  unstyled: boolean;
1213
1213
  placeholder: string;
1214
1214
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1267,8 +1267,8 @@ export declare const ResuxSelect: import("vue").DefineComponent<import("vue").Ex
1267
1267
  }>> & Readonly<{
1268
1268
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1269
1269
  }>, {
1270
- disabled: boolean;
1271
1270
  modelValue: string | number;
1271
+ disabled: boolean;
1272
1272
  unstyled: boolean;
1273
1273
  placeholder: string;
1274
1274
  options: (string | {
@@ -1316,8 +1316,8 @@ export declare const ResuxDatePicker: import("vue").DefineComponent<import("vue"
1316
1316
  }>> & Readonly<{
1317
1317
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1318
1318
  }>, {
1319
- disabled: boolean;
1320
1319
  modelValue: string | Date;
1320
+ disabled: boolean;
1321
1321
  unstyled: boolean;
1322
1322
  placeholder: string;
1323
1323
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1344,8 +1344,8 @@ export declare const ResuxPopover: import("vue").DefineComponent<import("vue").E
1344
1344
  }>> & Readonly<{
1345
1345
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
1346
1346
  }>, {
1347
- open: boolean;
1348
1347
  unstyled: boolean;
1348
+ open: boolean;
1349
1349
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1350
1350
  export declare const ResuxIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1351
1351
  name: {
@@ -1385,9 +1385,9 @@ export declare const ResuxIcon: import("vue").DefineComponent<import("vue").Extr
1385
1385
  };
1386
1386
  }>> & Readonly<{}>, {
1387
1387
  name: string;
1388
+ unstyled: boolean;
1388
1389
  size: string | number;
1389
1390
  color: string;
1390
- unstyled: boolean;
1391
1391
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1392
1392
  export declare const ResuxAvatar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1393
1393
  src: {
@@ -1434,9 +1434,9 @@ export declare const ResuxAvatar: import("vue").DefineComponent<import("vue").Ex
1434
1434
  default: boolean;
1435
1435
  };
1436
1436
  }>> & Readonly<{}>, {
1437
- size: string;
1438
1437
  status: string;
1439
1438
  unstyled: boolean;
1439
+ size: string;
1440
1440
  src: string;
1441
1441
  alt: string;
1442
1442
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1479,8 +1479,8 @@ export declare const ResuxAlert: import("vue").DefineComponent<import("vue").Ext
1479
1479
  }>> & Readonly<{
1480
1480
  onDismiss?: ((...args: any[]) => any) | undefined;
1481
1481
  }>, {
1482
- title: string;
1483
1482
  unstyled: boolean;
1483
+ title: string;
1484
1484
  variant: string;
1485
1485
  dismissible: boolean;
1486
1486
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1513,9 +1513,9 @@ export declare const ResuxAccordion: import("vue").DefineComponent<import("vue")
1513
1513
  default: boolean;
1514
1514
  };
1515
1515
  }>> & Readonly<{}>, {
1516
+ unstyled: boolean;
1516
1517
  title: string;
1517
1518
  open: boolean;
1518
- unstyled: boolean;
1519
1519
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1520
1520
  export declare const ResuxTooltip: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1521
1521
  text: {
@@ -1546,8 +1546,8 @@ export declare const ResuxTooltip: import("vue").DefineComponent<import("vue").E
1546
1546
  default: boolean;
1547
1547
  };
1548
1548
  }>> & Readonly<{}>, {
1549
- text: string;
1550
1549
  unstyled: boolean;
1550
+ text: string;
1551
1551
  placement: string;
1552
1552
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1553
1553
  export declare const ResuxDropdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1587,8 +1587,8 @@ export declare const ResuxDropdown: import("vue").DefineComponent<import("vue").
1587
1587
  }>> & Readonly<{
1588
1588
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
1589
1589
  }>, {
1590
- open: boolean;
1591
1590
  unstyled: boolean;
1591
+ open: boolean;
1592
1592
  items: {
1593
1593
  label: string;
1594
1594
  action?: () => void;
@@ -1685,8 +1685,8 @@ export declare const ResuxTextarea: import("vue").DefineComponent<import("vue").
1685
1685
  }>> & Readonly<{
1686
1686
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1687
1687
  }>, {
1688
- disabled: boolean;
1689
1688
  modelValue: string;
1689
+ disabled: boolean;
1690
1690
  unstyled: boolean;
1691
1691
  placeholder: string;
1692
1692
  rows: number;
@@ -1722,8 +1722,8 @@ export declare const ResuxSwitch: import("vue").DefineComponent<import("vue").Ex
1722
1722
  }>> & Readonly<{
1723
1723
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1724
1724
  }>, {
1725
- disabled: boolean;
1726
1725
  modelValue: boolean;
1726
+ disabled: boolean;
1727
1727
  unstyled: boolean;
1728
1728
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1729
1729
  export declare const ResuxSkeleton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1763,9 +1763,9 @@ export declare const ResuxSkeleton: import("vue").DefineComponent<import("vue").
1763
1763
  default: boolean;
1764
1764
  };
1765
1765
  }>> & Readonly<{}>, {
1766
+ unstyled: boolean;
1766
1767
  width: string;
1767
1768
  height: string;
1768
- unstyled: boolean;
1769
1769
  rounded: string;
1770
1770
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1771
1771
  export declare const ResuxDivider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1797,8 +1797,8 @@ export declare const ResuxDivider: import("vue").DefineComponent<import("vue").E
1797
1797
  default: boolean;
1798
1798
  };
1799
1799
  }>> & Readonly<{}>, {
1800
- label: string;
1801
1800
  unstyled: boolean;
1801
+ label: string;
1802
1802
  orientation: string;
1803
1803
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1804
1804
  export declare const ResuxKbd: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -1848,9 +1848,9 @@ export declare const ResuxModal: import("vue").DefineComponent<import("vue").Ext
1848
1848
  onClose?: ((...args: any[]) => any) | undefined;
1849
1849
  "onUpdate:open"?: ((...args: any[]) => any) | undefined;
1850
1850
  }>, {
1851
+ unstyled: boolean;
1851
1852
  title: string;
1852
1853
  open: boolean;
1853
- unstyled: boolean;
1854
1854
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1855
1855
  export declare const ResuxVerificationCode: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1856
1856
  modelValue: {
@@ -1907,7 +1907,7 @@ export declare const ResuxVerificationCode: import("vue").DefineComponent<import
1907
1907
  };
1908
1908
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1909
1909
  [key: string]: any;
1910
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "update:modelValue" | "complete")[], "blur" | "change" | "focus" | "update:modelValue" | "complete", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1910
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "complete" | "focus" | "blur")[], "update:modelValue" | "change" | "complete" | "focus" | "blur", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1911
1911
  modelValue: {
1912
1912
  type: StringConstructor;
1913
1913
  default: string;
@@ -1961,20 +1961,20 @@ export declare const ResuxVerificationCode: import("vue").DefineComponent<import
1961
1961
  default: boolean;
1962
1962
  };
1963
1963
  }>> & Readonly<{
1964
- onBlur?: ((...args: any[]) => any) | undefined;
1965
- onChange?: ((...args: any[]) => any) | undefined;
1966
- onFocus?: ((...args: any[]) => any) | undefined;
1967
1964
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1965
+ onChange?: ((...args: any[]) => any) | undefined;
1968
1966
  onComplete?: ((...args: any[]) => any) | undefined;
1967
+ onFocus?: ((...args: any[]) => any) | undefined;
1968
+ onBlur?: ((...args: any[]) => any) | undefined;
1969
1969
  }>, {
1970
- name: string;
1971
- mode: string;
1972
- length: number;
1973
- disabled: boolean;
1974
1970
  modelValue: string;
1971
+ length: number;
1975
1972
  status: string;
1973
+ mode: string;
1976
1974
  autoFocus: boolean;
1975
+ disabled: boolean;
1977
1976
  mask: boolean;
1977
+ name: string;
1978
1978
  ariaLabel: string;
1979
1979
  verifyingText: string;
1980
1980
  successText: string;
@@ -1993,5 +1993,4 @@ declare const resuxUiModule: {
1993
1993
  };
1994
1994
  setup(options: ResuxUiModuleOptions, resux: ResuxModuleContext): void;
1995
1995
  };
1996
- export { RxVerificationCode, type VerificationCodeMode, type VerificationCodeStatus, resuxUiModule as default };
1997
- //# sourceMappingURL=index.d.ts.map
1996
+ export { RxVerificationCode, type VerificationCodeMode, type VerificationCodeStatus, resuxUiModule as default };
@@ -55,7 +55,7 @@ export declare const RxVerificationCode: import("vue").DefineComponent<import("v
55
55
  };
56
56
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
57
57
  [key: string]: any;
58
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "update:modelValue" | "complete")[], "blur" | "change" | "focus" | "update:modelValue" | "complete", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
58
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "complete" | "focus" | "blur")[], "update:modelValue" | "change" | "complete" | "focus" | "blur", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
59
59
  modelValue: {
60
60
  type: StringConstructor;
61
61
  default: string;
@@ -109,20 +109,20 @@ export declare const RxVerificationCode: import("vue").DefineComponent<import("v
109
109
  default: boolean;
110
110
  };
111
111
  }>> & Readonly<{
112
- onBlur?: ((...args: any[]) => any) | undefined;
113
- onChange?: ((...args: any[]) => any) | undefined;
114
- onFocus?: ((...args: any[]) => any) | undefined;
115
112
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
113
+ onChange?: ((...args: any[]) => any) | undefined;
116
114
  onComplete?: ((...args: any[]) => any) | undefined;
115
+ onFocus?: ((...args: any[]) => any) | undefined;
116
+ onBlur?: ((...args: any[]) => any) | undefined;
117
117
  }>, {
118
- name: string;
119
- mode: string;
120
- length: number;
121
- disabled: boolean;
122
118
  modelValue: string;
119
+ length: number;
123
120
  status: string;
121
+ mode: string;
124
122
  autoFocus: boolean;
123
+ disabled: boolean;
125
124
  mask: boolean;
125
+ name: string;
126
126
  ariaLabel: string;
127
127
  verifyingText: string;
128
128
  successText: string;
@@ -130,5 +130,4 @@ export declare const RxVerificationCode: import("vue").DefineComponent<import("v
130
130
  unstyled: boolean;
131
131
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
132
132
  export declare const verificationCodeStyles = "\n@keyframes rxVerificationFill {\n 0% { transform: translateY(5px) scale(0.72) rotate(-7deg); opacity: 0.2; }\n 60% { transform: translateY(-2px) scale(1.08) rotate(3deg); opacity: 1; }\n 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationStatusIn {\n 0% { transform: scale(0.18) rotate(-18deg); opacity: 0; }\n 62% { transform: scale(1.12) rotate(5deg); opacity: 1; }\n 100% { transform: scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationPulse {\n 0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24); }\n 50% { transform: scale(1.07); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.36); }\n}\n@keyframes rxVerificationSpin {\n to { transform: rotate(360deg); }\n}\n@keyframes rxVerificationShake {\n 0%, 100% { transform: translateX(0); }\n 20% { transform: translateX(-6px); }\n 40% { transform: translateX(5px); }\n 60% { transform: translateX(-4px); }\n 80% { transform: translateX(3px); }\n}\n\n.rx-verification-code {\n --rx-verification-accent: #2563eb;\n --rx-verification-accent-soft: #dbeafe;\n --rx-verification-success: #10b981;\n --rx-verification-danger: #ef4444;\n --rx-verification-cell-bg: #ffffff;\n --rx-verification-cell-border: #cbd5e1;\n --rx-verification-cell-text: #0f172a;\n position: relative;\n display: inline-flex;\n width: min(100%, 42rem);\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n max-width: 100%;\n cursor: text;\n -webkit-tap-highlight-color: transparent;\n}\n.rx-verification-code[data-disabled=\"true\"] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n.rx-verification-code-cells {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n width: 100%;\n min-height: 3rem;\n perspective: 700px;\n}\n.rx-verification-code-cell {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n max-width: 3rem;\n min-width: 0;\n height: auto;\n aspect-ratio: 1;\n flex: 1 1 3rem;\n box-sizing: border-box;\n border: 1.5px solid var(--rx-verification-cell-border);\n border-radius: 0.75rem;\n background: var(--rx-verification-cell-bg);\n color: var(--rx-verification-cell-text);\n font-size: 1.05rem;\n font-weight: 750;\n line-height: 1;\n font-variant-numeric: tabular-nums;\n box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);\n transform-origin: center;\n transition:\n border-color 180ms ease,\n box-shadow 180ms ease,\n background 180ms ease,\n color 180ms ease,\n transform 180ms cubic-bezier(0.16, 1, 0.3, 1),\n opacity 180ms ease;\n}\n.rx-verification-code-cell.is-active {\n border-color: var(--rx-verification-accent);\n box-shadow:\n 0 0 0 3px rgba(37, 99, 235, 0.15),\n 0 6px 18px rgba(37, 99, 235, 0.12);\n transform: translateY(-1px);\n}\n.rx-verification-code-cell.is-filled {\n border-color: transparent;\n color: #ffffff;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);\n animation: rxVerificationFill 300ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code.is-collapsing .rx-verification-code-cell {\n border-color: transparent;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n color: #ffffff;\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);\n transform:\n translateX(var(--rx-otp-shift))\n scale(0.16)\n rotate(var(--rx-otp-rotate));\n opacity: 0;\n transition:\n transform 340ms cubic-bezier(0.7, 0, 0.84, 0),\n opacity 260ms ease;\n transition-delay: var(--rx-otp-delay);\n}\n.rx-verification-code.is-error .rx-verification-code-cells {\n animation: rxVerificationShake 360ms ease-in-out;\n}\n.rx-verification-code.is-error .rx-verification-code-cell {\n border-color: #fca5a5;\n}\n.rx-verification-code-status {\n min-height: 3rem;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n animation: rxVerificationStatusIn 420ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code-orb {\n width: 3rem;\n height: 3rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n}\n.rx-verification-code-orb.is-verifying {\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n animation: rxVerificationPulse 1.25s ease-in-out infinite;\n}\n.rx-verification-code-orb.is-success {\n color: #ffffff;\n background: linear-gradient(145deg, #34d399, var(--rx-verification-success));\n box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);\n}\n.rx-verification-code-spinner {\n width: 1.1rem;\n height: 1.1rem;\n box-sizing: border-box;\n border: 2px solid rgba(255, 255, 255, 0.42);\n border-top-color: #ffffff;\n border-radius: 9999px;\n animation: rxVerificationSpin 700ms linear infinite;\n}\n.rx-verification-code-check {\n font-size: 1.5rem;\n font-weight: 800;\n line-height: 1;\n transform: translateY(-1px);\n}\n.rx-verification-code-message {\n color: var(--rx-verification-success);\n font-size: 0.8rem;\n font-weight: 650;\n}\n.rx-verification-code-status.is-verifying .rx-verification-code-message {\n color: #64748b;\n}\n.rx-verification-code-error {\n color: var(--rx-verification-danger);\n font-size: 0.8rem;\n font-weight: 600;\n text-align: center;\n}\n\n@media (max-width: 420px) {\n .rx-verification-code-cells {\n gap: 0.375rem;\n }\n .rx-verification-code-cell {\n max-width: 2.65rem;\n border-radius: 0.65rem;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rx-verification-code *,\n .rx-verification-code *::before,\n .rx-verification-code *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n transition-delay: 0ms !important;\n }\n}\n";
133
- export declare const verificationCodeAnimationsDisabledStyles = "\n.rx-verification-code *,\n.rx-verification-code *::before,\n.rx-verification-code *::after {\n animation: none !important;\n transition: none !important;\n}\n";
134
- //# sourceMappingURL=verification-code.d.ts.map
133
+ export declare const verificationCodeAnimationsDisabledStyles = "\n.rx-verification-code *,\n.rx-verification-code *::before,\n.rx-verification-code *::after {\n animation: none !important;\n transition: none !important;\n}\n";
@@ -1 +1 @@
1
- {"version":3,"file":"verification-code.js","names":[],"sources":["../../src/ui/verification-code.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n mergeProps,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch\n} from \"vue\";\n\nexport type VerificationCodeStatus = \"idle\" | \"verifying\" | \"success\" | \"error\";\nexport type VerificationCodeMode = \"numeric\" | \"alphanumeric\";\n\ntype VerificationCodePhase = \"input\" | \"collapsing\" | \"verifying\" | \"success\" | \"error\";\n\nconst CELL_COLLAPSE_DURATION_MS = 340;\nconst CELL_COLLAPSE_DELAY_MS = 22;\nconst COLLAPSE_BUFFER_MS = 20;\nconst DEFAULT_CELL_STEP_PX = 56;\n\nfunction collapseDurationMs(length: number): number {\n return CELL_COLLAPSE_DURATION_MS + Math.max(0, length - 1) * CELL_COLLAPSE_DELAY_MS + COLLAPSE_BUFFER_MS;\n}\n\nfunction normalizedLength(value: number): number {\n if (!Number.isFinite(value)) return 4;\n return Math.min(12, Math.max(1, Math.trunc(value)));\n}\n\nfunction normalizeStatus(value: string): VerificationCodeStatus {\n return value === \"verifying\" || value === \"success\" || value === \"error\" ? value : \"idle\";\n}\n\nfunction sanitizeValue(value: string, mode: VerificationCodeMode, length: number): string {\n const clean = mode === \"alphanumeric\"\n ? value.replace(/[^a-zA-Z0-9]/g, \"\").toUpperCase()\n : value.replace(/\\D/g, \"\");\n\n return clean.slice(0, length);\n}\n\nfunction prefersReducedMotion(): boolean {\n return typeof window !== \"undefined\"\n && typeof window.matchMedia === \"function\"\n && window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n\nexport const RxVerificationCode = defineComponent({\n name: \"RxVerificationCode\",\n inheritAttrs: false,\n props: {\n modelValue: { type: String, default: \"\" },\n length: { type: Number, default: 4 },\n status: { type: String, default: \"idle\" },\n mode: { type: String, default: \"numeric\" },\n autoFocus: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n mask: { type: Boolean, default: false },\n name: { type: String, default: \"\" },\n ariaLabel: { type: String, default: \"Verification code\" },\n verifyingText: { type: String, default: \"Verifying…\" },\n successText: { type: String, default: \"Verified and secure\" },\n errorText: { type: String, default: \"The verification code is invalid\" },\n unstyled: { type: Boolean, default: false }\n },\n emits: [\"update:modelValue\", \"change\", \"complete\", \"focus\", \"blur\"],\n setup(props, { emit, attrs }) {\n const inputRef = ref<HTMLInputElement | null>(null);\n const focused = ref(false);\n const messageId = `rx-verification-code-${useId()}-message`;\n const initialStatus = normalizeStatus(props.status);\n const phase = ref<VerificationCodePhase>(\n initialStatus === \"idle\" ? \"input\" : initialStatus\n );\n\n let requestedStatus = initialStatus;\n let transitionTimer: ReturnType<typeof setTimeout> | undefined;\n\n const clearTransitionTimer = () => {\n if (transitionTimer !== undefined) {\n clearTimeout(transitionTimer);\n transitionTimer = undefined;\n }\n };\n\n const settleRequestedStatus = () => {\n transitionTimer = undefined;\n phase.value = requestedStatus === \"success\" ? \"success\" : \"verifying\";\n };\n\n const transitionToStatus = (nextStatus: VerificationCodeStatus) => {\n requestedStatus = nextStatus;\n\n if (nextStatus === \"idle\") {\n clearTransitionTimer();\n phase.value = \"input\";\n return;\n }\n\n if (nextStatus === \"error\") {\n clearTransitionTimer();\n phase.value = \"error\";\n return;\n }\n\n if (phase.value === \"collapsing\") {\n return;\n }\n\n if (phase.value === \"input\" || phase.value === \"error\") {\n if (prefersReducedMotion()) {\n phase.value = nextStatus;\n return;\n }\n\n phase.value = \"collapsing\";\n clearTransitionTimer();\n transitionTimer = setTimeout(settleRequestedStatus, collapseDurationMs(normalizedLength(props.length)));\n return;\n }\n\n phase.value = nextStatus;\n };\n\n watch(\n () => props.status,\n (status) => transitionToStatus(normalizeStatus(status))\n );\n\n const focusInput = () => {\n if (props.disabled || (phase.value !== \"input\" && phase.value !== \"error\")) return;\n inputRef.value?.focus();\n };\n\n const handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n const length = normalizedLength(props.length);\n const mode: VerificationCodeMode = props.mode === \"alphanumeric\" ? \"alphanumeric\" : \"numeric\";\n const nextValue = sanitizeValue(input.value, mode, length);\n\n if (input.value !== nextValue) {\n input.value = nextValue;\n }\n\n emit(\"update:modelValue\", nextValue);\n emit(\"change\", nextValue);\n\n if (nextValue.length === length) {\n emit(\"complete\", nextValue);\n }\n };\n\n const handleFocus = (event: FocusEvent) => {\n focused.value = true;\n emit(\"focus\", event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n focused.value = false;\n emit(\"blur\", event);\n };\n\n onMounted(() => {\n if (props.autoFocus && !props.disabled) {\n void nextTick(focusInput);\n }\n });\n\n onBeforeUnmount(clearTransitionTimer);\n\n return () => {\n const length = normalizedLength(props.length);\n const mode: VerificationCodeMode = props.mode === \"alphanumeric\" ? \"alphanumeric\" : \"numeric\";\n const code = sanitizeValue(String(props.modelValue || \"\"), mode, length);\n const status = normalizeStatus(props.status);\n const showCells = phase.value === \"input\" || phase.value === \"error\" || phase.value === \"collapsing\";\n\n const rootClass = props.unstyled\n ? undefined\n : [\n \"rx-verification-code\",\n focused.value ? \"is-focused\" : \"\",\n phase.value === \"error\" ? \"is-error\" : \"\",\n phase.value === \"collapsing\" ? \"is-collapsing\" : \"\"\n ].filter(Boolean);\n const editable = phase.value === \"input\" || phase.value === \"error\";\n const {\n required,\n form,\n readonly,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-describedby\": ariaDescribedby,\n ...rootAttrs\n } = attrs;\n\n const input = h(\"input\", {\n ref: inputRef,\n value: code,\n type: props.mask ? \"password\" : \"text\",\n inputmode: mode === \"numeric\" ? \"numeric\" : \"text\",\n pattern: mode === \"numeric\" ? \"[0-9]*\" : undefined,\n maxlength: length,\n autocomplete: \"one-time-code\",\n autocapitalize: mode === \"alphanumeric\" ? \"characters\" : \"off\",\n spellcheck: false,\n disabled: props.disabled,\n readonly: Boolean(readonly) || !editable,\n required: Boolean(required),\n form: typeof form === \"string\" ? form : undefined,\n name: props.name || undefined,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-invalid\": status === \"error\" ? \"true\" : undefined,\n \"aria-describedby\": status === \"error\" && props.errorText ? messageId : ariaDescribedby,\n style: {\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: \"0\",\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n border: \"0\",\n opacity: \"0\"\n },\n onInput: handleInput,\n onFocus: handleFocus,\n onBlur: handleBlur\n });\n\n const cells = Array.from({ length }, (_, index) => {\n const char = code[index] || \"\";\n const isFilled = char.length > 0;\n const activeIndex = code.length >= length ? length - 1 : code.length;\n const isActive = focused.value && index === activeIndex && phase.value !== \"collapsing\";\n const shift = ((length - 1) / 2 - index) * DEFAULT_CELL_STEP_PX;\n const rotate = (index - (length - 1) / 2) * 5;\n\n const cellClass = props.unstyled\n ? undefined\n : [\n \"rx-verification-code-cell\",\n isFilled ? \"is-filled\" : \"\",\n isActive ? \"is-active\" : \"\"\n ].filter(Boolean);\n\n return h(\n \"span\",\n {\n key: index,\n class: cellClass,\n \"aria-hidden\": \"true\",\n \"data-filled\": isFilled ? \"true\" : \"false\",\n \"data-active\": isActive ? \"true\" : \"false\",\n style: props.unstyled\n ? undefined\n : {\n \"--rx-otp-shift\": `${shift}px`,\n \"--rx-otp-rotate\": `${rotate}deg`,\n \"--rx-otp-delay\": `${index * CELL_COLLAPSE_DELAY_MS}ms`\n }\n },\n char ? (props.mask ? \"•\" : char) : \"\\u00a0\"\n );\n });\n\n const message = phase.value === \"success\"\n ? props.successText\n : phase.value === \"verifying\"\n ? props.verifyingText\n : phase.value === \"error\"\n ? props.errorText\n : \"\";\n\n const statusView = !showCells\n ? h(\n \"div\",\n {\n class: props.unstyled\n ? undefined\n : [\n \"rx-verification-code-status\",\n phase.value === \"success\" ? \"is-success\" : \"is-verifying\"\n ],\n role: \"status\",\n \"aria-live\": \"polite\"\n },\n [\n h(\n \"span\",\n {\n class: props.unstyled\n ? undefined\n : [\n \"rx-verification-code-orb\",\n phase.value === \"success\" ? \"is-success\" : \"is-verifying\"\n ],\n \"aria-hidden\": \"true\"\n },\n phase.value === \"success\"\n ? [h(\"span\", { class: props.unstyled ? undefined : \"rx-verification-code-check\" }, \"✓\")]\n : [h(\"span\", { class: props.unstyled ? undefined : \"rx-verification-code-spinner\" })]\n ),\n message\n ? h(\n \"span\",\n { class: props.unstyled ? undefined : \"rx-verification-code-message\" },\n message\n )\n : null\n ]\n )\n : null;\n\n const errorMessage = phase.value === \"error\" && props.errorText\n ? h(\n \"span\",\n {\n id: messageId,\n class: props.unstyled ? undefined : \"rx-verification-code-error\",\n role: \"alert\"\n },\n props.errorText\n )\n : null;\n\n return h(\n \"div\",\n mergeProps(rootAttrs, {\n class: rootClass,\n \"data-phase\": phase.value,\n \"data-status\": status,\n \"data-disabled\": props.disabled ? \"true\" : \"false\",\n \"data-length\": String(length),\n style: props.unstyled ? undefined : { \"--rx-otp-length\": String(length) },\n onClick: focusInput\n }),\n [\n input,\n showCells\n ? h(\n \"div\",\n {\n class: props.unstyled ? undefined : \"rx-verification-code-cells\",\n \"aria-hidden\": \"true\"\n },\n cells\n )\n : statusView,\n errorMessage\n ]\n );\n };\n }\n});\n\nexport const verificationCodeStyles = `\n@keyframes rxVerificationFill {\n 0% { transform: translateY(5px) scale(0.72) rotate(-7deg); opacity: 0.2; }\n 60% { transform: translateY(-2px) scale(1.08) rotate(3deg); opacity: 1; }\n 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationStatusIn {\n 0% { transform: scale(0.18) rotate(-18deg); opacity: 0; }\n 62% { transform: scale(1.12) rotate(5deg); opacity: 1; }\n 100% { transform: scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationPulse {\n 0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24); }\n 50% { transform: scale(1.07); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.36); }\n}\n@keyframes rxVerificationSpin {\n to { transform: rotate(360deg); }\n}\n@keyframes rxVerificationShake {\n 0%, 100% { transform: translateX(0); }\n 20% { transform: translateX(-6px); }\n 40% { transform: translateX(5px); }\n 60% { transform: translateX(-4px); }\n 80% { transform: translateX(3px); }\n}\n\n.rx-verification-code {\n --rx-verification-accent: #2563eb;\n --rx-verification-accent-soft: #dbeafe;\n --rx-verification-success: #10b981;\n --rx-verification-danger: #ef4444;\n --rx-verification-cell-bg: #ffffff;\n --rx-verification-cell-border: #cbd5e1;\n --rx-verification-cell-text: #0f172a;\n position: relative;\n display: inline-flex;\n width: min(100%, 42rem);\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n max-width: 100%;\n cursor: text;\n -webkit-tap-highlight-color: transparent;\n}\n.rx-verification-code[data-disabled=\"true\"] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n.rx-verification-code-cells {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n width: 100%;\n min-height: 3rem;\n perspective: 700px;\n}\n.rx-verification-code-cell {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n max-width: 3rem;\n min-width: 0;\n height: auto;\n aspect-ratio: 1;\n flex: 1 1 3rem;\n box-sizing: border-box;\n border: 1.5px solid var(--rx-verification-cell-border);\n border-radius: 0.75rem;\n background: var(--rx-verification-cell-bg);\n color: var(--rx-verification-cell-text);\n font-size: 1.05rem;\n font-weight: 750;\n line-height: 1;\n font-variant-numeric: tabular-nums;\n box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);\n transform-origin: center;\n transition:\n border-color 180ms ease,\n box-shadow 180ms ease,\n background 180ms ease,\n color 180ms ease,\n transform 180ms cubic-bezier(0.16, 1, 0.3, 1),\n opacity 180ms ease;\n}\n.rx-verification-code-cell.is-active {\n border-color: var(--rx-verification-accent);\n box-shadow:\n 0 0 0 3px rgba(37, 99, 235, 0.15),\n 0 6px 18px rgba(37, 99, 235, 0.12);\n transform: translateY(-1px);\n}\n.rx-verification-code-cell.is-filled {\n border-color: transparent;\n color: #ffffff;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);\n animation: rxVerificationFill 300ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code.is-collapsing .rx-verification-code-cell {\n border-color: transparent;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n color: #ffffff;\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);\n transform:\n translateX(var(--rx-otp-shift))\n scale(0.16)\n rotate(var(--rx-otp-rotate));\n opacity: 0;\n transition:\n transform 340ms cubic-bezier(0.7, 0, 0.84, 0),\n opacity 260ms ease;\n transition-delay: var(--rx-otp-delay);\n}\n.rx-verification-code.is-error .rx-verification-code-cells {\n animation: rxVerificationShake 360ms ease-in-out;\n}\n.rx-verification-code.is-error .rx-verification-code-cell {\n border-color: #fca5a5;\n}\n.rx-verification-code-status {\n min-height: 3rem;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n animation: rxVerificationStatusIn 420ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code-orb {\n width: 3rem;\n height: 3rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n}\n.rx-verification-code-orb.is-verifying {\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n animation: rxVerificationPulse 1.25s ease-in-out infinite;\n}\n.rx-verification-code-orb.is-success {\n color: #ffffff;\n background: linear-gradient(145deg, #34d399, var(--rx-verification-success));\n box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);\n}\n.rx-verification-code-spinner {\n width: 1.1rem;\n height: 1.1rem;\n box-sizing: border-box;\n border: 2px solid rgba(255, 255, 255, 0.42);\n border-top-color: #ffffff;\n border-radius: 9999px;\n animation: rxVerificationSpin 700ms linear infinite;\n}\n.rx-verification-code-check {\n font-size: 1.5rem;\n font-weight: 800;\n line-height: 1;\n transform: translateY(-1px);\n}\n.rx-verification-code-message {\n color: var(--rx-verification-success);\n font-size: 0.8rem;\n font-weight: 650;\n}\n.rx-verification-code-status.is-verifying .rx-verification-code-message {\n color: #64748b;\n}\n.rx-verification-code-error {\n color: var(--rx-verification-danger);\n font-size: 0.8rem;\n font-weight: 600;\n text-align: center;\n}\n\n@media (max-width: 420px) {\n .rx-verification-code-cells {\n gap: 0.375rem;\n }\n .rx-verification-code-cell {\n max-width: 2.65rem;\n border-radius: 0.65rem;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rx-verification-code *,\n .rx-verification-code *::before,\n .rx-verification-code *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n transition-delay: 0ms !important;\n }\n}\n`;\n\n\nexport const verificationCodeAnimationsDisabledStyles = `\n.rx-verification-code *,\n.rx-verification-code *::before,\n.rx-verification-code *::after {\n animation: none !important;\n transition: none !important;\n}\n`;\n"],"mappings":";;AAiBA,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;AAC/B,MAAM,qBAAqB;AAC3B,MAAM,uBAAuB;AAE7B,SAAS,mBAAmB,QAAwB;CAClD,OAAO,4BAA4B,KAAK,IAAI,GAAG,SA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwMtC,MAAa,2CAA2C"}
1
+ {"version":3,"file":"verification-code.js","names":[],"sources":["../../src/ui/verification-code.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n mergeProps,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n useId,\n watch\n} from \"vue\";\n\nexport type VerificationCodeStatus = \"idle\" | \"verifying\" | \"success\" | \"error\";\nexport type VerificationCodeMode = \"numeric\" | \"alphanumeric\";\n\ntype VerificationCodePhase = \"input\" | \"collapsing\" | \"verifying\" | \"success\" | \"error\";\n\nconst CELL_COLLAPSE_DURATION_MS = 340;\nconst CELL_COLLAPSE_DELAY_MS = 22;\nconst COLLAPSE_BUFFER_MS = 20;\nconst DEFAULT_CELL_STEP_PX = 56;\n\nfunction collapseDurationMs(length: number): number {\n return CELL_COLLAPSE_DURATION_MS + Math.max(0, length - 1) * CELL_COLLAPSE_DELAY_MS + COLLAPSE_BUFFER_MS;\n}\n\nfunction normalizedLength(value: number): number {\n if (!Number.isFinite(value)) return 4;\n return Math.min(12, Math.max(1, Math.trunc(value)));\n}\n\nfunction normalizeStatus(value: string): VerificationCodeStatus {\n return value === \"verifying\" || value === \"success\" || value === \"error\" ? value : \"idle\";\n}\n\nfunction sanitizeValue(value: string, mode: VerificationCodeMode, length: number): string {\n const clean = mode === \"alphanumeric\"\n ? value.replace(/[^a-zA-Z0-9]/g, \"\").toUpperCase()\n : value.replace(/\\D/g, \"\");\n\n return clean.slice(0, length);\n}\n\nfunction prefersReducedMotion(): boolean {\n return typeof window !== \"undefined\"\n && typeof window.matchMedia === \"function\"\n && window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n\nexport const RxVerificationCode = defineComponent({\n name: \"RxVerificationCode\",\n inheritAttrs: false,\n props: {\n modelValue: { type: String, default: \"\" },\n length: { type: Number, default: 4 },\n status: { type: String, default: \"idle\" },\n mode: { type: String, default: \"numeric\" },\n autoFocus: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n mask: { type: Boolean, default: false },\n name: { type: String, default: \"\" },\n ariaLabel: { type: String, default: \"Verification code\" },\n verifyingText: { type: String, default: \"Verifying…\" },\n successText: { type: String, default: \"Verified and secure\" },\n errorText: { type: String, default: \"The verification code is invalid\" },\n unstyled: { type: Boolean, default: false }\n },\n emits: [\"update:modelValue\", \"change\", \"complete\", \"focus\", \"blur\"],\n setup(props, { emit, attrs }) {\n const inputRef = ref<HTMLInputElement | null>(null);\n const focused = ref(false);\n const messageId = `rx-verification-code-${useId()}-message`;\n const initialStatus = normalizeStatus(props.status);\n const phase = ref<VerificationCodePhase>(\n initialStatus === \"idle\" ? \"input\" : initialStatus\n );\n\n let requestedStatus = initialStatus;\n let transitionTimer: ReturnType<typeof setTimeout> | undefined;\n\n const clearTransitionTimer = () => {\n if (transitionTimer !== undefined) {\n clearTimeout(transitionTimer);\n transitionTimer = undefined;\n }\n };\n\n const settleRequestedStatus = () => {\n transitionTimer = undefined;\n phase.value = requestedStatus === \"success\" ? \"success\" : \"verifying\";\n };\n\n const transitionToStatus = (nextStatus: VerificationCodeStatus) => {\n requestedStatus = nextStatus;\n\n if (nextStatus === \"idle\") {\n clearTransitionTimer();\n phase.value = \"input\";\n return;\n }\n\n if (nextStatus === \"error\") {\n clearTransitionTimer();\n phase.value = \"error\";\n return;\n }\n\n if (phase.value === \"collapsing\") {\n return;\n }\n\n if (phase.value === \"input\" || phase.value === \"error\") {\n if (prefersReducedMotion()) {\n phase.value = nextStatus;\n return;\n }\n\n phase.value = \"collapsing\";\n clearTransitionTimer();\n transitionTimer = setTimeout(settleRequestedStatus, collapseDurationMs(normalizedLength(props.length)));\n return;\n }\n\n phase.value = nextStatus;\n };\n\n watch(\n () => props.status,\n (status) => transitionToStatus(normalizeStatus(status))\n );\n\n const focusInput = () => {\n if (props.disabled || (phase.value !== \"input\" && phase.value !== \"error\")) return;\n inputRef.value?.focus();\n };\n\n const handleInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n const length = normalizedLength(props.length);\n const mode: VerificationCodeMode = props.mode === \"alphanumeric\" ? \"alphanumeric\" : \"numeric\";\n const nextValue = sanitizeValue(input.value, mode, length);\n\n if (input.value !== nextValue) {\n input.value = nextValue;\n }\n\n emit(\"update:modelValue\", nextValue);\n emit(\"change\", nextValue);\n\n if (nextValue.length === length) {\n emit(\"complete\", nextValue);\n }\n };\n\n const handleFocus = (event: FocusEvent) => {\n focused.value = true;\n emit(\"focus\", event);\n };\n\n const handleBlur = (event: FocusEvent) => {\n focused.value = false;\n emit(\"blur\", event);\n };\n\n onMounted(() => {\n if (props.autoFocus && !props.disabled) {\n void nextTick(focusInput);\n }\n });\n\n onBeforeUnmount(clearTransitionTimer);\n\n return () => {\n const length = normalizedLength(props.length);\n const mode: VerificationCodeMode = props.mode === \"alphanumeric\" ? \"alphanumeric\" : \"numeric\";\n const code = sanitizeValue(String(props.modelValue || \"\"), mode, length);\n const status = normalizeStatus(props.status);\n const showCells = phase.value === \"input\" || phase.value === \"error\" || phase.value === \"collapsing\";\n\n const rootClass = props.unstyled\n ? undefined\n : [\n \"rx-verification-code\",\n focused.value ? \"is-focused\" : \"\",\n phase.value === \"error\" ? \"is-error\" : \"\",\n phase.value === \"collapsing\" ? \"is-collapsing\" : \"\"\n ].filter(Boolean);\n const editable = phase.value === \"input\" || phase.value === \"error\";\n const {\n required,\n form,\n readonly,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-describedby\": ariaDescribedby,\n ...rootAttrs\n } = attrs;\n\n const input = h(\"input\", {\n ref: inputRef,\n value: code,\n type: props.mask ? \"password\" : \"text\",\n inputmode: mode === \"numeric\" ? \"numeric\" : \"text\",\n pattern: mode === \"numeric\" ? \"[0-9]*\" : undefined,\n maxlength: length,\n autocomplete: \"one-time-code\",\n autocapitalize: mode === \"alphanumeric\" ? \"characters\" : \"off\",\n spellcheck: false,\n disabled: props.disabled,\n readonly: Boolean(readonly) || !editable,\n required: Boolean(required),\n form: typeof form === \"string\" ? form : undefined,\n name: props.name || undefined,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-invalid\": status === \"error\" ? \"true\" : undefined,\n \"aria-describedby\": status === \"error\" && props.errorText ? messageId : ariaDescribedby,\n style: {\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: \"0\",\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n border: \"0\",\n opacity: \"0\"\n },\n onInput: handleInput,\n onFocus: handleFocus,\n onBlur: handleBlur\n });\n\n const cells = Array.from({ length }, (_, index) => {\n const char = code[index] || \"\";\n const isFilled = char.length > 0;\n const activeIndex = code.length >= length ? length - 1 : code.length;\n const isActive = focused.value && index === activeIndex && phase.value !== \"collapsing\";\n const shift = ((length - 1) / 2 - index) * DEFAULT_CELL_STEP_PX;\n const rotate = (index - (length - 1) / 2) * 5;\n\n const cellClass = props.unstyled\n ? undefined\n : [\n \"rx-verification-code-cell\",\n isFilled ? \"is-filled\" : \"\",\n isActive ? \"is-active\" : \"\"\n ].filter(Boolean);\n\n return h(\n \"span\",\n {\n key: index,\n class: cellClass,\n \"aria-hidden\": \"true\",\n \"data-filled\": isFilled ? \"true\" : \"false\",\n \"data-active\": isActive ? \"true\" : \"false\",\n style: props.unstyled\n ? undefined\n : {\n \"--rx-otp-shift\": `${shift}px`,\n \"--rx-otp-rotate\": `${rotate}deg`,\n \"--rx-otp-delay\": `${index * CELL_COLLAPSE_DELAY_MS}ms`\n }\n },\n char ? (props.mask ? \"•\" : char) : \"\\u00a0\"\n );\n });\n\n const message = phase.value === \"success\"\n ? props.successText\n : phase.value === \"verifying\"\n ? props.verifyingText\n : phase.value === \"error\"\n ? props.errorText\n : \"\";\n\n const statusView = !showCells\n ? h(\n \"div\",\n {\n class: props.unstyled\n ? undefined\n : [\n \"rx-verification-code-status\",\n phase.value === \"success\" ? \"is-success\" : \"is-verifying\"\n ],\n role: \"status\",\n \"aria-live\": \"polite\"\n },\n [\n h(\n \"span\",\n {\n class: props.unstyled\n ? undefined\n : [\n \"rx-verification-code-orb\",\n phase.value === \"success\" ? \"is-success\" : \"is-verifying\"\n ],\n \"aria-hidden\": \"true\"\n },\n phase.value === \"success\"\n ? [h(\"span\", { class: props.unstyled ? undefined : \"rx-verification-code-check\" }, \"✓\")]\n : [h(\"span\", { class: props.unstyled ? undefined : \"rx-verification-code-spinner\" })]\n ),\n message\n ? h(\n \"span\",\n { class: props.unstyled ? undefined : \"rx-verification-code-message\" },\n message\n )\n : null\n ]\n )\n : null;\n\n const errorMessage = phase.value === \"error\" && props.errorText\n ? h(\n \"span\",\n {\n id: messageId,\n class: props.unstyled ? undefined : \"rx-verification-code-error\",\n role: \"alert\"\n },\n props.errorText\n )\n : null;\n\n return h(\n \"div\",\n mergeProps(rootAttrs, {\n class: rootClass,\n \"data-phase\": phase.value,\n \"data-status\": status,\n \"data-disabled\": props.disabled ? \"true\" : \"false\",\n \"data-length\": String(length),\n style: props.unstyled ? undefined : { \"--rx-otp-length\": String(length) },\n onClick: focusInput\n }),\n [\n input,\n showCells\n ? h(\n \"div\",\n {\n class: props.unstyled ? undefined : \"rx-verification-code-cells\",\n \"aria-hidden\": \"true\"\n },\n cells\n )\n : statusView,\n errorMessage\n ]\n );\n };\n }\n});\n\nexport const verificationCodeStyles = `\n@keyframes rxVerificationFill {\n 0% { transform: translateY(5px) scale(0.72) rotate(-7deg); opacity: 0.2; }\n 60% { transform: translateY(-2px) scale(1.08) rotate(3deg); opacity: 1; }\n 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationStatusIn {\n 0% { transform: scale(0.18) rotate(-18deg); opacity: 0; }\n 62% { transform: scale(1.12) rotate(5deg); opacity: 1; }\n 100% { transform: scale(1) rotate(0); opacity: 1; }\n}\n@keyframes rxVerificationPulse {\n 0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24); }\n 50% { transform: scale(1.07); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.36); }\n}\n@keyframes rxVerificationSpin {\n to { transform: rotate(360deg); }\n}\n@keyframes rxVerificationShake {\n 0%, 100% { transform: translateX(0); }\n 20% { transform: translateX(-6px); }\n 40% { transform: translateX(5px); }\n 60% { transform: translateX(-4px); }\n 80% { transform: translateX(3px); }\n}\n\n.rx-verification-code {\n --rx-verification-accent: #2563eb;\n --rx-verification-accent-soft: #dbeafe;\n --rx-verification-success: #10b981;\n --rx-verification-danger: #ef4444;\n --rx-verification-cell-bg: #ffffff;\n --rx-verification-cell-border: #cbd5e1;\n --rx-verification-cell-text: #0f172a;\n position: relative;\n display: inline-flex;\n width: min(100%, 42rem);\n flex-direction: column;\n align-items: center;\n gap: 0.75rem;\n max-width: 100%;\n cursor: text;\n -webkit-tap-highlight-color: transparent;\n}\n.rx-verification-code[data-disabled=\"true\"] {\n cursor: not-allowed;\n opacity: 0.55;\n}\n.rx-verification-code-cells {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n width: 100%;\n min-height: 3rem;\n perspective: 700px;\n}\n.rx-verification-code-cell {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 3rem;\n max-width: 3rem;\n min-width: 0;\n height: auto;\n aspect-ratio: 1;\n flex: 1 1 3rem;\n box-sizing: border-box;\n border: 1.5px solid var(--rx-verification-cell-border);\n border-radius: 0.75rem;\n background: var(--rx-verification-cell-bg);\n color: var(--rx-verification-cell-text);\n font-size: 1.05rem;\n font-weight: 750;\n line-height: 1;\n font-variant-numeric: tabular-nums;\n box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);\n transform-origin: center;\n transition:\n border-color 180ms ease,\n box-shadow 180ms ease,\n background 180ms ease,\n color 180ms ease,\n transform 180ms cubic-bezier(0.16, 1, 0.3, 1),\n opacity 180ms ease;\n}\n.rx-verification-code-cell.is-active {\n border-color: var(--rx-verification-accent);\n box-shadow:\n 0 0 0 3px rgba(37, 99, 235, 0.15),\n 0 6px 18px rgba(37, 99, 235, 0.12);\n transform: translateY(-1px);\n}\n.rx-verification-code-cell.is-filled {\n border-color: transparent;\n color: #ffffff;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);\n animation: rxVerificationFill 300ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code.is-collapsing .rx-verification-code-cell {\n border-color: transparent;\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n color: #ffffff;\n box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);\n transform:\n translateX(var(--rx-otp-shift))\n scale(0.16)\n rotate(var(--rx-otp-rotate));\n opacity: 0;\n transition:\n transform 340ms cubic-bezier(0.7, 0, 0.84, 0),\n opacity 260ms ease;\n transition-delay: var(--rx-otp-delay);\n}\n.rx-verification-code.is-error .rx-verification-code-cells {\n animation: rxVerificationShake 360ms ease-in-out;\n}\n.rx-verification-code.is-error .rx-verification-code-cell {\n border-color: #fca5a5;\n}\n.rx-verification-code-status {\n min-height: 3rem;\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n animation: rxVerificationStatusIn 420ms cubic-bezier(0.16, 1, 0.3, 1);\n}\n.rx-verification-code-orb {\n width: 3rem;\n height: 3rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 9999px;\n}\n.rx-verification-code-orb.is-verifying {\n background: linear-gradient(145deg, #60a5fa, var(--rx-verification-accent));\n animation: rxVerificationPulse 1.25s ease-in-out infinite;\n}\n.rx-verification-code-orb.is-success {\n color: #ffffff;\n background: linear-gradient(145deg, #34d399, var(--rx-verification-success));\n box-shadow: 0 10px 24px rgba(16, 185, 129, 0.28);\n}\n.rx-verification-code-spinner {\n width: 1.1rem;\n height: 1.1rem;\n box-sizing: border-box;\n border: 2px solid rgba(255, 255, 255, 0.42);\n border-top-color: #ffffff;\n border-radius: 9999px;\n animation: rxVerificationSpin 700ms linear infinite;\n}\n.rx-verification-code-check {\n font-size: 1.5rem;\n font-weight: 800;\n line-height: 1;\n transform: translateY(-1px);\n}\n.rx-verification-code-message {\n color: var(--rx-verification-success);\n font-size: 0.8rem;\n font-weight: 650;\n}\n.rx-verification-code-status.is-verifying .rx-verification-code-message {\n color: #64748b;\n}\n.rx-verification-code-error {\n color: var(--rx-verification-danger);\n font-size: 0.8rem;\n font-weight: 600;\n text-align: center;\n}\n\n@media (max-width: 420px) {\n .rx-verification-code-cells {\n gap: 0.375rem;\n }\n .rx-verification-code-cell {\n max-width: 2.65rem;\n border-radius: 0.65rem;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rx-verification-code *,\n .rx-verification-code *::before,\n .rx-verification-code *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n transition-delay: 0ms !important;\n }\n}\n`;\n\n\nexport const verificationCodeAnimationsDisabledStyles = `\n.rx-verification-code *,\n.rx-verification-code *::before,\n.rx-verification-code *::after {\n animation: none !important;\n transition: none !important;\n}\n`;\n"],"mappings":";;AAiBA,MAAM,4BAA4B;AAClC,MAAM,yBAAyB;AAC/B,MAAM,qBAAqB;AAC3B,MAAM,uBAAuB;AAE7B,SAAS,mBAAmB,QAAwB;CAClD,OAAO,4BAA4B,KAAK,IAAI,GAAG,SAAS,CAAC,IAAI,yBAAyB;AACxF;AAEA,SAAS,iBAAiB,OAAuB;CAC/C,IAAI,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACpC,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC;AACpD;AAEA,SAAS,gBAAgB,OAAuC;CAC9D,OAAO,UAAU,eAAe,UAAU,aAAa,UAAU,UAAU,QAAQ;AACrF;AAEA,SAAS,cAAc,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C;IACJ,eAAe;GACjB,GACA,MAAM,UAAU,YACZ,CAAC,EAAE,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAA,IAAY,6BAA6B,GAAG,GAAG,CAAC,IACrF,CAAC,EAAE,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAA,IAAY,+BAA+B,CAAC,CAAC,CACxF,GACA,UACI,EACE,QACA,EAAE,OAAO,MAAM,WAAW,KAAA,IAAY,+BAA+B,GACrE,OACF,IACA,IACN,CACF,IACA;GAEJ,MAAM,eAAe,MAAM,UAAU,WAAW,MAAM,YAClD,EACE,QACA;IACE,IAAI;IACJ,OAAO,MAAM,WAAW,KAAA,IAAY;IACpC,MAAM;GACR,GACA,MAAM,SACR,IACA;GAEJ,OAAO,EACL,OACA,WAAW,WAAW;IACpB,OAAO;IACP,cAAc,MAAM;IACpB,eAAe;IACf,iBAAiB,MAAM,WAAW,SAAS;IAC3C,eAAe,OAAO,MAAM;IAC5B,OAAO,MAAM,WAAW,KAAA,IAAY,EAAE,mBAAmB,OAAO,MAAM,EAAE;IACxE,SAAS;GACX,CAAC,GACD;IACE;IACA,YACI,EACE,OACA;KACE,OAAO,MAAM,WAAW,KAAA,IAAY;KACpC,eAAe;IACjB,GACA,KACF,IACA;IACJ;GACF,CACF;EACF;CACF;AACF,CAAC;AAED,MAAa,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwMtC,MAAa,2CAA2C"}
@@ -3,5 +3,4 @@ export interface ResuxViteBuilderOptions {
3
3
  outDir: string;
4
4
  dev: boolean;
5
5
  }
6
- export declare function createViteBuilderOptions(options: ResuxViteBuilderOptions): ResuxViteBuilderOptions;
7
- //# sourceMappingURL=index.d.ts.map
6
+ export declare function createViteBuilderOptions(options: ResuxViteBuilderOptions): ResuxViteBuilderOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resuxjs",
3
- "version": "0.4.0-beta.7",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "Resumable web framework with Vue-like SFC routing and a custom SSR/runtime pipeline.",
6
6
  "type": "module",
@@ -102,7 +102,7 @@
102
102
  "devDependencies": {
103
103
  "@types/node": "^24.13.5",
104
104
  "happy-dom": "^20.14.5",
105
- "tsdown": "0.23.5",
105
+ "tsdown": "0.23.7",
106
106
  "vitest": "^4.1.11"
107
107
  },
108
108
  "overrides": {
@@ -1 +1,4 @@
1
1
  APP_ORIGIN=http://localhost:3000
2
+
3
+ # Secret for signing production Halal Core safety reports (minimum 32 characters)
4
+ RESUX_HALAL_REPORT_SIGNING_SECRET=
@@ -1,10 +1,22 @@
1
+ import { existsSync, readdirSync } from "node:fs";
2
+ import path from "node:path";
3
+
4
+ function getServerPlugins(): string[] {
5
+ const dir = path.resolve("server/plugins");
6
+ if (!existsSync(dir)) return [];
7
+ return readdirSync(dir)
8
+ .filter((f) => /\.(ts|js|mjs)$/.test(f) && !f.endsWith(".d.ts"))
9
+ .map((f) => path.join(dir, f));
10
+ }
11
+
1
12
  export default {
2
13
  compatibilityDate: "2026-05-02",
3
14
  // Resux uses top-level /plugins, /modules, and /middleware for app features.
4
- // Nitro auto-scans these folders too, so exclude them from Nitro scanning.
5
- ignore: ["plugins/**", "modules/**", "middleware/**"],
6
- // Keep Nitro discovery scoped to the generated adapter directory.
7
- scanDirs: [".resux-nitro"],
15
+ // Nitro auto-scans these folders too, so exclude only top-level Resux folders.
16
+ ignore: ["./plugins/**", "./modules/**", "./middleware/**"],
17
+ // Keep Nitro discovery scoped to the generated adapter directory and server directory.
18
+ scanDirs: [".resux-nitro", "server"],
19
+ plugins: getServerPlugins(),
8
20
  publicAssets: [
9
21
  {
10
22
  dir: "public",