@omnitron-dev/prism 0.1.2 → 0.2.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 (60) hide show
  1. package/dist/blocks/index.js +49 -9
  2. package/dist/blocks/index.js.map +1 -1
  3. package/dist/chunk-2FYNRDXR.js +192 -0
  4. package/dist/chunk-2FYNRDXR.js.map +1 -0
  5. package/dist/chunk-A2Z7NVGL.js +11496 -0
  6. package/dist/chunk-A2Z7NVGL.js.map +1 -0
  7. package/dist/{chunk-E3XANPTO.js → chunk-IZOIO7PA.js} +5 -191
  8. package/dist/{chunk-E3XANPTO.js.map → chunk-IZOIO7PA.js.map} +1 -1
  9. package/dist/{chunk-LAEY5USO.js → chunk-KTCWPGON.js} +55 -25
  10. package/dist/chunk-KTCWPGON.js.map +1 -0
  11. package/dist/{chunk-DXXZ3ITR.js → chunk-MEFT6XPH.js} +721 -455
  12. package/dist/chunk-MEFT6XPH.js.map +1 -0
  13. package/dist/{chunk-BTIT7WYH.js → chunk-SNKGGHBT.js} +2 -2
  14. package/dist/chunk-SNKGGHBT.js.map +1 -0
  15. package/dist/{chunk-UR6X3W5I.js → chunk-VAAIHNWQ.js} +3 -3
  16. package/dist/{chunk-UR6X3W5I.js.map → chunk-VAAIHNWQ.js.map} +1 -1
  17. package/dist/{chunk-GYDT5EKX.js → chunk-XQXGE2PW.js} +760 -472
  18. package/dist/chunk-XQXGE2PW.js.map +1 -0
  19. package/dist/{chunk-WC2WM2JD.js → chunk-XXP3ZGU6.js} +18 -8
  20. package/dist/chunk-XXP3ZGU6.js.map +1 -0
  21. package/dist/chunk-YJMAQL3S.js +1887 -0
  22. package/dist/chunk-YJMAQL3S.js.map +1 -0
  23. package/dist/cli/index.js +4 -4
  24. package/dist/cli/index.js.map +1 -1
  25. package/dist/components/editor/index.d.ts +107 -0
  26. package/dist/components/editor/index.js +4 -0
  27. package/dist/components/editor/index.js.map +1 -0
  28. package/dist/components/index.css +131 -0
  29. package/dist/components/index.css.map +1 -0
  30. package/dist/components/index.d.ts +7073 -0
  31. package/dist/components/index.js +13 -0
  32. package/dist/components/index.js.map +1 -0
  33. package/dist/components-BCGZ-Rwt.d.ts +142 -0
  34. package/dist/{config-BA6IeTq9.d.ts → config-Pct0n_Kq.d.ts} +2 -2
  35. package/dist/core/index.d.ts +20 -5
  36. package/dist/core/index.js +2 -2
  37. package/dist/hooks/index.d.ts +3 -2
  38. package/dist/hooks/index.js +4 -3
  39. package/dist/{index-odhPSv9I.d.ts → index-nmJ8Muwg.d.ts} +4 -127
  40. package/dist/index.d.ts +265 -6615
  41. package/dist/index.js +119 -11662
  42. package/dist/index.js.map +1 -1
  43. package/dist/layouts/index.js +1 -1
  44. package/dist/popover-Dmw7SJLR.d.ts +127 -0
  45. package/dist/registry/index.d.ts +2 -2
  46. package/dist/{registry-BrDNftd5.d.ts → registry-DQcIzW2s.d.ts} +2 -2
  47. package/dist/{settings-plpR26Xk.d.ts → settings-CAC0qFjS.d.ts} +2 -2
  48. package/dist/state/index.d.ts +2 -2
  49. package/dist/state/index.js +1 -1
  50. package/dist/text-transform-D6MzzF7V.d.ts +165 -0
  51. package/dist/theme/index.d.ts +2 -2
  52. package/dist/theme/index.js +2 -2
  53. package/dist/{theme-CrXLfP1c.d.ts → theme-B4Q3Bg5o.d.ts} +1 -1
  54. package/dist/types/index.d.ts +6 -145
  55. package/package.json +46 -40
  56. package/dist/chunk-BTIT7WYH.js.map +0 -1
  57. package/dist/chunk-DXXZ3ITR.js.map +0 -1
  58. package/dist/chunk-GYDT5EKX.js.map +0 -1
  59. package/dist/chunk-LAEY5USO.js.map +0 -1
  60. package/dist/chunk-WC2WM2JD.js.map +0 -1
