create-foldkit-app 0.31.0 → 0.31.1-canary.2f2a07458578

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 (51) hide show
  1. package/dist/templates/base/FOLDKIT.md +3 -3
  2. package/dist/templates/examples/api-cache/package.json +7 -7
  3. package/dist/templates/examples/auth/package.json +7 -7
  4. package/dist/templates/examples/canvas-art/package.json +7 -7
  5. package/dist/templates/examples/charting/package.json +7 -7
  6. package/dist/templates/examples/charting/src/view/chart.ts +43 -45
  7. package/dist/templates/examples/counter/package.json +7 -7
  8. package/dist/templates/examples/counters/package.json +7 -7
  9. package/dist/templates/examples/crash-view/package.json +7 -7
  10. package/dist/templates/examples/embedding/package.json +7 -7
  11. package/dist/templates/examples/form/package.json +7 -7
  12. package/dist/templates/examples/generative-art/package.json +7 -7
  13. package/dist/templates/examples/interrupting-commands/package.json +7 -7
  14. package/dist/templates/examples/job-application/package.json +7 -7
  15. package/dist/templates/examples/job-application/src/view/education.ts +31 -32
  16. package/dist/templates/examples/job-application/src/view/workHistory.ts +40 -41
  17. package/dist/templates/examples/kanban/package.json +8 -8
  18. package/dist/templates/examples/managed-resource-layer/package.json +7 -7
  19. package/dist/templates/examples/map/package.json +8 -8
  20. package/dist/templates/examples/map/src/main.ts +52 -53
  21. package/dist/templates/examples/map/src/vite-env.d.ts +1 -0
  22. package/dist/templates/examples/pixel-art/package.json +7 -7
  23. package/dist/templates/examples/pixel-art/src/scene.test.ts +3 -3
  24. package/dist/templates/examples/pixel-art/src/story.test.ts +3 -3
  25. package/dist/templates/examples/query-sync/package.json +7 -7
  26. package/dist/templates/examples/route-transitions/package.json +7 -7
  27. package/dist/templates/examples/routing/package.json +7 -7
  28. package/dist/templates/examples/routing/src/page/people.ts +76 -77
  29. package/dist/templates/examples/shopping-cart/package.json +7 -7
  30. package/dist/templates/examples/slow-warnings/package.json +7 -7
  31. package/dist/templates/examples/snake/package.json +7 -7
  32. package/dist/templates/examples/ssg/package.json +6 -6
  33. package/dist/templates/examples/ssr/package.json +8 -8
  34. package/dist/templates/examples/state-machine/package.json +7 -7
  35. package/dist/templates/examples/stopwatch/package.json +7 -7
  36. package/dist/templates/examples/todo/package.json +7 -7
  37. package/dist/templates/examples/ui-showcase/package.json +7 -7
  38. package/dist/templates/examples/ui-showcase/src/main.ts +12 -0
  39. package/dist/templates/examples/ui-showcase/src/scene.test.ts +11 -0
  40. package/dist/templates/examples/ui-showcase/src/ui/init.ts +2 -0
  41. package/dist/templates/examples/ui-showcase/src/ui/message.ts +2 -0
  42. package/dist/templates/examples/ui-showcase/src/ui/model.ts +2 -0
  43. package/dist/templates/examples/ui-showcase/src/ui/update.ts +21 -0
  44. package/dist/templates/examples/ui-showcase/src/ui/view/hoverIntent.ts +89 -0
  45. package/dist/templates/examples/ui-showcase/src/ui/view/index.ts +1 -0
  46. package/dist/templates/examples/view-transitions/package.json +7 -7
  47. package/dist/templates/examples/weather/package.json +7 -7
  48. package/dist/templates/examples/web-components/package.json +7 -7
  49. package/dist/templates/examples/websocket-chat/package.json +7 -7
  50. package/dist/templates/release.json +19 -19
  51. package/package.json +6 -5
@@ -60,7 +60,7 @@ When composing one of those results, bind the whole result to a value named afte
60
60
 
