@luxonis/depthai-pipeline-lib 1.4.8

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 (240) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +14 -0
  3. package/dist/index.css +3 -0
  4. package/dist/panda.css +1474 -0
  5. package/dist/src/components/Node.d.ts +5 -0
  6. package/dist/src/components/Node.js +42 -0
  7. package/dist/src/components/PipelineCanvas.d.ts +7 -0
  8. package/dist/src/components/PipelineCanvas.js +56 -0
  9. package/dist/src/index.d.ts +4 -0
  10. package/dist/src/index.js +2 -0
  11. package/dist/src/services/pipeline.d.ts +51 -0
  12. package/dist/src/services/pipeline.js +40 -0
  13. package/dist/src/styled-system/chunks/src__components__Node.css +195 -0
  14. package/dist/src/styled-system/chunks/src__components__PipelineCanvas.css +25 -0
  15. package/dist/src/styled-system/css/conditions.mjs +34 -0
  16. package/dist/src/styled-system/css/css.d.mts +9 -0
  17. package/dist/src/styled-system/css/css.mjs +44 -0
  18. package/dist/src/styled-system/css/cva.d.mts +6 -0
  19. package/dist/src/styled-system/css/cva.mjs +63 -0
  20. package/dist/src/styled-system/css/cx.d.mts +5 -0
  21. package/dist/src/styled-system/css/cx.mjs +15 -0
  22. package/dist/src/styled-system/css/index.d.mts +5 -0
  23. package/dist/src/styled-system/css/index.mjs +4 -0
  24. package/dist/src/styled-system/css/sva.d.mts +4 -0
  25. package/dist/src/styled-system/css/sva.mjs +35 -0
  26. package/dist/src/styled-system/global.css +70 -0
  27. package/dist/src/styled-system/helpers.mjs +282 -0
  28. package/dist/src/styled-system/patterns/aspect-ratio.d.mts +21 -0
  29. package/dist/src/styled-system/patterns/aspect-ratio.mjs +35 -0
  30. package/dist/src/styled-system/patterns/bleed.d.mts +22 -0
  31. package/dist/src/styled-system/patterns/bleed.mjs +19 -0
  32. package/dist/src/styled-system/patterns/box.d.mts +21 -0
  33. package/dist/src/styled-system/patterns/box.mjs +12 -0
  34. package/dist/src/styled-system/patterns/center.d.mts +21 -0
  35. package/dist/src/styled-system/patterns/center.mjs +18 -0
  36. package/dist/src/styled-system/patterns/circle.d.mts +21 -0
  37. package/dist/src/styled-system/patterns/circle.mjs +22 -0
  38. package/dist/src/styled-system/patterns/container.d.mts +21 -0
  39. package/dist/src/styled-system/patterns/container.mjs +18 -0
  40. package/dist/src/styled-system/patterns/divider.d.mts +23 -0
  41. package/dist/src/styled-system/patterns/divider.mjs +21 -0
  42. package/dist/src/styled-system/patterns/flex.d.mts +27 -0
  43. package/dist/src/styled-system/patterns/flex.mjs +23 -0
  44. package/dist/src/styled-system/patterns/float.d.mts +24 -0
  45. package/dist/src/styled-system/patterns/float.mjs +45 -0
  46. package/dist/src/styled-system/patterns/grid-item.d.mts +26 -0
  47. package/dist/src/styled-system/patterns/grid-item.mjs +22 -0
  48. package/dist/src/styled-system/patterns/grid.d.mts +25 -0
  49. package/dist/src/styled-system/patterns/grid.mjs +20 -0
  50. package/dist/src/styled-system/patterns/hstack.d.mts +22 -0
  51. package/dist/src/styled-system/patterns/hstack.mjs +20 -0
  52. package/dist/src/styled-system/patterns/index.d.mts +21 -0
  53. package/dist/src/styled-system/patterns/index.mjs +20 -0
  54. package/dist/src/styled-system/patterns/link-box.d.mts +21 -0
  55. package/dist/src/styled-system/patterns/link-box.mjs +19 -0
  56. package/dist/src/styled-system/patterns/link-overlay.d.mts +21 -0
  57. package/dist/src/styled-system/patterns/link-overlay.mjs +24 -0
  58. package/dist/src/styled-system/patterns/spacer.d.mts +21 -0
  59. package/dist/src/styled-system/patterns/spacer.mjs +18 -0
  60. package/dist/src/styled-system/patterns/square.d.mts +21 -0
  61. package/dist/src/styled-system/patterns/square.mjs +21 -0
  62. package/dist/src/styled-system/patterns/stack.d.mts +24 -0
  63. package/dist/src/styled-system/patterns/stack.mjs +20 -0
  64. package/dist/src/styled-system/patterns/visually-hidden.d.mts +21 -0
  65. package/dist/src/styled-system/patterns/visually-hidden.mjs +15 -0
  66. package/dist/src/styled-system/patterns/vstack.d.mts +22 -0
  67. package/dist/src/styled-system/patterns/vstack.mjs +20 -0
  68. package/dist/src/styled-system/patterns/wrap.d.mts +25 -0
  69. package/dist/src/styled-system/patterns/wrap.mjs +22 -0
  70. package/dist/src/styled-system/recipes/accordion.d.mts +28 -0
  71. package/dist/src/styled-system/recipes/accordion.mjs +46 -0
  72. package/dist/src/styled-system/recipes/alert-description.d.mts +28 -0
  73. package/dist/src/styled-system/recipes/alert-description.mjs +19 -0
  74. package/dist/src/styled-system/recipes/alert-dialog.d.mts +28 -0
  75. package/dist/src/styled-system/recipes/alert-dialog.mjs +70 -0
  76. package/dist/src/styled-system/recipes/alert-title.d.mts +28 -0
  77. package/dist/src/styled-system/recipes/alert-title.mjs +19 -0
  78. package/dist/src/styled-system/recipes/alert.d.mts +28 -0
  79. package/dist/src/styled-system/recipes/alert.mjs +26 -0
  80. package/dist/src/styled-system/recipes/avatar.d.mts +28 -0
  81. package/dist/src/styled-system/recipes/avatar.mjs +38 -0
  82. package/dist/src/styled-system/recipes/badge.d.mts +28 -0
  83. package/dist/src/styled-system/recipes/badge.mjs +28 -0
  84. package/dist/src/styled-system/recipes/blockquote.d.mts +28 -0
  85. package/dist/src/styled-system/recipes/blockquote.mjs +19 -0
  86. package/dist/src/styled-system/recipes/button.d.mts +29 -0
  87. package/dist/src/styled-system/recipes/button.mjs +37 -0
  88. package/dist/src/styled-system/recipes/calendar.d.mts +28 -0
  89. package/dist/src/styled-system/recipes/calendar.mjs +118 -0
  90. package/dist/src/styled-system/recipes/card-content.d.mts +28 -0
  91. package/dist/src/styled-system/recipes/card-content.mjs +19 -0
  92. package/dist/src/styled-system/recipes/card-description.d.mts +28 -0
  93. package/dist/src/styled-system/recipes/card-description.mjs +19 -0
  94. package/dist/src/styled-system/recipes/card-footer.d.mts +28 -0
  95. package/dist/src/styled-system/recipes/card-footer.mjs +19 -0
  96. package/dist/src/styled-system/recipes/card-header.d.mts +28 -0
  97. package/dist/src/styled-system/recipes/card-header.mjs +19 -0
  98. package/dist/src/styled-system/recipes/card-title.d.mts +28 -0
  99. package/dist/src/styled-system/recipes/card-title.mjs +19 -0
  100. package/dist/src/styled-system/recipes/card.d.mts +28 -0
  101. package/dist/src/styled-system/recipes/card.mjs +19 -0
  102. package/dist/src/styled-system/recipes/checkbox.d.mts +28 -0
  103. package/dist/src/styled-system/recipes/checkbox.mjs +34 -0
  104. package/dist/src/styled-system/recipes/collapsible.d.mts +28 -0
  105. package/dist/src/styled-system/recipes/collapsible.mjs +38 -0
  106. package/dist/src/styled-system/recipes/command-dialog.d.mts +28 -0
  107. package/dist/src/styled-system/recipes/command-dialog.mjs +34 -0
  108. package/dist/src/styled-system/recipes/command.d.mts +28 -0
  109. package/dist/src/styled-system/recipes/command.mjs +66 -0
  110. package/dist/src/styled-system/recipes/context-menu.d.mts +28 -0
  111. package/dist/src/styled-system/recipes/context-menu.mjs +98 -0
  112. package/dist/src/styled-system/recipes/create-recipe.d.mts +1 -0
  113. package/dist/src/styled-system/recipes/create-recipe.mjs +50 -0
  114. package/dist/src/styled-system/recipes/dialog.d.mts +28 -0
  115. package/dist/src/styled-system/recipes/dialog.mjs +66 -0
  116. package/dist/src/styled-system/recipes/dropdown-menu.d.mts +28 -0
  117. package/dist/src/styled-system/recipes/dropdown-menu.mjs +90 -0
  118. package/dist/src/styled-system/recipes/form-control.d.mts +28 -0
  119. package/dist/src/styled-system/recipes/form-control.mjs +19 -0
  120. package/dist/src/styled-system/recipes/form-description.d.mts +28 -0
  121. package/dist/src/styled-system/recipes/form-description.mjs +19 -0
  122. package/dist/src/styled-system/recipes/form-item.d.mts +28 -0
  123. package/dist/src/styled-system/recipes/form-item.mjs +19 -0
  124. package/dist/src/styled-system/recipes/form-label.d.mts +28 -0
  125. package/dist/src/styled-system/recipes/form-label.mjs +19 -0
  126. package/dist/src/styled-system/recipes/form-message.d.mts +28 -0
  127. package/dist/src/styled-system/recipes/form-message.mjs +19 -0
  128. package/dist/src/styled-system/recipes/h1.d.mts +28 -0
  129. package/dist/src/styled-system/recipes/h1.mjs +19 -0
  130. package/dist/src/styled-system/recipes/h2.d.mts +28 -0
  131. package/dist/src/styled-system/recipes/h2.mjs +19 -0
  132. package/dist/src/styled-system/recipes/h3.d.mts +28 -0
  133. package/dist/src/styled-system/recipes/h3.mjs +19 -0
  134. package/dist/src/styled-system/recipes/h4.d.mts +28 -0
  135. package/dist/src/styled-system/recipes/h4.mjs +19 -0
  136. package/dist/src/styled-system/recipes/hover-card.d.mts +28 -0
  137. package/dist/src/styled-system/recipes/hover-card.mjs +38 -0
  138. package/dist/src/styled-system/recipes/icon.d.mts +32 -0
  139. package/dist/src/styled-system/recipes/icon.mjs +49 -0
  140. package/dist/src/styled-system/recipes/index.d.mts +74 -0
  141. package/dist/src/styled-system/recipes/index.mjs +73 -0
  142. package/dist/src/styled-system/recipes/inline-code.d.mts +28 -0
  143. package/dist/src/styled-system/recipes/inline-code.mjs +19 -0
  144. package/dist/src/styled-system/recipes/input.d.mts +28 -0
  145. package/dist/src/styled-system/recipes/input.mjs +19 -0
  146. package/dist/src/styled-system/recipes/label.d.mts +28 -0
  147. package/dist/src/styled-system/recipes/label.mjs +19 -0
  148. package/dist/src/styled-system/recipes/large.d.mts +28 -0
  149. package/dist/src/styled-system/recipes/large.mjs +19 -0
  150. package/dist/src/styled-system/recipes/lead.d.mts +28 -0
  151. package/dist/src/styled-system/recipes/lead.mjs +19 -0
  152. package/dist/src/styled-system/recipes/link.d.mts +28 -0
  153. package/dist/src/styled-system/recipes/link.mjs +19 -0
  154. package/dist/src/styled-system/recipes/list.d.mts +28 -0
  155. package/dist/src/styled-system/recipes/list.mjs +19 -0
  156. package/dist/src/styled-system/recipes/menubar.d.mts +28 -0
  157. package/dist/src/styled-system/recipes/menubar.mjs +94 -0
  158. package/dist/src/styled-system/recipes/muted.d.mts +28 -0
  159. package/dist/src/styled-system/recipes/muted.mjs +19 -0
  160. package/dist/src/styled-system/recipes/navigation-menu.d.mts +28 -0
  161. package/dist/src/styled-system/recipes/navigation-menu.mjs +62 -0
  162. package/dist/src/styled-system/recipes/p.d.mts +28 -0
  163. package/dist/src/styled-system/recipes/p.mjs +19 -0
  164. package/dist/src/styled-system/recipes/popover.d.mts +28 -0
  165. package/dist/src/styled-system/recipes/popover.mjs +42 -0
  166. package/dist/src/styled-system/recipes/progress.d.mts +28 -0
  167. package/dist/src/styled-system/recipes/progress.mjs +34 -0
  168. package/dist/src/styled-system/recipes/radio-group.d.mts +28 -0
  169. package/dist/src/styled-system/recipes/radio-group.mjs +42 -0
  170. package/dist/src/styled-system/recipes/scroll-area.d.mts +28 -0
  171. package/dist/src/styled-system/recipes/scroll-area.mjs +46 -0
  172. package/dist/src/styled-system/recipes/select.d.mts +28 -0
  173. package/dist/src/styled-system/recipes/select.mjs +66 -0
  174. package/dist/src/styled-system/recipes/separator.d.mts +28 -0
  175. package/dist/src/styled-system/recipes/separator.mjs +26 -0
  176. package/dist/src/styled-system/recipes/sheet.d.mts +28 -0
  177. package/dist/src/styled-system/recipes/sheet.mjs +81 -0
  178. package/dist/src/styled-system/recipes/skeleton.d.mts +28 -0
  179. package/dist/src/styled-system/recipes/skeleton.mjs +19 -0
  180. package/dist/src/styled-system/recipes/slider.d.mts +28 -0
  181. package/dist/src/styled-system/recipes/slider.mjs +42 -0
  182. package/dist/src/styled-system/recipes/small.d.mts +28 -0
  183. package/dist/src/styled-system/recipes/small.mjs +19 -0
  184. package/dist/src/styled-system/recipes/switch-recipe.d.mts +28 -0
  185. package/dist/src/styled-system/recipes/switch-recipe.mjs +34 -0
  186. package/dist/src/styled-system/recipes/table-body.d.mts +28 -0
  187. package/dist/src/styled-system/recipes/table-body.mjs +19 -0
  188. package/dist/src/styled-system/recipes/table-caption.d.mts +28 -0
  189. package/dist/src/styled-system/recipes/table-caption.mjs +19 -0
  190. package/dist/src/styled-system/recipes/table-cell.d.mts +28 -0
  191. package/dist/src/styled-system/recipes/table-cell.mjs +19 -0
  192. package/dist/src/styled-system/recipes/table-container.d.mts +28 -0
  193. package/dist/src/styled-system/recipes/table-container.mjs +19 -0
  194. package/dist/src/styled-system/recipes/table-footer.d.mts +28 -0
  195. package/dist/src/styled-system/recipes/table-footer.mjs +19 -0
  196. package/dist/src/styled-system/recipes/table-head.d.mts +28 -0
  197. package/dist/src/styled-system/recipes/table-head.mjs +19 -0
  198. package/dist/src/styled-system/recipes/table-header.d.mts +28 -0
  199. package/dist/src/styled-system/recipes/table-header.mjs +19 -0
  200. package/dist/src/styled-system/recipes/table-row.d.mts +28 -0
  201. package/dist/src/styled-system/recipes/table-row.mjs +19 -0
  202. package/dist/src/styled-system/recipes/table.d.mts +28 -0
  203. package/dist/src/styled-system/recipes/table.mjs +19 -0
  204. package/dist/src/styled-system/recipes/tabs.d.mts +28 -0
  205. package/dist/src/styled-system/recipes/tabs.mjs +42 -0
  206. package/dist/src/styled-system/recipes/textarea.d.mts +28 -0
  207. package/dist/src/styled-system/recipes/textarea.mjs +19 -0
  208. package/dist/src/styled-system/recipes/toast-viewport.d.mts +28 -0
  209. package/dist/src/styled-system/recipes/toast-viewport.mjs +19 -0
  210. package/dist/src/styled-system/recipes/toast.d.mts +28 -0
  211. package/dist/src/styled-system/recipes/toast.mjs +59 -0
  212. package/dist/src/styled-system/recipes/toggle.d.mts +29 -0
  213. package/dist/src/styled-system/recipes/toggle.mjs +32 -0
  214. package/dist/src/styled-system/recipes/tooltip.d.mts +28 -0
  215. package/dist/src/styled-system/recipes/tooltip.mjs +38 -0
  216. package/dist/src/styled-system/recipes/typography-table-container.d.mts +28 -0
  217. package/dist/src/styled-system/recipes/typography-table-container.mjs +19 -0
  218. package/dist/src/styled-system/recipes/typography-table.d.mts +28 -0
  219. package/dist/src/styled-system/recipes/typography-table.mjs +19 -0
  220. package/dist/src/styled-system/reset.css +206 -0
  221. package/dist/src/styled-system/static.css +320 -0
  222. package/dist/src/styled-system/tokens/index.css +620 -0
  223. package/dist/src/styled-system/tokens/index.d.mts +9 -0
  224. package/dist/src/styled-system/tokens/index.mjs +2680 -0
  225. package/dist/src/styled-system/tokens/keyframes.css +56 -0
  226. package/dist/src/styled-system/tokens/tokens.d.mts +63 -0
  227. package/dist/src/styled-system/types/composition.d.mts +111 -0
  228. package/dist/src/styled-system/types/conditions.d.mts +266 -0
  229. package/dist/src/styled-system/types/csstype.d.mts +20749 -0
  230. package/dist/src/styled-system/types/global.d.mts +19 -0
  231. package/dist/src/styled-system/types/helpers.d.mts +2 -0
  232. package/dist/src/styled-system/types/index.d.mts +8 -0
  233. package/dist/src/styled-system/types/parts.d.mts +6 -0
  234. package/dist/src/styled-system/types/pattern.d.mts +61 -0
  235. package/dist/src/styled-system/types/prop-type.d.mts +340 -0
  236. package/dist/src/styled-system/types/recipe.d.mts +148 -0
  237. package/dist/src/styled-system/types/selectors.d.mts +59 -0
  238. package/dist/src/styled-system/types/style-props.d.mts +687 -0
  239. package/dist/src/styled-system/types/system-types.d.mts +85 -0
  240. package/package.json +63 -0
