poveste 0.1.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 (251) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +11 -0
  3. package/bin.mjs +4 -0
  4. package/client.d.ts +19 -0
  5. package/client.js +15 -0
  6. package/dist/controls.d.ts +2 -0
  7. package/dist/controls.d.ts.map +1 -0
  8. package/dist/controls.js +1 -0
  9. package/dist/node/alias.d.ts +3 -0
  10. package/dist/node/alias.d.ts.map +1 -0
  11. package/dist/node/alias.js +5 -0
  12. package/dist/node/bin.d.ts +2 -0
  13. package/dist/node/bin.d.ts.map +1 -0
  14. package/dist/node/bin.js +35 -0
  15. package/dist/node/build-serialize.d.ts +22 -0
  16. package/dist/node/build-serialize.d.ts.map +1 -0
  17. package/dist/node/build-serialize.js +36 -0
  18. package/dist/node/build.d.ts +3 -0
  19. package/dist/node/build.d.ts.map +1 -0
  20. package/dist/node/build.js +228 -0
  21. package/dist/node/builtin-plugins/pinceau-tokens.d.ts +7 -0
  22. package/dist/node/builtin-plugins/pinceau-tokens.d.ts.map +1 -0
  23. package/dist/node/builtin-plugins/pinceau-tokens.js +505 -0
  24. package/dist/node/builtin-plugins/tailwind-tokens.d.ts +6 -0
  25. package/dist/node/builtin-plugins/tailwind-tokens.d.ts.map +1 -0
  26. package/dist/node/builtin-plugins/tailwind-tokens.js +523 -0
  27. package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts +15 -0
  28. package/dist/node/builtin-plugins/vanilla-support/MountStory.d.ts.map +1 -0
  29. package/dist/node/builtin-plugins/vanilla-support/MountStory.js +39 -0
  30. package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts +39 -0
  31. package/dist/node/builtin-plugins/vanilla-support/RenderStory.d.ts.map +1 -0
  32. package/dist/node/builtin-plugins/vanilla-support/RenderStory.js +129 -0
  33. package/dist/node/builtin-plugins/vanilla-support/client.d.ts +4 -0
  34. package/dist/node/builtin-plugins/vanilla-support/client.d.ts.map +1 -0
  35. package/dist/node/builtin-plugins/vanilla-support/client.js +5 -0
  36. package/dist/node/builtin-plugins/vanilla-support/collect.d.ts +3 -0
  37. package/dist/node/builtin-plugins/vanilla-support/collect.d.ts.map +1 -0
  38. package/dist/node/builtin-plugins/vanilla-support/collect.js +33 -0
  39. package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts +3 -0
  40. package/dist/node/builtin-plugins/vanilla-support/plugin.d.ts.map +1 -0
  41. package/dist/node/builtin-plugins/vanilla-support/plugin.js +29 -0
  42. package/dist/node/builtin-plugins/vanilla-support/types.d.ts +36 -0
  43. package/dist/node/builtin-plugins/vanilla-support/types.d.ts.map +1 -0
  44. package/dist/node/builtin-plugins/vanilla-support/types.js +3 -0
  45. package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts +4 -0
  46. package/dist/node/builtin-plugins/vanilla-support/vanilla.story.d.ts.map +1 -0
  47. package/dist/node/builtin-plugins/vanilla-support/vanilla.story.js +55 -0
  48. package/dist/node/collect/index.d.ts +14 -0
  49. package/dist/node/collect/index.d.ts.map +1 -0
  50. package/dist/node/collect/index.js +129 -0
  51. package/dist/node/collect/run.d.ts +3 -0
  52. package/dist/node/collect/run.d.ts.map +1 -0
  53. package/dist/node/collect/run.js +7 -0
  54. package/dist/node/collect/worker.d.ts +14 -0
  55. package/dist/node/collect/worker.d.ts.map +1 -0
  56. package/dist/node/collect/worker.js +64 -0
  57. package/dist/node/colors.d.ts +287 -0
  58. package/dist/node/colors.d.ts.map +1 -0
  59. package/dist/node/colors.js +324 -0
  60. package/dist/node/commands/build.d.ts +5 -0
  61. package/dist/node/commands/build.d.ts.map +1 -0
  62. package/dist/node/commands/build.js +9 -0
  63. package/dist/node/commands/dev.d.ts +8 -0
  64. package/dist/node/commands/dev.d.ts.map +1 -0
  65. package/dist/node/commands/dev.js +52 -0
  66. package/dist/node/commands/preview.d.ts +5 -0
  67. package/dist/node/commands/preview.d.ts.map +1 -0
  68. package/dist/node/commands/preview.js +15 -0
  69. package/dist/node/config.d.ts +40 -0
  70. package/dist/node/config.d.ts.map +1 -0
  71. package/dist/node/config.js +330 -0
  72. package/dist/node/context.d.ts +18 -0
  73. package/dist/node/context.d.ts.map +1 -0
  74. package/dist/node/context.js +28 -0
  75. package/dist/node/dom/dom-keys.d.ts +5 -0
  76. package/dist/node/dom/dom-keys.d.ts.map +1 -0
  77. package/dist/node/dom/dom-keys.js +233 -0
  78. package/dist/node/dom/env.d.ts +5 -0
  79. package/dist/node/dom/env.d.ts.map +1 -0
  80. package/dist/node/dom/env.js +47 -0
  81. package/dist/node/dom/util.d.ts +11 -0
  82. package/dist/node/dom/util.d.ts.map +1 -0
  83. package/dist/node/dom/util.js +65 -0
  84. package/dist/node/index.d.ts +12 -0
  85. package/dist/node/index.d.ts.map +1 -0
  86. package/dist/node/index.js +4 -0
  87. package/dist/node/load.d.ts +9 -0
  88. package/dist/node/load.d.ts.map +1 -0
  89. package/dist/node/load.js +42 -0
  90. package/dist/node/markdown.d.ts +11 -0
  91. package/dist/node/markdown.d.ts.map +1 -0
  92. package/dist/node/markdown.js +228 -0
  93. package/dist/node/plugin.d.ts +42 -0
  94. package/dist/node/plugin.d.ts.map +1 -0
  95. package/dist/node/plugin.js +67 -0
  96. package/dist/node/preview.d.ts +8 -0
  97. package/dist/node/preview.d.ts.map +1 -0
  98. package/dist/node/preview.js +41 -0
  99. package/dist/node/search.d.ts +17 -0
  100. package/dist/node/search.d.ts.map +1 -0
  101. package/dist/node/search.js +72 -0
  102. package/dist/node/server.d.ts +12 -0
  103. package/dist/node/server.d.ts.map +1 -0
  104. package/dist/node/server.js +189 -0
  105. package/dist/node/stories.d.ts +22 -0
  106. package/dist/node/stories.d.ts.map +1 -0
  107. package/dist/node/stories.js +125 -0
  108. package/dist/node/tree.d.ts +4 -0
  109. package/dist/node/tree.d.ts.map +1 -0
  110. package/dist/node/tree.js +117 -0
  111. package/dist/node/util/find-up.d.ts +2 -0
  112. package/dist/node/util/find-up.d.ts.map +1 -0
  113. package/dist/node/util/find-up.js +20 -0
  114. package/dist/node/util/fs.d.ts +2 -0
  115. package/dist/node/util/fs.d.ts.map +1 -0
  116. package/dist/node/util/fs.js +1 -0
  117. package/dist/node/util/log.d.ts +2 -0
  118. package/dist/node/util/log.d.ts.map +1 -0
  119. package/dist/node/util/log.js +9 -0
  120. package/dist/node/util/slugify.d.ts +2 -0
  121. package/dist/node/util/slugify.d.ts.map +1 -0
  122. package/dist/node/util/slugify.js +22 -0
  123. package/dist/node/util/vendors.d.ts +3 -0
  124. package/dist/node/util/vendors.d.ts.map +1 -0
  125. package/dist/node/util/vendors.js +22 -0
  126. package/dist/node/vendors/controls.d.ts +2 -0
  127. package/dist/node/vendors/controls.d.ts.map +1 -0
  128. package/dist/node/vendors/controls.js +1 -0
  129. package/dist/node/vendors/vue.d.ts +2 -0
  130. package/dist/node/vendors/vue.d.ts.map +1 -0
  131. package/dist/node/vendors/vue.js +1 -0
  132. package/dist/node/virtual/index.d.ts +38 -0
  133. package/dist/node/virtual/index.d.ts.map +1 -0
  134. package/dist/node/virtual/index.js +49 -0
  135. package/dist/node/virtual/markdown.d.ts +3 -0
  136. package/dist/node/virtual/markdown.d.ts.map +1 -0
  137. package/dist/node/virtual/markdown.js +19 -0
  138. package/dist/node/virtual/noop.d.ts +2 -0
  139. package/dist/node/virtual/noop.d.ts.map +1 -0
  140. package/dist/node/virtual/noop.js +1 -0
  141. package/dist/node/virtual/resolved-commands.d.ts +3 -0
  142. package/dist/node/virtual/resolved-commands.d.ts.map +1 -0
  143. package/dist/node/virtual/resolved-commands.js +32 -0
  144. package/dist/node/virtual/resolved-config.d.ts +3 -0
  145. package/dist/node/virtual/resolved-config.d.ts.map +1 -0
  146. package/dist/node/virtual/resolved-config.js +10 -0
  147. package/dist/node/virtual/resolved-generated-global-setup.d.ts +3 -0
  148. package/dist/node/virtual/resolved-generated-global-setup.d.ts.map +1 -0
  149. package/dist/node/virtual/resolved-generated-global-setup.js +23 -0
  150. package/dist/node/virtual/resolved-generated-setup-code.d.ts +3 -0
  151. package/dist/node/virtual/resolved-generated-setup-code.d.ts.map +1 -0
  152. package/dist/node/virtual/resolved-generated-setup-code.js +5 -0
  153. package/dist/node/virtual/resolved-markdown-files.d.ts +3 -0
  154. package/dist/node/virtual/resolved-markdown-files.d.ts.map +1 -0
  155. package/dist/node/virtual/resolved-markdown-files.js +17 -0
  156. package/dist/node/virtual/resolved-stories.d.ts +3 -0
  157. package/dist/node/virtual/resolved-stories.d.ts.map +1 -0
  158. package/dist/node/virtual/resolved-stories.js +42 -0
  159. package/dist/node/virtual/resolved-support-plugins-client.d.ts +3 -0
  160. package/dist/node/virtual/resolved-support-plugins-client.d.ts.map +1 -0
  161. package/dist/node/virtual/resolved-support-plugins-client.js +11 -0
  162. package/dist/node/virtual/resolved-support-plugins-collect.d.ts +3 -0
  163. package/dist/node/virtual/resolved-support-plugins-collect.d.ts.map +1 -0
  164. package/dist/node/virtual/resolved-support-plugins-collect.js +11 -0
  165. package/dist/node/virtual/resolved-theme.d.ts +3 -0
  166. package/dist/node/virtual/resolved-theme.d.ts.map +1 -0
  167. package/dist/node/virtual/resolved-theme.js +12 -0
  168. package/dist/node/virtual/story-source.d.ts +3 -0
  169. package/dist/node/virtual/story-source.d.ts.map +1 -0
  170. package/dist/node/virtual/story-source.js +16 -0
  171. package/dist/node/virtual/story.d.ts +3 -0
  172. package/dist/node/virtual/story.d.ts.map +1 -0
  173. package/dist/node/virtual/story.js +7 -0
  174. package/dist/node/virtual/util.d.ts +3 -0
  175. package/dist/node/virtual/util.d.ts.map +1 -0
  176. package/dist/node/virtual/util.js +4 -0
  177. package/dist/node/virtual/vite-plugin.d.ts +4 -0
  178. package/dist/node/virtual/vite-plugin.d.ts.map +1 -0
  179. package/dist/node/virtual/vite-plugin.js +126 -0
  180. package/dist/node/vite.d.ts +9 -0
  181. package/dist/node/vite.d.ts.map +1 -0
  182. package/dist/node/vite.js +337 -0
  183. package/index.d.ts +1 -0
  184. package/package.json +89 -0
  185. package/plugin.d.ts +3 -0
  186. package/plugin.js +11 -0
  187. package/src/controls.ts +1 -0
  188. package/src/node/__tests__/markdown/test1.story.md +7 -0
  189. package/src/node/__tests__/markdown/test2.story.md +5 -0
  190. package/src/node/__tests__/markdown.spec.ts +61 -0
  191. package/src/node/__tests__/tree.spec.ts +109 -0
  192. package/src/node/alias.ts +8 -0
  193. package/src/node/bin.ts +43 -0
  194. package/src/node/build-serialize.ts +62 -0
  195. package/src/node/build.ts +283 -0
  196. package/src/node/builtin-plugins/pinceau-tokens.ts +521 -0
  197. package/src/node/builtin-plugins/tailwind-tokens.ts +536 -0
  198. package/src/node/builtin-plugins/vanilla-support/MountStory.ts +49 -0
  199. package/src/node/builtin-plugins/vanilla-support/RenderStory.ts +164 -0
  200. package/src/node/builtin-plugins/vanilla-support/client.ts +6 -0
  201. package/src/node/builtin-plugins/vanilla-support/collect.ts +43 -0
  202. package/src/node/builtin-plugins/vanilla-support/plugin.ts +35 -0
  203. package/src/node/builtin-plugins/vanilla-support/types.ts +40 -0
  204. package/src/node/builtin-plugins/vanilla-support/vanilla.story.ts +63 -0
  205. package/src/node/collect/index.ts +160 -0
  206. package/src/node/collect/run.ts +9 -0
  207. package/src/node/collect/worker.ts +97 -0
  208. package/src/node/colors.ts +340 -0
  209. package/src/node/commands/build.ts +14 -0
  210. package/src/node/commands/dev.ts +67 -0
  211. package/src/node/commands/preview.ts +22 -0
  212. package/src/node/config.ts +385 -0
  213. package/src/node/context.ts +60 -0
  214. package/src/node/dom/dom-keys.ts +238 -0
  215. package/src/node/dom/env.ts +60 -0
  216. package/src/node/dom/util.ts +83 -0
  217. package/src/node/index.ts +12 -0
  218. package/src/node/load.ts +59 -0
  219. package/src/node/markdown.ts +267 -0
  220. package/src/node/plugin.ts +95 -0
  221. package/src/node/preview.ts +57 -0
  222. package/src/node/search.ts +84 -0
  223. package/src/node/server.ts +235 -0
  224. package/src/node/stories.ts +154 -0
  225. package/src/node/tree.ts +158 -0
  226. package/src/node/util/find-up.ts +24 -0
  227. package/src/node/util/fs.ts +1 -0
  228. package/src/node/util/log.ts +10 -0
  229. package/src/node/util/slugify.ts +26 -0
  230. package/src/node/util/vendors.ts +27 -0
  231. package/src/node/vendors/controls.ts +1 -0
  232. package/src/node/vendors/vue.ts +1 -0
  233. package/src/node/virtual/index.ts +50 -0
  234. package/src/node/virtual/markdown.ts +21 -0
  235. package/src/node/virtual/noop.ts +1 -0
  236. package/src/node/virtual/resolved-commands.ts +42 -0
  237. package/src/node/virtual/resolved-config.ts +12 -0
  238. package/src/node/virtual/resolved-generated-global-setup.ts +25 -0
  239. package/src/node/virtual/resolved-generated-setup-code.ts +7 -0
  240. package/src/node/virtual/resolved-markdown-files.ts +19 -0
  241. package/src/node/virtual/resolved-stories.ts +44 -0
  242. package/src/node/virtual/resolved-support-plugins-client.ts +14 -0
  243. package/src/node/virtual/resolved-support-plugins-collect.ts +14 -0
  244. package/src/node/virtual/resolved-theme.ts +14 -0
  245. package/src/node/virtual/story-source.ts +18 -0
  246. package/src/node/virtual/story.ts +9 -0
  247. package/src/node/virtual/util.ts +5 -0
  248. package/src/node/virtual/vite-plugin.ts +146 -0
  249. package/src/node/vite.ts +379 -0
  250. package/tsconfig.json +44 -0
  251. package/vitest.config.ts +10 -0