61
61
  Pass optional Commands directly to APIs that accept them: `Command.mapMessages(homeInit.commands, toParentMessage)`. Use `result.commands ?? []` only when the next operation requires a concrete array for spreading, concatenating, execution, or an assertion.
62
62
 
63
- `Update.Return<Model, Message>` rejects an OutMessage-producing result where an API would consume only its Model and Commands. `Update.ReturnWithOutMessage<Model, Message, OutMessage>` still accepts a result with no `outMessage`, because omission means the update emitted nothing.
63
+ Use `Update.Return<Model, Message>` when an update cannot emit an OutMessage. It prevents a result containing an OutMessage from entering code that would keep only its Model and Commands. A result with no `outMessage` can still be used where `Update.ReturnWithOutMessage<Model, Message, OutMessage>` is expected. The missing field means that update emitted no OutMessage.
64
64
 
65
65
  Manual unpacking of a child result usually means the site should use `Update.foldChild` or `Update.foldChildStep`.
66
66
 
@@ -68,7 +68,7 @@ Use `Update.combine` when a later Step should receive the Model produced by an e
68
68
 
69
69
  When the OutMessage is already known while constructing a new result, include it directly: `{ model, commands, outMessage }`. Use `Update.withOutMessage` when attaching an OutMessage to an existing plain return or when the value has the type `OutMessage | undefined`. Pipe an existing return into the helper: `pipe(dialogClose, Update.withOutMessage(outMessage))`. When constructing the plain return in the same expression, pass it first: `Update.withOutMessage({ model, commands }, outMessage)`.
70
70
 
71
- Add `toParentOutMessage` only when at least one child OutMessage is forwarded from the current Submodel to its parent. Omit it when no variant is forwarded. Local handling through `foldOutMessage` is independent, so a forwarded variant may also update the current parent. Never write `toParentOutMessage: () => undefined`.
71
+ Add `toParentOutMessage` only when at least one child OutMessage should continue to the current Submodel's parent. For partial forwarding, match every child variant and return `undefined` for the variants that stop here. Omit `toParentOutMessage` when every variant stops here. `foldOutMessage` still handles each variant locally, including variants that continue upward. Never write `toParentOutMessage: () => undefined`.
72
72
 
73
73
  Use `evo()` from `foldkit/struct` for immutable model updates. Never spread or `Object.assign`.
74
74
 
@@ -109,7 +109,7 @@ Scene runs at any level, since a page's own `update`/`view` pair drops into `sce
109
109
  ## Code Style
110
110
 
111
111
  - Encode state in discriminated unions, not booleans or nullable fields. `Idle | Loading | Error | Ok`, not `isLoading: boolean`. Make impossible states unrepresentable.
112
- - Use `Option` for absence in the Model and domain values instead of `null` or `undefined`. Foldkit return records are the exception: omit `commands` and `outMessage` when absent. A partial `toParentOutMessage` mapper returns `undefined` for each named child variant that stops at the current parent. Prefix Option-typed values with `maybe*`. Match with `Option.match`; don't unwrap with `Option.map(...)` + `Option.getOrElse(...)` when you can just match.
112
+ - Use `Option` for absence in the Model and domain values instead of `null` or `undefined`. Foldkit return records are the exception: omit `commands` and `outMessage` when absent. A partial `toParentOutMessage` mapper returns `undefined` for each child variant that stops at this Submodel. Prefix Option-typed values with `maybe*`. Match with `Option.match`; don't unwrap with `Option.map(...)` + `Option.getOrElse(...)` when you can just match.
113
113
  - Use Effect modules over native methods in `pipe` chains (`Array.map`, `String.startsWith`, `Array.findFirst`). Native methods are fine when calling directly on a named variable.
114
114
  - Never cast Schema values with `as Type`. Use the callable constructor: `Message.SucceededLogin({ sessionId })`, not `{ _tag: 'SucceededLogin', sessionId } as Message`.
