@flickfyi/flkr 0.0.182 → 0.0.185
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/{api-client-CAg1b8Bh.js → api-client-nn4U_Vfn.js} +1 -1
- package/dist/{app-DpM5nhb9.js → app-COXGJhrt.js} +3 -3
- package/dist/{bundler-DNrDcqyk.js → bundler-CW4YC73e.js} +4 -2
- package/dist/cli.js +11 -11
- package/dist/{delegate-DcVye0KE.js → delegate-aUVluBjB.js} +2 -2
- package/dist/{generate-B1l1z_FZ.js → generate-BeL1QPDi.js} +1 -1
- package/dist/{preview-Dqn_Tq6K.js → preview-DTVM8Csb.js} +2 -2
- package/dist/{publish-BmDqO1xU.js → publish-BJG-s-w5.js} +4 -4
- package/dist/{pull-CO80DMn8.js → pull-B_Yfjpi2.js} +1 -1
- package/dist/{save-8crfOeo1.js → save-UrfgmK2-.js} +2 -2
- package/dist/{sdk-app-BXWrf_pf.js → sdk-app-BAxznAf9.js} +3 -3
- package/dist/{sdk-deploy-CaEonlvx.js → sdk-deploy-D1wgQxse.js} +3 -3
- package/dist/{sdk-generation-CF8ATbrL.js → sdk-generation-CLQ-QrVM.js} +1 -1
- package/dist/{sdk-project-CKV3U3u9.js → sdk-project-BaO0fqhW.js} +1 -1
- package/dist/{use-auth-B6nwU2rp.js → use-auth-CtM4_BAY.js} +1 -1
- package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +4 -4
- package/node_modules/@flickfyi/core/README.md +19 -9
- package/node_modules/@flickfyi/core/dist/chunks/{default-CuxDsQoM.js → default-BTmKidHV.js} +1 -1
- package/node_modules/@flickfyi/core/dist/chunks/{default-BB6YexEH.cjs → default-JhTq5I_y.cjs} +1 -1
- package/node_modules/@flickfyi/core/dist/chunks/{define-CUJRqVKY.cjs → define-BKCRhpuY.cjs} +1 -1
- package/node_modules/@flickfyi/core/dist/chunks/{define-e_VqSs4M.js → define-DZXgUsy7.js} +5 -5
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.js +728 -549
- package/node_modules/@flickfyi/core/dist/kowalski/index.cjs +5 -5
- package/node_modules/@flickfyi/core/dist/kowalski/index.js +4297 -3700
- package/node_modules/@flickfyi/core/dist/kowalski/schemas.cjs +1 -0
- package/node_modules/@flickfyi/core/dist/kowalski/schemas.js +637 -0
- package/node_modules/@flickfyi/core/dist/kowalski-catalog.css +516 -0
- package/node_modules/@flickfyi/core/dist/kowalski.css +10 -0
- package/node_modules/@flickfyi/core/dist/themes/athletic/athletic.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/athletic/athletic.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/compact/compact.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/compact/compact.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/default/default.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/default/default.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/editorial/editorial.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/editorial/editorial.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/handwritten/handwritten.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/handwritten/handwritten.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/index.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/index.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/kids/kids.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/kids/kids.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/rounded/rounded.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/rounded/rounded.js +1 -1
- package/node_modules/@flickfyi/core/dist/themes/technical/technical.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/themes/technical/technical.js +1 -1
- package/node_modules/@flickfyi/core/dist-types/hooks/use-feature-store/index.d.ts +43 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/calculations.d.ts +57 -3
- package/node_modules/@flickfyi/core/dist-types/kowalski/calculator.d.ts +7 -6
- package/node_modules/@flickfyi/core/dist-types/kowalski/catalog.d.cts +524 -809
- package/node_modules/@flickfyi/core/dist-types/kowalski/catalog.d.ts +524 -809
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/bill-split.d.ts +38 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/bookmark.d.ts +48 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/budget.d.ts +39 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/calculator.d.ts +62 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/checklist.d.ts +35 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/color-palette.d.ts +32 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/contact.d.ts +41 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/countdown.d.ts +34 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/event.d.ts +43 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/expense.d.ts +40 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/goal.d.ts +36 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/habit.d.ts +57 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/ledger.d.ts +43 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/note.d.ts +35 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/poll.d.ts +41 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/random-picker.d.ts +69 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/rating.d.ts +33 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/reminder.d.ts +48 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/rotation.d.ts +39 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/scoreboard.d.ts +37 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/shopping-list.d.ts +41 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/task-board.d.ts +39 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/time-zone.d.ts +34 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/timer.d.ts +43 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/trip.d.ts +61 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/components/unit-converter.d.ts +106 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/create-schemas.d.ts +6 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/date-time.d.ts +1 -1
- package/node_modules/@flickfyi/core/dist-types/kowalski/everyday.d.ts +28 -8
- package/node_modules/@flickfyi/core/dist-types/kowalski/feature-schema.d.ts +65 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/format.d.ts +4 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/fortune.d.ts +21 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/frame.d.ts +4 -4
- package/node_modules/@flickfyi/core/dist-types/kowalski/index.d.cts +31 -7
- package/node_modules/@flickfyi/core/dist-types/kowalski/index.d.ts +31 -7
- package/node_modules/@flickfyi/core/dist-types/kowalski/lesson.d.ts +89 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/recipe.d.ts +129 -8
- package/node_modules/@flickfyi/core/dist-types/kowalski/schemas.d.cts +4 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/schemas.d.ts +4 -0
- package/node_modules/@flickfyi/core/dist-types/kowalski/time-since.d.ts +34 -0
- package/node_modules/@flickfyi/core/examples/example-metadata.ts +19 -2
- package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.stories.tsx +25 -6
- package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.tsx +6 -12
- package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.stories.tsx +22 -5
- package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.stories.tsx +26 -5
- package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.tsx +6 -21
- package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.stories.tsx +18 -5
- package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.tsx +6 -19
- package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.stories.tsx +25 -5
- package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.tsx +6 -21
- package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.stories.tsx +19 -6
- package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.tsx +6 -17
- package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.stories.tsx +30 -5
- package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.stories.tsx +22 -5
- package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/event/event.stories.tsx +23 -5
- package/node_modules/@flickfyi/core/examples/kowalski/event/event.tsx +6 -19
- package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.stories.tsx +23 -5
- package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/fortune/fortune.stories.tsx +61 -0
- package/node_modules/@flickfyi/core/examples/kowalski/fortune/fortune.tsx +11 -0
- package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.stories.tsx +18 -5
- package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.tsx +3 -19
- package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.stories.tsx +22 -5
- package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.stories.tsx +25 -5
- package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.tsx +6 -20
- package/node_modules/@flickfyi/core/examples/kowalski/lesson/lesson.stories.tsx +99 -0
- package/node_modules/@flickfyi/core/examples/kowalski/lesson/lesson.tsx +11 -0
- package/node_modules/@flickfyi/core/examples/kowalski/note/note.stories.tsx +21 -5
- package/node_modules/@flickfyi/core/examples/kowalski/note/note.tsx +3 -17
- package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.stories.tsx +26 -5
- package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.tsx +3 -21
- package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.stories.tsx +37 -6
- package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.stories.tsx +18 -5
- package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.tsx +6 -14
- package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.stories.tsx +117 -5
- package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.tsx +6 -115
- package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.stories.tsx +22 -5
- package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.stories.tsx +26 -5
- package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.tsx +6 -22
- package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.stories.tsx +26 -5
- package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.tsx +6 -21
- package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.stories.tsx +28 -6
- package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.tsx +6 -22
- package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.stories.tsx +27 -6
- package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.tsx +6 -22
- package/node_modules/@flickfyi/core/examples/kowalski/time-since/time-since.stories.tsx +33 -0
- package/node_modules/@flickfyi/core/examples/kowalski/time-since/time-since.tsx +12 -0
- package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.stories.tsx +22 -6
- package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.tsx +6 -17
- package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.stories.tsx +18 -5
- package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.tsx +6 -18
- package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.stories.tsx +25 -5
- package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.tsx +3 -21
- package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.stories.tsx +19 -6
- package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.tsx +6 -19
- package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.tsx +2 -13
- package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/counter/counter.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/counter/counter.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/grid/grid.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/grid/grid.tsx +4 -9
- package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/list/list.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/list/list.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/log/log.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/log/log.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.tsx +0 -8
- package/node_modules/@flickfyi/core/examples/parrott/timer/timer.stories.tsx +10 -3
- package/node_modules/@flickfyi/core/examples/parrott/timer/timer.tsx +0 -8
- package/node_modules/@flickfyi/core/package.json +16 -3
- package/node_modules/@flickfyi/core/src/{kowalski/use-configured-feature.ts → hooks/use-configured-feature/index.ts} +1 -1
- package/node_modules/@flickfyi/core/src/{kowalski/use-feature-store.ts → hooks/use-feature-store/index.ts} +37 -12
- package/node_modules/@flickfyi/core/src/kowalski/README.md +13 -0
- package/node_modules/@flickfyi/core/src/kowalski/calculations.ts +36 -8
- package/node_modules/@flickfyi/core/src/kowalski/calculator.ts +15 -7
- package/node_modules/@flickfyi/core/src/kowalski/catalog.ts +110 -704
- package/node_modules/@flickfyi/core/src/kowalski/components/bill-split.tsx +284 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/bookmark.tsx +347 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/budget.tsx +169 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/calculator.tsx +202 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/checklist.tsx +119 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/color-palette.tsx +302 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/contact.tsx +247 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/countdown.tsx +173 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/event.tsx +260 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/expense.tsx +257 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/goal.tsx +182 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/habit.tsx +272 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/ledger.tsx +211 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/note.tsx +188 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/poll.tsx +242 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/random-picker.tsx +308 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/rating.tsx +112 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/reminder.tsx +298 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/rotation.tsx +146 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/scoreboard.tsx +139 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/shopping-list.tsx +144 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/task-board.tsx +146 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/time-zone.tsx +240 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/timer.tsx +225 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/trip.tsx +338 -0
- package/node_modules/@flickfyi/core/src/kowalski/components/unit-converter.tsx +285 -0
- package/node_modules/@flickfyi/core/src/kowalski/create-schemas.ts +8 -0
- package/node_modules/@flickfyi/core/src/kowalski/date-time.tsx +1 -1
- package/node_modules/@flickfyi/core/src/kowalski/everyday.tsx +1 -640
- package/node_modules/@flickfyi/core/src/kowalski/feature-schema.ts +84 -0
- package/node_modules/@flickfyi/core/src/kowalski/format.ts +29 -3
- package/node_modules/@flickfyi/core/src/kowalski/fortune.tsx +67 -0
- package/node_modules/@flickfyi/core/src/kowalski/frame.tsx +5 -6
- package/node_modules/@flickfyi/core/src/kowalski/index.ts +31 -22
- package/node_modules/@flickfyi/core/src/kowalski/lesson.tsx +564 -0
- package/node_modules/@flickfyi/core/src/kowalski/recipe.tsx +78 -37
- package/node_modules/@flickfyi/core/src/kowalski/schemas.ts +67 -0
- package/node_modules/@flickfyi/core/src/kowalski/stories/composition.tsx +22 -20
- package/node_modules/@flickfyi/core/src/kowalski/time-since.tsx +145 -0
- package/node_modules/@flickfyi/core/src/molecules/progress/progress.tsx +4 -1
- package/node_modules/@flickfyi/core/src/oklch.ts +1 -6
- package/node_modules/@flickfyi/core/src/parrott/theme.ts +3 -1
- package/node_modules/@flickfyi/core/src/themes/editorial/editorial.ts +6 -1
- package/node_modules/@flickfyi/core/src/themes/palette.ts +5 -5
- package/node_modules/@flickfyi/core/src/themes/stories/composition.tsx +11 -9
- package/node_modules/@flickfyi/core/src/themes/stories/gallery.tsx +7 -11
- package/node_modules/@flickfyi/core/tsgo.bun.lock +7 -7
- package/node_modules/@flickfyi/core/tsgo.package.json +1 -1
- package/package.json +2 -2
- package/node_modules/@flickfyi/core/dist-types/kowalski/clocks.d.ts +0 -4
- package/node_modules/@flickfyi/core/dist-types/kowalski/details.d.ts +0 -7
- package/node_modules/@flickfyi/core/dist-types/kowalski/productivity.d.ts +0 -5
- package/node_modules/@flickfyi/core/dist-types/kowalski/tools.d.ts +0 -7
- package/node_modules/@flickfyi/core/dist-types/kowalski/use-feature-store.d.ts +0 -15
- package/node_modules/@flickfyi/core/src/kowalski/clocks.tsx +0 -464
- package/node_modules/@flickfyi/core/src/kowalski/details.tsx +0 -1387
- package/node_modules/@flickfyi/core/src/kowalski/productivity.tsx +0 -575
- package/node_modules/@flickfyi/core/src/kowalski/tools.tsx +0 -1213
- /package/node_modules/@flickfyi/core/dist-types/{kowalski/use-clock.d.ts → hooks/use-clock/index.d.ts} +0 -0
- /package/node_modules/@flickfyi/core/dist-types/{kowalski/use-configured-feature.d.ts → hooks/use-configured-feature/index.d.ts} +0 -0
- /package/node_modules/@flickfyi/core/src/{kowalski/use-clock.ts → hooks/use-clock/index.ts} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from 'zod/v4'
|
|
2
|
+
|
|
3
|
+
/** A feature's store name; without one it is Kowalski<ExportName>. */
|
|
4
|
+
export const kowalskiFeatureId = z
|
|
5
|
+
.string()
|
|
6
|
+
.regex(/^[A-Za-z][A-Za-z0-9]*$/)
|
|
7
|
+
.optional()
|
|
8
|
+
export const kowalskiScope = z.enum(['private', 'public']).default('private')
|
|
9
|
+
|
|
10
|
+
export const featureFields = {
|
|
11
|
+
id: kowalskiFeatureId,
|
|
12
|
+
revision: z.number().default(0),
|
|
13
|
+
scope: kowalskiScope,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function store<Shape extends z.ZodRawShape>(shape: Shape) {
|
|
17
|
+
return z.object({
|
|
18
|
+
configuration: z.record(z.string(), z.unknown()).nullable().default(null),
|
|
19
|
+
configurationRevision: z.number().default(0),
|
|
20
|
+
...shape,
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const kowalskiComponentSchema = z.enum([
|
|
25
|
+
'checklist',
|
|
26
|
+
'timer',
|
|
27
|
+
'habit',
|
|
28
|
+
'goal',
|
|
29
|
+
'poll',
|
|
30
|
+
'event',
|
|
31
|
+
'reminder',
|
|
32
|
+
'trip',
|
|
33
|
+
'countdown',
|
|
34
|
+
'timeZone',
|
|
35
|
+
'colorPalette',
|
|
36
|
+
'billSplit',
|
|
37
|
+
'expense',
|
|
38
|
+
'unitConverter',
|
|
39
|
+
'calculator',
|
|
40
|
+
'randomPicker',
|
|
41
|
+
'contact',
|
|
42
|
+
'bookmark',
|
|
43
|
+
'note',
|
|
44
|
+
'budget',
|
|
45
|
+
'scoreboard',
|
|
46
|
+
'taskBoard',
|
|
47
|
+
'recipe',
|
|
48
|
+
'rotation',
|
|
49
|
+
'shoppingList',
|
|
50
|
+
'rating',
|
|
51
|
+
'ledger',
|
|
52
|
+
'timeSince',
|
|
53
|
+
'fortune',
|
|
54
|
+
'lesson',
|
|
55
|
+
])
|
|
56
|
+
export type KowalskiComponent = z.infer<typeof kowalskiComponentSchema>
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Per-item state as top-level `<prefix><id>` fields, which Quantum patches independently.
|
|
60
|
+
* The template-literal record types them by prefix, so they never collide with the named
|
|
61
|
+
* fields; any other key is rejected.
|
|
62
|
+
*/
|
|
63
|
+
export function entries<
|
|
64
|
+
Prefix extends string,
|
|
65
|
+
Value extends z.ZodType,
|
|
66
|
+
Shape extends z.ZodRawShape,
|
|
67
|
+
>(prefix: Prefix, value: Value, shape: Shape) {
|
|
68
|
+
const named = store(shape)
|
|
69
|
+
const keys = new Set(Object.keys(named.shape))
|
|
70
|
+
return z
|
|
71
|
+
.intersection(
|
|
72
|
+
named.loose(),
|
|
73
|
+
z.looseRecord(z.templateLiteral([prefix, z.string()]), value)
|
|
74
|
+
)
|
|
75
|
+
.refine(
|
|
76
|
+
state => Object.keys(state).every(key => keys.has(key) || key.startsWith(prefix)),
|
|
77
|
+
`Item fields must start with ${prefix}.`
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Catalog fields are whole-value replacements, not collaborative text insertions. */
|
|
82
|
+
export function replacement<Schema extends z.ZodType>(schema: Schema) {
|
|
83
|
+
return z.object({ value: schema }).default(() => ({ value: schema.parse(undefined) }))
|
|
84
|
+
}
|
|
@@ -28,10 +28,11 @@ export const format = createIntl(
|
|
|
28
28
|
|
|
29
29
|
/** Validate the UI's English decimal/currency grammar before removing its fixed affixes. */
|
|
30
30
|
export function parseNumberInput(text: string, currency?: string) {
|
|
31
|
-
const
|
|
31
|
+
const code = currency === undefined ? undefined : resolveCurrency(currency)
|
|
32
|
+
const symbol = code
|
|
32
33
|
? (format
|
|
33
|
-
.formatNumberToParts(0, { currency, style: 'currency' })
|
|
34
|
-
.find(part => part.type === 'currency')?.value ??
|
|
34
|
+
.formatNumberToParts(0, { currency: code, style: 'currency' })
|
|
35
|
+
.find(part => part.type === 'currency')?.value ?? code)
|
|
35
36
|
: ''
|
|
36
37
|
const normalized = text.replaceAll('\u200E', '').trim().replaceAll('\u00A0', ' ')
|
|
37
38
|
const amount = normalized.replace(symbol, '')
|
|
@@ -46,3 +47,28 @@ export function parseNumberInput(text: string, currency?: string) {
|
|
|
46
47
|
}
|
|
47
48
|
return Number(amount.replaceAll(',', '').trim())
|
|
48
49
|
}
|
|
50
|
+
|
|
51
|
+
/** Content arrives unvalidated, so an unknown currency code falls back instead of throwing. */
|
|
52
|
+
export function resolveCurrency(value: string | undefined) {
|
|
53
|
+
try {
|
|
54
|
+
return new Intl.NumberFormat('en-US', {
|
|
55
|
+
currency: value ?? 'USD',
|
|
56
|
+
style: 'currency',
|
|
57
|
+
}).resolvedOptions().currency
|
|
58
|
+
} catch {
|
|
59
|
+
return 'USD'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Content arrives unvalidated, so an unknown time zone falls back instead of throwing. */
|
|
64
|
+
export function resolveTimeZone(value: string | undefined, fallback = 'UTC') {
|
|
65
|
+
if (value === undefined) {
|
|
66
|
+
return fallback
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
return new Intl.DateTimeFormat('en-US', { timeZone: value }).resolvedOptions()
|
|
70
|
+
.timeZone
|
|
71
|
+
} catch {
|
|
72
|
+
return fallback
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Text } from '@flickfyi/core'
|
|
2
|
+
import * as stylex from '@stylexjs/stylex'
|
|
3
|
+
import sample from 'lodash/sample.js'
|
|
4
|
+
import { useState } from 'react'
|
|
5
|
+
import { z } from 'zod/v4'
|
|
6
|
+
|
|
7
|
+
import { space } from '~/themes/scale.stylex'
|
|
8
|
+
import { roles } from '~/themes/shared'
|
|
9
|
+
|
|
10
|
+
import { FeatureAction, FeatureFrame, FeatureWell } from './frame'
|
|
11
|
+
|
|
12
|
+
export const FortuneData = /* @__PURE__ */ z
|
|
13
|
+
.strictObject({
|
|
14
|
+
action: z
|
|
15
|
+
.string()
|
|
16
|
+
.describe('A short button command, e.g. "Crack cookie" or "Ask the eight ball".'),
|
|
17
|
+
answers: z
|
|
18
|
+
.array(z.string())
|
|
19
|
+
.describe(
|
|
20
|
+
'The complete pool of short fortunes or answers to reveal, one at a time. Match the requested topic and tone.'
|
|
21
|
+
),
|
|
22
|
+
prompt: z
|
|
23
|
+
.string()
|
|
24
|
+
.describe(
|
|
25
|
+
'The short invitation shown before the first reveal, e.g. "Your fortune awaits" or "Think of a yes-or-no question".'
|
|
26
|
+
),
|
|
27
|
+
title: z.string().describe('The heading, e.g. "Fortune cookie" or "Magic 8 Ball".'),
|
|
28
|
+
})
|
|
29
|
+
.describe(
|
|
30
|
+
'Content for one existing Fortune React component. It already implements a button that randomly reveals one answer. Supply concise UI copy and a ready-to-use answer pool for a fortune cookie, magic eight ball, or themed oracle. Answers are supplied at generation time; the component does not generate new answers or interpret questions at runtime.'
|
|
31
|
+
)
|
|
32
|
+
export type FortuneData = z.input<typeof FortuneData>
|
|
33
|
+
|
|
34
|
+
export const FortuneProps = z.strictObject({ data: FortuneData })
|
|
35
|
+
export type FortuneProps = z.input<typeof FortuneProps> & {
|
|
36
|
+
style?: stylex.StyleXArray<stylex.StyleXStyles>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function Fortune({ data, style }: FortuneProps) {
|
|
40
|
+
const [result, setResult] = useState<string | null>(null)
|
|
41
|
+
const answer = result !== null && data.answers.includes(result) ? result : null
|
|
42
|
+
return (
|
|
43
|
+
<FeatureFrame component="fortune" title={data.title} style={style}>
|
|
44
|
+
<FeatureWell style={styles.reveal}>
|
|
45
|
+
<Text {...stylex.props(answer === null ? roles.muted : roles.h1, styles.answer)}>
|
|
46
|
+
{answer ?? data.prompt}
|
|
47
|
+
</Text>
|
|
48
|
+
</FeatureWell>
|
|
49
|
+
<FeatureAction
|
|
50
|
+
component="fortune"
|
|
51
|
+
onClick={() => {
|
|
52
|
+
const remaining = data.answers.filter(value => value !== answer)
|
|
53
|
+
setResult(sample(remaining.length > 0 ? remaining : data.answers) ?? null)
|
|
54
|
+
}}
|
|
55
|
+
size="lg"
|
|
56
|
+
variant="primary"
|
|
57
|
+
>
|
|
58
|
+
{data.action}
|
|
59
|
+
</FeatureAction>
|
|
60
|
+
</FeatureFrame>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const styles = /* @__PURE__ */ stylex.create({
|
|
65
|
+
answer: { textAlign: 'center' },
|
|
66
|
+
reveal: { justifyContent: 'center', minHeight: space[24] },
|
|
67
|
+
})
|
|
@@ -15,7 +15,7 @@ import { space } from '~/themes/scale.stylex'
|
|
|
15
15
|
import { appearance, button, roles } from '~/themes/shared'
|
|
16
16
|
import { colors, shape } from '~/themes/tokens.stylex'
|
|
17
17
|
|
|
18
|
-
import type { KowalskiComponent } from './
|
|
18
|
+
import type { KowalskiComponent } from './feature-schema'
|
|
19
19
|
import { format, parseNumberInput } from './format'
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -29,6 +29,7 @@ export function FeatureFrame({
|
|
|
29
29
|
header,
|
|
30
30
|
notice,
|
|
31
31
|
onRetry,
|
|
32
|
+
style,
|
|
32
33
|
title,
|
|
33
34
|
trailing,
|
|
34
35
|
}: PropsWithChildren<{
|
|
@@ -37,11 +38,12 @@ export function FeatureFrame({
|
|
|
37
38
|
header?: ReactNode
|
|
38
39
|
notice?: string
|
|
39
40
|
onRetry?: () => void
|
|
41
|
+
style?: stylex.StyleXArray<stylex.StyleXStyles>
|
|
40
42
|
title: string
|
|
41
43
|
trailing?: ReactNode
|
|
42
44
|
}>) {
|
|
43
45
|
return (
|
|
44
|
-
<Flex {...stylex.props(appearance.tray, layout.frame)}>
|
|
46
|
+
<Flex {...stylex.props(appearance.tray, layout.frame, style)}>
|
|
45
47
|
{header ?? (
|
|
46
48
|
<Flex {...stylex.props(layout.header)}>
|
|
47
49
|
<Flex {...stylex.props(layout.headerRow)}>
|
|
@@ -228,8 +230,7 @@ export function FeatureNumber({
|
|
|
228
230
|
component,
|
|
229
231
|
integer = false,
|
|
230
232
|
label,
|
|
231
|
-
|
|
232
|
-
min = -1e12,
|
|
233
|
+
min = Number.NEGATIVE_INFINITY,
|
|
233
234
|
onChange,
|
|
234
235
|
ready,
|
|
235
236
|
saving,
|
|
@@ -238,7 +239,6 @@ export function FeatureNumber({
|
|
|
238
239
|
component: KowalskiComponent
|
|
239
240
|
integer?: boolean
|
|
240
241
|
label: string
|
|
241
|
-
max?: number
|
|
242
242
|
min?: number
|
|
243
243
|
onChange: (value: number, onSaved: () => void) => void
|
|
244
244
|
ready: boolean
|
|
@@ -257,7 +257,6 @@ export function FeatureNumber({
|
|
|
257
257
|
validate={text =>
|
|
258
258
|
Number.isFinite(parseNumberInput(text)) &&
|
|
259
259
|
parseNumberInput(text) >= min &&
|
|
260
|
-
parseNumberInput(text) <= max &&
|
|
261
260
|
(!integer || Number.isInteger(parseNumberInput(text)))
|
|
262
261
|
}
|
|
263
262
|
onChange={(text, onSaved) => onChange(parseNumberInput(text), onSaved)}
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
3
|
-
export { Bookmark, Contact, Event, Note, Reminder, Trip } from './details'
|
|
4
|
-
export {
|
|
5
|
-
Budget,
|
|
6
|
-
Ledger,
|
|
7
|
-
Rating,
|
|
8
|
-
Rotation,
|
|
9
|
-
Scoreboard,
|
|
10
|
-
ShoppingList,
|
|
11
|
-
TaskBoard,
|
|
12
|
-
} from './everyday'
|
|
1
|
+
export type { CreateSchemas, CreateSchemasInput } from './create-schemas'
|
|
2
|
+
export { Fortune, type FortuneData, FortuneProps } from './fortune'
|
|
13
3
|
export { KowalskiStack } from './frame'
|
|
14
|
-
export {
|
|
15
|
-
export { Recipe } from './recipe'
|
|
16
|
-
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from '
|
|
4
|
+
export { Lesson, type LessonData, LessonProps } from './lesson'
|
|
5
|
+
export { Recipe, RecipeProps } from './recipe'
|
|
6
|
+
export { TimeSince, type TimeSinceData, TimeSinceProps } from './time-since'
|
|
7
|
+
export { BillSplit, BillSplitProps } from '~/kowalski/components/bill-split'
|
|
8
|
+
export { Bookmark, BookmarkProps } from '~/kowalski/components/bookmark'
|
|
9
|
+
export { Budget, BudgetProps } from '~/kowalski/components/budget'
|
|
10
|
+
export { Calculator, CalculatorProps } from '~/kowalski/components/calculator'
|
|
11
|
+
export { Checklist, ChecklistProps } from '~/kowalski/components/checklist'
|
|
12
|
+
export { ColorPalette, ColorPaletteProps } from '~/kowalski/components/color-palette'
|
|
13
|
+
export { Contact, ContactProps } from '~/kowalski/components/contact'
|
|
14
|
+
export { Countdown, CountdownProps } from '~/kowalski/components/countdown'
|
|
15
|
+
export { Event, EventProps } from '~/kowalski/components/event'
|
|
16
|
+
export { Expense, ExpenseProps } from '~/kowalski/components/expense'
|
|
17
|
+
export { Goal, GoalProps } from '~/kowalski/components/goal'
|
|
18
|
+
export { Habit, HabitProps } from '~/kowalski/components/habit'
|
|
19
|
+
export { Ledger, LedgerProps } from '~/kowalski/components/ledger'
|
|
20
|
+
export { Note, NoteProps } from '~/kowalski/components/note'
|
|
21
|
+
export { Poll, PollProps } from '~/kowalski/components/poll'
|
|
22
|
+
export { RandomPicker, RandomPickerProps } from '~/kowalski/components/random-picker'
|
|
23
|
+
export { Rating, RatingProps } from '~/kowalski/components/rating'
|
|
24
|
+
export { Reminder, ReminderProps } from '~/kowalski/components/reminder'
|
|
25
|
+
export { Rotation, RotationProps } from '~/kowalski/components/rotation'
|
|
26
|
+
export { Scoreboard, ScoreboardProps } from '~/kowalski/components/scoreboard'
|
|
27
|
+
export { ShoppingList, ShoppingListProps } from '~/kowalski/components/shopping-list'
|
|
28
|
+
export { TaskBoard, TaskBoardProps } from '~/kowalski/components/task-board'
|
|
29
|
+
export { TimeZone, TimeZoneProps } from '~/kowalski/components/time-zone'
|
|
30
|
+
export { Timer, TimerProps } from '~/kowalski/components/timer'
|
|
31
|
+
export { Trip, TripProps } from '~/kowalski/components/trip'
|
|
32
|
+
export { UnitConverter, UnitConverterProps } from '~/kowalski/components/unit-converter'
|