@makeswift/prop-controllers 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/dist/cjs/backgrounds/backgrounds.js +297 -0
  2. package/dist/cjs/backgrounds/backgrounds.js.map +1 -0
  3. package/dist/cjs/backgrounds/index.js +23 -0
  4. package/dist/cjs/backgrounds/index.js.map +1 -0
  5. package/dist/cjs/border/border.js +132 -0
  6. package/dist/cjs/border/border.js.map +1 -0
  7. package/dist/cjs/border/index.js +23 -0
  8. package/dist/cjs/border/index.js.map +1 -0
  9. package/dist/cjs/border-radius/border-radius.js +82 -0
  10. package/dist/cjs/border-radius/border-radius.js.map +1 -0
  11. package/dist/cjs/border-radius/index.js +23 -0
  12. package/dist/cjs/border-radius/index.js.map +1 -0
  13. package/dist/cjs/checkbox/checkbox.js +68 -0
  14. package/dist/cjs/checkbox/checkbox.js.map +1 -0
  15. package/dist/cjs/checkbox/index.js +23 -0
  16. package/dist/cjs/checkbox/index.js.map +1 -0
  17. package/dist/cjs/data.js +85 -0
  18. package/dist/cjs/data.js.map +1 -0
  19. package/dist/cjs/date/date.js +68 -0
  20. package/dist/cjs/date/date.js.map +1 -0
  21. package/dist/cjs/date/index.js +23 -0
  22. package/dist/cjs/date/index.js.map +1 -0
  23. package/dist/cjs/element-id/element-id.js +90 -0
  24. package/dist/cjs/element-id/element-id.js.map +1 -0
  25. package/dist/cjs/element-id/index.js +23 -0
  26. package/dist/cjs/element-id/index.js.map +1 -0
  27. package/dist/cjs/font/font.js +70 -0
  28. package/dist/cjs/font/font.js.map +1 -0
  29. package/dist/cjs/font/index.js +23 -0
  30. package/dist/cjs/font/index.js.map +1 -0
  31. package/dist/cjs/gap-x/gap-x.js +40 -0
  32. package/dist/cjs/gap-x/gap-x.js.map +1 -0
  33. package/dist/cjs/gap-x/index.js +23 -0
  34. package/dist/cjs/gap-x/index.js.map +1 -0
  35. package/dist/cjs/gap-y/gap-y.js +68 -0
  36. package/dist/cjs/gap-y/gap-y.js.map +1 -0
  37. package/dist/cjs/gap-y/index.js +23 -0
  38. package/dist/cjs/gap-y/index.js.map +1 -0
  39. package/dist/cjs/grid/grid.js +130 -0
  40. package/dist/cjs/grid/grid.js.map +1 -0
  41. package/dist/cjs/grid/index.js +23 -0
  42. package/dist/cjs/grid/index.js.map +1 -0
  43. package/dist/cjs/image/image.js +95 -0
  44. package/dist/cjs/image/image.js.map +1 -0
  45. package/dist/cjs/image/index.js +23 -0
  46. package/dist/cjs/image/index.js.map +1 -0
  47. package/dist/cjs/images/images.js +147 -0
  48. package/dist/cjs/images/images.js.map +1 -0
  49. package/dist/cjs/images/index.js +23 -0
  50. package/dist/cjs/images/index.js.map +1 -0
  51. package/dist/cjs/index.js +343 -0
  52. package/dist/cjs/index.js.map +1 -0
  53. package/dist/cjs/link/index.js +23 -0
  54. package/dist/cjs/link/index.js.map +1 -0
  55. package/dist/cjs/link/link.js +137 -0
  56. package/dist/cjs/link/link.js.map +1 -0
  57. package/dist/cjs/margin/index.js +23 -0
  58. package/dist/cjs/margin/index.js.map +1 -0
  59. package/dist/cjs/margin/margin.js +94 -0
  60. package/dist/cjs/margin/margin.js.map +1 -0
  61. package/dist/cjs/navigation-links/index.js +23 -0
  62. package/dist/cjs/navigation-links/index.js.map +1 -0
  63. package/dist/cjs/navigation-links/navigation-links.js +226 -0
  64. package/dist/cjs/navigation-links/navigation-links.js.map +1 -0
  65. package/dist/cjs/number.js +66 -0
  66. package/dist/cjs/number.js.map +1 -0
  67. package/dist/cjs/padding/index.js +23 -0
  68. package/dist/cjs/padding/index.js.map +1 -0
  69. package/dist/cjs/padding/padding.js +91 -0
  70. package/dist/cjs/padding/padding.js.map +1 -0
  71. package/dist/cjs/prop-controllers.js +67 -0
  72. package/dist/cjs/prop-controllers.js.map +1 -0
  73. package/dist/cjs/responsive-color.js +106 -0
  74. package/dist/cjs/responsive-color.js.map +1 -0
  75. package/dist/cjs/responsive-icon-radio-group/index.js +23 -0
  76. package/dist/cjs/responsive-icon-radio-group/index.js.map +1 -0
  77. package/dist/cjs/responsive-icon-radio-group/responsive-icon-radio-group.js +42 -0
  78. package/dist/cjs/responsive-icon-radio-group/responsive-icon-radio-group.js.map +1 -0
  79. package/dist/cjs/responsive-length.js +73 -0
  80. package/dist/cjs/responsive-length.js.map +1 -0
  81. package/dist/cjs/responsive-number/index.js +23 -0
  82. package/dist/cjs/responsive-number/index.js.map +1 -0
  83. package/dist/cjs/responsive-number/responsive-number.js +40 -0
  84. package/dist/cjs/responsive-number/responsive-number.js.map +1 -0
  85. package/dist/cjs/responsive-opacity/index.js +23 -0
  86. package/dist/cjs/responsive-opacity/index.js.map +1 -0
  87. package/dist/cjs/responsive-opacity/responsive-opacity.js +43 -0
  88. package/dist/cjs/responsive-opacity/responsive-opacity.js.map +1 -0
  89. package/dist/cjs/responsive-select/index.js +23 -0
  90. package/dist/cjs/responsive-select/index.js.map +1 -0
  91. package/dist/cjs/responsive-select/responsive-select.js +42 -0
  92. package/dist/cjs/responsive-select/responsive-select.js.map +1 -0
  93. package/dist/cjs/shadows.js +126 -0
  94. package/dist/cjs/shadows.js.map +1 -0
  95. package/dist/cjs/social-links/index.js +23 -0
  96. package/dist/cjs/social-links/index.js.map +1 -0
  97. package/dist/cjs/social-links/social-links.js +128 -0
  98. package/dist/cjs/social-links/social-links.js.map +1 -0
  99. package/dist/cjs/table/index.js +23 -0
  100. package/dist/cjs/table/index.js.map +1 -0
  101. package/dist/cjs/table/table.js +91 -0
  102. package/dist/cjs/table/table.js.map +1 -0
  103. package/dist/cjs/table-form-fields/index.js +23 -0
  104. package/dist/cjs/table-form-fields/index.js.map +1 -0
  105. package/dist/cjs/table-form-fields/table-form-fields.js +113 -0
  106. package/dist/cjs/table-form-fields/table-form-fields.js.map +1 -0
  107. package/dist/cjs/text-area/index.js +23 -0
  108. package/dist/cjs/text-area/index.js.map +1 -0
  109. package/dist/cjs/text-area/text-area.js +67 -0
  110. package/dist/cjs/text-area/text-area.js.map +1 -0
  111. package/dist/cjs/text-input/index.js +23 -0
  112. package/dist/cjs/text-input/index.js.map +1 -0
  113. package/dist/cjs/text-input/text-input.js +67 -0
  114. package/dist/cjs/text-input/text-input.js.map +1 -0
  115. package/dist/cjs/text-style/index.js +23 -0
  116. package/dist/cjs/text-style/index.js.map +1 -0
  117. package/dist/cjs/text-style/text-style.js +88 -0
  118. package/dist/cjs/text-style/text-style.js.map +1 -0
  119. package/dist/cjs/utils/associated-types.js +17 -0
  120. package/dist/cjs/utils/associated-types.js.map +1 -0
  121. package/dist/cjs/utils/utils.js +42 -0
  122. package/dist/cjs/utils/utils.js.map +1 -0
  123. package/dist/cjs/versioned.js +66 -0
  124. package/dist/cjs/versioned.js.map +1 -0
  125. package/dist/cjs/video/index.js +23 -0
  126. package/dist/cjs/video/index.js.map +1 -0
  127. package/dist/cjs/video/video.js +75 -0
  128. package/dist/cjs/video/video.js.map +1 -0
  129. package/dist/cjs/width/index.js +23 -0
  130. package/dist/cjs/width/index.js.map +1 -0
  131. package/dist/cjs/width/width.js +76 -0
  132. package/dist/cjs/width/width.js.map +1 -0
  133. package/dist/esm/backgrounds/backgrounds.js +268 -0
  134. package/dist/esm/backgrounds/backgrounds.js.map +1 -0
  135. package/dist/esm/backgrounds/index.js +2 -0
  136. package/dist/esm/backgrounds/index.js.map +1 -0
  137. package/dist/esm/border/border.js +105 -0
  138. package/dist/esm/border/border.js.map +1 -0
  139. package/dist/esm/border/index.js +2 -0
  140. package/dist/esm/border/index.js.map +1 -0
  141. package/dist/esm/border-radius/border-radius.js +58 -0
  142. package/dist/esm/border-radius/border-radius.js.map +1 -0
  143. package/dist/esm/border-radius/index.js +2 -0
  144. package/dist/esm/border-radius/index.js.map +1 -0
  145. package/dist/esm/checkbox/checkbox.js +40 -0
  146. package/dist/esm/checkbox/checkbox.js.map +1 -0
  147. package/dist/esm/checkbox/index.js +2 -0
  148. package/dist/esm/checkbox/index.js.map +1 -0
  149. package/dist/esm/data.js +52 -0
  150. package/dist/esm/data.js.map +1 -0
  151. package/dist/esm/date/date.js +40 -0
  152. package/dist/esm/date/date.js.map +1 -0
  153. package/dist/esm/date/index.js +2 -0
  154. package/dist/esm/date/index.js.map +1 -0
  155. package/dist/esm/element-id/element-id.js +64 -0
  156. package/dist/esm/element-id/element-id.js.map +1 -0
  157. package/dist/esm/element-id/index.js +2 -0
  158. package/dist/esm/element-id/index.js.map +1 -0
  159. package/dist/esm/font/font.js +42 -0
  160. package/dist/esm/font/font.js.map +1 -0
  161. package/dist/esm/font/index.js +2 -0
  162. package/dist/esm/font/index.js.map +1 -0
  163. package/dist/esm/gap-x/gap-x.js +16 -0
  164. package/dist/esm/gap-x/gap-x.js.map +1 -0
  165. package/dist/esm/gap-x/index.js +2 -0
  166. package/dist/esm/gap-x/index.js.map +1 -0
  167. package/dist/esm/gap-y/gap-y.js +40 -0
  168. package/dist/esm/gap-y/gap-y.js.map +1 -0
  169. package/dist/esm/gap-y/index.js +2 -0
  170. package/dist/esm/gap-y/index.js.map +1 -0
  171. package/dist/esm/grid/grid.js +102 -0
  172. package/dist/esm/grid/grid.js.map +1 -0
  173. package/dist/esm/grid/index.js +2 -0
  174. package/dist/esm/grid/index.js.map +1 -0
  175. package/dist/esm/image/image.js +71 -0
  176. package/dist/esm/image/image.js.map +1 -0
  177. package/dist/esm/image/index.js +2 -0
  178. package/dist/esm/image/index.js.map +1 -0
  179. package/dist/esm/images/images.js +119 -0
  180. package/dist/esm/images/images.js.map +1 -0
  181. package/dist/esm/images/index.js +2 -0
  182. package/dist/esm/images/index.js.map +1 -0
  183. package/dist/esm/index.js +336 -0
  184. package/dist/esm/index.js.map +1 -0
  185. package/dist/esm/link/index.js +2 -0
  186. package/dist/esm/link/index.js.map +1 -0
  187. package/dist/esm/link/link.js +108 -0
  188. package/dist/esm/link/link.js.map +1 -0
  189. package/dist/esm/margin/index.js +2 -0
  190. package/dist/esm/margin/index.js.map +1 -0
  191. package/dist/esm/margin/margin.js +69 -0
  192. package/dist/esm/margin/margin.js.map +1 -0
  193. package/dist/esm/navigation-links/index.js +2 -0
  194. package/dist/esm/navigation-links/index.js.map +1 -0
  195. package/dist/esm/navigation-links/navigation-links.js +199 -0
  196. package/dist/esm/navigation-links/navigation-links.js.map +1 -0
  197. package/dist/esm/number.js +39 -0
  198. package/dist/esm/number.js.map +1 -0
  199. package/dist/esm/padding/index.js +2 -0
  200. package/dist/esm/padding/index.js.map +1 -0
  201. package/dist/esm/padding/padding.js +66 -0
  202. package/dist/esm/padding/padding.js.map +1 -0
  203. package/dist/esm/prop-controllers.js +44 -0
  204. package/dist/esm/prop-controllers.js.map +1 -0
  205. package/dist/esm/responsive-color.js +79 -0
  206. package/dist/esm/responsive-color.js.map +1 -0
  207. package/dist/esm/responsive-icon-radio-group/index.js +2 -0
  208. package/dist/esm/responsive-icon-radio-group/index.js.map +1 -0
  209. package/dist/esm/responsive-icon-radio-group/responsive-icon-radio-group.js +21 -0
  210. package/dist/esm/responsive-icon-radio-group/responsive-icon-radio-group.js.map +1 -0
  211. package/dist/esm/responsive-length.js +43 -0
  212. package/dist/esm/responsive-length.js.map +1 -0
  213. package/dist/esm/responsive-number/index.js +2 -0
  214. package/dist/esm/responsive-number/index.js.map +1 -0
  215. package/dist/esm/responsive-number/responsive-number.js +16 -0
  216. package/dist/esm/responsive-number/responsive-number.js.map +1 -0
  217. package/dist/esm/responsive-opacity/index.js +2 -0
  218. package/dist/esm/responsive-opacity/index.js.map +1 -0
  219. package/dist/esm/responsive-opacity/responsive-opacity.js +18 -0
  220. package/dist/esm/responsive-opacity/responsive-opacity.js.map +1 -0
  221. package/dist/esm/responsive-select/index.js +2 -0
  222. package/dist/esm/responsive-select/index.js.map +1 -0
  223. package/dist/esm/responsive-select/responsive-select.js +21 -0
  224. package/dist/esm/responsive-select/responsive-select.js.map +1 -0
  225. package/dist/esm/shadows.js +100 -0
  226. package/dist/esm/shadows.js.map +1 -0
  227. package/dist/esm/social-links/index.js +2 -0
  228. package/dist/esm/social-links/index.js.map +1 -0
  229. package/dist/esm/social-links/social-links.js +98 -0
  230. package/dist/esm/social-links/social-links.js.map +1 -0
  231. package/dist/esm/table/index.js +2 -0
  232. package/dist/esm/table/index.js.map +1 -0
  233. package/dist/esm/table/table.js +64 -0
  234. package/dist/esm/table/table.js.map +1 -0
  235. package/dist/esm/table-form-fields/index.js +2 -0
  236. package/dist/esm/table-form-fields/index.js.map +1 -0
  237. package/dist/esm/table-form-fields/table-form-fields.js +87 -0
  238. package/dist/esm/table-form-fields/table-form-fields.js.map +1 -0
  239. package/dist/esm/text-area/index.js +2 -0
  240. package/dist/esm/text-area/index.js.map +1 -0
  241. package/dist/esm/text-area/text-area.js +39 -0
  242. package/dist/esm/text-area/text-area.js.map +1 -0
  243. package/dist/esm/text-input/index.js +2 -0
  244. package/dist/esm/text-input/index.js.map +1 -0
  245. package/dist/esm/text-input/text-input.js +39 -0
  246. package/dist/esm/text-input/text-input.js.map +1 -0
  247. package/dist/esm/text-style/index.js +2 -0
  248. package/dist/esm/text-style/index.js.map +1 -0
  249. package/dist/esm/text-style/text-style.js +59 -0
  250. package/dist/esm/text-style/text-style.js.map +1 -0
  251. package/dist/esm/utils/associated-types.js +1 -0
  252. package/dist/esm/utils/associated-types.js.map +1 -0
  253. package/dist/esm/utils/utils.js +18 -0
  254. package/dist/esm/utils/utils.js.map +1 -0
  255. package/dist/esm/versioned.js +43 -0
  256. package/dist/esm/versioned.js.map +1 -0
  257. package/dist/esm/video/index.js +2 -0
  258. package/dist/esm/video/index.js.map +1 -0
  259. package/dist/esm/video/video.js +47 -0
  260. package/dist/esm/video/video.js.map +1 -0
  261. package/dist/esm/width/index.js +2 -0
  262. package/dist/esm/width/index.js.map +1 -0
  263. package/dist/esm/width/width.js +49 -0
  264. package/dist/esm/width/width.js.map +1 -0
  265. package/dist/types/backgrounds/backgrounds.d.ts +97 -97
  266. package/dist/types/border/border.d.ts +595 -765
  267. package/dist/types/border/border.d.ts.map +1 -1
  268. package/dist/types/border/index.d.ts +1 -0
  269. package/dist/types/border/index.d.ts.map +1 -1
  270. package/dist/types/border-radius/border-radius.d.ts +23 -23
  271. package/dist/types/border-radius/border-radius.d.ts.map +1 -1
  272. package/dist/types/checkbox/checkbox.d.ts +4 -4
  273. package/dist/types/data.d.ts +5 -5
  274. package/dist/types/data.d.ts.map +1 -1
  275. package/dist/types/date/date.d.ts +4 -4
  276. package/dist/types/element-id/element-id.d.ts +4 -4
  277. package/dist/types/font/font.d.ts +9 -9
  278. package/dist/types/font/font.d.ts.map +1 -1
  279. package/dist/types/gap-x/gap-x.d.ts +204 -120
  280. package/dist/types/gap-x/gap-x.d.ts.map +1 -1
  281. package/dist/types/gap-y/gap-y.d.ts +8 -8
  282. package/dist/types/grid/grid.d.ts +854 -38
  283. package/dist/types/grid/grid.d.ts.map +1 -1
  284. package/dist/types/image/image.d.ts +4 -4
  285. package/dist/types/images/images.d.ts +94 -94
  286. package/dist/types/index.d.ts +1 -1
  287. package/dist/types/index.d.ts.map +1 -1
  288. package/dist/types/link/link.d.ts +21 -21
  289. package/dist/types/link/link.d.ts.map +1 -1
  290. package/dist/types/margin/margin.d.ts +10 -10
  291. package/dist/types/margin/margin.d.ts.map +1 -1
  292. package/dist/types/navigation-links/navigation-links.d.ts +164 -164
  293. package/dist/types/number.d.ts +4 -4
  294. package/dist/types/padding/padding.d.ts +10 -10
  295. package/dist/types/padding/padding.d.ts.map +1 -1
  296. package/dist/types/prop-controllers.d.ts +2 -99
  297. package/dist/types/prop-controllers.d.ts.map +1 -1
  298. package/dist/types/responsive-color.d.ts +9 -9
  299. package/dist/types/responsive-color.d.ts.map +1 -1
  300. package/dist/types/responsive-icon-radio-group/responsive-icon-radio-group.d.ts +88 -35
  301. package/dist/types/responsive-icon-radio-group/responsive-icon-radio-group.d.ts.map +1 -1
  302. package/dist/types/responsive-length.d.ts +14 -14
  303. package/dist/types/responsive-length.d.ts.map +1 -1
  304. package/dist/types/responsive-number/responsive-number.d.ts +118 -67
  305. package/dist/types/responsive-number/responsive-number.d.ts.map +1 -1
  306. package/dist/types/responsive-opacity/responsive-opacity.d.ts +120 -69
  307. package/dist/types/responsive-opacity/responsive-opacity.d.ts.map +1 -1
  308. package/dist/types/responsive-select/responsive-select.d.ts +88 -35
  309. package/dist/types/responsive-select/responsive-select.d.ts.map +1 -1
  310. package/dist/types/shadows.d.ts +7 -7
  311. package/dist/types/shadows.d.ts.map +1 -1
  312. package/dist/types/social-links/social-links.d.ts +4 -4
  313. package/dist/types/table/table.d.ts +4 -4
  314. package/dist/types/table-form-fields/table-form-fields.d.ts +9 -9
  315. package/dist/types/text-area/text-area.d.ts +4 -4
  316. package/dist/types/text-input/text-input.d.ts +4 -4
  317. package/dist/types/text-style/text-style.d.ts +9 -9
  318. package/dist/types/text-style/text-style.d.ts.map +1 -1
  319. package/dist/types/utils/associated-types.d.ts +4 -1
  320. package/dist/types/utils/associated-types.d.ts.map +1 -1
  321. package/dist/types/versioned.d.ts +187 -122
  322. package/dist/types/versioned.d.ts.map +1 -1
  323. package/dist/types/video/video.d.ts +4 -4
  324. package/dist/types/width/width.d.ts +12 -12
  325. package/package.json +9 -7
  326. package/dist/index.cjs +0 -2489
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var prop_controllers_exports = {};
20
+ __export(prop_controllers_exports, {
21
+ ControlDataTypeKey: () => import_controls2.ControlDataTypeKey,
22
+ Schema: () => import_controls2.Schema,
23
+ Types: () => Types
24
+ });
25
+ module.exports = __toCommonJS(prop_controllers_exports);
26
+ var import_controls2 = require("@makeswift/controls");
27
+ const Types = {
28
+ Backgrounds: "Backgrounds",
29
+ Border: "Border",
30
+ BorderRadius: "BorderRadius",
31
+ Checkbox: "Checkbox",
32
+ Date: "Date",
33
+ ElementID: "ElementID",
34
+ Font: "Font",
35
+ GapX: "GapX",
36
+ GapY: "GapY",
37
+ Grid: "Grid",
38
+ Image: "Image",
39
+ Images: "Images",
40
+ Link: "Link",
41
+ Margin: "Margin",
42
+ NavigationLinks: "NavigationLinks",
43
+ Padding: "Padding",
44
+ Number: "Number",
45
+ Shadows: "Shadows",
46
+ ResponsiveColor: "ResponsiveColor",
47
+ ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup",
48
+ ResponsiveLength: "ResponsiveLength",
49
+ ResponsiveNumber: "ResponsiveNumber",
50
+ ResponsiveOpacity: "ResponsiveOpacity",
51
+ ResponsiveSelect: "ResponsiveSelect",
52
+ SocialLinks: "SocialLinks",
53
+ TextArea: "TextArea",
54
+ TextInput: "TextInput",
55
+ Table: "Table",
56
+ TableFormFields: "TableFormFields",
57
+ TextStyle: "TextStyle",
58
+ Width: "Width",
59
+ Video: "Video"
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ ControlDataTypeKey,
64
+ Schema,
65
+ Types
66
+ });
67
+ //# sourceMappingURL=prop-controllers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/prop-controllers.ts"],"sourcesContent":["import { type Device, type ResponsiveValue } from '@makeswift/controls'\n\nimport { AssociatedType } from './utils/associated-types'\n\nexport {\n type CopyContext,\n type DataType,\n type Element,\n type ElementData,\n type MergeTranslatableDataContext,\n type ReplacementContext,\n type ResponsiveValue,\n Schema,\n ControlDataTypeKey,\n} from '@makeswift/controls'\n\nexport const Types = {\n Backgrounds: 'Backgrounds',\n Border: 'Border',\n BorderRadius: 'BorderRadius',\n Checkbox: 'Checkbox',\n Date: 'Date',\n ElementID: 'ElementID',\n Font: 'Font',\n GapX: 'GapX',\n GapY: 'GapY',\n Grid: 'Grid',\n Image: 'Image',\n Images: 'Images',\n Link: 'Link',\n Margin: 'Margin',\n NavigationLinks: 'NavigationLinks',\n Padding: 'Padding',\n Number: 'Number',\n Shadows: 'Shadows',\n ResponsiveColor: 'ResponsiveColor',\n ResponsiveIconRadioGroup: 'ResponsiveIconRadioGroup',\n ResponsiveLength: 'ResponsiveLength',\n ResponsiveNumber: 'ResponsiveNumber',\n ResponsiveOpacity: 'ResponsiveOpacity',\n ResponsiveSelect: 'ResponsiveSelect',\n SocialLinks: 'SocialLinks',\n TextArea: 'TextArea',\n TextInput: 'TextInput',\n Table: 'Table',\n TableFormFields: 'TableFormFields',\n TextStyle: 'TextStyle',\n Width: 'Width',\n Video: 'Video',\n} as const\n\nexport type Options<T> =\n | T\n | ((props: Record<string, unknown>, deviceMode: Device) => T)\n\nexport type ResolveOptions<T extends Options<unknown>> =\n T extends Options<infer U> ? U : never\n\nexport type PropType<T> = AssociatedType<T, 'Type'>\nexport type PropData<T> = AssociatedType<T, 'PropData'>\nexport type Value<T> = AssociatedType<T, 'Value'>\nexport type Descriptor<T> = AssociatedType<T, 'Descriptor'>\nexport type Discriminator<T> = AssociatedType<T, 'Discriminator'>\nexport type OptionsType<T> = AssociatedType<Descriptor<T>, 'Options'>\nexport type RawOptionsType<T> = ResolveOptions<OptionsType<T>>\n\nexport type PrimitiveValue<T> =\n Value<T> extends ResponsiveValue<infer U> ? U : Value<T>\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,IAAAA,mBAUO;AAEA,MAAM,QAAQ;AAAA,EACnB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,MAAM;AAAA,EACN,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,0BAA0B;AAAA,EAC1B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AACT;","names":["import_controls"]}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_color_exports = {};
20
+ __export(responsive_color_exports, {
21
+ ResponsiveColor: () => ResponsiveColor,
22
+ copyResponsiveColorData: () => copyResponsiveColorData,
23
+ copyResponsiveColorPropControllerData: () => copyResponsiveColorPropControllerData,
24
+ createResponsiveColorPropControllerDataFromResponsiveColorData: () => createResponsiveColorPropControllerDataFromResponsiveColorData,
25
+ getResponsiveColorDataSwatchIds: () => getResponsiveColorDataSwatchIds,
26
+ getResponsiveColorPropControllerDataResponsiveColorData: () => getResponsiveColorPropControllerDataResponsiveColorData,
27
+ getResponsiveColorPropControllerDataSawtchIds: () => getResponsiveColorPropControllerDataSawtchIds,
28
+ responsiveColorPropControllerDataSchema: () => responsiveColorPropControllerDataSchema
29
+ });
30
+ module.exports = __toCommonJS(responsive_color_exports);
31
+ var import_zod = require("zod");
32
+ var import_data = require("./data");
33
+ var import_prop_controllers = require("./prop-controllers");
34
+ var import_ts_pattern = require("ts-pattern");
35
+ const responsiveColorDataSchema = import_prop_controllers.Schema.responsiveValue(import_data.colorDataSchema);
36
+ const responsiveColorPropControllerDataV0Schema = responsiveColorDataSchema;
37
+ const ResponsiveColorPropControllerDataV1Type = "prop-controllers::responsive-color::v1";
38
+ const responsiveColorPropControllerDataV1Schema = import_zod.z.object({
39
+ [import_prop_controllers.ControlDataTypeKey]: import_zod.z.literal(ResponsiveColorPropControllerDataV1Type),
40
+ value: responsiveColorDataSchema
41
+ });
42
+ const responsiveColorPropControllerDataSchema = import_zod.z.union([
43
+ responsiveColorPropControllerDataV0Schema,
44
+ responsiveColorPropControllerDataV1Schema
45
+ ]);
46
+ function ResponsiveColor(options = {}) {
47
+ return { type: import_prop_controllers.Types.ResponsiveColor, version: 1, options };
48
+ }
49
+ function getResponsiveColorPropControllerDataResponsiveColorData(data) {
50
+ return (0, import_ts_pattern.match)(data).with(
51
+ { [import_prop_controllers.ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type },
52
+ (v1) => v1.value
53
+ ).otherwise((v0) => v0);
54
+ }
55
+ function createResponsiveColorPropControllerDataFromResponsiveColorData(definition, responsiveColorData) {
56
+ return (0, import_ts_pattern.match)(definition).with(
57
+ { version: 1 },
58
+ () => ({
59
+ [import_prop_controllers.ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type,
60
+ value: responsiveColorData
61
+ })
62
+ ).otherwise(() => responsiveColorData);
63
+ }
64
+ function getResponsiveColorDataSwatchIds(data) {
65
+ return data.map((override) => override.value.swatchId);
66
+ }
67
+ function getResponsiveColorPropControllerDataSawtchIds(data) {
68
+ if (data == null)
69
+ return [];
70
+ return getResponsiveColorDataSwatchIds(
71
+ getResponsiveColorPropControllerDataResponsiveColorData(data)
72
+ );
73
+ }
74
+ function copyResponsiveColorData(data, context) {
75
+ return data.map((override) => ({
76
+ ...override,
77
+ value: copyColorValue(override.value)
78
+ }));
79
+ function copyColorValue(colorValue) {
80
+ return {
81
+ ...colorValue,
82
+ swatchId: context.replacementContext.swatchIds.get(colorValue.swatchId) ?? colorValue.swatchId
83
+ };
84
+ }
85
+ }
86
+ function copyResponsiveColorPropControllerData(data, context) {
87
+ return (0, import_ts_pattern.match)(data).with(void 0, () => void 0).with(
88
+ { [import_prop_controllers.ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type },
89
+ (v1) => ({
90
+ [import_prop_controllers.ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type,
91
+ value: copyResponsiveColorData(v1.value, context)
92
+ })
93
+ ).otherwise((v0) => copyResponsiveColorData(v0, context));
94
+ }
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ ResponsiveColor,
98
+ copyResponsiveColorData,
99
+ copyResponsiveColorPropControllerData,
100
+ createResponsiveColorPropControllerDataFromResponsiveColorData,
101
+ getResponsiveColorDataSwatchIds,
102
+ getResponsiveColorPropControllerDataResponsiveColorData,
103
+ getResponsiveColorPropControllerDataSawtchIds,
104
+ responsiveColorPropControllerDataSchema
105
+ });
106
+ //# sourceMappingURL=responsive-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/responsive-color.ts"],"sourcesContent":["import { z } from 'zod'\nimport { colorDataSchema } from './data'\nimport {\n ControlDataTypeKey,\n CopyContext,\n Options,\n Types,\n Schema,\n} from './prop-controllers'\nimport { match } from 'ts-pattern'\n\nconst responsiveColorDataSchema = Schema.responsiveValue(colorDataSchema)\n\nexport type ResponsiveColorData = z.infer<typeof responsiveColorDataSchema>\n\nconst responsiveColorPropControllerDataV0Schema = responsiveColorDataSchema\n\ntype ResponsiveColorPropControllerDataV0 = z.infer<\n typeof responsiveColorPropControllerDataV0Schema\n>\n\nconst ResponsiveColorPropControllerDataV1Type =\n 'prop-controllers::responsive-color::v1'\n\nconst responsiveColorPropControllerDataV1Schema = z.object({\n [ControlDataTypeKey]: z.literal(ResponsiveColorPropControllerDataV1Type),\n value: responsiveColorDataSchema,\n})\n\ntype ResponsiveColorPropControllerDataV1 = z.infer<\n typeof responsiveColorPropControllerDataV1Schema\n>\n\nexport const responsiveColorPropControllerDataSchema = z.union([\n responsiveColorPropControllerDataV0Schema,\n responsiveColorPropControllerDataV1Schema,\n])\n\nexport type ResponsiveColorPropControllerData = z.infer<\n typeof responsiveColorPropControllerDataSchema\n>\n\nexport type ResponsiveColorOptions = Options<{\n label?: string\n placeholder?: string\n hidden?: boolean\n}>\n\ntype ResponsiveColorDescriptorV0<_T = ResponsiveColorPropControllerDataV0> = {\n type: typeof Types.ResponsiveColor\n options: ResponsiveColorOptions\n}\n\ntype ResponsiveColorDescriptorV1<_T = ResponsiveColorPropControllerDataV1> = {\n type: typeof Types.ResponsiveColor\n version: 1\n options: ResponsiveColorOptions\n}\n\nexport type ResponsiveColorDescriptor<_T = ResponsiveColorPropControllerData> =\n | ResponsiveColorDescriptorV0\n | ResponsiveColorDescriptorV1\n\n/**\n * @deprecated Imports from `@makeswift/prop-controllers` are deprecated. Use\n * `@makeswift/runtime/controls` instead.\n */\nexport function ResponsiveColor(\n options: ResponsiveColorOptions = {},\n): ResponsiveColorDescriptorV1 {\n return { type: Types.ResponsiveColor, version: 1, options }\n}\n\nexport function getResponsiveColorPropControllerDataResponsiveColorData(\n data: ResponsiveColorPropControllerData,\n): ResponsiveColorData {\n return match(data)\n .with(\n { [ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type },\n (v1) => v1.value,\n )\n .otherwise((v0) => v0)\n}\n\nexport function createResponsiveColorPropControllerDataFromResponsiveColorData(\n definition: ResponsiveColorDescriptor,\n responsiveColorData: ResponsiveColorData,\n): ResponsiveColorPropControllerData {\n return match(definition)\n .with(\n { version: 1 },\n () =>\n ({\n [ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type,\n value: responsiveColorData,\n }) as const,\n )\n .otherwise(() => responsiveColorData)\n}\n\nexport function getResponsiveColorDataSwatchIds(\n data: ResponsiveColorData,\n): string[] {\n return data.map((override) => override.value.swatchId)\n}\n\nexport function getResponsiveColorPropControllerDataSawtchIds(\n data: ResponsiveColorPropControllerData | undefined | null,\n): string[] {\n if (data == null) return []\n\n return getResponsiveColorDataSwatchIds(\n getResponsiveColorPropControllerDataResponsiveColorData(data),\n )\n}\n\nexport function copyResponsiveColorData(\n data: ResponsiveColorData,\n context: CopyContext,\n): ResponsiveColorData {\n return data.map((override) => ({\n ...override,\n value: copyColorValue(override.value),\n }))\n\n function copyColorValue(colorValue: any): any {\n return {\n ...colorValue,\n swatchId:\n context.replacementContext.swatchIds.get(colorValue.swatchId) ??\n colorValue.swatchId,\n }\n }\n}\n\nexport function copyResponsiveColorPropControllerData(\n data: ResponsiveColorPropControllerData | undefined,\n context: CopyContext,\n): ResponsiveColorPropControllerData | undefined {\n return match(data)\n .with(undefined, () => undefined)\n .with(\n { [ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type },\n (v1) =>\n ({\n [ControlDataTypeKey]: ResponsiveColorPropControllerDataV1Type,\n value: copyResponsiveColorData(v1.value, context),\n }) as const,\n )\n .otherwise((v0) => copyResponsiveColorData(v0, context))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAClB,kBAAgC;AAChC,8BAMO;AACP,wBAAsB;AAEtB,MAAM,4BAA4B,+BAAO,gBAAgB,2BAAe;AAIxE,MAAM,4CAA4C;AAMlD,MAAM,0CACJ;AAEF,MAAM,4CAA4C,aAAE,OAAO;AAAA,EACzD,CAAC,0CAAkB,GAAG,aAAE,QAAQ,uCAAuC;AAAA,EACvE,OAAO;AACT,CAAC;AAMM,MAAM,0CAA0C,aAAE,MAAM;AAAA,EAC7D;AAAA,EACA;AACF,CAAC;AA+BM,SAAS,gBACd,UAAkC,CAAC,GACN;AAC7B,SAAO,EAAE,MAAM,8BAAM,iBAAiB,SAAS,GAAG,QAAQ;AAC5D;AAEO,SAAS,wDACd,MACqB;AACrB,aAAO,yBAAM,IAAI,EACd;AAAA,IACC,EAAE,CAAC,0CAAkB,GAAG,wCAAwC;AAAA,IAChE,CAAC,OAAO,GAAG;AAAA,EACb,EACC,UAAU,CAAC,OAAO,EAAE;AACzB;AAEO,SAAS,+DACd,YACA,qBACmC;AACnC,aAAO,yBAAM,UAAU,EACpB;AAAA,IACC,EAAE,SAAS,EAAE;AAAA,IACb,OACG;AAAA,MACC,CAAC,0CAAkB,GAAG;AAAA,MACtB,OAAO;AAAA,IACT;AAAA,EACJ,EACC,UAAU,MAAM,mBAAmB;AACxC;AAEO,SAAS,gCACd,MACU;AACV,SAAO,KAAK,IAAI,CAAC,aAAa,SAAS,MAAM,QAAQ;AACvD;AAEO,SAAS,8CACd,MACU;AACV,MAAI,QAAQ;AAAM,WAAO,CAAC;AAE1B,SAAO;AAAA,IACL,wDAAwD,IAAI;AAAA,EAC9D;AACF;AAEO,SAAS,wBACd,MACA,SACqB;AACrB,SAAO,KAAK,IAAI,CAAC,cAAc;AAAA,IAC7B,GAAG;AAAA,IACH,OAAO,eAAe,SAAS,KAAK;AAAA,EACtC,EAAE;AAEF,WAAS,eAAe,YAAsB;AAC5C,WAAO;AAAA,MACL,GAAG;AAAA,MACH,UACE,QAAQ,mBAAmB,UAAU,IAAI,WAAW,QAAQ,KAC5D,WAAW;AAAA,IACf;AAAA,EACF;AACF;AAEO,SAAS,sCACd,MACA,SAC+C;AAC/C,aAAO,yBAAM,IAAI,EACd,KAAK,QAAW,MAAM,MAAS,EAC/B;AAAA,IACC,EAAE,CAAC,0CAAkB,GAAG,wCAAwC;AAAA,IAChE,CAAC,QACE;AAAA,MACC,CAAC,0CAAkB,GAAG;AAAA,MACtB,OAAO,wBAAwB,GAAG,OAAO,OAAO;AAAA,IAClD;AAAA,EACJ,EACC,UAAU,CAAC,OAAO,wBAAwB,IAAI,OAAO,CAAC;AAC3D;","names":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var responsive_icon_radio_group_exports = {};
17
+ module.exports = __toCommonJS(responsive_icon_radio_group_exports);
18
+ __reExport(responsive_icon_radio_group_exports, require("./responsive-icon-radio-group"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./responsive-icon-radio-group")
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-icon-radio-group/index.ts"],"sourcesContent":["export * from './responsive-icon-radio-group'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gDAAc,0CAAd;","names":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_icon_radio_group_exports = {};
20
+ __export(responsive_icon_radio_group_exports, {
21
+ ResponsiveIconRadioGroup: () => ResponsiveIconRadioGroup
22
+ });
23
+ module.exports = __toCommonJS(responsive_icon_radio_group_exports);
24
+ var import_prop_controllers = require("../prop-controllers");
25
+ var import_data = require("../data");
26
+ var import_versioned = require("../versioned");
27
+ const discriminator = {
28
+ version: 1,
29
+ dataKey: "prop-controllers::responsive-icon-radio-group::v1"
30
+ };
31
+ const ResponsiveIconRadioGroup = (0, import_versioned.versionedPropDef)(
32
+ import_prop_controllers.Types.ResponsiveIconRadioGroup,
33
+ import_data.responsiveIconRadioGroupValueSchema,
34
+ discriminator,
35
+ (0, import_versioned.typeArg)(),
36
+ (0, import_versioned.typeArg)()
37
+ );
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ ResponsiveIconRadioGroup
41
+ });
42
+ //# sourceMappingURL=responsive-icon-radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-icon-radio-group/responsive-icon-radio-group.ts"],"sourcesContent":["import { type Options, Types } from '../prop-controllers'\nimport { responsiveIconRadioGroupValueSchema } from '../data'\nimport {\n versionedPropDef,\n typeArg,\n type VersionedDescriptor,\n} from '../versioned'\n\ntype IconName =\n | 'HeightAuto16'\n | 'HeightMatch16'\n | 'VerticalAlignStart16'\n | 'VerticalAlignMiddle16'\n | 'VerticalAlignEnd16'\n | 'VerticalAlignSpaceBetween16'\n | 'ButtonPill16'\n | 'ButtonRounded16'\n | 'ButtonSquare16'\n | 'SizeSmall16'\n | 'SizeMedium16'\n | 'SizeLarge16'\n | 'ArrowInside16'\n | 'ArrowCenter16'\n | 'ArrowOutside16'\n | 'CountdownSolid16'\n | 'CountdownSolidSplit16'\n | 'CountdownOutline16'\n | 'CountdownOutlineSplit16'\n | 'CountdownNaked16'\n | 'Sun16'\n | 'Moon16'\n | 'AlignLeft16'\n | 'AlignCenter16'\n | 'AlignRight16'\n | 'Star16'\n | 'StarCircle16'\n | 'StarRoundedSquare16'\n | 'StarSquare16'\n\nexport type IconRadioGroupOption<T extends string> = {\n value: T\n label: string\n icon: IconName\n}\n\nexport type RawIconRadioGroupOptions<\n T extends string = string,\n U extends T = T,\n> = {\n label?: string\n options: IconRadioGroupOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}\n\nconst discriminator = {\n version: 1,\n dataKey: 'prop-controllers::responsive-icon-radio-group::v1' as const,\n}\n\nexport interface ResponsiveIconRadioGroupCtor {\n // HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n // values provided would undergo type widening. For some reason, the extra layer of indirection\n // reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n // function is passed to another as an argument, which is common with the `registerComponent` API.\n /**\n * @deprecated Prop controllers are deprecated. Use `@makeswift/runtime/controls` instead.\n */\n <_T extends string, T extends _T, U extends T>(\n options: Options<RawIconRadioGroupOptions<T, U>>,\n ): VersionedDescriptor<\n typeof discriminator,\n typeof Types.ResponsiveIconRadioGroup,\n Options<RawIconRadioGroupOptions<T, U>>\n >\n}\n\nexport const ResponsiveIconRadioGroup = versionedPropDef(\n Types.ResponsiveIconRadioGroup,\n responsiveIconRadioGroupValueSchema,\n discriminator,\n typeArg<RawIconRadioGroupOptions>(),\n typeArg<ResponsiveIconRadioGroupCtor>(),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAoC;AACpC,kBAAoD;AACpD,uBAIO;AAiDP,MAAM,gBAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AACX;AAmBO,MAAM,+BAA2B;AAAA,EACtC,8BAAM;AAAA,EACN;AAAA,EACA;AAAA,MACA,0BAAkC;AAAA,MAClC,0BAAsC;AACxC;","names":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_length_exports = {};
20
+ __export(responsive_length_exports, {
21
+ ResponsiveLength: () => ResponsiveLength,
22
+ ResponsiveLengthPropControllerDataV1Type: () => ResponsiveLengthPropControllerDataV1Type,
23
+ createResponsiveLengthPropControllerDataFromResponsiveLengthData: () => createResponsiveLengthPropControllerDataFromResponsiveLengthData,
24
+ getResponsiveLengthPropControllerDataResponsiveLengthData: () => getResponsiveLengthPropControllerDataResponsiveLengthData,
25
+ responsiveLengthDataSchema: () => responsiveLengthDataSchema,
26
+ responsiveLengthPropControllerDataSchema: () => responsiveLengthPropControllerDataSchema,
27
+ responsiveLengthPropControllerDataV0Schema: () => responsiveLengthPropControllerDataV0Schema
28
+ });
29
+ module.exports = __toCommonJS(responsive_length_exports);
30
+ var import_zod = require("zod");
31
+ var import_data = require("./data");
32
+ var import_prop_controllers = require("./prop-controllers");
33
+ var import_ts_pattern = require("ts-pattern");
34
+ const responsiveLengthDataSchema = import_prop_controllers.Schema.responsiveValue(import_data.lengthDataSchema);
35
+ const responsiveLengthPropControllerDataV0Schema = responsiveLengthDataSchema;
36
+ const ResponsiveLengthPropControllerDataV1Type = "prop-controllers::responsive-length::v1";
37
+ const responsiveLengthPropControllerDataV1Schema = import_zod.z.object({
38
+ [import_prop_controllers.ControlDataTypeKey]: import_zod.z.literal(ResponsiveLengthPropControllerDataV1Type),
39
+ value: responsiveLengthDataSchema
40
+ });
41
+ const responsiveLengthPropControllerDataSchema = import_zod.z.union([
42
+ responsiveLengthPropControllerDataV0Schema,
43
+ responsiveLengthPropControllerDataV1Schema
44
+ ]);
45
+ function ResponsiveLength(options = {}) {
46
+ return { type: import_prop_controllers.Types.ResponsiveLength, version: 1, options };
47
+ }
48
+ function getResponsiveLengthPropControllerDataResponsiveLengthData(data) {
49
+ return (0, import_ts_pattern.match)(data).with(
50
+ { [import_prop_controllers.ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type },
51
+ (v1) => v1.value
52
+ ).otherwise((v0) => v0);
53
+ }
54
+ function createResponsiveLengthPropControllerDataFromResponsiveLengthData(definition, responsiveLengthData) {
55
+ return (0, import_ts_pattern.match)(definition).with(
56
+ { version: 1 },
57
+ () => ({
58
+ [import_prop_controllers.ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type,
59
+ value: responsiveLengthData
60
+ })
61
+ ).otherwise(() => responsiveLengthData);
62
+ }
63
+ // Annotate the CommonJS export names for ESM import in node:
64
+ 0 && (module.exports = {
65
+ ResponsiveLength,
66
+ ResponsiveLengthPropControllerDataV1Type,
67
+ createResponsiveLengthPropControllerDataFromResponsiveLengthData,
68
+ getResponsiveLengthPropControllerDataResponsiveLengthData,
69
+ responsiveLengthDataSchema,
70
+ responsiveLengthPropControllerDataSchema,
71
+ responsiveLengthPropControllerDataV0Schema
72
+ });
73
+ //# sourceMappingURL=responsive-length.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/responsive-length.ts"],"sourcesContent":["import { z } from 'zod'\nimport { LengthData, lengthDataSchema } from './data'\nimport { ControlDataTypeKey, Options, Types, Schema } from './prop-controllers'\nimport { match } from 'ts-pattern'\n\nexport const responsiveLengthDataSchema =\n Schema.responsiveValue(lengthDataSchema)\n\nexport type ResponsiveLengthData = z.infer<typeof responsiveLengthDataSchema>\n\nexport const responsiveLengthPropControllerDataV0Schema =\n responsiveLengthDataSchema\n\ntype ResponsiveLengthPropControllerDataV0 = z.infer<\n typeof responsiveLengthPropControllerDataV0Schema\n>\n\nexport const ResponsiveLengthPropControllerDataV1Type =\n 'prop-controllers::responsive-length::v1'\n\nconst responsiveLengthPropControllerDataV1Schema = z.object({\n [ControlDataTypeKey]: z.literal(ResponsiveLengthPropControllerDataV1Type),\n value: responsiveLengthDataSchema,\n})\n\ntype ResponsiveLengthPropControllerDataV1 = z.infer<\n typeof responsiveLengthPropControllerDataV1Schema\n>\n\nexport const responsiveLengthPropControllerDataSchema = z.union([\n responsiveLengthPropControllerDataV0Schema,\n responsiveLengthPropControllerDataV1Schema,\n])\n\nexport type ResponsiveLengthPropControllerData = z.infer<\n typeof responsiveLengthPropControllerDataSchema\n>\n\nexport type LengthOption =\n | { value: 'px'; label: 'Pixels'; icon: 'Px16' }\n | { value: '%'; label: 'Percentage'; icon: 'Percent16' }\n\nexport type ResponsiveLengthOptions = Options<{\n preset?: ResponsiveLengthPropControllerData\n label?: string\n options?: LengthOption[]\n defaultValue?: LengthData\n hidden?: boolean\n}>\n\ntype ResponsiveLengthDescriptorV0<_T = ResponsiveLengthPropControllerDataV0> = {\n type: typeof Types.ResponsiveLength\n options: ResponsiveLengthOptions\n}\n\ntype ResponsiveLengthDescriptorV1<_T = ResponsiveLengthPropControllerDataV1> = {\n type: typeof Types.ResponsiveLength\n version: 1\n options: ResponsiveLengthOptions\n}\n\nexport type ResponsiveLengthDescriptor<\n _T = ResponsiveLengthPropControllerData,\n> = ResponsiveLengthDescriptorV0<_T> | ResponsiveLengthDescriptorV1<_T>\n\nexport type ResolveResponsiveLengthPropControllerValue<\n T extends ResponsiveLengthDescriptor,\n> = T extends ResponsiveLengthDescriptor\n ? ResponsiveLengthData | undefined\n : never\n\n/**\n * @deprecated Imports from `@makeswift/prop-controllers` are deprecated. Use\n * `@makeswift/runtime/controls` instead.\n */\nexport function ResponsiveLength(\n options: ResponsiveLengthOptions = {},\n): ResponsiveLengthDescriptorV1 {\n return { type: Types.ResponsiveLength, version: 1, options }\n}\n\nexport function getResponsiveLengthPropControllerDataResponsiveLengthData(\n data: ResponsiveLengthPropControllerData,\n): ResponsiveLengthData {\n return match(data)\n .with(\n { [ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type },\n (v1) => v1.value,\n )\n .otherwise((v0) => v0)\n}\n\nexport function createResponsiveLengthPropControllerDataFromResponsiveLengthData(\n definition: ResponsiveLengthDescriptor,\n responsiveLengthData: ResponsiveLengthData,\n): ResponsiveLengthPropControllerData {\n return match(definition)\n .with(\n { version: 1 },\n () =>\n ({\n [ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type,\n value: responsiveLengthData,\n }) as const,\n )\n .otherwise(() => responsiveLengthData)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAClB,kBAA6C;AAC7C,8BAA2D;AAC3D,wBAAsB;AAEf,MAAM,6BACX,+BAAO,gBAAgB,4BAAgB;AAIlC,MAAM,6CACX;AAMK,MAAM,2CACX;AAEF,MAAM,6CAA6C,aAAE,OAAO;AAAA,EAC1D,CAAC,0CAAkB,GAAG,aAAE,QAAQ,wCAAwC;AAAA,EACxE,OAAO;AACT,CAAC;AAMM,MAAM,2CAA2C,aAAE,MAAM;AAAA,EAC9D;AAAA,EACA;AACF,CAAC;AA2CM,SAAS,iBACd,UAAmC,CAAC,GACN;AAC9B,SAAO,EAAE,MAAM,8BAAM,kBAAkB,SAAS,GAAG,QAAQ;AAC7D;AAEO,SAAS,0DACd,MACsB;AACtB,aAAO,yBAAM,IAAI,EACd;AAAA,IACC,EAAE,CAAC,0CAAkB,GAAG,yCAAyC;AAAA,IACjE,CAAC,OAAO,GAAG;AAAA,EACb,EACC,UAAU,CAAC,OAAO,EAAE;AACzB;AAEO,SAAS,iEACd,YACA,sBACoC;AACpC,aAAO,yBAAM,UAAU,EACpB;AAAA,IACC,EAAE,SAAS,EAAE;AAAA,IACb,OACG;AAAA,MACC,CAAC,0CAAkB,GAAG;AAAA,MACtB,OAAO;AAAA,IACT;AAAA,EACJ,EACC,UAAU,MAAM,oBAAoB;AACzC;","names":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var responsive_number_exports = {};
17
+ module.exports = __toCommonJS(responsive_number_exports);
18
+ __reExport(responsive_number_exports, require("./responsive-number"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./responsive-number")
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-number/index.ts"],"sourcesContent":["export * from './responsive-number'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sCAAc,gCAAd;","names":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_number_exports = {};
20
+ __export(responsive_number_exports, {
21
+ ResponsiveNumber: () => ResponsiveNumber
22
+ });
23
+ module.exports = __toCommonJS(responsive_number_exports);
24
+ var import_prop_controllers = require("../prop-controllers");
25
+ var import_data = require("../data");
26
+ var import_versioned = require("../versioned");
27
+ const ResponsiveNumber = (0, import_versioned.versionedPropDef)(
28
+ import_prop_controllers.Types.ResponsiveNumber,
29
+ import_data.responsiveNumberValueSchema,
30
+ {
31
+ version: 1,
32
+ dataKey: "prop-controllers::responsive-number::v1"
33
+ },
34
+ (0, import_versioned.typeArg)()
35
+ );
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ ResponsiveNumber
39
+ });
40
+ //# sourceMappingURL=responsive-number.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-number/responsive-number.ts"],"sourcesContent":["import { Types } from '../prop-controllers'\nimport { responsiveNumberValueSchema } from '../data'\nimport { versionedPropDef, typeArg } from '../versioned'\n\nexport const ResponsiveNumber = versionedPropDef(\n Types.ResponsiveNumber,\n responsiveNumberValueSchema,\n {\n version: 1,\n dataKey: 'prop-controllers::responsive-number::v1',\n },\n typeArg<{\n label?: string\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n hidden?: boolean\n }>(),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAsB;AACtB,kBAA4C;AAC5C,uBAA0C;AAEnC,MAAM,uBAAmB;AAAA,EAC9B,8BAAM;AAAA,EACN;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,MACA,0BAQG;AACL;","names":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var responsive_opacity_exports = {};
17
+ module.exports = __toCommonJS(responsive_opacity_exports);
18
+ __reExport(responsive_opacity_exports, require("./responsive-opacity"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./responsive-opacity")
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-opacity/index.ts"],"sourcesContent":["export * from './responsive-opacity'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,uCAAc,iCAAd;","names":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_opacity_exports = {};
20
+ __export(responsive_opacity_exports, {
21
+ ResponsiveOpacity: () => ResponsiveOpacity,
22
+ responsiveOpacityValueSchema: () => responsiveOpacityValueSchema
23
+ });
24
+ module.exports = __toCommonJS(responsive_opacity_exports);
25
+ var import_prop_controllers = require("../prop-controllers");
26
+ var import_versioned = require("../versioned");
27
+ var import_zod = require("zod");
28
+ const responsiveOpacityValueSchema = import_prop_controllers.Schema.responsiveValue(import_zod.z.number());
29
+ const ResponsiveOpacity = (0, import_versioned.versionedPropDef)(
30
+ import_prop_controllers.Types.ResponsiveOpacity,
31
+ responsiveOpacityValueSchema,
32
+ {
33
+ version: 1,
34
+ dataKey: "prop-controllers::responsive-opacity::v1"
35
+ },
36
+ (0, import_versioned.typeArg)()
37
+ );
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ ResponsiveOpacity,
41
+ responsiveOpacityValueSchema
42
+ });
43
+ //# sourceMappingURL=responsive-opacity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-opacity/responsive-opacity.ts"],"sourcesContent":["import { Types, Schema } from '../prop-controllers'\nimport { versionedPropDef, typeArg } from '../versioned'\nimport { z } from 'zod'\n\nexport const responsiveOpacityValueSchema = Schema.responsiveValue(z.number())\n\nexport type ResponsiveOpacityValue = z.infer<\n typeof responsiveOpacityValueSchema\n>\n\nexport const ResponsiveOpacity = versionedPropDef(\n Types.ResponsiveOpacity,\n responsiveOpacityValueSchema,\n {\n version: 1,\n dataKey: 'prop-controllers::responsive-opacity::v1',\n },\n typeArg<Record<string, never>>(),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA8B;AAC9B,uBAA0C;AAC1C,iBAAkB;AAEX,MAAM,+BAA+B,+BAAO,gBAAgB,aAAE,OAAO,CAAC;AAMtE,MAAM,wBAAoB;AAAA,EAC/B,8BAAM;AAAA,EACN;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,MACA,0BAA+B;AACjC;","names":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var responsive_select_exports = {};
17
+ module.exports = __toCommonJS(responsive_select_exports);
18
+ __reExport(responsive_select_exports, require("./responsive-select"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./responsive-select")
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-select/index.ts"],"sourcesContent":["export * from './responsive-select'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sCAAc,gCAAd;","names":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var responsive_select_exports = {};
20
+ __export(responsive_select_exports, {
21
+ ResponsiveSelect: () => ResponsiveSelect
22
+ });
23
+ module.exports = __toCommonJS(responsive_select_exports);
24
+ var import_prop_controllers = require("../prop-controllers");
25
+ var import_data = require("../data");
26
+ var import_versioned = require("../versioned");
27
+ const discriminator = {
28
+ version: 1,
29
+ dataKey: "prop-controllers::responsive-select::v1"
30
+ };
31
+ const ResponsiveSelect = (0, import_versioned.versionedPropDef)(
32
+ import_prop_controllers.Types.ResponsiveSelect,
33
+ import_data.responsiveSelectValueSchema,
34
+ discriminator,
35
+ (0, import_versioned.typeArg)(),
36
+ (0, import_versioned.typeArg)()
37
+ );
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ ResponsiveSelect
41
+ });
42
+ //# sourceMappingURL=responsive-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/responsive-select/responsive-select.ts"],"sourcesContent":["import { type Options, Types } from '../prop-controllers'\nimport { responsiveSelectValueSchema } from '../data'\nimport {\n versionedPropDef,\n typeArg,\n type VersionedDescriptor,\n} from '../versioned'\n\nexport type SelectLabelOrientation = 'vertical' | 'horizontal'\n\nexport type SelectOption<T extends string> = { value: T; label: string }\n\nexport type RawSelectOptions<T extends string = string, U extends T = T> = {\n label?: string\n labelOrientation?: SelectLabelOrientation\n options: SelectOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}\n\nconst discriminator = {\n version: 1,\n dataKey: 'prop-controllers::responsive-select::v1' as const,\n}\n\nexport interface ResponsiveSelectCtor {\n // HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n // values provided would undergo type widening. For some reason, the extra layer of indirection\n // reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n // function is passed to another as an argument, which is common with the `registerComponent` API.\n /**\n * @deprecated Prop controllers are deprecated. Use `@makeswift/runtime/controls` instead.\n */\n <_T extends string, T extends _T, U extends T>(\n options: Options<RawSelectOptions<T, U>>,\n ): VersionedDescriptor<\n typeof discriminator,\n typeof Types.ResponsiveSelect,\n Options<RawSelectOptions<T, U>>\n >\n}\n\nexport const ResponsiveSelect = versionedPropDef(\n Types.ResponsiveSelect,\n responsiveSelectValueSchema,\n discriminator,\n typeArg<RawSelectOptions>(),\n typeArg<ResponsiveSelectCtor>(),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAoC;AACpC,kBAA4C;AAC5C,uBAIO;AAcP,MAAM,gBAAgB;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AACX;AAmBO,MAAM,uBAAmB;AAAA,EAC9B,8BAAM;AAAA,EACN;AAAA,EACA;AAAA,MACA,0BAA0B;AAAA,MAC1B,0BAA8B;AAChC;","names":[]}