115
115
  - Always `Array.isArrayEmpty` / `Array.isArrayNonEmpty` (not `.length === 0` / `.length > 0`). Use `Array.match` when handling both empty and non-empty cases.
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -18,13 +18,13 @@
18
18
  "devDependencies": {
19
19
  "@foldkit/devtools": "workspace:*",
20
20
  "@foldkit/vite-plugin": "workspace:*",
21
- "@tailwindcss/vite": "^4.3.1",
21
+ "@tailwindcss/vite": "^4.3.3",
22
22
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
23
- "happy-dom": "^20.10.4",
24
- "prettier": "^3.8.4",
25
- "tailwindcss": "^4.3.1",
26
- "typescript": "^6.0.3",
27
- "vite": "^8.0.16",
28
- "vitest": "^4.1.9"
23
+ "happy-dom": "^20.11.12",
24
+ "prettier": "^3.9.6",
25
+ "tailwindcss": "^4.3.3",
26
+ "typescript": "^7.0.2",
27
+ "vite": "^8.2.2",
28
+ "vitest": "^4.1.11"
29
29
  }
30
30
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -19,13 +19,13 @@
19
19
  "devDependencies": {
20
20
  "@foldkit/devtools": "workspace:*",
21
21
  "@foldkit/vite-plugin": "workspace:*",
22
- "@tailwindcss/vite": "^4.3.1",
22
+ "@tailwindcss/vite": "^4.3.3",
23
23
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
24
- "happy-dom": "^20.10.4",
25
- "prettier": "^3.8.4",
26
- "tailwindcss": "^4.3.1",
27
- "typescript": "^6.0.3",
28
- "vite": "^8.0.16",
29
- "vitest": "^4.1.9"
24
+ "happy-dom": "^20.11.12",
25
+ "prettier": "^3.9.6",
26
+ "tailwindcss": "^4.3.3",
27
+ "typescript": "^7.0.2",
28
+ "vite": "^8.2.2",
29
+ "vitest": "^4.1.11"
30
30
  }
31
31
  }
@@ -13,53 +13,51 @@ import { formatInteger } from './format'
13
13
 
14
14
  export const CHART_HOST_ID = 'charting-chart'
15
15
 
