create-foldkit-app 0.32.1 → 0.33.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.
- package/dist/templates/base/.oxfmtrc.json +28 -0
- package/dist/templates/base/.oxlintrc.json +4 -0
- package/dist/templates/base/FOLDKIT.md +1 -1
- package/dist/templates/base/package.json +1 -1
- package/dist/templates/examples/api-cache/package.json +0 -2
- package/dist/templates/examples/api-cache/src/scene.test.ts +1 -2
- package/dist/templates/examples/api-cache/src/story.test.ts +3 -4
- package/dist/templates/examples/auth/package.json +0 -2
- package/dist/templates/examples/canvas-art/package.json +0 -2
- package/dist/templates/examples/charting/package.json +0 -2
- package/dist/templates/examples/charting/src/scene.test.ts +1 -2
- package/dist/templates/examples/charting/src/story.test.ts +3 -4
- package/dist/templates/examples/counter/package.json +0 -2
- package/dist/templates/examples/counters/package.json +0 -2
- package/dist/templates/examples/crash-view/package.json +0 -2
- package/dist/templates/examples/embedding/package.json +0 -2
- package/dist/templates/examples/form/package.json +0 -2
- package/dist/templates/examples/generative-art/package.json +0 -2
- package/dist/templates/examples/interrupting-commands/package.json +0 -2
- package/dist/templates/examples/job-application/package.json +0 -2
- package/dist/templates/examples/job-application/src/main.fixture.ts +69 -0
- package/dist/templates/examples/job-application/src/main.ts +1 -1
- package/dist/templates/examples/job-application/src/scene.test.ts +6 -66
- package/dist/templates/examples/job-application/src/step/attachments/index.ts +2 -0
- package/dist/templates/examples/job-application/src/step/attachments/scene.test.ts +19 -0
- package/dist/templates/examples/job-application/src/step/attachments/story.test.ts +46 -0
- package/dist/templates/examples/job-application/src/{view/attachments.ts → step/attachments/view.ts} +4 -11
- package/dist/templates/examples/job-application/src/{view → step/coverLetter}/coverLetter.ts +36 -7
- package/dist/templates/examples/job-application/src/step/coverLetter/index.ts +1 -0
- package/dist/templates/examples/job-application/src/step/coverLetter/scene.test.ts +24 -0
- package/dist/templates/examples/job-application/src/step/coverLetter/story.test.ts +19 -0
- package/dist/templates/examples/job-application/src/step/education/{entry.ts → entry/entry.ts} +2 -2
- package/dist/templates/examples/job-application/src/step/education/entry/index.ts +11 -0
- package/dist/templates/examples/job-application/src/step/education/entry/story.test.ts +39 -0
- package/dist/templates/examples/job-application/src/step/education/entry/view.ts +160 -0
- package/dist/templates/examples/job-application/src/step/education/index.ts +11 -1
- package/dist/templates/examples/job-application/src/step/education/scene.test.ts +20 -0
- package/dist/templates/examples/job-application/src/step/education/story.test.ts +87 -0
- package/dist/templates/examples/job-application/src/{view/education.ts → step/education/view.ts} +6 -10
- package/dist/templates/examples/job-application/src/step/personalInfo/index.ts +11 -0
- package/dist/templates/examples/job-application/src/step/{personalInfo.ts → personalInfo/personalInfo.ts} +2 -2
- package/dist/templates/examples/job-application/src/step/personalInfo/scene.test.ts +38 -0
- package/dist/templates/examples/job-application/src/step/personalInfo/story.test.ts +87 -0
- package/dist/templates/examples/job-application/src/{view/personalInfo.ts → step/personalInfo/view.ts} +24 -34
- package/dist/templates/examples/job-application/src/step/skills/{entry.ts → entry/entry.ts} +2 -2
- package/dist/templates/examples/job-application/src/step/skills/entry/index.ts +11 -0
- package/dist/templates/examples/job-application/src/step/skills/entry/story.test.ts +27 -0
- package/dist/templates/examples/job-application/src/{view/skillEntry.ts → step/skills/entry/view.ts} +9 -12
- package/dist/templates/examples/job-application/src/step/skills/index.ts +11 -1
- package/dist/templates/examples/job-application/src/step/skills/scene.test.ts +16 -0
- package/dist/templates/examples/job-application/src/step/skills/story.test.ts +85 -0
- package/dist/templates/examples/job-application/src/step/skills/view.ts +47 -0
- package/dist/templates/examples/job-application/src/step/workHistory/{entry.ts → entry/entry.ts} +1 -1
- package/dist/templates/examples/job-application/src/step/workHistory/entry/index.ts +11 -0
- package/dist/templates/examples/job-application/src/step/workHistory/entry/story.test.ts +42 -0
- package/dist/templates/examples/job-application/src/{view/workEntry.ts → step/workHistory/entry/view.ts} +27 -42
- package/dist/templates/examples/job-application/src/step/workHistory/index.ts +11 -1
- package/dist/templates/examples/job-application/src/step/workHistory/scene.test.ts +20 -0
- package/dist/templates/examples/job-application/src/step/workHistory/story.test.ts +87 -0
- package/dist/templates/examples/job-application/src/{view/workHistory.ts → step/workHistory/view.ts} +4 -8
- package/dist/templates/examples/job-application/src/story.test.ts +28 -419
- package/dist/templates/examples/job-application/src/view/datePicker.ts +4 -4
- package/dist/templates/examples/job-application/src/view/field.ts +3 -3
- package/dist/templates/examples/job-application/src/view/index.ts +3 -358
- package/dist/templates/examples/job-application/src/view/stepNav.ts +2 -2
- package/dist/templates/examples/job-application/src/view/view.ts +359 -0
- package/dist/templates/examples/kanban/package.json +0 -2
- package/dist/templates/examples/kanban/src/scene.test.ts +1 -1
- package/dist/templates/examples/kanban/src/story.test.ts +22 -23
- package/dist/templates/examples/kanban/src/view/index.ts +1 -71
- package/dist/templates/examples/kanban/src/view/view.ts +71 -0
- package/dist/templates/examples/managed-resource-layer/package.json +0 -2
- package/dist/templates/examples/map/package.json +0 -2
- package/dist/templates/examples/pixel-art/package.json +0 -2
- package/dist/templates/examples/pixel-art/src/scene.test.ts +16 -9
- package/dist/templates/examples/pixel-art/src/story.test.ts +12 -7
- package/dist/templates/examples/query-sync/package.json +0 -2
- package/dist/templates/examples/query-sync/src/story.test.ts +4 -5
- package/dist/templates/examples/route-transitions/package.json +0 -2
- package/dist/templates/examples/routing/package.json +0 -2
- package/dist/templates/examples/routing/src/page/people.scene.test.ts +41 -0
- package/dist/templates/examples/routing/src/page/people.story.test.ts +73 -0
- package/dist/templates/examples/routing/src/scene.test.ts +2 -17
- package/dist/templates/examples/routing/src/story.test.ts +4 -34
- package/dist/templates/examples/shopping-cart/package.json +0 -2
- package/dist/templates/examples/shopping-cart/src/page/products.scene.test.ts +20 -0
- package/dist/templates/examples/shopping-cart/src/page/products.story.test.ts +56 -0
- package/dist/templates/examples/shopping-cart/src/page/products.ts +1 -1
- package/dist/templates/examples/shopping-cart/src/scene.test.ts +1 -4
- package/dist/templates/examples/shopping-cart/src/story.test.ts +3 -4
- package/dist/templates/examples/slow-warnings/package.json +0 -2
- package/dist/templates/examples/snake/package.json +0 -2
- package/dist/templates/examples/ssg/package.json +0 -2
- package/dist/templates/examples/ssr/package.json +0 -2
- package/dist/templates/examples/state-machine/package.json +0 -2
- package/dist/templates/examples/state-machine/src/main.ts +79 -87
- package/dist/templates/examples/state-machine/src/scene.test.ts +1 -2
- package/dist/templates/examples/stopwatch/package.json +0 -2
- package/dist/templates/examples/todo/package.json +0 -2
- package/dist/templates/examples/ui-showcase/package.json +0 -2
- package/dist/templates/examples/ui-showcase/src/story.test.ts +1 -2
- package/dist/templates/examples/view-transitions/package.json +0 -2
- package/dist/templates/examples/view-transitions/src/styles.css +3 -3
- package/dist/templates/examples/weather/package.json +0 -2
- package/dist/templates/examples/web-components/package.json +0 -2
- package/dist/templates/examples/websocket-chat/package.json +0 -2
- package/dist/templates/release.json +9 -10
- package/dist/templates/rendering/ssg/package.json +1 -1
- package/dist/templates/rendering/ssr/package.json +1 -1
- package/dist/utils/packages.js +1 -2
- package/package.json +3 -3
- package/dist/templates/base/.prettierignore +0 -5
- package/dist/templates/base/.prettierrc +0 -13
- package/dist/templates/examples/job-application/src/step/coverLetter.ts +0 -34
- package/dist/templates/examples/job-application/src/view/educationEntry.ts +0 -165
- package/dist/templates/examples/job-application/src/view/skills.ts +0 -49
- /package/dist/templates/examples/job-application/src/step/{attachments.ts → attachments/attachments.ts} +0 -0
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
"@foldkit/devtools": "workspace:*",
|
|
18
18
|
"@foldkit/vite-plugin": "workspace:*",
|
|
19
19
|
"@tailwindcss/vite": "^4.3.3",
|
|
20
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
21
20
|
"happy-dom": "^20.11.13",
|
|
22
|
-
"prettier": "^3.9.6",
|
|
23
21
|
"tailwindcss": "^4.3.3",
|
|
24
22
|
"typescript": "^7.0.2",
|
|
25
23
|
"vite": "^8.2.2",
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
"@foldkit/devtools": "workspace:*",
|
|
18
18
|
"@foldkit/vite-plugin": "workspace:*",
|
|
19
19
|
"@tailwindcss/vite": "^4.3.3",
|
|
20
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
21
20
|
"happy-dom": "^20.11.13",
|
|
22
|
-
"prettier": "^3.9.6",
|
|
23
21
|
"tailwindcss": "^4.3.3",
|
|
24
22
|
"typescript": "^7.0.2",
|
|
25
23
|
"vite": "^8.2.2",
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
"@foldkit/devtools": "workspace:*",
|
|
19
19
|
"@foldkit/vite-plugin": "workspace:*",
|
|
20
20
|
"@tailwindcss/vite": "^4.3.3",
|
|
21
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"prettier": "^3.9.6",
|
|
23
21
|
"tailwindcss": "^4.3.3",
|
|
24
22
|
"typescript": "^7.0.2",
|
|
25
23
|
"vite": "^8.2.2"
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"@foldkit/devtools": "workspace:*",
|
|
22
22
|
"@foldkit/vite-plugin": "workspace:*",
|
|
23
23
|
"@tailwindcss/vite": "^4.3.3",
|
|
24
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
25
24
|
"happy-dom": "^20.11.13",
|
|
26
|
-
"prettier": "^3.9.6",
|
|
27
25
|
"tailwindcss": "^4.3.3",
|
|
28
26
|
"typescript": "^7.0.2",
|
|
29
27
|
"vite": "^8.2.2",
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
"@foldkit/devtools": "workspace:*",
|
|
20
20
|
"@foldkit/vite-plugin": "workspace:*",
|
|
21
21
|
"@tailwindcss/vite": "^4.3.3",
|
|
22
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
22
|
"happy-dom": "^20.11.13",
|
|
24
|
-
"prettier": "^3.9.6",
|
|
25
23
|
"tailwindcss": "^4.3.3",
|
|
26
24
|
"typescript": "^7.0.2",
|
|
27
25
|
"vite": "^8.2.2",
|
|
@@ -161,173 +161,165 @@ export const checkoutMachine = Machine.define({
|
|
|
161
161
|
message: Message,
|
|
162
162
|
})({
|
|
163
163
|
initial: CheckoutState.Cart({ isShippingRequired: true }),
|
|
164
|
+
shared: [
|
|
165
|
+
Machine.forStates(['Cart', 'Shipping', 'Payment', 'Review']).on({
|
|
166
|
+
ClickedCancel: to('Cancelled', ({ state }) => ({
|
|
167
|
+
model: CheckoutState.Cancelled({
|
|
168
|
+
isShippingRequired: state.isShippingRequired,
|
|
169
|
+
}),
|
|
170
|
+
})),
|
|
171
|
+
}),
|
|
172
|
+
Machine.forStates(['Confirmed', 'Cancelled']).on({
|
|
173
|
+
ClickedStartOver: to('Cart', ({ state }) => ({
|
|
174
|
+
model: CheckoutState.Cart({
|
|
175
|
+
isShippingRequired: state.isShippingRequired,
|
|
176
|
+
}),
|
|
177
|
+
})),
|
|
178
|
+
}),
|
|
179
|
+
],
|
|
164
180
|
states: {
|
|
165
181
|
Cart: {
|
|
166
182
|
on: {
|
|
167
|
-
SelectedEdition: to('Cart', ({ state, message }) =>
|
|
168
|
-
evo(state, {
|
|
169
|
-
|
|
183
|
+
SelectedEdition: to('Cart', ({ state, message }) => ({
|
|
184
|
+
model: evo(state, {
|
|
185
|
+
isShippingRequired: () => message.isShippingRequired,
|
|
186
|
+
}),
|
|
187
|
+
})),
|
|
170
188
|
ClickedContinue: [
|
|
171
189
|
when(
|
|
172
190
|
state => state.isShippingRequired,
|
|
173
191
|
'Shipping',
|
|
174
|
-
({ state }) =>
|
|
175
|
-
CheckoutState.Shipping({
|
|
192
|
+
({ state }) => ({
|
|
193
|
+
model: CheckoutState.Shipping({
|
|
176
194
|
isShippingRequired: state.isShippingRequired,
|
|
177
195
|
}),
|
|
196
|
+
}),
|
|
178
197
|
),
|
|
179
198
|
otherwise(
|
|
180
|
-
to('Payment', ({ state }) =>
|
|
181
|
-
CheckoutState.Payment({
|
|
199
|
+
to('Payment', ({ state }) => ({
|
|
200
|
+
model: CheckoutState.Payment({
|
|
182
201
|
isPaymentMethodSelected: false,
|
|
183
202
|
isShippingRequired: state.isShippingRequired,
|
|
184
203
|
}),
|
|
185
|
-
),
|
|
204
|
+
})),
|
|
186
205
|
),
|
|
187
206
|
],
|
|
188
|
-
ClickedCancel: to('Cancelled', ({ state }) =>
|
|
189
|
-
CheckoutState.Cancelled({
|
|
190
|
-
isShippingRequired: state.isShippingRequired,
|
|
191
|
-
}),
|
|
192
|
-
),
|
|
193
207
|
},
|
|
194
208
|
},
|
|
195
209
|
Shipping: {
|
|
196
210
|
on: {
|
|
197
|
-
ClickedContinue: to('Payment', ({ state }) =>
|
|
198
|
-
CheckoutState.Payment({
|
|
211
|
+
ClickedContinue: to('Payment', ({ state }) => ({
|
|
212
|
+
model: CheckoutState.Payment({
|
|
199
213
|
isPaymentMethodSelected: false,
|
|
200
214
|
isShippingRequired: state.isShippingRequired,
|
|
201
215
|
}),
|
|
202
|
-
),
|
|
203
|
-
ClickedBack: to('Cart', ({ state }) =>
|
|
204
|
-
CheckoutState.Cart({
|
|
205
|
-
),
|
|
206
|
-
ClickedCancel: to('Cancelled', ({ state }) =>
|
|
207
|
-
CheckoutState.Cancelled({
|
|
216
|
+
})),
|
|
217
|
+
ClickedBack: to('Cart', ({ state }) => ({
|
|
218
|
+
model: CheckoutState.Cart({
|
|
208
219
|
isShippingRequired: state.isShippingRequired,
|
|
209
220
|
}),
|
|
210
|
-
),
|
|
221
|
+
})),
|
|
211
222
|
},
|
|
212
223
|
},
|
|
213
224
|
Payment: {
|
|
214
225
|
on: {
|
|
215
|
-
ToggledPaymentMethod: to('Payment', ({ state, message }) =>
|
|
216
|
-
evo(state, {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
226
|
+
ToggledPaymentMethod: to('Payment', ({ state, message }) => ({
|
|
227
|
+
model: evo(state, {
|
|
228
|
+
isPaymentMethodSelected: () => message.isSelected,
|
|
229
|
+
}),
|
|
230
|
+
})),
|
|
231
|
+
ClickedContinue: to('Review', ({ state }) => ({
|
|
232
|
+
model: CheckoutState.Review({
|
|
220
233
|
isPaymentMethodSelected: state.isPaymentMethodSelected,
|
|
221
234
|
isShippingRequired: state.isShippingRequired,
|
|
222
235
|
isTermsAccepted: false,
|
|
223
236
|
promo: Promo.NoPromo(),
|
|
224
237
|
promoCodeInput: '',
|
|
225
238
|
}),
|
|
226
|
-
),
|
|
239
|
+
})),
|
|
227
240
|
ClickedBack: [
|
|
228
241
|
when(
|
|
229
242
|
state => state.isShippingRequired,
|
|
230
243
|
'Shipping',
|
|
231
|
-
({ state }) =>
|
|
232
|
-
CheckoutState.Shipping({
|
|
244
|
+
({ state }) => ({
|
|
245
|
+
model: CheckoutState.Shipping({
|
|
233
246
|
isShippingRequired: state.isShippingRequired,
|
|
234
247
|
}),
|
|
248
|
+
}),
|
|
235
249
|
),
|
|
236
250
|
otherwise(
|
|
237
|
-
to('Cart', ({ state }) =>
|
|
238
|
-
CheckoutState.Cart({
|
|
251
|
+
to('Cart', ({ state }) => ({
|
|
252
|
+
model: CheckoutState.Cart({
|
|
239
253
|
isShippingRequired: state.isShippingRequired,
|
|
240
254
|
}),
|
|
241
|
-
),
|
|
255
|
+
})),
|
|
242
256
|
),
|
|
243
257
|
],
|
|
244
|
-
ClickedCancel: to('Cancelled', ({ state }) =>
|
|
245
|
-
CheckoutState.Cancelled({
|
|
246
|
-
isShippingRequired: state.isShippingRequired,
|
|
247
|
-
}),
|
|
248
|
-
),
|
|
249
258
|
},
|
|
250
259
|
},
|
|
251
260
|
Review: {
|
|
252
261
|
on: {
|
|
253
|
-
ToggledPaymentMethod: to('Review', ({ state, message }) =>
|
|
254
|
-
evo(state, {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
ToggledPaymentMethod: to('Review', ({ state, message }) => ({
|
|
263
|
+
model: evo(state, {
|
|
264
|
+
isPaymentMethodSelected: () => message.isSelected,
|
|
265
|
+
}),
|
|
266
|
+
})),
|
|
267
|
+
ToggledTermsAccepted: to('Review', ({ state, message }) => ({
|
|
268
|
+
model: evo(state, { isTermsAccepted: () => message.isAccepted }),
|
|
269
|
+
})),
|
|
270
|
+
UpdatedPromoCode: to('Review', ({ state, message }) => ({
|
|
271
|
+
model: evo(state, {
|
|
261
272
|
promoCodeInput: () => message.value,
|
|
262
273
|
promo: currentPromo =>
|
|
263
274
|
currentPromo._tag === 'RejectedPromo'
|
|
264
275
|
? Promo.NoPromo()
|
|
265
276
|
: currentPromo,
|
|
266
277
|
}),
|
|
267
|
-
),
|
|
278
|
+
})),
|
|
268
279
|
SubmittedPromoCode: [
|
|
269
280
|
when(
|
|
270
281
|
reviewToMaybeDiscount,
|
|
271
282
|
'Review',
|
|
272
|
-
({ state, guardValue: discount }) =>
|
|
273
|
-
evo(state, {
|
|
283
|
+
({ state, guardValue: discount }) => ({
|
|
284
|
+
model: evo(state, {
|
|
285
|
+
promo: () => Promo.AppliedPromo({ discount }),
|
|
286
|
+
}),
|
|
287
|
+
}),
|
|
274
288
|
),
|
|
275
289
|
otherwise(
|
|
276
|
-
to('Review', ({ state }) =>
|
|
277
|
-
evo(state, { promo: () => Promo.RejectedPromo() }),
|
|
278
|
-
),
|
|
290
|
+
to('Review', ({ state }) => ({
|
|
291
|
+
model: evo(state, { promo: () => Promo.RejectedPromo() }),
|
|
292
|
+
})),
|
|
279
293
|
),
|
|
280
294
|
],
|
|
281
295
|
ClickedPlaceOrder: [
|
|
282
|
-
when(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
maybeDiscount: promoToMaybeDiscount(state.promo),
|
|
289
|
-
}),
|
|
290
|
-
({ state }) => [
|
|
296
|
+
when(isReviewReady, 'Placing', ({ state }) => ({
|
|
297
|
+
model: CheckoutState.Placing({
|
|
298
|
+
isShippingRequired: state.isShippingRequired,
|
|
299
|
+
maybeDiscount: promoToMaybeDiscount(state.promo),
|
|
300
|
+
}),
|
|
301
|
+
commands: [
|
|
291
302
|
PlaceOrder({ isShippingRequired: state.isShippingRequired }),
|
|
292
303
|
],
|
|
293
|
-
),
|
|
304
|
+
})),
|
|
294
305
|
],
|
|
295
|
-
ClickedBack: to('Payment', ({ state }) =>
|
|
296
|
-
CheckoutState.Payment({
|
|
306
|
+
ClickedBack: to('Payment', ({ state }) => ({
|
|
307
|
+
model: CheckoutState.Payment({
|
|
297
308
|
isPaymentMethodSelected: state.isPaymentMethodSelected,
|
|
298
309
|
isShippingRequired: state.isShippingRequired,
|
|
299
310
|
}),
|
|
300
|
-
),
|
|
301
|
-
ClickedCancel: to('Cancelled', ({ state }) =>
|
|
302
|
-
CheckoutState.Cancelled({
|
|
303
|
-
isShippingRequired: state.isShippingRequired,
|
|
304
|
-
}),
|
|
305
|
-
),
|
|
311
|
+
})),
|
|
306
312
|
},
|
|
307
313
|
},
|
|
308
314
|
Placing: {
|
|
309
315
|
on: {
|
|
310
|
-
SucceededPlaceOrder: to('Confirmed', ({ state, message }) =>
|
|
311
|
-
CheckoutState.Confirmed({
|
|
316
|
+
SucceededPlaceOrder: to('Confirmed', ({ state, message }) => ({
|
|
317
|
+
model: CheckoutState.Confirmed({
|
|
312
318
|
isShippingRequired: state.isShippingRequired,
|
|
313
319
|
maybeDiscount: state.maybeDiscount,
|
|
314
320
|
orderId: message.orderId,
|
|
315
321
|
}),
|
|
316
|
-
),
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
Confirmed: {
|
|
320
|
-
on: {
|
|
321
|
-
ClickedStartOver: to('Cart', ({ state }) =>
|
|
322
|
-
CheckoutState.Cart({ isShippingRequired: state.isShippingRequired }),
|
|
323
|
-
),
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
Cancelled: {
|
|
327
|
-
on: {
|
|
328
|
-
ClickedStartOver: to('Cart', ({ state }) =>
|
|
329
|
-
CheckoutState.Cart({ isShippingRequired: state.isShippingRequired }),
|
|
330
|
-
),
|
|
322
|
+
})),
|
|
331
323
|
},
|
|
332
324
|
},
|
|
333
325
|
},
|
|
@@ -12,14 +12,13 @@ import {
|
|
|
12
12
|
import { describe, test } from 'vitest'
|
|
13
13
|
|
|
14
14
|
import { RadioGroup } from '@foldkit/ui'
|
|
15
|
-
import { Message as RadioGroupMessage } from '@foldkit/ui/radioGroup'
|
|
16
15
|
|
|
17
16
|
import { Message, PlaceOrder, initialModel, update } from './main'
|
|
18
17
|
import { view } from './view'
|
|
19
18
|
|
|
20
19
|
const resolveFocusOption = Command.resolve(
|
|
21
20
|
RadioGroup.FocusOption,
|
|
22
|
-
|
|
21
|
+
RadioGroup.Message.CompletedFocusOption(),
|
|
23
22
|
)
|
|
24
23
|
|
|
25
24
|
describe('scene', () => {
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
"@foldkit/devtools": "workspace:*",
|
|
19
19
|
"@foldkit/vite-plugin": "workspace:*",
|
|
20
20
|
"@tailwindcss/vite": "^4.3.3",
|
|
21
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
21
|
"happy-dom": "^20.11.13",
|
|
23
|
-
"prettier": "^3.9.6",
|
|
24
22
|
"tailwindcss": "^4.3.3",
|
|
25
23
|
"typescript": "^7.0.2",
|
|
26
24
|
"vite": "^8.2.2",
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
"@foldkit/devtools": "workspace:*",
|
|
20
20
|
"@foldkit/vite-plugin": "workspace:*",
|
|
21
21
|
"@tailwindcss/vite": "^4.3.3",
|
|
22
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
22
|
"happy-dom": "^20.11.13",
|
|
24
|
-
"prettier": "^3.9.6",
|
|
25
23
|
"tailwindcss": "^4.3.3",
|
|
26
24
|
"typescript": "^7.0.2",
|
|
27
25
|
"vite": "^8.2.2",
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
"@foldkit/devtools": "workspace:*",
|
|
20
20
|
"@foldkit/vite-plugin": "workspace:*",
|
|
21
21
|
"@tailwindcss/vite": "^4.3.3",
|
|
22
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
22
|
"happy-dom": "^20.11.13",
|
|
24
|
-
"prettier": "^3.9.6",
|
|
25
23
|
"tailwindcss": "^4.3.3",
|
|
26
24
|
"typescript": "^7.0.2",
|
|
27
25
|
"vite": "^8.2.2",
|
|
@@ -5,7 +5,6 @@ import { fromString } from 'foldkit/url'
|
|
|
5
5
|
import { describe, expect, test } from 'vitest'
|
|
6
6
|
|
|
7
7
|
import { Dialog } from '@foldkit/ui'
|
|
8
|
-
import { Message as DialogMessage } from '@foldkit/ui/dialog'
|
|
9
8
|
|
|
10
9
|
import { AppRoute, Message, type Model, update } from './main'
|
|
11
10
|
import { uiInit } from './ui/init'
|
|
@@ -117,7 +116,7 @@ describe('update', () => {
|
|
|
117
116
|
),
|
|
118
117
|
Command.resolve(
|
|
119
118
|
Dialog.CloseDialog,
|
|
120
|
-
|
|
119
|
+
Dialog.Message.CompletedCloseDialog(),
|
|
121
120
|
),
|
|
122
121
|
model(model => {
|
|
123
122
|
expect(model.uiModel.mobileMenuDialog.isOpen).toBe(false)
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
"@foldkit/devtools": "workspace:*",
|
|
18
18
|
"@foldkit/vite-plugin": "workspace:*",
|
|
19
19
|
"@tailwindcss/vite": "^4.3.3",
|
|
20
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
21
20
|
"happy-dom": "^20.11.13",
|
|
22
|
-
"prettier": "^3.9.6",
|
|
23
21
|
"tailwindcss": "^4.3.3",
|
|
24
22
|
"typescript": "^7.0.2",
|
|
25
23
|
"vite": "^8.2.2",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
The directions differ in pace, not in curve: arriving at a detail page is
|
|
54
54
|
unhurried, returning to the grid is brisk. Transition types are what let CSS
|
|
55
55
|
tell the two apart, since the DOM change is otherwise symmetric. */
|
|
56
|
-
:root:active-view-transition-type(
|
|
57
|
-
|
|
58
|
-
) {
|
|
56
|
+
:root:active-view-transition-type(
|
|
57
|
+
to-artwork-detail
|
|
58
|
+
)::view-transition-group(.artwork) {
|
|
59
59
|
animation-duration: 480ms;
|
|
60
60
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
61
61
|
}
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
"@foldkit/devtools": "workspace:*",
|
|
19
19
|
"@foldkit/vite-plugin": "workspace:*",
|
|
20
20
|
"@tailwindcss/vite": "^4.3.3",
|
|
21
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
21
|
"happy-dom": "^20.11.13",
|
|
23
|
-
"prettier": "^3.9.6",
|
|
24
22
|
"tailwindcss": "^4.3.3",
|
|
25
23
|
"typescript": "^7.0.2",
|
|
26
24
|
"vite": "^8.2.2",
|
|
@@ -21,9 +21,7 @@
|
|
|
21
21
|
"@foldkit/devtools": "workspace:*",
|
|
22
22
|
"@foldkit/vite-plugin": "workspace:*",
|
|
23
23
|
"@tailwindcss/vite": "^4.3.3",
|
|
24
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
25
24
|
"happy-dom": "^20.11.13",
|
|
26
|
-
"prettier": "^3.9.6",
|
|
27
25
|
"tailwindcss": "^4.3.3",
|
|
28
26
|
"typescript": "^7.0.2",
|
|
29
27
|
"vite": "^8.2.2",
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
"@foldkit/devtools": "workspace:*",
|
|
19
19
|
"@foldkit/vite-plugin": "workspace:*",
|
|
20
20
|
"@tailwindcss/vite": "^4.3.3",
|
|
21
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
21
|
"happy-dom": "^20.11.13",
|
|
23
|
-
"prettier": "^3.9.6",
|
|
24
22
|
"tailwindcss": "^4.3.3",
|
|
25
23
|
"typescript": "^7.0.2",
|
|
26
24
|
"vite": "^8.2.2",
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"channel": "stable",
|
|
4
|
-
"sourceCommit": "
|
|
4
|
+
"sourceCommit": "bfd25c089383e4c210423f16966d58026d7c7141",
|
|
5
5
|
"packages": {
|
|
6
|
-
"create-foldkit-app": "0.
|
|
7
|
-
"@foldkit/devtools": "0.
|
|
8
|
-
"@foldkit/devtools-mcp": "0.19.
|
|
9
|
-
"foldkit": "0.
|
|
6
|
+
"create-foldkit-app": "0.33.0",
|
|
7
|
+
"@foldkit/devtools": "0.158.1",
|
|
8
|
+
"@foldkit/devtools-mcp": "0.19.4",
|
|
9
|
+
"foldkit": "0.158.1",
|
|
10
10
|
"@foldkit/markdown": "0.9.0",
|
|
11
11
|
"@foldkit/oxlint-plugin": "0.12.0",
|
|
12
|
-
"@foldkit/ui": "0.
|
|
12
|
+
"@foldkit/ui": "0.158.1",
|
|
13
13
|
"@foldkit/vite-plugin": "0.20.1"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@foldkit/devtools": "0.
|
|
16
|
+
"@foldkit/devtools": "0.158.1",
|
|
17
17
|
"@foldkit/vite-plugin": "0.20.1",
|
|
18
|
-
"@foldkit/devtools-mcp": "0.19.
|
|
18
|
+
"@foldkit/devtools-mcp": "0.19.4",
|
|
19
19
|
"@foldkit/oxlint-plugin": "0.12.0",
|
|
20
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
21
20
|
"@types/node": "^26.4.0",
|
|
22
21
|
"happy-dom": "^20.11.13",
|
|
22
|
+
"oxfmt": "^0.66.0",
|
|
23
23
|
"oxlint": "^1.80.0",
|
|
24
|
-
"prettier": "^3.9.6",
|
|
25
24
|
"vitest": "^4.1.11"
|
|
26
25
|
}
|
|
27
26
|
}
|
package/dist/utils/packages.js
CHANGED
|
@@ -40,10 +40,9 @@ const TEMPLATE_DEV_DEPENDENCIES = [
|
|
|
40
40
|
'@foldkit/vite-plugin',
|
|
41
41
|
'@foldkit/devtools-mcp',
|
|
42
42
|
'@foldkit/oxlint-plugin',
|
|
43
|
-
'@trivago/prettier-plugin-sort-imports',
|
|
44
43
|
'happy-dom',
|
|
44
|
+
'oxfmt',
|
|
45
45
|
'oxlint',
|
|
46
|
-
'prettier',
|
|
47
46
|
'vitest',
|
|
48
47
|
];
|
|
49
48
|
const SERVER_RENDERING_DEV_DEPENDENCIES = ['@types/node'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-foldkit-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Create Foldkit applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/foldkit/foldkit.git",
|
|
39
39
|
"directory": "packages/create-foldkit-app"
|
|
40
40
|
},
|
|
41
|
-
"homepage": "https://foldkit.dev/get-started
|
|
41
|
+
"homepage": "https://foldkit.dev/get-started",
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"clean": "rimraf dist *.tsbuildinfo",
|
|
50
50
|
"build": "pnpm run clean && tsc -b tsconfig.build.json && node scripts/build-templates.mjs",
|
|
51
|
-
"format": "
|
|
51
|
+
"format": "oxfmt",
|
|
52
52
|
"test": "vitest run",
|
|
53
53
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
54
54
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"semi": false,
|
|
3
|
-
"singleQuote": true,
|
|
4
|
-
"arrowParens": "avoid",
|
|
5
|
-
"trailingComma": "all",
|
|
6
|
-
"printWidth": 80,
|
|
7
|
-
|
|
8
|
-
"importOrder": ["<THIRD_PARTY_MODULES>", "^@", "^[./]"],
|
|
9
|
-
"importOrderSeparation": true,
|
|
10
|
-
"importOrderSortSpecifiers": true,
|
|
11
|
-
|
|
12
|
-
"plugins": ["@trivago/prettier-plugin-sort-imports"]
|
|
13
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect'
|
|
2
|
-
import { type Update } from 'foldkit'
|
|
3
|
-
import { defineMessageUnion } from 'foldkit/message'
|
|
4
|
-
import { evo } from 'foldkit/struct'
|
|
5
|
-
|
|
6
|
-
// MODEL
|
|
7
|
-
|
|
8
|
-
export const Model = Schema.Struct({
|
|
9
|
-
content: Schema.String,
|
|
10
|
-
})
|
|
11
|
-
export type Model = typeof Model.Type
|
|
12
|
-
|
|
13
|
-
// MESSAGE
|
|
14
|
-
|
|
15
|
-
export const Message = defineMessageUnion({
|
|
16
|
-
UpdatedContent: { value: Schema.String },
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export type Message = typeof Message.Type
|
|
20
|
-
|
|
21
|
-
// INIT
|
|
22
|
-
|
|
23
|
-
export const init = (): Model => ({
|
|
24
|
-
content: '',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// UPDATE
|
|
28
|
-
|
|
29
|
-
export const update = (model: Model, message: Message) =>
|
|
30
|
-
Message.match<Update.Return<Model, Message>>(message, {
|
|
31
|
-
UpdatedContent: ({ value }) => ({
|
|
32
|
-
model: evo(model, { content: () => value }),
|
|
33
|
-
}),
|
|
34
|
-
})
|