@svadmin/surface 0.8.6 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/README.md +70 -38
  2. package/STYLING.md +31 -0
  3. package/compatibility.json +23 -2
  4. package/dist/agent-contract.d.ts +37 -0
  5. package/dist/agent-contract.js +203 -0
  6. package/dist/agent.d.ts +38 -7
  7. package/dist/agent.js +98 -59
  8. package/dist/binding.d.ts +2 -0
  9. package/dist/binding.js +7 -1
  10. package/dist/builtin-definitions.d.ts +6 -0
  11. package/dist/builtin-definitions.js +40 -0
  12. package/dist/builtin-schemas.d.ts +25 -0
  13. package/dist/builtin-schemas.js +13 -0
  14. package/dist/catalog.d.ts +4 -61
  15. package/dist/catalog.js +20 -44
  16. package/dist/components/MetricWidget.svelte +12 -8
  17. package/dist/components/ResourceFormBody.svelte +97 -0
  18. package/dist/components/ResourceFormBody.svelte.d.ts +13 -0
  19. package/dist/components/ResourceFormWidget.svelte +19 -0
  20. package/dist/components/ResourceFormWidget.svelte.d.ts +4 -0
  21. package/dist/components/ResourceTableWidget.svelte +14 -12
  22. package/dist/components/SurfaceEditPreview.svelte +107 -0
  23. package/dist/components/SurfaceEditPreview.svelte.d.ts +20 -0
  24. package/dist/components/SurfaceRenderer.svelte +120 -163
  25. package/dist/components/SurfaceRenderer.svelte.d.ts +4 -0
  26. package/dist/components/SurfaceWorkflowProvider.svelte +22 -0
  27. package/dist/components/SurfaceWorkflowProvider.svelte.d.ts +17 -0
  28. package/dist/components/SvarGridWidget.svelte +47 -0
  29. package/dist/components/SvarGridWidget.svelte.d.ts +4 -0
  30. package/dist/components/SvarSurfaceProvider.svelte +12 -0
  31. package/dist/components/SvarSurfaceProvider.svelte.d.ts +11 -0
  32. package/dist/edits.d.ts +57 -0
  33. package/dist/edits.js +166 -0
  34. package/dist/index.d.ts +8 -2
  35. package/dist/index.js +5 -1
  36. package/dist/interactive.d.ts +6 -0
  37. package/dist/interactive.js +15 -0
  38. package/dist/json.js +1 -2
  39. package/dist/openui.d.ts +64 -0
  40. package/dist/openui.js +168 -0
  41. package/dist/schema.d.ts +108 -0
  42. package/dist/schema.js +73 -0
  43. package/dist/server-sqlite.d.ts +1 -0
  44. package/dist/server-sqlite.js +2 -0
  45. package/dist/server.d.ts +4 -0
  46. package/dist/server.js +4 -0
  47. package/dist/source-cache.d.ts +30 -0
  48. package/dist/source-cache.js +135 -0
  49. package/dist/styled-system/css/conditions.js +36 -0
  50. package/dist/styled-system/css/css.d.ts +22 -0
  51. package/dist/styled-system/css/css.js +45 -0
  52. package/dist/styled-system/css/cva.d.ts +6 -0
  53. package/dist/styled-system/css/cva.js +87 -0
  54. package/dist/styled-system/css/cx.d.ts +5 -0
  55. package/dist/styled-system/css/cx.js +15 -0
  56. package/dist/styled-system/css/index.d.ts +5 -0
  57. package/dist/styled-system/css/index.js +4 -0
  58. package/dist/styled-system/css/sva.d.ts +4 -0
  59. package/dist/styled-system/css/sva.js +46 -0
  60. package/dist/styled-system/design-contract.d.ts +13 -0
  61. package/dist/styled-system/design-contract.js +11 -0
  62. package/dist/styled-system/helpers.js +316 -0
  63. package/dist/styled-system/patterns/aspect-ratio.d.ts +20 -0
  64. package/dist/styled-system/patterns/aspect-ratio.js +38 -0
  65. package/dist/styled-system/patterns/bleed.d.ts +21 -0
  66. package/dist/styled-system/patterns/bleed.js +24 -0
  67. package/dist/styled-system/patterns/box.d.ts +20 -0
  68. package/dist/styled-system/patterns/box.js +15 -0
  69. package/dist/styled-system/patterns/center.d.ts +20 -0
  70. package/dist/styled-system/patterns/center.js +21 -0
  71. package/dist/styled-system/patterns/circle.d.ts +20 -0
  72. package/dist/styled-system/patterns/circle.js +25 -0
  73. package/dist/styled-system/patterns/container.d.ts +20 -0
  74. package/dist/styled-system/patterns/container.js +21 -0
  75. package/dist/styled-system/patterns/cq.d.ts +21 -0
  76. package/dist/styled-system/patterns/cq.js +21 -0
  77. package/dist/styled-system/patterns/divider.d.ts +22 -0
  78. package/dist/styled-system/patterns/divider.js +25 -0
  79. package/dist/styled-system/patterns/flex.d.ts +26 -0
  80. package/dist/styled-system/patterns/flex.js +26 -0
  81. package/dist/styled-system/patterns/float.d.ts +23 -0
  82. package/dist/styled-system/patterns/float.js +52 -0
  83. package/dist/styled-system/patterns/grid-item.d.ts +25 -0
  84. package/dist/styled-system/patterns/grid-item.js +25 -0
  85. package/dist/styled-system/patterns/grid.d.ts +24 -0
  86. package/dist/styled-system/patterns/grid.js +27 -0
  87. package/dist/styled-system/patterns/hstack.d.ts +21 -0
  88. package/dist/styled-system/patterns/hstack.js +24 -0
  89. package/dist/styled-system/patterns/index.d.ts +21 -0
  90. package/dist/styled-system/patterns/index.js +20 -0
  91. package/dist/styled-system/patterns/link-overlay.d.ts +20 -0
  92. package/dist/styled-system/patterns/link-overlay.js +24 -0
  93. package/dist/styled-system/patterns/spacer.d.ts +20 -0
  94. package/dist/styled-system/patterns/spacer.js +25 -0
  95. package/dist/styled-system/patterns/square.d.ts +20 -0
  96. package/dist/styled-system/patterns/square.js +24 -0
  97. package/dist/styled-system/patterns/stack.d.ts +23 -0
  98. package/dist/styled-system/patterns/stack.js +24 -0
  99. package/dist/styled-system/patterns/visually-hidden.d.ts +20 -0
  100. package/dist/styled-system/patterns/visually-hidden.js +18 -0
  101. package/dist/styled-system/patterns/vstack.d.ts +21 -0
  102. package/dist/styled-system/patterns/vstack.js +24 -0
  103. package/dist/styled-system/patterns/wrap.d.ts +24 -0
  104. package/dist/styled-system/patterns/wrap.js +25 -0
  105. package/dist/styled-system/recipes/content-header.d.ts +31 -0
  106. package/dist/styled-system/recipes/content-header.js +65 -0
  107. package/dist/styled-system/recipes/content-page.d.ts +34 -0
  108. package/dist/styled-system/recipes/content-page.js +43 -0
  109. package/dist/styled-system/recipes/create-recipe.js +82 -0
  110. package/dist/styled-system/recipes/index.d.ts +17 -0
  111. package/dist/styled-system/recipes/index.js +16 -0
  112. package/dist/styled-system/recipes/metric-block.d.ts +34 -0
  113. package/dist/styled-system/recipes/metric-block.js +76 -0
  114. package/dist/styled-system/recipes/product-list.d.ts +31 -0
  115. package/dist/styled-system/recipes/product-list.js +73 -0
  116. package/dist/styled-system/recipes/product-section.d.ts +31 -0
  117. package/dist/styled-system/recipes/product-section.js +49 -0
  118. package/dist/styled-system/recipes/product-settings-row.d.ts +34 -0
  119. package/dist/styled-system/recipes/product-settings-row.js +58 -0
  120. package/dist/styled-system/recipes/product-settings.d.ts +31 -0
  121. package/dist/styled-system/recipes/product-settings.js +57 -0
  122. package/dist/styled-system/recipes/product-status.d.ts +34 -0
  123. package/dist/styled-system/recipes/product-status.js +45 -0
  124. package/dist/styled-system/recipes/product-toolbar.d.ts +31 -0
  125. package/dist/styled-system/recipes/product-toolbar.js +41 -0
  126. package/dist/styled-system/recipes/product-workspace.d.ts +34 -0
  127. package/dist/styled-system/recipes/product-workspace.js +58 -0
  128. package/dist/styled-system/recipes/surface-metric.d.ts +38 -0
  129. package/dist/styled-system/recipes/surface-metric.js +63 -0
  130. package/dist/styled-system/recipes/surface-table.d.ts +34 -0
  131. package/dist/styled-system/recipes/surface-table.js +62 -0
  132. package/dist/styled-system/recipes/ui-badge.d.ts +31 -0
  133. package/dist/styled-system/recipes/ui-badge.js +38 -0
  134. package/dist/styled-system/recipes/ui-button.d.ts +32 -0
  135. package/dist/styled-system/recipes/ui-button.js +43 -0
  136. package/dist/styled-system/recipes/ui-input.d.ts +31 -0
  137. package/dist/styled-system/recipes/ui-input.js +49 -0
  138. package/dist/styled-system/recipes/ui-textarea.d.ts +31 -0
  139. package/dist/styled-system/recipes/ui-textarea.js +24 -0
  140. package/dist/styled-system/styles.css +1257 -0
  141. package/dist/styled-system/tokens/index.d.ts +9 -0
  142. package/dist/styled-system/tokens/index.js +268 -0
  143. package/dist/styled-system/tokens/tokens.d.ts +36 -0
  144. package/dist/styled-system/types/composition.d.ts +227 -0
  145. package/dist/styled-system/types/conditions.d.ts +236 -0
  146. package/dist/styled-system/types/csstype.d.ts +22570 -0
  147. package/dist/styled-system/types/index.d.ts +6 -0
  148. package/dist/styled-system/types/parts.d.ts +8 -0
  149. package/dist/styled-system/types/pattern.d.ts +78 -0
  150. package/dist/styled-system/types/prop-type.d.ts +223 -0
  151. package/dist/styled-system/types/recipe.d.ts +181 -0
  152. package/dist/styled-system/types/selectors.d.ts +59 -0
  153. package/dist/styled-system/types/static-css.d.ts +56 -0
  154. package/dist/styled-system/types/style-props.d.ts +8088 -0
  155. package/dist/styled-system/types/system-types.d.ts +151 -0
  156. package/dist/styles/editor.css +124 -0
  157. package/dist/styles/editor.generated.d.ts +8 -0
  158. package/dist/styles/editor.generated.js +9 -0
  159. package/dist/styles.css +1262 -0
  160. package/dist/svar-catalog.d.ts +3 -0
  161. package/dist/svar-catalog.js +7 -0
  162. package/dist/svar-context.d.ts +9 -0
  163. package/dist/svar-context.js +1 -0
  164. package/dist/svar-schema.d.ts +21 -0
  165. package/dist/svar-schema.js +36 -0
  166. package/dist/svar.d.ts +4 -0
  167. package/dist/svar.js +3 -0
  168. package/dist/svelte.d.ts +4 -2
  169. package/dist/svelte.js +2 -1
  170. package/dist/types.d.ts +5 -1
  171. package/dist/validation.js +2 -102
  172. package/dist/wire.d.ts +13 -0
  173. package/dist/wire.js +30 -0
  174. package/dist/workflows/action-contracts.d.ts +7 -0
  175. package/dist/workflows/action-contracts.js +54 -0
  176. package/dist/workflows/catalog.d.ts +20 -0
  177. package/dist/workflows/catalog.js +50 -0
  178. package/dist/workflows/client.d.ts +45 -0
  179. package/dist/workflows/client.js +125 -0
  180. package/dist/workflows/context.d.ts +9 -0
  181. package/dist/workflows/context.js +5 -0
  182. package/dist/workflows/openui-guard.d.ts +19 -0
  183. package/dist/workflows/openui-guard.js +209 -0
  184. package/dist/workflows/service.d.ts +58 -0
  185. package/dist/workflows/service.js +296 -0
  186. package/dist/workflows/sqlite-store.d.ts +20 -0
  187. package/dist/workflows/sqlite-store.js +91 -0
  188. package/dist/workflows/types.d.ts +103 -0
  189. package/dist/workflows/types.js +8 -0
  190. package/dist/workflows.d.ts +5 -0
  191. package/dist/workflows.js +4 -0
  192. package/package.json +53 -9