16
- export const MountChart = Mount.define(
17
- 'MountChart',
18
- { hostId: S.String },
19
- Message.SucceededMountChart,
20
- Message.FailedMountChart,
21
- )(
22
- ({ hostId }) =>
23
- element =>
24
- Effect.gen(function* () {
25
- if (!(element instanceof HTMLElement)) {
26
- return Message.FailedMountChart({
27
- reason: 'Chart host is not an HTMLElement.',
28
- })
29
- }
16
+ const mountChart = (element: Element, hostId: string) =>
17
+ Effect.gen(function* () {
18
+ if (!(element instanceof HTMLElement)) {
19
+ return Message.FailedMountChart({
20
+ reason: 'Chart host is not an HTMLElement.',
21
+ })
22
+ }
30
23
 
31
- return yield* Effect.acquireRelease(
32
- Effect.try({
33
- try: () => {
34
- const chart = echarts.init(element, undefined, {
35
- renderer: 'canvas',
36
- })
37
- const resizeObserver = new ResizeObserver(() => chart.resize())
38
- resizeObserver.observe(element)
39
- const onWindowResize = () => chart.resize()
40
- window.addEventListener('resize', onWindowResize)
41
- setChart(hostId, chart)
42
- return { resizeObserver, onWindowResize }
43
- },
44
- catch: error =>
45
- error instanceof Error
46
- ? error
47
- : new Error(`Failed to mount chart: ${error}`),
48
- }),
49
- ({ resizeObserver, onWindowResize }) =>
50
- Effect.sync(() => {
51
- resizeObserver.disconnect()
52
- window.removeEventListener('resize', onWindowResize)
53
- removeChart(hostId)
54
- }),
55
- ).pipe(
56
- Effect.map(() => Message.SucceededMountChart({ hostId })),
57
- Effect.catch(error =>
58
- Effect.succeed(Message.FailedMountChart({ reason: error.message })),
59
- ),
60
- )
24
+ return yield* Effect.acquireRelease(
25
+ Effect.try({
26
+ try: () => {
27
+ const chart = echarts.init(element, undefined, {
28
+ renderer: 'canvas',
29
+ })
30
+ const resizeObserver = new ResizeObserver(() => chart.resize())
31
+ resizeObserver.observe(element)
32
+ const onWindowResize = () => chart.resize()
33
+ window.addEventListener('resize', onWindowResize)
34
+ setChart(hostId, chart)
35
+ return { resizeObserver, onWindowResize }
36
+ },
37
+ catch: error =>
38
+ error instanceof Error
39
+ ? error
40
+ : new Error(`Failed to mount chart: ${error}`),
61
41
  }),
62
- )
42
+ ({ resizeObserver, onWindowResize }) =>
43
+ Effect.sync(() => {
44
+ resizeObserver.disconnect()
45
+ window.removeEventListener('resize', onWindowResize)
46
+ removeChart(hostId)
47
+ }),
48
+ ).pipe(
49
+ Effect.map(() => Message.SucceededMountChart({ hostId })),
50
+ Effect.catch(error =>
51
+ Effect.succeed(Message.FailedMountChart({ reason: error.message })),
52
+ ),
53
+ )
54
+ })
55
+
56
+ export const MountChart = Mount.define('MountChart', {
57
+ args: { hostId: S.String },
58
+ messages: [Message.SucceededMountChart, Message.FailedMountChart],
59
+ execute: ({ element, hostId }) => mountChart(element, hostId),
60
+ })
63
61
 
64
62
  export const chartPanelView = (
65
63
  model: Model,
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -18,13 +18,13 @@
18
18
  "devDependencies": {
19
19
  "@foldkit/devtools": "workspace:*",
20
20
  "@foldkit/vite-plugin": "workspace:*",
21
- "@tailwindcss/vite": "^4.3.1",
21
+ "@tailwindcss/vite": "^4.3.3",
22
22
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
23
- "happy-dom": "^20.10.4",
24
- "prettier": "^3.8.4",
25
- "tailwindcss": "^4.3.1",
26
- "typescript": "^6.0.3",
27
- "vite": "^8.0.16",
28
- "vitest": "^4.1.9"
23
+ "happy-dom": "^20.11.12",
24
+ "prettier": "^3.9.6",
25
+ "tailwindcss": "^4.3.3",
26
+ "typescript": "^7.0.2",
27
+ "vite": "^8.2.2",
28
+ "vitest": "^4.1.11"
29
29
  }
30
30
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -18,13 +18,13 @@
18
18
  "devDependencies": {
19
19
  "@foldkit/devtools": "workspace:*",
20
20
  "@foldkit/vite-plugin": "workspace:*",
21
- "@tailwindcss/vite": "^4.3.1",
21
+ "@tailwindcss/vite": "^4.3.3",
22
22
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
23
- "happy-dom": "^20.10.4",
24
- "prettier": "^3.8.4",
25
- "tailwindcss": "^4.3.1",
26
- "typescript": "^6.0.3",
27
- "vite": "^8.0.16",
28
- "vitest": "^4.1.9"
23
+ "happy-dom": "^20.11.12",
24
+ "prettier": "^3.9.6",
25
+ "tailwindcss": "^4.3.3",
26
+ "typescript": "^7.0.2",
27
+ "vite": "^8.2.2",
28
+ "vitest": "^4.1.11"
29
29
  }
30
30
  }
@@ -27,37 +27,36 @@ const entryView = (
27
27
  export const educationView = Submodel.defineView<
28
28
  Education.Model,
29
29
  Education.Message
30
- >(
31
- (model, h): Html =>
32
- h.div(
33
- [h.Class('space-y-6')],
34
- [
35
- h.p(
36
- [h.Class('text-sm text-gray-500')],
37
- ['Add your educational background.'],
30
+ >((model, h): Html =>
31
+ h.div(
32
+ [h.Class('space-y-6')],
33
+ [
34
+ h.p(
35
+ [h.Class('text-sm text-gray-500')],
36
+ ['Add your educational background.'],
37
+ ),
38
+ h.div(
39
+ [h.Class('divide-y divide-gray-200')],
40
+ model.entries.map(entry =>
41
+ lazyEntry(entry.id, entryView, [entry, model.today, h]),
38
42
  ),
39
- h.div(
40
- [h.Class('divide-y divide-gray-200')],
41
- model.entries.map(entry =>
42
- lazyEntry(entry.id, entryView, [entry, model.today, h]),
43
- ),
44
- ),
45
- Button.view(
46
- {
47
- onClick: Message.ClickedAddEntry(),
48
- toView: attributes =>
49
- h.button(
50
- [
51
- ...attributes.button,
52
- h.Class(
53
- 'w-full rounded-lg border-2 border-dashed border-gray-300 px-4 py-3 text-sm font-medium text-gray-600 hover:border-indigo-400 hover:text-indigo-600 transition cursor-pointer',
54
- ),
55
- ],
56
- ['+ Add Education'],
57
- ),
58
- },
59
- h,
60
- ),
61
- ],
62
- ),
43
+ ),
44
+ Button.view(
45
+ {
46
+ onClick: Message.ClickedAddEntry(),
47
+ toView: attributes =>
48
+ h.button(
49
+ [
50
+ ...attributes.button,
51
+ h.Class(
52
+ 'w-full rounded-lg border-2 border-dashed border-gray-300 px-4 py-3 text-sm font-medium text-gray-600 hover:border-indigo-400 hover:text-indigo-600 transition cursor-pointer',
53
+ ),
54
+ ],
55
+ ['+ Add Education'],
56
+ ),
57
+ },
58
+ h,
59
+ ),
60
+ ],
61
+ ),
63
62
  )
@@ -10,46 +10,45 @@ import { workEntryView } from './workEntry'
10
10
  export const workHistoryView = Submodel.defineView<
11
11
  WorkHistory.Model,
12
12
  WorkHistory.Message
13
- >(
14
- (model, h): Html =>
15
- h.div(
16
- [h.Class('space-y-6')],
17
- [
18
- h.p(
19
- [h.Class('text-sm text-gray-500')],
20
- ['Add your relevant work experience, starting with the most recent.'],
13
+ >((model, h): Html =>
14
+ h.div(
15
+ [h.Class('space-y-6')],
16
+ [
17
+ h.p(
18
+ [h.Class('text-sm text-gray-500')],
19
+ ['Add your relevant work experience, starting with the most recent.'],
20
+ ),
21
+ h.div(
22
+ [h.Class('divide-y divide-gray-200')],
23
+ model.entries.map(entry =>
24
+ h.submodel({
25
+ slotId: entry.id,
26
+ model: entry,
27
+ view: workEntryView,
28
+ toParentMessage: message =>
29
+ Message.GotEntryMessage({
30
+ entryId: entry.id,
31
+ message,
32
+ }),
33
+ }),
21
34
  ),
22
- h.div(
23
- [h.Class('divide-y divide-gray-200')],
24
- model.entries.map(entry =>
25
- h.submodel({
26
- slotId: entry.id,
27
- model: entry,
28
- view: workEntryView,
29
- toParentMessage: message =>
30
- Message.GotEntryMessage({
31
- entryId: entry.id,
32
- message,
33
- }),
34
- }),
35
- ),
36
- ),
37
- Button.view(
38
- {
39
- onClick: Message.ClickedAddEntry(),
40
- toView: attributes =>
41
- h.button(
42
- [
43
- ...attributes.button,
44
- h.Class(
45
- 'w-full rounded-lg border-2 border-dashed border-gray-300 px-4 py-3 text-sm font-medium text-gray-600 hover:border-indigo-400 hover:text-indigo-600 transition cursor-pointer',
46
- ),
47
- ],
48
- ['+ Add Position'],
49
- ),
50
- },
51
- h,
52
- ),
53
- ],
54
- ),
35
+ ),
36
+ Button.view(
37
+ {
38
+ onClick: Message.ClickedAddEntry(),
39
+ toView: attributes =>
40
+ h.button(
41
+ [
42
+ ...attributes.button,
43
+ h.Class(
44
+ 'w-full rounded-lg border-2 border-dashed border-gray-300 px-4 py-3 text-sm font-medium text-gray-600 hover:border-indigo-400 hover:text-indigo-600 transition cursor-pointer',
45
+ ),
46
+ ],
47
+ ['+ Add Position'],
48
+ ),
49
+ },
50
+ h,
51
+ ),
52
+ ],
53
+ ),
55
54
  )
@@ -14,18 +14,18 @@
14
14
  "clsx": "^2.1.1",
15
15
  "effect": "4.0.0-rc.112",
16
16
  "foldkit": "workspace:*",
17
- "fractional-indexing": "^3.2.0"
17
+ "fractional-indexing": "^4.0.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@foldkit/devtools": "workspace:*",
21
21
  "@foldkit/vite-plugin": "workspace:*",
22
- "@tailwindcss/vite": "^4.3.1",
22
+ "@tailwindcss/vite": "^4.3.3",
23
23
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
24
- "happy-dom": "^20.10.4",
25
- "prettier": "^3.8.4",
26
- "tailwindcss": "^4.3.1",
27
- "typescript": "^6.0.3",
28
- "vite": "^8.0.16",
29
- "vitest": "^4.1.9"
24
+ "happy-dom": "^20.11.12",
25
+ "prettier": "^3.9.6",
26
+ "tailwindcss": "^4.3.3",
27
+ "typescript": "^7.0.2",
28
+ "vite": "^8.2.2",
29
+ "vitest": "^4.1.11"
30
30
  }
31
31
  }
@@ -17,13 +17,13 @@
17
17
  "devDependencies": {
18
18
  "@foldkit/devtools": "workspace:*",
19
19
  "@foldkit/vite-plugin": "workspace:*",
20
- "@tailwindcss/vite": "^4.3.1",
20
+ "@tailwindcss/vite": "^4.3.3",
21
21
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
22
- "happy-dom": "^20.10.4",
23
- "prettier": "^3.8.4",
24
- "tailwindcss": "^4.3.1",
25
- "typescript": "^6.0.3",
26
- "vite": "^8.0.16",
27
- "vitest": "^4.1.9"
22
+ "happy-dom": "^20.11.12",
23
+ "prettier": "^3.9.6",
24
+ "tailwindcss": "^4.3.3",
25
+ "typescript": "^7.0.2",
26
+ "vite": "^8.2.2",
27
+ "vitest": "^4.1.11"
28
28
  }
29
29
  }
@@ -14,18 +14,18 @@
14
14
  "clsx": "^2.1.1",
15
15
  "effect": "4.0.0-rc.112",
16
16
  "foldkit": "workspace:*",
17
- "maplibre-gl": "^5.24.0"
17
+ "maplibre-gl": "^6.6.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@foldkit/devtools": "workspace:*",
21
21
  "@foldkit/vite-plugin": "workspace:*",
22
- "@tailwindcss/vite": "^4.3.1",
22
+ "@tailwindcss/vite": "^4.3.3",
23
23
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
24
- "happy-dom": "^20.10.4",
25
- "prettier": "^3.8.4",
26
- "tailwindcss": "^4.3.1",
27
- "typescript": "^6.0.3",
28
- "vite": "^8.0.16",
29
- "vitest": "^4.1.9"
24
+ "happy-dom": "^20.11.12",
25
+ "prettier": "^3.9.6",
26
+ "tailwindcss": "^4.3.3",
27
+ "typescript": "^7.0.2",
28
+ "vite": "^8.2.2",
29
+ "vitest": "^4.1.11"
30
30
  }
31
31
  }