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.
- package/dist/templates/base/FOLDKIT.md +3 -3
- package/dist/templates/examples/api-cache/package.json +7 -7
- package/dist/templates/examples/auth/package.json +7 -7
- package/dist/templates/examples/canvas-art/package.json +7 -7
- package/dist/templates/examples/charting/package.json +7 -7
- package/dist/templates/examples/charting/src/view/chart.ts +43 -45
- package/dist/templates/examples/counter/package.json +7 -7
- package/dist/templates/examples/counters/package.json +7 -7
- package/dist/templates/examples/crash-view/package.json +7 -7
- package/dist/templates/examples/embedding/package.json +7 -7
- package/dist/templates/examples/form/package.json +7 -7
- package/dist/templates/examples/generative-art/package.json +7 -7
- package/dist/templates/examples/interrupting-commands/package.json +7 -7
- package/dist/templates/examples/job-application/package.json +7 -7
- package/dist/templates/examples/job-application/src/view/education.ts +31 -32
- package/dist/templates/examples/job-application/src/view/workHistory.ts +40 -41
- package/dist/templates/examples/kanban/package.json +8 -8
- package/dist/templates/examples/managed-resource-layer/package.json +7 -7
- package/dist/templates/examples/map/package.json +8 -8
- package/dist/templates/examples/map/src/main.ts +52 -53
- package/dist/templates/examples/map/src/vite-env.d.ts +1 -0
- package/dist/templates/examples/pixel-art/package.json +7 -7
- package/dist/templates/examples/pixel-art/src/scene.test.ts +3 -3
- package/dist/templates/examples/pixel-art/src/story.test.ts +3 -3
- package/dist/templates/examples/query-sync/package.json +7 -7
- package/dist/templates/examples/route-transitions/package.json +7 -7
- package/dist/templates/examples/routing/package.json +7 -7
- package/dist/templates/examples/routing/src/page/people.ts +76 -77
- package/dist/templates/examples/shopping-cart/package.json +7 -7
- package/dist/templates/examples/slow-warnings/package.json +7 -7
- package/dist/templates/examples/snake/package.json +7 -7
- package/dist/templates/examples/ssg/package.json +6 -6
- package/dist/templates/examples/ssr/package.json +8 -8
- package/dist/templates/examples/state-machine/package.json +7 -7
- package/dist/templates/examples/stopwatch/package.json +7 -7
- package/dist/templates/examples/todo/package.json +7 -7
- package/dist/templates/examples/ui-showcase/package.json +7 -7
- package/dist/templates/examples/ui-showcase/src/main.ts +12 -0
- package/dist/templates/examples/ui-showcase/src/scene.test.ts +11 -0
- package/dist/templates/examples/ui-showcase/src/ui/init.ts +2 -0
- package/dist/templates/examples/ui-showcase/src/ui/message.ts +2 -0
- package/dist/templates/examples/ui-showcase/src/ui/model.ts +2 -0
- package/dist/templates/examples/ui-showcase/src/ui/update.ts +21 -0
- package/dist/templates/examples/ui-showcase/src/ui/view/hoverIntent.ts +89 -0
- package/dist/templates/examples/ui-showcase/src/ui/view/index.ts +1 -0
- package/dist/templates/examples/view-transitions/package.json +7 -7
- package/dist/templates/examples/weather/package.json +7 -7
- package/dist/templates/examples/web-components/package.json +7 -7
- package/dist/templates/examples/websocket-chat/package.json +7 -7
- package/dist/templates/release.json +19 -19
- 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>`
|
|
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
|
|
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
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
21
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
22
22
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
|
-
"happy-dom": "^20.
|
|
24
|
-
"prettier": "^3.
|
|
25
|
-
"tailwindcss": "^4.3.
|
|
26
|
-
"typescript": "^
|
|
27
|
-
"vite": "^8.
|
|
28
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
22
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
23
23
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
24
|
-
"happy-dom": "^20.
|
|
25
|
-
"prettier": "^3.
|
|
26
|
-
"tailwindcss": "^4.3.
|
|
27
|
-
"typescript": "^
|
|
28
|
-
"vite": "^8.
|
|
29
|
-
"vitest": "^4.1.
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
22
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
21
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
22
22
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
|
-
"happy-dom": "^20.
|
|
24
|
-
"prettier": "^3.
|
|
25
|
-
"tailwindcss": "^4.3.
|
|
26
|
-
"typescript": "^
|
|
27
|
-
"vite": "^8.
|
|
28
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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.
|
|
21
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
22
22
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
23
|
-
"happy-dom": "^20.
|
|
24
|
-
"prettier": "^3.
|
|
25
|
-
"tailwindcss": "^4.3.
|
|
26
|
-
"typescript": "^
|
|
27
|
-
"vite": "^8.
|
|
28
|
-
"vitest": "^4.1.
|
|
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
|
-
(
|
|
32
|
-
h.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
h.
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
(
|
|
15
|
-
h.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
h.
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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": "^
|
|
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.
|
|
22
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
23
23
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
24
|
-
"happy-dom": "^20.
|
|
25
|
-
"prettier": "^3.
|
|
26
|
-
"tailwindcss": "^4.3.
|
|
27
|
-
"typescript": "^
|
|
28
|
-
"vite": "^8.
|
|
29
|
-
"vitest": "^4.1.
|
|
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.
|
|
20
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
22
|
-
"happy-dom": "^20.
|
|
23
|
-
"prettier": "^3.
|
|
24
|
-
"tailwindcss": "^4.3.
|
|
25
|
-
"typescript": "^
|
|
26
|
-
"vite": "^8.
|
|
27
|
-
"vitest": "^4.1.
|
|
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": "^
|
|
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.
|
|
22
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
23
23
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
24
|
-
"happy-dom": "^20.
|
|
25
|
-
"prettier": "^3.
|
|
26
|
-
"tailwindcss": "^4.3.
|
|
27
|
-
"typescript": "^
|
|
28
|
-
"vite": "^8.
|
|
29
|
-
"vitest": "^4.1.
|
|
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
|
}
|