@plasmicpkgs/plasmic-rich-components 1.0.231 → 1.0.232

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 (40) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/index.js +16 -8
  3. package/dist/index.js.map +1 -1
  4. package/dist/plasmic-rich-components.esm.js +16 -8
  5. package/dist/plasmic-rich-components.esm.js.map +1 -1
  6. package/dist/utils.d.ts +4 -4
  7. package/package.json +3 -3
  8. package/skinny/{common-prop-types-94b20130.cjs.js → common-prop-types-691f4a06.cjs.js} +3 -3
  9. package/skinny/{common-prop-types-94b20130.cjs.js.map → common-prop-types-691f4a06.cjs.js.map} +1 -1
  10. package/skinny/{common-prop-types-82f3a4ed.esm.js → common-prop-types-758ece78.esm.js} +3 -3
  11. package/skinny/{common-prop-types-82f3a4ed.esm.js.map → common-prop-types-758ece78.esm.js.map} +1 -1
  12. package/skinny/{field-react-utils-c717ec94.cjs.js → field-react-utils-2bbbadc7.cjs.js} +2 -2
  13. package/skinny/{field-react-utils-c717ec94.cjs.js.map → field-react-utils-2bbbadc7.cjs.js.map} +1 -1
  14. package/skinny/{field-react-utils-26fba31e.esm.js → field-react-utils-46bb1f20.esm.js} +2 -2
  15. package/skinny/{field-react-utils-26fba31e.esm.js.map → field-react-utils-46bb1f20.esm.js.map} +1 -1
  16. package/skinny/{formatting-6f22c9d6.esm.js → formatting-b434487b.esm.js} +2 -2
  17. package/skinny/{formatting-6f22c9d6.esm.js.map → formatting-b434487b.esm.js.map} +1 -1
  18. package/skinny/{formatting-939d0aa3.cjs.js → formatting-c37b4133.cjs.js} +2 -2
  19. package/skinny/{formatting-939d0aa3.cjs.js.map → formatting-c37b4133.cjs.js.map} +1 -1
  20. package/skinny/rich-calendar/index.cjs.js +3 -3
  21. package/skinny/rich-calendar/index.esm.js +3 -3
  22. package/skinny/rich-details/index.cjs.js +2 -2
  23. package/skinny/rich-details/index.esm.js +2 -2
  24. package/skinny/rich-layout/index.cjs.js +1 -1
  25. package/skinny/rich-layout/index.cjs.js.map +1 -1
  26. package/skinny/rich-layout/index.esm.js +1 -1
  27. package/skinny/rich-layout/index.esm.js.map +1 -1
  28. package/skinny/rich-list/index.cjs.js +4 -4
  29. package/skinny/rich-list/index.cjs.js.map +1 -1
  30. package/skinny/rich-list/index.esm.js +4 -4
  31. package/skinny/rich-list/index.esm.js.map +1 -1
  32. package/skinny/rich-table/index.cjs.js +4 -4
  33. package/skinny/rich-table/index.esm.js +4 -4
  34. package/skinny/{utils-c32bd7ed.esm.js → utils-546b05e4.esm.js} +17 -9
  35. package/skinny/utils-546b05e4.esm.js.map +1 -0
  36. package/skinny/{utils-65c486f0.cjs.js → utils-da451c58.cjs.js} +17 -9
  37. package/skinny/utils-da451c58.cjs.js.map +1 -0
  38. package/skinny/utils.d.ts +4 -4
  39. package/skinny/utils-65c486f0.cjs.js.map +0 -1
  40. package/skinny/utils-c32bd7ed.esm.js.map +0 -1
package/dist/index.js CHANGED
@@ -49,27 +49,34 @@ function isOneOf(elem, arr) {
49
49
  return arr.includes(elem);
50
50
  }
51
51
  function maybe(x, f) {
52
- if (x === void 0 || x === null)
52
+ if (x === void 0 || x === null) {
53
53
  return void 0;
54
+ }
54
55
  return f(x);
55
56
  }
56
57
  function isValidIsoDate(str, extendedOnly = false) {
57
- if (!str)
58
+ if (!str) {
58
59
  return false;
59
- if (typeof str !== "string")
60
+ }
61
+ if (typeof str !== "string") {
60
62
  return false;
61
- if (str.includes(" "))
63
+ }
64
+ if (str.includes(" ")) {
62
65
  return false;
66
+ }
63
67
  if (str.length === 10) {
64
- if (extendedOnly)
68
+ if (extendedOnly) {
65
69
  return false;
70
+ }
66
71
  dayjs__default.default.extend(customParseFormat__default.default);
67
72
  return dayjs__default.default(str, "YYYY-MM-DD", true).isValid();
68
73
  }
69
- if (!dayjs__default.default(str).isValid())
74
+ if (!dayjs__default.default(str).isValid()) {
70
75
  return false;
71
- if (isNaN(new Date(str).getTime()))
76
+ }
77
+ if (isNaN(new Date(str).getTime())) {
72
78
  return false;
79
+ }
73
80
  return true;
74
81
  }
75
82
  function isLikeDate(value) {
@@ -80,8 +87,9 @@ function isLikeImage(value) {
80
87
  return typeof value === "string" ? value.match(/\.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)$/i) : false;
81
88
  }
82
89
  function isLikeColor(value) {
83
- if (typeof value !== "string")
90
+ if (typeof value !== "string") {
84
91
  return false;
92
+ }
85
93
  const hex = /^#?([0-9a-fA-F]{3}([0-9a-fA-F]{3})?|[0-9a-fA-F]{4}([0-9a-fA-F]{4})?)$/;
86
94
  const rgba = /^rgba?\((\s*\d+\s*,\s*\d+\s*,\s*\d+\s*(,\s*(1|0?(\.\d+)?))?\s*)\)$/;
87
95
  const cssNamed = /^(aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$/;