@@ -0,0 +1,35 @@
1
+ import { getSlotRecipes, splitProps } from '../helpers.mjs';
2
+ import { cva } from './cva.mjs';
3
+
4
+ export function sva(config) {
5
+ const slots = Object.entries(getSlotRecipes(config)).map(([slot, slotCva]) => [slot, cva(slotCva)])
6
+
7
+ function svaFn(props) {
8
+ const result = slots.map(([slot, cvaFn]) => [slot, cvaFn(props)])
9
+ return Object.fromEntries(result)
10
+ }
11
+
12
+ function raw(props) {
13
+ const result = slots.map(([slot, cvaFn]) => [slot, cvaFn.raw(props)])
14
+ return Object.fromEntries(result)
15
+ }
16
+
17
+ const variants = config.variants ?? {};
18
+ const variantKeys = Object.keys(variants);
19
+
20
+ function splitVariantProps(props) {
21
+ return splitProps(props, variantKeys);
22
+ }
23
+
24
+ const variantMap = Object.fromEntries(
25
+ Object.entries(variants).map(([key, value]) => [key, Object.keys(value)])
26
+ );
27
+
28
+ return Object.assign(svaFn, {
29
+ __cva__: false,
30
+ raw,
31
+ variantMap,
32
+ variantKeys,
33
+ splitVariantProps,
34
+ })
35
+ }
@@ -0,0 +1,70 @@
1
+ @layer base {
2
+ :root {
3
+ --made-with-panda: '🐼'
4
+ }
5
+
6
+ *, *::before, *::after, ::backdrop {
7
+ --blur: ;
8
+ --brightness: ;
9
+ --contrast: ;
10
+ --grayscale: ;
11
+ --hue-rotate: ;
12
+ --invert: ;
13
+ --saturate: ;
14
+ --sepia: ;
15
+ --drop-shadow: ;
16
+ --backdrop-blur: ;
17
+ --backdrop-brightness: ;
18
+ --backdrop-contrast: ;
19
+ --backdrop-grayscale: ;
20
+ --backdrop-hue-rotate: ;
21
+ --backdrop-invert: ;
22
+ --backdrop-opacity: ;
23
+ --backdrop-saturate: ;
24
+ --backdrop-sepia: ;
25
+ --scroll-snap-strictness: proximity;
26
+ --border-spacing-x: 0;
27
+ --border-spacing-y: 0;
28
+ --translate-x: 0;
29
+ --translate-y: 0;
30
+ --rotate: 0;
31
+ --skew-x: 0;
32
+ --skew-y: 0;
33
+ --scale-x: 1;
34
+ --scale-y: 1
35
+ }
36
+
37
+ html {
38
+ -moz-osx-font-smoothing: grayscale;
39
+ text-rendering: optimizeLegibility;
40
+ -webkit-font-smoothing: antialiased;
41
+ -webkit-text-size-adjust: 100%
42
+ }
43
+
44
+ body {
45
+ background: var(--colors-background);
46
+ color: var(--colors-foreground);
47
+ font-family: var(--fonts-sans)
48
+ }
49
+
50
+ button {
51
+ color: inherit;
52
+ outline: 2px solid transparent
53
+ }
54
+
55
+ * {
56
+ box-sizing: border-box;
57
+ font-family: var(--fonts-body)
58
+ }
59
+
60
+ html, body {
61
+ margin: var(--spacing-0);
62
+ padding: var(--spacing-0)
63
+ }
64
+
65
+ #root {
66
+ display: flex;
67
+ flex-direction: column;
68
+ height: 100vh
69
+ }
70
+ }
@@ -0,0 +1,282 @@
1
+ // src/assert.ts
2
+ function isObject(value) {
3
+ return typeof value === "object" && value != null && !Array.isArray(value);
4
+ }
5
+
6
+ // src/compact.ts
7
+ function compact(value) {
8
+ return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0));
9
+ }
10
+
11
+ // src/condition.ts
12
+ var isBaseCondition = (v) => v === "base";
13
+ function filterBaseConditions(c) {
14
+ return c.slice().filter((v) => !isBaseCondition(v));
15
+ }
16
+
17
+ // src/css-important.ts
18
+ var importantRegex = /!(important)?$/;
19
+ function isImportant(value) {
20
+ return typeof value === "string" ? importantRegex.test(value) : false;
21
+ }
22
+ function withoutImportant(value) {
23
+ return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
24
+ }
25
+ function withoutSpace(str) {
26
+ return typeof str === "string" ? str.replaceAll(" ", "_") : str;
27
+ }
28
+
29
+ // src/hash.ts
30
+ function toChar(code) {
31
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
32
+ }
33
+ function toName(code) {
34
+ let name = "";
35
+ let x;
36
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0)
37
+ name = toChar(x % 52) + name;
38
+ return toChar(x % 52) + name;
39
+ }
40
+ function toPhash(h, x) {
41
+ let i = x.length;
42
+ while (i)
43
+ h = h * 33 ^ x.charCodeAt(--i);
44
+ return h;
45
+ }
46
+ function toHash(value) {
47
+ return toName(toPhash(5381, value) >>> 0);
48
+ }
49
+
50
+ // src/merge-props.ts
51
+ function mergeProps(...sources) {
52
+ const result = {};
53
+ for (const source of sources) {
54
+ for (const [key, value] of Object.entries(source)) {
55
+ if (isObject(value)) {
56
+ result[key] = mergeProps(result[key] || {}, value);
57
+ } else {
58
+ result[key] = value;
59
+ }
60
+ }
61
+ }
62
+ return result;
63
+ }
64
+
65
+ // src/walk-object.ts
66
+ var isNotNullish = (element) => element != null;
67
+ function walkObject(target, predicate, options = {}) {
68
+ const { stop, getKey } = options;
69
+ function inner(value, path = []) {
70
+ if (isObject(value) || Array.isArray(value)) {
71
+ const result = {};
72
+ for (const [prop, child] of Object.entries(value)) {
73
+ const key = getKey?.(prop) ?? prop;
74
+ const childPath = [...path, key];
75
+ if (stop?.(value, childPath)) {
76
+ return predicate(value, path);
77
+ }
78
+ const next = inner(child, childPath);
79
+ if (isNotNullish(next)) {
80
+ result[key] = next;
81
+ }
82
+ }
83
+ return result;
84
+ }
85
+ return predicate(value, path);
86
+ }
87
+ return inner(target);
88
+ }
89
+ function mapObject(obj, fn) {
90
+ if (!isObject(obj))
91
+ return fn(obj);
92
+ return walkObject(obj, (value) => fn(value));
93
+ }
94
+
95
+ // src/normalize-style-object.ts
96
+ function toResponsiveObject(values, breakpoints) {
97
+ return values.reduce((acc, current, index) => {
98
+ const key = breakpoints[index];
99
+ if (current != null) {
100
+ acc[key] = current;
101
+ }
102
+ return acc;
103
+ }, {});
104
+ }
105
+ function normalizeShorthand(styles, context) {
106
+ const { hasShorthand, resolveShorthand } = context.utility;
107
+ return walkObject(styles, (v) => v, {
108
+ getKey: (prop) => {
109
+ return hasShorthand ? resolveShorthand(prop) : prop;
110
+ }
111
+ });
112
+ }
113
+ function normalizeStyleObject(styles, context) {
114
+ const { utility, conditions } = context;
115
+ const { hasShorthand, resolveShorthand } = utility;
116
+ return walkObject(
117
+ styles,
118
+ (value) => {
119
+ return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value;
120
+ },
121
+ {
122
+ stop: (value) => Array.isArray(value),
123
+ getKey: (prop) => {
124
+ return hasShorthand ? resolveShorthand(prop) : prop;
125
+ }
126
+ }
127
+ );
128
+ }
129
+
130
+ // src/classname.ts
131
+ var fallbackCondition = {
132
+ shift: (v) => v,
133
+ finalize: (v) => v,
134
+ breakpoints: { keys: [] }
135
+ };
136
+ var sanitize = (value) => typeof value === "string" ? value.replaceAll(/[\n\s]+/g, " ") : value;
137
+ function createCss(context) {
138
+ const { utility, hash, conditions: conds = fallbackCondition } = context;
139
+ const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join("-");
140
+ const hashFn = (conditions, className) => {
141
+ let result;
142
+ if (hash) {
143
+ const baseArray = [...conds.finalize(conditions), className];
144
+ result = formatClassName(toHash(baseArray.join(":")));
145
+ } else {
146
+ const baseArray = [...conds.finalize(conditions), formatClassName(className)];
147
+ result = baseArray.join(":");
148
+ }
149
+ return result;
150
+ };
151
+ return (styleObject = {}) => {
152
+ const normalizedObject = normalizeStyleObject(styleObject, context);
153
+ const classNames = /* @__PURE__ */ new Set();
154
+ walkObject(normalizedObject, (value, paths) => {
155
+ const important = isImportant(value);
156
+ if (value == null)
157
+ return;
158
+ const [prop, ...allConditions] = conds.shift(paths);
159
+ const conditions = filterBaseConditions(allConditions);
160
+ const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
161
+ let className = hashFn(conditions, transformed.className);
162
+ if (important)
163
+ className = `${className}!`;
164
+ classNames.add(className);
165
+ });
166
+ return Array.from(classNames).join(" ");
167
+ };
168
+ }
169
+ function compactStyles(...styles) {
170
+ return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
171
+ }
172
+ function createMergeCss(context) {
173
+ function resolve(styles) {
174
+ const allStyles = compactStyles(...styles);
175
+ if (allStyles.length === 1)
176
+ return allStyles;
177
+ return allStyles.map((style) => normalizeShorthand(style, context));
178
+ }
179
+ function mergeCss(...styles) {
180
+ return mergeProps(...resolve(styles));
181
+ }
182
+ function assignCss(...styles) {
183
+ return Object.assign({}, ...resolve(styles));
184
+ }
185
+ return { mergeCss, assignCss };
186
+ }
187
+
188
+ // src/memo.ts
189
+ var memo = (fn) => {
190
+ const cache = /* @__PURE__ */ new Map();
191
+ const get = (...args) => {
192
+ const key = JSON.stringify(args);
193
+ if (cache.has(key)) {
194
+ return cache.get(key);
195
+ }
196
+ const result = fn(...args);
197
+ cache.set(key, result);
198
+ return result;
199
+ };
200
+ return get;
201
+ };
202
+
203
+ // src/hypenate-property.ts
204
+ var wordRegex = /([A-Z])/g;
205
+ var msRegex = /^ms-/;
206
+ var hypenateProperty = memo((property) => {
207
+ if (property.startsWith("--"))
208
+ return property;
209
+ return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
210
+ });
211
+
212
+ // src/slot.ts
213
+ var getSlotRecipes = (recipe = {}) => {
214
+ const init = (slot) => ({
215
+ className: [recipe.className, slot].filter(Boolean).join("__"),
216
+ base: recipe.base?.[slot] ?? {},
217
+ variants: {},
218
+ defaultVariants: recipe.defaultVariants ?? {},
219
+ compoundVariants: recipe.compoundVariants ? getSlotCompoundVariant(recipe.compoundVariants, slot) : []
220
+ });
221
+ const slots = recipe.slots ?? [];
222
+ const recipeParts = slots.map((slot) => [slot, init(slot)]);
223
+ for (const [variantsKey, variantsSpec] of Object.entries(recipe.variants ?? {})) {
224
+ for (const [variantKey, variantSpec] of Object.entries(variantsSpec)) {
225
+ recipeParts.forEach(([slot, slotRecipe]) => {
226
+ slotRecipe.variants[variantsKey] ??= {};
227
+ slotRecipe.variants[variantsKey][variantKey] = variantSpec[slot] ?? {};
228
+ });
229
+ }
230
+ }
231
+ return Object.fromEntries(recipeParts);
232
+ };
233
+ var getSlotCompoundVariant = (compoundVariants, slotName) => compoundVariants.filter((compoundVariant) => compoundVariant.css[slotName]).map((compoundVariant) => ({ ...compoundVariant, css: compoundVariant.css[slotName] }));
234
+
235
+ // src/split-props.ts
236
+ function splitProps(props, ...keys) {
237
+ const descriptors = Object.getOwnPropertyDescriptors(props);
238
+ const dKeys = Object.keys(descriptors);
239
+ const split = (k) => {
240
+ const clone = {};
241
+ for (let i = 0; i < k.length; i++) {
242
+ const key = k[i];
243
+ if (descriptors[key]) {
244
+ Object.defineProperty(clone, key, descriptors[key]);
245
+ delete descriptors[key];
246
+ }
247
+ }
248
+ return clone;
249
+ };
250
+ const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
251
+ return keys.map(fn).concat(split(dKeys));
252
+ }
253
+ export {
254
+ compact,
255
+ createCss,
256
+ createMergeCss,
257
+ filterBaseConditions,
258
+ getSlotCompoundVariant,
259
+ getSlotRecipes,
260
+ hypenateProperty,
261
+ isBaseCondition,
262
+ isObject,
263
+ mapObject,
264
+ memo,
265
+ mergeProps,
266
+ splitProps,
267
+ toHash,
268
+ walkObject,
269
+ withoutSpace
270
+ };
271
+
272
+
273
+
274
+
275
+
276
+ export function __spreadValues(a, b) {
277
+ return { ...a, ...b }
278
+ }
279
+
280
+ export function __objRest(source, exclude) {
281
+ return Object.fromEntries(Object.entries(source).filter(([key]) => !exclude.includes(key)))
282
+ }
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface AspectRatioProperties {
9
+ ratio?: ConditionalValue<number>
10
+ }
11
+
12
+
13
+ interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
14
+
15
+ interface AspectRatioPatternFn {
16
+ (styles?: AspectRatioStyles): string
17
+ raw: (styles?: AspectRatioStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const aspectRatio: AspectRatioPatternFn;
@@ -0,0 +1,35 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const aspectRatioConfig = {
5
+ transform(props, { map }) {
6
+ const { ratio = 4 / 3, ...rest } = props;
7
+ return {
8
+ position: "relative",
9
+ _before: {
10
+ content: `""`,
11
+ display: "block",
12
+ height: "0",
13
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
14
+ },
15
+ "&>*": {
16
+ display: "flex",
17
+ justifyContent: "center",
18
+ alignItems: "center",
19
+ overflow: "hidden",
20
+ position: "absolute",
21
+ inset: "0",
22
+ width: "100%",
23
+ height: "100%"
24
+ },
25
+ "&>img, &>video": {
26
+ objectFit: "cover"
27
+ },
28
+ ...rest
29
+ };
30
+ }}
31
+
32
+ export const getAspectRatioStyle = (styles = {}) => aspectRatioConfig.transform(styles, { map: mapObject })
33
+
34
+ export const aspectRatio = (styles) => css(getAspectRatioStyle(styles))
35
+ aspectRatio.raw = getAspectRatioStyle
@@ -0,0 +1,22 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface BleedProperties {
9
+ inline?: PropertyValue<'marginInline'>
10
+ block?: PropertyValue<'marginBlock'>
11
+ }
12
+
13
+
14
+ interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
15
+
16
+ interface BleedPatternFn {
17
+ (styles?: BleedStyles): string
18
+ raw: (styles?: BleedStyles) => SystemStyleObject
19
+ }
20
+
21
+
22
+ export declare const bleed: BleedPatternFn;
@@ -0,0 +1,19 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const bleedConfig = {
5
+ transform(props) {
6
+ const { inline = "0", block = "0", ...rest } = props;
7
+ return {
8
+ "--bleed-x": `spacing.${inline}`,
9
+ "--bleed-y": `spacing.${block}`,
10
+ marginInline: "calc(var(--bleed-x, 0) * -1)",
11
+ marginBlock: "calc(var(--bleed-y, 0) * -1)",
12
+ ...rest
13
+ };
14
+ }}
15
+
16
+ export const getBleedStyle = (styles = {}) => bleedConfig.transform(styles, { map: mapObject })
17
+
18
+ export const bleed = (styles) => css(getBleedStyle(styles))
19
+ bleed.raw = getBleedStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface BoxProperties {
9
+
10
+ }
11
+
12
+
13
+ interface BoxStyles extends BoxProperties, DistributiveOmit<SystemStyleObject, keyof BoxProperties > {}
14
+
15
+ interface BoxPatternFn {
16
+ (styles?: BoxStyles): string
17
+ raw: (styles?: BoxStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const box: BoxPatternFn;
@@ -0,0 +1,12 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const boxConfig = {
5
+ transform(props) {
6
+ return props;
7
+ }}
8
+
9
+ export const getBoxStyle = (styles = {}) => boxConfig.transform(styles, { map: mapObject })
10
+
11
+ export const box = (styles) => css(getBoxStyle(styles))
12
+ box.raw = getBoxStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface CenterProperties {
9
+ inline?: ConditionalValue<boolean>
10
+ }
11
+
12
+
13
+ interface CenterStyles extends CenterProperties, DistributiveOmit<SystemStyleObject, keyof CenterProperties > {}
14
+
15
+ interface CenterPatternFn {
16
+ (styles?: CenterStyles): string
17
+ raw: (styles?: CenterStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const center: CenterPatternFn;
@@ -0,0 +1,18 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const centerConfig = {
5
+ transform(props) {
6
+ const { inline, ...rest } = props;
7
+ return {
8
+ display: inline ? "inline-flex" : "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ ...rest
12
+ };
13
+ }}
14
+
15
+ export const getCenterStyle = (styles = {}) => centerConfig.transform(styles, { map: mapObject })
16
+
17
+ export const center = (styles) => css(getCenterStyle(styles))
18
+ center.raw = getCenterStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface CircleProperties {
9
+ size?: PropertyValue<'width'>
10
+ }
11
+
12
+
13
+ interface CircleStyles extends CircleProperties, DistributiveOmit<SystemStyleObject, keyof CircleProperties > {}
14
+
15
+ interface CirclePatternFn {
16
+ (styles?: CircleStyles): string
17
+ raw: (styles?: CircleStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const circle: CirclePatternFn;
@@ -0,0 +1,22 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const circleConfig = {
5
+ transform(props) {
6
+ const { size, ...rest } = props;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ flex: "0 0 auto",
12
+ width: size,
13
+ height: size,
14
+ borderRadius: "9999px",
15
+ ...rest
16
+ };
17
+ }}
18
+
19
+ export const getCircleStyle = (styles = {}) => circleConfig.transform(styles, { map: mapObject })
20
+
21
+ export const circle = (styles) => css(getCircleStyle(styles))
22
+ circle.raw = getCircleStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface ContainerProperties {
9
+
10
+ }
11
+
12
+
13
+ interface ContainerStyles extends ContainerProperties, DistributiveOmit<SystemStyleObject, keyof ContainerProperties > {}
14
+
15
+ interface ContainerPatternFn {
16
+ (styles?: ContainerStyles): string
17
+ raw: (styles?: ContainerStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const container: ContainerPatternFn;
@@ -0,0 +1,18 @@
1
+ import { mapObject } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const containerConfig = {
5
+ transform(props) {
6
+ return {
7
+ position: "relative",
8
+ maxWidth: "8xl",
9
+ mx: "auto",
10
+ px: { base: "4", md: "6", lg: "8" },
11
+ ...props
12
+ };
13
+ }}
14
+
15
+ export const getContainerStyle = (styles = {}) => containerConfig.transform(styles, { map: mapObject })
16
+
17
+ export const container = (styles) => css(getContainerStyle(styles))
18
+ container.raw = getContainerStyle
@@ -0,0 +1,23 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
3
+ import type { Properties } from '../types/csstype.d.mts';
4
+ import type { PropertyValue } from '../types/prop-type.d.mts';
5
+ import type { DistributiveOmit } from '../types/system-types.d.mts';
6
+ import type { Tokens } from '../tokens/index.d.mts';
7
+
8
+ export interface DividerProperties {
9
+ orientation?: ConditionalValue<"horizontal" | "vertical">
10
+ thickness?: ConditionalValue<Tokens["sizes"] | Properties["borderWidth"]>
11
+ color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
12
+ }
13
+
14
+
15
+ interface DividerStyles extends DividerProperties, DistributiveOmit<SystemStyleObject, keyof DividerProperties > {}
16
+
17
+ interface DividerPatternFn {
18
+ (styles?: DividerStyles): string
19
+ raw: (styles?: DividerStyles) => SystemStyleObject
20
+ }
21
+
22
+
23
+ export declare const divider: DividerPatternFn;