@@ -0,0 +1,236 @@
1
+ /* eslint-disable */
2
+ import type { AnySelector, Selectors } from './selectors';
3
+
4
+ export interface Conditions {
5
+ /** `&:is(:hover, [data-hover])` */
6
+ "_hover": string
7
+ /** `&:is(:focus, [data-focus])` */
8
+ "_focus": string
9
+ /** `&:focus-within` */
10
+ "_focusWithin": string
11
+ /** `&:is(:focus-visible, [data-focus-visible])` */
12
+ "_focusVisible": string
13
+ /** `&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])` */
14
+ "_disabled": string
15
+ /** `&:is(:active, [data-active])` */
16
+ "_active": string
17
+ /** `&:visited` */
18
+ "_visited": string
19
+ /** `&:target` */
20
+ "_target": string
21
+ /** `&:is(:read-only, [data-read-only], [aria-readonly=true])` */
22
+ "_readOnly": string
23
+ /** `&:read-write` */
24
+ "_readWrite": string
25
+ /** `&:is(:empty, [data-empty])` */
26
+ "_empty": string
27
+ /** `&:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"])` */
28
+ "_checked": string
29
+ /** `&:enabled` */
30
+ "_enabled": string
31
+ /** `&:is([aria-expanded=true], [data-expanded], [data-state="expanded"])` */
32
+ "_expanded": string
33
+ /** `&[data-highlighted]` */
34
+ "_highlighted": string
35
+ /** `&[data-complete]` */
36
+ "_complete": string
37
+ /** `&[data-incomplete]` */
38
+ "_incomplete": string
39
+ /** `&[data-dragging]` */
40
+ "_dragging": string
41
+ /** `&::before` */
42
+ "_before": string
43
+ /** `&::after` */
44
+ "_after": string
45
+ /** `&::first-letter` */
46
+ "_firstLetter": string
47
+ /** `&::first-line` */
48
+ "_firstLine": string
49
+ /** `&::marker, &::-webkit-details-marker` */
50
+ "_marker": string
51
+ /** `&::selection` */
52
+ "_selection": string
53
+ /** `&::file-selector-button` */
54
+ "_file": string
55
+ /** `&::backdrop` */
56
+ "_backdrop": string
57
+ /** `&:first-child` */
58
+ "_first": string
59
+ /** `&:last-child` */
60
+ "_last": string
61
+ /** `&:only-child` */
62
+ "_only": string
63
+ /** `&:nth-child(even)` */
64
+ "_even": string
65
+ /** `&:nth-child(odd)` */
66
+ "_odd": string
67
+ /** `&:first-of-type` */
68
+ "_firstOfType": string
69
+ /** `&:last-of-type` */
70
+ "_lastOfType": string
71
+ /** `&:only-of-type` */
72
+ "_onlyOfType": string
73
+ /** `.peer:is(:focus, [data-focus]) ~ &` */
74
+ "_peerFocus": string
75
+ /** `.peer:is(:hover, [data-hover]) ~ &` */
76
+ "_peerHover": string
77
+ /** `.peer:is(:active, [data-active]) ~ &` */
78
+ "_peerActive": string
79
+ /** `.peer:focus-within ~ &` */
80
+ "_peerFocusWithin": string
81
+ /** `.peer:is(:focus-visible, [data-focus-visible]) ~ &` */
82
+ "_peerFocusVisible": string
83
+ /** `.peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &` */
84
+ "_peerDisabled": string
85
+ /** `.peer:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) ~ &` */
86
+ "_peerChecked": string
87
+ /** `.peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &` */
88
+ "_peerInvalid": string
89
+ /** `.peer:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) ~ &` */
90
+ "_peerExpanded": string
91
+ /** `.peer:placeholder-shown ~ &` */
92
+ "_peerPlaceholderShown": string
93
+ /** `.group:is(:focus, [data-focus]) &` */
94
+ "_groupFocus": string
95
+ /** `.group:is(:hover, [data-hover]) &` */
96
+ "_groupHover": string
97
+ /** `.group:is(:active, [data-active]) &` */
98
+ "_groupActive": string
99
+ /** `.group:focus-within &` */
100
+ "_groupFocusWithin": string
101
+ /** `.group:is(:focus-visible, [data-focus-visible]) &` */
102
+ "_groupFocusVisible": string
103
+ /** `.group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &` */
104
+ "_groupDisabled": string
105
+ /** `.group:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) &` */
106
+ "_groupChecked": string
107
+ /** `.group:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) &` */
108
+ "_groupExpanded": string
109
+ /** `.group:is(:invalid, [data-invalid], [aria-invalid=true]) &` */
110
+ "_groupInvalid": string
111
+ /** `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state="indeterminate"])` */
112
+ "_indeterminate": string
113
+ /** `&:is(:required, [data-required], [aria-required=true])` */
114
+ "_required": string
115
+ /** `&:is(:valid, [data-valid])` */
116
+ "_valid": string
117
+ /** `&:is(:invalid, [data-invalid], [aria-invalid=true])` */
118
+ "_invalid": string
119
+ /** `&:autofill` */
120
+ "_autofill": string
121
+ /** `&:is(:in-range, [data-in-range])` */
122
+ "_inRange": string
123
+ /** `&:is(:out-of-range, [data-outside-range])` */
124
+ "_outOfRange": string
125
+ /** `&::placeholder, &[data-placeholder]` */
126
+ "_placeholder": string
127
+ /** `&:is(:placeholder-shown, [data-placeholder-shown])` */
128
+ "_placeholderShown": string
129
+ /** `&:is([aria-pressed=true], [data-pressed])` */
130
+ "_pressed": string
131
+ /** `&:is([aria-selected=true], [data-selected])` */
132
+ "_selected": string
133
+ /** `&:is([aria-grabbed=true], [data-grabbed])` */
134
+ "_grabbed": string
135
+ /** `&[data-state=under-value]` */
136
+ "_underValue": string
137
+ /** `&[data-state=over-value]` */
138
+ "_overValue": string
139
+ /** `&[data-state=at-value]` */
140
+ "_atValue": string
141
+ /** `&:default` */
142
+ "_default": string
143
+ /** `&:optional` */
144
+ "_optional": string
145
+ /** `&:is([open], [data-open], [data-state="open"], :popover-open)` */
146
+ "_open": string
147
+ /** `&:is([closed], [data-closed], [data-state="closed"])` */
148
+ "_closed": string
149
+ /** `&:is(:fullscreen, [data-fullscreen])` */
150
+ "_fullscreen": string
151
+ /** `&:is([data-loading], [aria-busy=true])` */
152
+ "_loading": string
153
+ /** `&:is([hidden], [data-hidden])` */
154
+ "_hidden": string
155
+ /** `&:is([aria-current=true], [data-current])` */
156
+ "_current": string
157
+ /** `&[aria-current=page]` */
158
+ "_currentPage": string
159
+ /** `&[aria-current=step]` */
160
+ "_currentStep": string
161
+ /** `&[data-today]` */
162
+ "_today": string
163
+ /** `&[data-unavailable]` */
164
+ "_unavailable": string
165
+ /** `&[data-range-start]` */
166
+ "_rangeStart": string
167
+ /** `&[data-range-end]` */
168
+ "_rangeEnd": string
169
+ /** `&[data-now]` */
170
+ "_now": string
171
+ /** `&[data-topmost]` */
172
+ "_topmost": string
173
+ /** `@media (prefers-reduced-motion: reduce)` */
174
+ "_motionReduce": string
175
+ /** `@media (prefers-reduced-motion: no-preference)` */
176
+ "_motionSafe": string
177
+ /** `@media print` */
178
+ "_print": string
179
+ /** `@media (orientation: landscape)` */
180
+ "_landscape": string
181
+ /** `@media (orientation: portrait)` */
182
+ "_portrait": string
183
+ /** `.dark &` */
184
+ "_dark": string
185
+ /** `.light &` */
186
+ "_light": string
187
+ /** `@media (prefers-color-scheme: dark)` */
188
+ "_osDark": string
189
+ /** `@media (prefers-color-scheme: light)` */
190
+ "_osLight": string
191
+ /** `@media (forced-colors: active)` */
192
+ "_highContrast": string
193
+ /** `@media (prefers-contrast: less)` */
194
+ "_lessContrast": string
195
+ /** `@media (prefers-contrast: more)` */
196
+ "_moreContrast": string
197
+ /** `:where([dir=ltr], :dir(ltr)) &` */
198
+ "_ltr": string
199
+ /** `:where([dir=rtl], :dir(rtl)) &` */
200
+ "_rtl": string
201
+ /** `&::-webkit-scrollbar` */
202
+ "_scrollbar": string
203
+ /** `&::-webkit-scrollbar-thumb` */
204
+ "_scrollbarThumb": string
205
+ /** `&::-webkit-scrollbar-track` */
206
+ "_scrollbarTrack": string
207
+ /** `&[data-orientation=horizontal]` */
208
+ "_horizontal": string
209
+ /** `&[data-orientation=vertical]` */
210
+ "_vertical": string
211
+ /** `& :where(svg)` */
212
+ "_icon": string
213
+ /** `@starting-style` */
214
+ "_starting": string
215
+ /** `@media (scripting: none)` */
216
+ "_noscript": string
217
+ /** `@media (inverted-colors: inverted)` */
218
+ "_invertedColors": string
219
+ /** The base (=no conditions) styles to apply */
220
+ "base": string
221
+ }
222
+
223
+ export type ConditionalValue<V> =
224
+ | V
225
+ | Array<V | null>
226
+ | {
227
+ [K in keyof Conditions]?: ConditionalValue<V>
228
+ }
229
+
230
+ export type Nested<P> = P & {
231
+ [K in Selectors]?: Nested<P>
232
+ } & {
233
+ [K in AnySelector]?: Nested<P>
234
+ } & {
235
+ [K in keyof Conditions]?: Nested<P>
236
+ }