@@ -320,13 +320,15 @@ function FieldCheckbox({
320
320
  id: inputId,
321
321
  checked: !!field.value,
322
322
  indeterminate,
323
- inputProps: {
324
- "aria-describedby": error?.message || helperText ? helperId : void 0,
325
- "aria-invalid": !!error,
326
- "aria-required": required,
327
- ...indeterminate && { "aria-checked": "mixed" }
328
- },
329
- ...other
323
+ ...other,
324
+ slotProps: {
325
+ input: {
326
+ "aria-describedby": error?.message || helperText ? helperId : void 0,
327
+ "aria-invalid": !!error,
328
+ "aria-required": required,
329
+ ...indeterminate && { "aria-checked": "mixed" }
330
+ }
331
+ }
330
332
  }
331
333
  ),
332
334
  label,
@@ -367,12 +369,14 @@ function FieldSwitch({
367
369
  ...field,
368
370
  id: inputId,
369
371
  checked: !!field.value,
370
- inputProps: {
371
- "aria-describedby": error?.message || helperText ? helperId : void 0,
372
- "aria-invalid": !!error,
373
- "aria-required": required
374
- },
375
- ...other
372
+ ...other,
373
+ slotProps: {
374
+ input: {
375
+ "aria-describedby": error?.message || helperText ? helperId : void 0,
376
+ "aria-invalid": !!error,
377
+ "aria-required": required
378
+ }
379
+ }
376
380
  }
377
381
  ),
378
382
  label,