@@ -0,0 +1,287 @@
1
+ export declare const defaultColors: {
2
+ slate: {
3
+ 50: string;
4
+ 100: string;
5
+ 200: string;
6
+ 300: string;
7
+ 400: string;
8
+ 500: string;
9
+ 600: string;
10
+ 700: string;
11
+ 750: string;
12
+ 800: string;
13
+ 850: string;
14
+ 900: string;
15
+ 950: string;
16
+ };
17
+ gray: {
18
+ 50: string;
19
+ 100: string;
20
+ 200: string;
21
+ 300: string;
22
+ 400: string;
23
+ 500: string;
24
+ 600: string;
25
+ 700: string;
26
+ 750: string;
27
+ 800: string;
28
+ 850: string;
29
+ 900: string;
30
+ 950: string;
31
+ };
32
+ zinc: {
33
+ 50: string;
34
+ 100: string;
35
+ 200: string;
36
+ 300: string;
37
+ 400: string;
38
+ 500: string;
39
+ 600: string;
40
+ 700: string;
41
+ 750: string;
42
+ 800: string;
43
+ 850: string;
44
+ 900: string;
45
+ 950: string;
46
+ };
47
+ neutral: {
48
+ 50: string;
49
+ 100: string;
50
+ 200: string;
51
+ 300: string;
52
+ 400: string;
53
+ 500: string;
54
+ 600: string;
55
+ 700: string;
56
+ 750: string;
57
+ 800: string;
58
+ 850: string;
59
+ 900: string;
60
+ 950: string;
61
+ };
62
+ stone: {
63
+ 50: string;
64
+ 100: string;
65
+ 200: string;
66
+ 300: string;
67
+ 400: string;
68
+ 500: string;
69
+ 600: string;
70
+ 700: string;
71
+ 750: string;
72
+ 800: string;
73
+ 850: string;
74
+ 900: string;
75
+ 950: string;
76
+ };
77
+ red: {
78
+ 50: string;
79
+ 100: string;
80
+ 200: string;
81
+ 300: string;
82
+ 400: string;
83
+ 500: string;
84
+ 600: string;
85
+ 700: string;
86
+ 800: string;
87
+ 900: string;
88
+ };
89
+ orange: {
90
+ 50: string;
91
+ 100: string;
92
+ 200: string;
93
+ 300: string;
94
+ 400: string;
95
+ 500: string;
96
+ 600: string;
97
+ 700: string;
98
+ 800: string;
99
+ 900: string;
100
+ };
101
+ amber: {
102
+ 50: string;
103
+ 100: string;
104
+ 200: string;
105
+ 300: string;
106
+ 400: string;
107
+ 500: string;
108
+ 600: string;
109
+ 700: string;
110
+ 800: string;
111
+ 900: string;
112
+ };
113
+ yellow: {
114
+ 50: string;
115
+ 100: string;
116
+ 200: string;
117
+ 300: string;
118
+ 400: string;
119
+ 500: string;
120
+ 600: string;
121
+ 700: string;
122
+ 800: string;
123
+ 900: string;
124
+ };
125
+ lime: {
126
+ 50: string;
127
+ 100: string;
128
+ 200: string;
129
+ 300: string;
130
+ 400: string;
131
+ 500: string;
132
+ 600: string;
133
+ 700: string;
134
+ 800: string;
135
+ 900: string;
136
+ };
137
+ green: {
138
+ 50: string;
139
+ 100: string;
140
+ 200: string;
141
+ 300: string;
142
+ 400: string;
143
+ 500: string;
144
+ 600: string;
145
+ 700: string;
146
+ 800: string;
147
+ 900: string;
148
+ };
149
+ emerald: {
150
+ 50: string;
151
+ 100: string;
152
+ 200: string;
153
+ 300: string;
154
+ 400: string;
155
+ 500: string;
156
+ 600: string;
157
+ 700: string;
158
+ 800: string;
159
+ 900: string;
160
+ };
161
+ teal: {
162
+ 50: string;
163
+ 100: string;
164
+ 200: string;
165
+ 300: string;
166
+ 400: string;
167
+ 500: string;
168
+ 600: string;
169
+ 700: string;
170
+ 800: string;
171
+ 900: string;
172
+ };
173
+ cyan: {
174
+ 50: string;
175
+ 100: string;
176
+ 200: string;
177
+ 300: string;
178
+ 400: string;
179
+ 500: string;
180
+ 600: string;
181
+ 700: string;
182
+ 800: string;
183
+ 900: string;
184
+ };
185
+ sky: {
186
+ 50: string;
187
+ 100: string;
188
+ 200: string;
189
+ 300: string;
190
+ 400: string;
191
+ 500: string;
192
+ 600: string;
193
+ 700: string;
194
+ 800: string;
195
+ 900: string;
196
+ };
197
+ blue: {
198
+ 50: string;
199
+ 100: string;
200
+ 200: string;
201
+ 300: string;
202
+ 400: string;
203
+ 500: string;
204
+ 600: string;
205
+ 700: string;
206
+ 800: string;
207
+ 900: string;
208
+ };
209
+ indigo: {
210
+ 50: string;
211
+ 100: string;
212
+ 200: string;
213
+ 300: string;
214
+ 400: string;
215
+ 500: string;
216
+ 600: string;
217
+ 700: string;
218
+ 800: string;
219
+ 900: string;
220
+ };
221
+ violet: {
222
+ 50: string;
223
+ 100: string;
224
+ 200: string;
225
+ 300: string;
226
+ 400: string;
227
+ 500: string;
228
+ 600: string;
229
+ 700: string;
230
+ 800: string;
231
+ 900: string;
232
+ };
233
+ purple: {
234
+ 50: string;
235
+ 100: string;
236
+ 200: string;
237
+ 300: string;
238
+ 400: string;
239
+ 500: string;
240
+ 600: string;
241
+ 700: string;
242
+ 800: string;
243
+ 900: string;
244
+ };
245
+ fuchsia: {
246
+ 50: string;
247
+ 100: string;
248
+ 200: string;
249
+ 300: string;
250
+ 400: string;
251
+ 500: string;
252
+ 600: string;
253
+ 700: string;
254
+ 800: string;
255
+ 900: string;
256
+ };
257
+ pink: {
258
+ 50: string;
259
+ 100: string;
260
+ 200: string;
261
+ 300: string;
262
+ 400: string;
263
+ 500: string;
264
+ 600: string;
265
+ 700: string;
266
+ 800: string;
267
+ 900: string;
268
+ };
269
+ rose: {
270
+ 50: string;
271
+ 100: string;
272
+ 200: string;
273
+ 300: string;
274
+ 400: string;
275
+ 500: string;
276
+ 600: string;
277
+ 700: string;
278
+ 800: string;
279
+ 900: string;
280
+ };
281
+ };
282
+ export declare function parseColor(value: any): {
283
+ mode: string;
284
+ color: any[];
285
+ alpha: any;
286
+ };
287
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/node/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwRzB,CAAA;AAcD,wBAAgB,UAAU,CAAC,KAAK,KAAA;;;;EA6C/B"}
@@ -0,0 +1,324 @@
1
+ export const defaultColors = {
2
+ slate: {
3
+ 50: '#f8fafc',
4
+ 100: '#f1f5f9',
5
+ 200: '#e2e8f0',
6
+ 300: '#cbd5e1',
7
+ 400: '#94a3b8',
8
+ 500: '#64748b',
9
+ 600: '#475569',
10
+ 700: '#334155',
11
+ 750: '#283548',
12
+ 800: '#1e293b',
13
+ 850: '#151f32',
14
+ 900: '#0f172a',
15
+ 950: '#09101f',
16
+ },
17
+ gray: {
18
+ 50: '#f9fafb',
19
+ 100: '#f3f4f6',
20
+ 200: '#e5e7eb',
21
+ 300: '#d1d5db',
22
+ 400: '#9ca3af',
23
+ 500: '#6b7280',
24
+ 600: '#4b5563',
25
+ 700: '#374151',
26
+ 750: '#2b3546',
27
+ 800: '#1f2937',
28
+ 850: '#18212f',
29
+ 900: '#111827',
30
+ 950: '#0c101d',
31
+ },
32
+ zinc: {
33
+ 50: '#fafafa',
34
+ 100: '#f4f4f5',
35
+ 200: '#e4e4e7',
36
+ 300: '#d4d4d8',
37
+ 400: '#a1a1aa',
38
+ 500: '#71717a',
39
+ 600: '#52525b',
40
+ 700: '#3f3f46',
41
+ 750: '#323238',
42
+ 800: '#27272a',
43
+ 850: '#1f1f21',
44
+ 900: '#18181b',
45
+ 950: '#101012',
46
+ },
47
+ neutral: {
48
+ 50: '#fafafa',
49
+ 100: '#f5f5f5',
50
+ 200: '#e5e5e5',
51
+ 300: '#d4d4d4',
52
+ 400: '#a3a3a3',
53
+ 500: '#737373',
54
+ 600: '#525252',
55
+ 700: '#404040',
56
+ 750: '#333333',
57
+ 800: '#262626',
58
+ 850: '#1f1f1f',
59
+ 900: '#171717',
60
+ 950: '#0f0f0f',
61
+ },
62
+ stone: {
63
+ 50: '#fafaf9',
64
+ 100: '#f5f5f4',
65
+ 200: '#e7e5e4',
66
+ 300: '#d6d3d1',
67
+ 400: '#a8a29e',
68
+ 500: '#78716c',
69
+ 600: '#57534e',
70
+ 700: '#44403c',
71
+ 750: '#363230',
72
+ 800: '#292524',
73
+ 850: '#211e1c',
74
+ 900: '#1c1917',
75
+ 950: '#171412',
76
+ },
77
+ red: {
78
+ 50: '#fef2f2',
79
+ 100: '#fee2e2',
80
+ 200: '#fecaca',
81
+ 300: '#fca5a5',
82
+ 400: '#f87171',
83
+ 500: '#ef4444',
84
+ 600: '#dc2626',
85
+ 700: '#b91c1c',
86
+ 800: '#991b1b',
87
+ 900: '#7f1d1d',
88
+ },
89
+ orange: {
90
+ 50: '#fff7ed',
91
+ 100: '#ffedd5',
92
+ 200: '#fed7aa',
93
+ 300: '#fdba74',
94
+ 400: '#fb923c',
95
+ 500: '#f97316',
96
+ 600: '#ea580c',
97
+ 700: '#c2410c',
98
+ 800: '#9a3412',
99
+ 900: '#7c2d12',
100
+ },
101
+ amber: {
102
+ 50: '#fffbeb',
103
+ 100: '#fef3c7',
104
+ 200: '#fde68a',
105
+ 300: '#fcd34d',
106
+ 400: '#fbbf24',
107
+ 500: '#f59e0b',
108
+ 600: '#d97706',
109
+ 700: '#b45309',
110
+ 800: '#92400e',
111
+ 900: '#78350f',
112
+ },
113
+ yellow: {
114
+ 50: '#fefce8',
115
+ 100: '#fef9c3',
116
+ 200: '#fef08a',
117
+ 300: '#fde047',
118
+ 400: '#facc15',
119
+ 500: '#eab308',
120
+ 600: '#ca8a04',
121
+ 700: '#a16207',
122
+ 800: '#854d0e',
123
+ 900: '#713f12',
124
+ },
125
+ lime: {
126
+ 50: '#f7fee7',
127
+ 100: '#ecfccb',
128
+ 200: '#d9f99d',
129
+ 300: '#bef264',
130
+ 400: '#a3e635',
131
+ 500: '#84cc16',
132
+ 600: '#65a30d',
133
+ 700: '#4d7c0f',
134
+ 800: '#3f6212',
135
+ 900: '#365314',
136
+ },
137
+ green: {
138
+ 50: '#f0fdf4',
139
+ 100: '#dcfce7',
140
+ 200: '#bbf7d0',
141
+ 300: '#86efac',
142
+ 400: '#4ade80',
143
+ 500: '#22c55e',
144
+ 600: '#16a34a',
145
+ 700: '#15803d',
146
+ 800: '#166534',
147
+ 900: '#14532d',
148
+ },
149
+ emerald: {
150
+ 50: '#ecfdf5',
151
+ 100: '#d1fae5',
152
+ 200: '#a7f3d0',
153
+ 300: '#6ee7b7',
154
+ 400: '#34d399',
155
+ 500: '#10b981',
156
+ 600: '#059669',
157
+ 700: '#047857',
158
+ 800: '#065f46',
159
+ 900: '#064e3b',
160
+ },
161
+ teal: {
162
+ 50: '#f0fdfa',
163
+ 100: '#ccfbf1',
164
+ 200: '#99f6e4',
165
+ 300: '#5eead4',
166
+ 400: '#2dd4bf',
167
+ 500: '#14b8a6',
168
+ 600: '#0d9488',
169
+ 700: '#0f766e',
170
+ 800: '#115e59',
171
+ 900: '#134e4a',
172
+ },
173
+ cyan: {
174
+ 50: '#ecfeff',
175
+ 100: '#cffafe',
176
+ 200: '#a5f3fc',
177
+ 300: '#67e8f9',
178
+ 400: '#22d3ee',
179
+ 500: '#06b6d4',
180
+ 600: '#0891b2',
181
+ 700: '#0e7490',
182
+ 800: '#155e75',
183
+ 900: '#164e63',
184
+ },
185
+ sky: {
186
+ 50: '#f0f9ff',
187
+ 100: '#e0f2fe',
188
+ 200: '#bae6fd',
189
+ 300: '#7dd3fc',
190
+ 400: '#38bdf8',
191
+ 500: '#0ea5e9',
192
+ 600: '#0284c7',
193
+ 700: '#0369a1',
194
+ 800: '#075985',
195
+ 900: '#0c4a6e',
196
+ },
197
+ blue: {
198
+ 50: '#eff6ff',
199
+ 100: '#dbeafe',
200
+ 200: '#bfdbfe',
201
+ 300: '#93c5fd',
202
+ 400: '#60a5fa',
203
+ 500: '#3b82f6',
204
+ 600: '#2563eb',
205
+ 700: '#1d4ed8',
206
+ 800: '#1e40af',
207
+ 900: '#1e3a8a',
208
+ },
209
+ indigo: {
210
+ 50: '#eef2ff',
211
+ 100: '#e0e7ff',
212
+ 200: '#c7d2fe',
213
+ 300: '#a5b4fc',
214
+ 400: '#818cf8',
215
+ 500: '#6366f1',
216
+ 600: '#4f46e5',
217
+ 700: '#4338ca',
218
+ 800: '#3730a3',
219
+ 900: '#312e81',
220
+ },
221
+ violet: {
222
+ 50: '#f5f3ff',
223
+ 100: '#ede9fe',
224
+ 200: '#ddd6fe',
225
+ 300: '#c4b5fd',
226
+ 400: '#a78bfa',
227
+ 500: '#8b5cf6',
228
+ 600: '#7c3aed',
229
+ 700: '#6d28d9',
230
+ 800: '#5b21b6',
231
+ 900: '#4c1d95',
232
+ },
233
+ purple: {
234
+ 50: '#faf5ff',
235
+ 100: '#f3e8ff',
236
+ 200: '#e9d5ff',
237
+ 300: '#d8b4fe',
238
+ 400: '#c084fc',
239
+ 500: '#a855f7',
240
+ 600: '#9333ea',
241
+ 700: '#7e22ce',
242
+ 800: '#6b21a8',
243
+ 900: '#581c87',
244
+ },
245
+ fuchsia: {
246
+ 50: '#fdf4ff',
247
+ 100: '#fae8ff',
248
+ 200: '#f5d0fe',
249
+ 300: '#f0abfc',
250
+ 400: '#e879f9',
251
+ 500: '#d946ef',
252
+ 600: '#c026d3',
253
+ 700: '#a21caf',
254
+ 800: '#86198f',
255
+ 900: '#701a75',
256
+ },
257
+ pink: {
258
+ 50: '#fdf2f8',
259
+ 100: '#fce7f3',
260
+ 200: '#fbcfe8',
261
+ 300: '#f9a8d4',
262
+ 400: '#f472b6',
263
+ 500: '#ec4899',
264
+ 600: '#db2777',
265
+ 700: '#be185d',
266
+ 800: '#9d174d',
267
+ 900: '#831843',
268
+ },
269
+ rose: {
270
+ 50: '#fff1f2',
271
+ 100: '#ffe4e6',
272
+ 200: '#fecdd3',
273
+ 300: '#fda4af',
274
+ 400: '#fb7185',
275
+ 500: '#f43f5e',
276
+ 600: '#e11d48',
277
+ 700: '#be123c',
278
+ 800: '#9f1239',
279
+ 900: '#881337',
280
+ },
281
+ };
282
+ const HEX = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
283
+ const SHORT_HEX = /^#([a-f\d]){3,4}$/i;
284
+ const VALUE = `(?:\\d+|\\d*\\.\\d+)%?`;
285
+ const SEP = `(?:\\s*,\\s*|\\s+)`;
286
+ const ALPHA_SEP = `\\s*[,/]\\s*`;
287
+ const RGB = new RegExp(`^rgba?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
288
+ const HSL = new RegExp(`^hsla?\\(\\s*(${VALUE}(?:deg|rad|grad|turn)?)${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
289
+ export function parseColor(value) {
290
+ if (typeof value !== 'string') {
291
+ return null;
292
+ }
293
+ value = value.trim();
294
+ if (value === 'transparent') {
295
+ return { mode: 'rgb', color: ['0', '0', '0'], alpha: '0' };
296
+ }
297
+ const hex = value
298
+ .replace(SHORT_HEX, (_, r, g, b, a) => ['#', r, r, g, g, b, b, a ? a + a : ''].join(''))
299
+ .match(HEX);
300
+ if (hex !== null) {
301
+ return {
302
+ mode: 'rgb',
303
+ color: [Number.parseInt(hex[1], 16), Number.parseInt(hex[2], 16), Number.parseInt(hex[3], 16)].map(v => v.toString()),
304
+ alpha: hex[4] ? (Number.parseInt(hex[4], 16) / 255).toString() : undefined,
305
+ };
306
+ }
307
+ const rgbMatch = value.match(RGB);
308
+ if (rgbMatch !== null) {
309
+ return {
310
+ mode: 'rgb',
311
+ color: [rgbMatch[1], rgbMatch[2], rgbMatch[3]].map(v => v.toString()),
312
+ alpha: rgbMatch[4]?.toString?.(),
313
+ };
314
+ }
315
+ const hslMatch = value.match(HSL);
316
+ if (hslMatch !== null) {
317
+ return {
318
+ mode: 'hsl',
319
+ color: [hslMatch[1], hslMatch[2], hslMatch[3]].map(v => v.toString()),
320
+ alpha: hslMatch[4]?.toString?.(),
321
+ };
322
+ }
323
+ return null;
324
+ }
@@ -0,0 +1,5 @@
1
+ export interface BuildOptions {
2
+ config?: string;
3
+ }
4
+ export declare function buildCommand(options: BuildOptions): Promise<void>;
5
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/node/commands/build.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,iBAMvD"}
@@ -0,0 +1,9 @@
1
+ import { build } from '../build.js';
2
+ import { createContext } from '../context.js';
3
+ export async function buildCommand(options) {
4
+ const ctx = await createContext({
5
+ configFile: options.config,
6
+ mode: 'build',
7
+ });
8
+ await build(ctx);
9
+ }
@@ -0,0 +1,8 @@
1
+ export interface DevOptions {
2
+ port: number;
3
+ open?: boolean;
4
+ host?: string | boolean;
5
+ config?: string;
6
+ }
7
+ export declare function devCommand(options: DevOptions): Promise<void>;
8
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/node/commands/dev.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,UAAU,iBAoDnD"}
@@ -0,0 +1,52 @@
1
+ import chokidar from 'chokidar';
2
+ import pc from 'picocolors';
3
+ import { resolveConfigFile } from '../config.js';
4
+ import { createContext } from '../context.js';
5
+ import { createServer } from '../server.js';
6
+ export async function devCommand(options) {
7
+ let stop;
8
+ async function start() {
9
+ const ctx = await createContext({
10
+ configFile: options.config,
11
+ mode: 'dev',
12
+ });
13
+ const { server, viteConfigFile, close } = await createServer(ctx, {
14
+ port: options.port,
15
+ open: options.open,
16
+ host: options.host,
17
+ });
18
+ server.printUrls();
19
+ // Poveste config watcher
20
+ let watcher;
21
+ if (viteConfigFile) {
22
+ watcher = chokidar.watch(viteConfigFile, {
23
+ ignoreInitial: true,
24
+ });
25
+ watcher.on('change', () => {
26
+ restart('Vite');
27
+ });
28
+ }
29
+ return async () => {
30
+ await watcher?.close();
31
+ await close();
32
+ };
33
+ }
34
+ async function restart(source) {
35
+ if (stop) {
36
+ console.log(pc.blue(`${source} config changed, restarting...`));
37
+ await stop();
38
+ stop = null; // Don't call stop again until new start() is done
39
+ stop = await start();
40
+ }
41
+ }
42
+ stop = await start();
43
+ const configFile = await resolveConfigFile(undefined, options.config);
44
+ if (configFile) {
45
+ const watcher = chokidar.watch(configFile, {
46
+ ignoreInitial: true,
47
+ });
48
+ watcher.on('change', () => {
49
+ restart('Poveste');
50
+ });
51
+ }
52
+ }
@@ -0,0 +1,5 @@
1
+ export interface PreviewOptions {
2
+ port?: number;
3
+ }
4
+ export declare function previewCommand(options: PreviewOptions): Promise<void>;
5
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/node/commands/preview.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,iBAa3D"}