@@ -620,8 +624,10 @@ function FieldRadio({
620
624
  Radio,
621
625
  {
622
626
  id: `${groupId}-option-${index}`,
623
- inputProps: {
624
- "aria-label": option.label
627
+ slotProps: {
628
+ input: {
629
+ "aria-label": option.label
630
+ }
625
631
  }
626
632
  }
627
633
  ),
@@ -762,8 +768,8 @@ function FieldMultiSelect({
762
768
  const newValues = newValue.map((item) => item.value);
763
769
  setValue(name, newValues, { shouldValidate: true });
764
770
  },
765
- renderTags: (value, getTagProps) => value.map((option, index) => {
766
- const { key, ...tagProps } = getTagProps({ index });
771
+ renderValue: (value, getItemProps) => value.map((option, index) => {
772
+ const { key, ...tagProps } = getItemProps({ index });
767
773
  return /* @__PURE__ */ jsx(
768
774
  Chip,
769
775
  {
@@ -891,7 +897,9 @@ function FieldSlider({
891
897
  return /* @__PURE__ */ jsxs(FormControl8, { error: !!error, fullWidth: true, ...formControlProps, children: [
892
898
  (label || showValue) && /* @__PURE__ */ jsxs(Box7, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1 }, children: [
893
899
  label && /* @__PURE__ */ jsx(FormLabel6, { id: labelId, children: label }),
894
- showValue && /* @__PURE__ */ jsx(Typography2, { variant: "body2", color: "text.secondary", children: displayValue(field.value ?? (Array.isArray(other.defaultValue) ? [min, max] : min)) })
900
+ showValue && /* @__PURE__ */ jsx(Typography2, { variant: "body2", sx: {
901
+ color: "text.secondary"
902
+ }, children: displayValue(field.value ?? (Array.isArray(other.defaultValue) ? [min, max] : min)) })
895
903
  ] }),
896
904
  /* @__PURE__ */ jsx(
897
905
  Slider,
@@ -969,6 +977,14 @@ function FieldDatePicker({
969
977
  openTo,
970
978
  format,
971
979
  slotProps: {
980
+ // MUI v9 x-date-pickers' default textField slot is the new
981
+ // PickersTextField (separate from the MUI TextField). The
982
+ // shape is structurally compatible for our use (fullWidth,
983
+ // error, helperText, sx, label) but TS's strict slot typing
984
+ // refuses to merge with our caller-supplied TextFieldProps.
985
+ // Cast silences the union mismatch without losing runtime
986
+ // behaviour — the picker forwards every prop through to
987
+ // the underlying input.
972
988
  textField: {
973
989
  fullWidth: true,
974
990
  error: !!error,
@@ -1441,9 +1457,9 @@ function UploadPlaceholder({ isDragActive, disabled }) {
1441
1457
  Stack,
1442
1458
  {
1443
1459
  spacing: 1,
1444
- alignItems: "center",
1445
- justifyContent: "center",
1446
1460
  sx: {
1461
+ alignItems: "center",
1462
+ justifyContent: "center",
1447
1463
  p: 3,
1448
1464
  textAlign: "center",
1449
1465
  color: disabled ? "text.disabled" : "text.secondary"
@@ -1513,7 +1529,9 @@ function FilePreview({ files, thumbnail, onRemove }) {
1513
1529
  ),
1514
1530
  /* @__PURE__ */ jsxs(Box7, { sx: { flexGrow: 1, minWidth: 0 }, children: [
1515
1531
  /* @__PURE__ */ jsx(Typography2, { variant: "body2", noWrap: true, children: fileName }),
1516
- fileSize && /* @__PURE__ */ jsx(Typography2, { variant: "caption", color: "text.secondary", children: fileSize })
1532
+ fileSize && /* @__PURE__ */ jsx(Typography2, { variant: "caption", sx: {
1533
+ color: "text.secondary"
1534
+ }, children: fileSize })
1517
1535
  ] }),
1518
1536
  onRemove && /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => onRemove(file), sx: { flexShrink: 0 }, children: "\u2715" })
1519
1537
  ]
@@ -2078,7 +2096,18 @@ function FieldPhone({
2078
2096
  )
2079
2097
  }
2080
2098
  ),
2081
- /* @__PURE__ */ jsx(Typography2, { variant: "body2", color: "text.secondary", sx: { mr: 0.5, minWidth: 40 }, children: selectedCountry.dialCode })
2099
+ /* @__PURE__ */ jsx(
2100
+ Typography2,
2101
+ {
2102
+ variant: "body2",
2103
+ sx: {
2104
+ color: "text.secondary",
2105
+ mr: 0.5,
2106
+ minWidth: 40
2107
+ },
2108
+ children: selectedCountry.dialCode
2109
+ }
2110
+ )
2082
2111
  ] })
2083
2112
  },
2084
2113
  htmlInput: {
@@ -2382,9 +2411,10 @@ function FieldCountrySelect({
2382
2411
  error: !!error,
2383
2412
  helperText: error?.message ?? helperText,
2384
2413
  slotProps: {
2414
+ ...params.slotProps,
2385
2415
  ...textFieldProps?.slotProps,
2386
2416
  htmlInput: {
2387
- ...params.inputProps,
2417
+ ...params.slotProps.htmlInput,
2388
2418
  autoComplete: "country-name"
2389
2419
  }
2390
2420
  }
@@ -2617,5 +2647,5 @@ var Field = {
2617
2647
  };
2618
2648
 
2619
2649
  export { Field, FieldAutocomplete, FieldCheckbox, FieldCode, FieldCountrySelect, FieldCustomEditor, FieldDatePicker, FieldDateTimePicker, FieldEditor, FieldMultiCheckbox, FieldMultiSelect, FieldMultiSwitch, FieldNumber, FieldPhone, FieldRadio, FieldRating, FieldSelect, FieldSlider, FieldSwitch, FieldText, FieldTimePicker, FieldUpload, FieldUploadAvatar, FieldUploadBox, SearchInput, clampNumber, createNumberInputHandlers, parseNumber, roundToDecimals, transformForDisplay, transformOnBlur, transformOnChange };
2620
- //# sourceMappingURL=chunk-LAEY5USO.js.map
2621
- //# sourceMappingURL=chunk-LAEY5USO.js.map
2650
+ //# sourceMappingURL=chunk-KTCWPGON.js.map
2651
+ //# sourceMappingURL=chunk-KTCWPGON.js.map