aeon-ui-engine 1.0.1 → 1.0.3
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/CHANGELOG.md +51 -0
- package/CONSUMER.md +86 -0
- package/INTEGRATION.md +2 -0
- package/README.md +15 -4
- package/package.json +17 -1
- package/packages/core/dist/index.d.ts +257 -0
- package/packages/core/dist/index.js +378 -0
- package/packages/core/node_modules/.bin/esbuild +21 -0
- package/packages/core/node_modules/.bin/jiti +21 -0
- package/packages/core/node_modules/.bin/tsc +21 -0
- package/packages/core/node_modules/.bin/tsserver +21 -0
- package/packages/core/node_modules/.bin/tsup +21 -0
- package/packages/core/node_modules/.bin/tsup-node +21 -0
- package/packages/core/node_modules/.bin/tsx +21 -0
- package/packages/core/node_modules/.bin/vite +21 -0
- package/packages/core/node_modules/.bin/vitest +21 -0
- package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/geometry/dist/index.d.ts +50 -0
- package/packages/geometry/dist/index.js +88 -0
- package/packages/geometry/node_modules/.bin/esbuild +21 -0
- package/packages/geometry/node_modules/.bin/jiti +21 -0
- package/packages/geometry/node_modules/.bin/tsc +21 -0
- package/packages/geometry/node_modules/.bin/tsserver +21 -0
- package/packages/geometry/node_modules/.bin/tsup +21 -0
- package/packages/geometry/node_modules/.bin/tsup-node +21 -0
- package/packages/geometry/node_modules/.bin/tsx +21 -0
- package/packages/panda/src/recipes/button.ts +4 -4
- package/packages/panda/src/recipes/combobox.ts +1 -1
- package/packages/panda/src/recipes/select.ts +1 -1
- package/packages/panda/src/theme/tokens.ts +5 -0
- package/packages/panda/styled-system/styles.css +10 -6
- package/packages/panda/styled-system/tokens/index.mjs +32 -0
- package/packages/panda/styled-system/tokens/tokens.d.ts +2 -2
- package/packages/primitives/dist/chunk-5S4DIRL4.js +42 -0
- package/packages/primitives/dist/chunk-H4KOEPYC.js +52 -0
- package/packages/primitives/dist/chunk-HONROWUG.js +41 -0
- package/packages/primitives/dist/chunk-J6JHKMVM.js +90 -0
- package/packages/primitives/dist/chunk-JBAG5E6W.js +46 -0
- package/packages/primitives/dist/chunk-LVNCD5F2.js +43 -0
- package/packages/primitives/dist/chunk-PB3LFHXU.js +72 -0
- package/packages/primitives/dist/chunk-SZV6KGXN.js +49 -0
- package/packages/primitives/dist/chunk-WVICCOQH.js +56 -0
- package/packages/primitives/dist/chunk-ZMGRX64G.js +74 -0
- package/packages/primitives/dist/index.d.ts +11 -0
- package/packages/primitives/dist/index.js +60 -0
- package/packages/primitives/dist/machines/accordion.d.ts +34 -0
- package/packages/primitives/dist/machines/accordion.js +6 -0
- package/packages/primitives/dist/machines/async.d.ts +111 -0
- package/packages/primitives/dist/machines/async.js +12 -0
- package/packages/primitives/dist/machines/button.d.ts +45 -0
- package/packages/primitives/dist/machines/button.js +8 -0
- package/packages/primitives/dist/machines/dialog.d.ts +57 -0
- package/packages/primitives/dist/machines/dialog.js +6 -0
- package/packages/primitives/dist/machines/field.d.ts +72 -0
- package/packages/primitives/dist/machines/field.js +12 -0
- package/packages/primitives/dist/machines/popover.d.ts +54 -0
- package/packages/primitives/dist/machines/popover.js +6 -0
- package/packages/primitives/dist/machines/slider.d.ts +71 -0
- package/packages/primitives/dist/machines/slider.js +10 -0
- package/packages/primitives/dist/machines/tabs.d.ts +39 -0
- package/packages/primitives/dist/machines/tabs.js +6 -0
- package/packages/primitives/dist/machines/toast.d.ts +31 -0
- package/packages/primitives/dist/machines/toast.js +6 -0
- package/packages/primitives/dist/machines/toggle.d.ts +54 -0
- package/packages/primitives/dist/machines/toggle.js +6 -0
- package/packages/primitives/node_modules/.bin/jiti +21 -0
- package/packages/primitives/node_modules/.bin/tsc +21 -0
- package/packages/primitives/node_modules/.bin/tsserver +21 -0
- package/packages/primitives/node_modules/.bin/tsup +21 -0
- package/packages/primitives/node_modules/.bin/tsup-node +21 -0
- package/packages/primitives/node_modules/.bin/tsx +21 -0
- package/packages/primitives/node_modules/.bin/vitest +21 -0
- package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/react/dist/index.d.ts +564 -0
- package/packages/react/dist/index.js +3461 -0
- package/packages/react/node_modules/.bin/jiti +21 -0
- package/packages/react/node_modules/.bin/tsc +21 -0
- package/packages/react/node_modules/.bin/tsserver +21 -0
- package/packages/react/node_modules/.bin/tsup +21 -0
- package/packages/react/node_modules/.bin/tsup-node +21 -0
- package/packages/react/node_modules/.bin/tsx +21 -0
- package/packages/react/node_modules/.bin/vitest +21 -0
- package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/react-scene/dist/index.d.ts +121 -0
- package/packages/react-scene/dist/index.js +430 -0
- package/packages/react-scene/node_modules/.bin/jiti +21 -0
- package/packages/react-scene/node_modules/.bin/tsc +21 -0
- package/packages/react-scene/node_modules/.bin/tsserver +21 -0
- package/packages/react-scene/node_modules/.bin/tsup +21 -0
- package/packages/react-scene/node_modules/.bin/tsup-node +21 -0
- package/packages/react-scene/node_modules/.bin/tsx +21 -0
- package/packages/scene/dist/index.d.ts +46 -0
- package/packages/scene/dist/index.js +54 -0
- package/packages/scene/node_modules/.bin/jiti +21 -0
- package/packages/scene/node_modules/.bin/tsc +21 -0
- package/packages/scene/node_modules/.bin/tsserver +21 -0
- package/packages/scene/node_modules/.bin/tsup +21 -0
- package/packages/scene/node_modules/.bin/tsup-node +21 -0
- package/packages/scene/node_modules/.bin/tsx +21 -0
- package/packages/signal/dist/index.d.ts +54 -0
- package/packages/signal/dist/index.js +169 -0
- package/packages/signal/node_modules/.bin/jiti +21 -0
- package/packages/signal/node_modules/.bin/tsc +21 -0
- package/packages/signal/node_modules/.bin/tsserver +21 -0
- package/packages/signal/node_modules/.bin/tsup +21 -0
- package/packages/signal/node_modules/.bin/tsup-node +21 -0
- package/packages/signal/node_modules/.bin/tsx +21 -0
- package/packages/site/dist/index.d.ts +31 -0
- package/packages/site/dist/index.js +62 -0
- package/packages/site/node_modules/.bin/jiti +21 -0
- package/packages/site/node_modules/.bin/tsc +21 -0
- package/packages/site/node_modules/.bin/tsserver +21 -0
- package/packages/site/node_modules/.bin/tsup +21 -0
- package/packages/site/node_modules/.bin/tsup-node +21 -0
- package/packages/site/node_modules/.bin/tsx +21 -0
- package/packages/solid/dist/index.d.ts +30 -0
- package/packages/solid/dist/index.js +174 -0
- package/packages/solid/node_modules/.bin/jiti +21 -0
- package/packages/solid/node_modules/.bin/tsc +21 -0
- package/packages/solid/node_modules/.bin/tsserver +21 -0
- package/packages/solid/node_modules/.bin/tsup +21 -0
- package/packages/solid/node_modules/.bin/tsup-node +21 -0
- package/packages/solid/node_modules/.bin/tsx +21 -0
- package/packages/surface/dist/index.d.ts +8 -0
- package/packages/surface/dist/index.js +14 -0
- package/packages/surface/node_modules/.bin/jiti +21 -0
- package/packages/surface/node_modules/.bin/tsc +21 -0
- package/packages/surface/node_modules/.bin/tsserver +21 -0
- package/packages/surface/node_modules/.bin/tsup +21 -0
- package/packages/surface/node_modules/.bin/tsup-node +21 -0
- package/packages/surface/node_modules/.bin/tsx +21 -0
- package/packages/svelte/dist/index.d.ts +12 -0
- package/packages/svelte/dist/index.js +15 -0
- package/packages/svelte/node_modules/.bin/acorn +21 -0
- package/packages/svelte/node_modules/.bin/jiti +21 -0
- package/packages/svelte/node_modules/.bin/svelte-check +21 -0
- package/packages/svelte/node_modules/.bin/tsc +21 -0
- package/packages/svelte/node_modules/.bin/tsserver +21 -0
- package/packages/svelte/node_modules/.bin/tsup +21 -0
- package/packages/svelte/node_modules/.bin/tsup-node +21 -0
- package/packages/svelte/node_modules/.bin/tsx +21 -0
- package/packages/svelte/node_modules/.bin/vite +21 -0
- package/packages/ui/dist/index.d.ts +200 -0
- package/packages/ui/dist/index.js +429 -0
- package/packages/ui/node_modules/.bin/jiti +21 -0
- package/packages/ui/node_modules/.bin/tsc +21 -0
- package/packages/ui/node_modules/.bin/tsserver +21 -0
- package/packages/ui/node_modules/.bin/tsup +21 -0
- package/packages/ui/node_modules/.bin/tsup-node +21 -0
- package/packages/ui/node_modules/.bin/tsx +21 -0
- package/packages/ui/src/select.tsx +3 -4
- package/packages/vue/dist/index.d.ts +71 -0
- package/packages/vue/dist/index.js +193 -0
- package/packages/vue/node_modules/.bin/jiti +21 -0
- package/packages/vue/node_modules/.bin/tsc +21 -0
- package/packages/vue/node_modules/.bin/tsserver +21 -0
- package/packages/vue/node_modules/.bin/tsup +21 -0
- package/packages/vue/node_modules/.bin/tsup-node +21 -0
- package/packages/vue/node_modules/.bin/tsx +21 -0
- package/scripts/vite-aliases.mjs +125 -0
- package/.changeset/README.md +0 -23
- package/.changeset/combobox-and-changesets.md +0 -9
- package/.changeset/config.json +0 -30
- package/.changeset/framework-adapters.md +0 -12
- package/.changeset/scene-3d.md +0 -6
- package/.changeset/scene-plane.md +0 -8
- package/.changeset/site-og.md +0 -5
- package/.cursor/rules/aeon-ui.mdc +0 -22
- package/ACCESSIBILITY.md +0 -32
- package/AGENTS.md +0 -226
- package/COMPONENTS.md +0 -41
- package/FRAMEWORKS.md +0 -57
- package/PHILOSOPHY.md +0 -71
- package/PUBLISHING.md +0 -85
- package/SCENE.md +0 -113
- package/STATES.md +0 -243
- package/apps/demo/index.html +0 -31
- package/apps/demo/og.config.mjs +0 -20
- package/apps/demo/package.json +0 -41
- package/apps/demo/public/favicon.svg +0 -16
- package/apps/demo/public/og-aeon-ui-engine.png +0 -0
- package/apps/demo/public/og.svg +0 -35
- package/apps/demo/scripts/generate-og-png.mjs +0 -62
- package/apps/demo/src/App.tsx +0 -31
- package/apps/demo/src/aeonDiagrams.ts +0 -42
- package/apps/demo/src/app.css +0 -16
- package/apps/demo/src/components/ActionCluster.tsx +0 -20
- package/apps/demo/src/components/AsyncMachineDemo.tsx +0 -97
- package/apps/demo/src/components/ButtonLifecycleDemo.tsx +0 -63
- package/apps/demo/src/components/CodeExample.tsx +0 -7
- package/apps/demo/src/components/ComboboxDemo.tsx +0 -30
- package/apps/demo/src/components/DiagramsSection.tsx +0 -37
- package/apps/demo/src/components/FieldStateDemo.tsx +0 -51
- package/apps/demo/src/components/GridMesh.tsx +0 -8
- package/apps/demo/src/components/HeroInstall.tsx +0 -13
- package/apps/demo/src/components/LandingFaq.tsx +0 -29
- package/apps/demo/src/components/LandingFooter.tsx +0 -30
- package/apps/demo/src/components/LandingHeader.tsx +0 -62
- package/apps/demo/src/components/LandingHero.tsx +0 -55
- package/apps/demo/src/components/LayersSection.tsx +0 -47
- package/apps/demo/src/components/MermaidDiagram.tsx +0 -86
- package/apps/demo/src/components/PhilosophySection.tsx +0 -31
- package/apps/demo/src/components/PlaygroundBlock.tsx +0 -18
- package/apps/demo/src/components/PlaygroundControlsDemo.tsx +0 -63
- package/apps/demo/src/components/PlaygroundSection.tsx +0 -120
- package/apps/demo/src/components/ScrollRegionDemo.tsx +0 -74
- package/apps/demo/src/components/ThemeSwitcher.tsx +0 -79
- package/apps/demo/src/demo-layout.css +0 -293
- package/apps/demo/src/landing.css +0 -1151
- package/apps/demo/src/main.tsx +0 -14
- package/apps/demo/src/nav.ts +0 -9
- package/apps/demo/src/site.ts +0 -218
- package/apps/demo/tsconfig.json +0 -17
- package/apps/demo/vite-plugins/og-meta.ts +0 -30
- package/apps/demo/vite.config.ts +0 -69
- package/docs/API_PATTERNS.md +0 -234
- package/docs/ARCHITECTURE.md +0 -125
- package/docs/COMPONENT_CHECKLIST.md +0 -103
- package/docs/FILE_MAP.md +0 -122
- package/docs/GLOSSARY.md +0 -125
- package/docs/INDEX.md +0 -53
- package/docs/LAYOUT_COORDINATES.md +0 -178
- package/docs/MACHINES.md +0 -171
- package/docs/MIGRATION_FROM_ARK.md +0 -295
- package/docs/VITE_CONSUMER.md +0 -114
- package/pnpm-workspace.yaml +0 -3
- package/vercel.json +0 -12
package/apps/demo/src/main.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StrictMode } from 'react'
|
|
2
|
-
import { createRoot } from 'react-dom/client'
|
|
3
|
-
import '@aeon-ui/panda/styles.css'
|
|
4
|
-
import '@aeon-ui/panda/theme-runtime.css'
|
|
5
|
-
import '@aeon-ui/panda/scrollbars.css'
|
|
6
|
-
import '@aeon-ui/panda/chrome.css'
|
|
7
|
-
import './app.css'
|
|
8
|
-
import { App } from './App.js'
|
|
9
|
-
|
|
10
|
-
createRoot(document.getElementById('root')!).render(
|
|
11
|
-
<StrictMode>
|
|
12
|
-
<App />
|
|
13
|
-
</StrictMode>,
|
|
14
|
-
)
|
package/apps/demo/src/nav.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const navLinks = [
|
|
2
|
-
{ href: '#philosophy', label: 'Foundation', sectionId: 'philosophy' },
|
|
3
|
-
{ href: '#playground', label: 'Components', sectionId: 'playground' },
|
|
4
|
-
{ href: '#layers', label: 'Shape', sectionId: 'layers' },
|
|
5
|
-
{ href: '#diagrams', label: 'Statecharts', sectionId: 'diagrams' },
|
|
6
|
-
{ href: '#faq', label: 'FAQ', sectionId: 'faq' },
|
|
7
|
-
] as const
|
|
8
|
-
|
|
9
|
-
export const navSectionIds = navLinks.map((l) => l.sectionId)
|
package/apps/demo/src/site.ts
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
/** Public demo origin — set VITE_SITE_ORIGIN in Vercel to your deployment URL. */
|
|
2
|
-
export const siteOrigin =
|
|
3
|
-
(import.meta.env.VITE_SITE_ORIGIN as string | undefined)?.replace(/\/$/, '') ??
|
|
4
|
-
'https://aeon-ui.com'
|
|
5
|
-
|
|
6
|
-
/** Published npm package (monorepo root). */
|
|
7
|
-
export const npmPackage = 'aeon-ui-engine' as const
|
|
8
|
-
|
|
9
|
-
export const npmInstallCommand = `npm install ${npmPackage}` as const
|
|
10
|
-
|
|
11
|
-
/** User-facing code sample — install line plus usage (no internal workspace import paths). */
|
|
12
|
-
export const withInstall = (usage: string) => `${npmInstallCommand}\n\n${usage.trim()}`
|
|
13
|
-
|
|
14
|
-
export const site = {
|
|
15
|
-
brand: 'Aeon UI',
|
|
16
|
-
tagline: 'Future-proof UI infrastructure for the web',
|
|
17
|
-
url: 'https://github.com/GenericCPU/aeon-ui',
|
|
18
|
-
siteOrigin,
|
|
19
|
-
repoCloneUrl: 'https://github.com/GenericCPU/aeon-ui.git',
|
|
20
|
-
npmPackage,
|
|
21
|
-
npmRegistryUrl: `https://www.npmjs.com/package/${npmPackage}`,
|
|
22
|
-
npmInstallCommand,
|
|
23
|
-
studio: 'SpiderCorp',
|
|
24
|
-
studioUrl: 'https://spidercorp.xyz',
|
|
25
|
-
|
|
26
|
-
heroEyebrow: 'Future-proof UI · Statecharts · Design systems',
|
|
27
|
-
heroTitle: 'Future-proof UI for the modern web.',
|
|
28
|
-
heroAccent: 'Built to last.',
|
|
29
|
-
heroLead:
|
|
30
|
-
'Statechart-driven primitives and a styled layer your team controls — dependable behavior today, room to grow tomorrow.',
|
|
31
|
-
heroSub:
|
|
32
|
-
'Grounded in proven state theory and production-ready patterns for compound components, anatomy, and styling.',
|
|
33
|
-
heroCtaPrimary: 'Try components',
|
|
34
|
-
heroCtaSecondary: 'View architecture',
|
|
35
|
-
headerCtaShort: 'Try',
|
|
36
|
-
heroInstallLabel: 'npm',
|
|
37
|
-
heroInstallCommand: npmInstallCommand,
|
|
38
|
-
heroInstallHint: `${npmPackage} on npm — core, React bindings, styled components, and themes in one install.`,
|
|
39
|
-
stateCardLabel: 'Example: fetch region',
|
|
40
|
-
stateCardHint: 'Five states on the rail. One active. Click Run.',
|
|
41
|
-
|
|
42
|
-
heroStats: [
|
|
43
|
-
{
|
|
44
|
-
label: 'Headless',
|
|
45
|
-
detail: 'Compound primitives and anatomy tokens — your brand, your CSS',
|
|
46
|
-
example: '<Switch.Root>\n <Switch.Control />\n</Switch.Root>',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
label: 'Machines',
|
|
50
|
-
detail: 'Explicit states, guards, and hierarchy powered by XState',
|
|
51
|
-
example: "send({ type: 'FETCH' })",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: 'Styled',
|
|
55
|
-
detail: 'Panda CSS slot recipes with thoughtful defaults you can extend',
|
|
56
|
-
example: `${npmInstallCommand}\nimport { Button } from '@aeon-ui/ui'`,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
|
|
60
|
-
philosophyLabel: 'Foundation',
|
|
61
|
-
philosophyTitle: 'What Aeon is',
|
|
62
|
-
philosophyLead:
|
|
63
|
-
'Not a grab bag of widgets — a discipline for interfaces that stay legible as requirements accumulate. Grounded in statechart theory and the conviction that the UI must represent every condition the model allows, and imply none that it does not.',
|
|
64
|
-
thesisUrl:
|
|
65
|
-
'https://www.theseus.fi/bitstream/handle/10024/334118/Thanh_Nguyen.pdf?sequence=2&isAllowed=y',
|
|
66
|
-
thesisCta: 'Read the thesis (PDF)',
|
|
67
|
-
|
|
68
|
-
layersLabel: 'Shape',
|
|
69
|
-
layersTitle: 'Separation on purpose',
|
|
70
|
-
layersLead:
|
|
71
|
-
'Three layers so behavior, contract, and brand can evolve independently — without forking the mental model.',
|
|
72
|
-
|
|
73
|
-
diagramsLabel: 'Statecharts',
|
|
74
|
-
diagramsTitle: 'A map the whole team can read',
|
|
75
|
-
diagramsLead:
|
|
76
|
-
'Executable models you can review with design and engineering before complexity lands in production — the same chart the playground runs.',
|
|
77
|
-
statesDocUrl: 'https://github.com/GenericCPU/aeon-ui/blob/main/STATES.md',
|
|
78
|
-
|
|
79
|
-
playgroundLabel: 'Proof',
|
|
80
|
-
playgroundTitle: 'See the discipline in motion',
|
|
81
|
-
playgroundLead:
|
|
82
|
-
'Each block is a real machine. Interact to feel what it means when the interface and the chart stay in lockstep.',
|
|
83
|
-
|
|
84
|
-
faqLabel: 'FAQ',
|
|
85
|
-
faqTitle: 'Questions teams ask',
|
|
86
|
-
faqLead: 'Identity and adoption — not a feature matrix.',
|
|
87
|
-
} as const
|
|
88
|
-
|
|
89
|
-
/** Why we built the stack this way — sits above the layer cards. */
|
|
90
|
-
export const commitments = [
|
|
91
|
-
{
|
|
92
|
-
id: 'coherent',
|
|
93
|
-
title: 'One condition at a time',
|
|
94
|
-
description:
|
|
95
|
-
'Regions hold a single stable state the team can name, test, and extend — so interfaces stay coherent when flows multiply.',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'shared',
|
|
99
|
-
title: 'A shared map',
|
|
100
|
-
description:
|
|
101
|
-
'Statecharts give designers and engineers the same picture of behavior before edge cases become tribal knowledge.',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
id: 'sovereign',
|
|
105
|
-
title: 'Sovereign surfaces',
|
|
106
|
-
description:
|
|
107
|
-
'Unstyled primitives with a clear anatomy contract. Defaults when you want speed — full control when you do not.',
|
|
108
|
-
},
|
|
109
|
-
] as const
|
|
110
|
-
|
|
111
|
-
export const philosophyTenets = [
|
|
112
|
-
{
|
|
113
|
-
title: 'Write the chart first',
|
|
114
|
-
body: 'List every stable state and transition before you choose type scales. The model is the brief; the UI is its faithful projection.',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
title: 'UI = f(state)',
|
|
118
|
-
body: 'The snapshot decides what renders — labels, disabled affordances, and data-aeon-state together. Not parallel React flags that drift out of sync.',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
title: 'Show the full map',
|
|
122
|
-
body: 'Users and developers see the same complete lifecycle. Async empty, button failure, field validation — nothing left implicit off-screen.',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
title: 'Scale with regions',
|
|
126
|
-
body: 'When complexity arrives, split orthogonal concerns — interaction, validation, submission — instead of one overloaded “error” boolean.',
|
|
127
|
-
},
|
|
128
|
-
] as const
|
|
129
|
-
|
|
130
|
-
export const layers = [
|
|
131
|
-
{
|
|
132
|
-
id: 'core',
|
|
133
|
-
title: 'Core',
|
|
134
|
-
description:
|
|
135
|
-
'The contract between machine and markup — scope, part, and state attributes your theme can target for years.',
|
|
136
|
-
highlights: ['North star & anatomy', 'PHILOSOPHY.md · STATES.md'],
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: 'react',
|
|
140
|
-
title: 'React',
|
|
141
|
-
description:
|
|
142
|
-
'Headless bindings where the DOM reflects the snapshot — compound parts, accessibility, and predictable structure.',
|
|
143
|
-
highlights: ['Snapshot-driven parts', 'useAeonMachine for app logic'],
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 'ui',
|
|
147
|
-
title: 'Styled UI',
|
|
148
|
-
description:
|
|
149
|
-
'An optional face with intentional tokens — ship quickly or treat it as a reference implementation for your system.',
|
|
150
|
-
highlights: ['Panda recipes on anatomy', 'Themes: your palette, your modes'],
|
|
151
|
-
},
|
|
152
|
-
] as const
|
|
153
|
-
|
|
154
|
-
export const playgroundBlocks = {
|
|
155
|
-
async: {
|
|
156
|
-
title: 'Async region',
|
|
157
|
-
description:
|
|
158
|
-
'Fetch flows as a named lifecycle — idle through empty — so “loading” is never the only story the UI tells.',
|
|
159
|
-
},
|
|
160
|
-
buttonLifecycle: {
|
|
161
|
-
title: 'Button lifecycle',
|
|
162
|
-
description:
|
|
163
|
-
'Submission is more than disabled: pending, success, and failure are states worth showing, not hidden side effects.',
|
|
164
|
-
},
|
|
165
|
-
field: {
|
|
166
|
-
title: 'Field',
|
|
167
|
-
description:
|
|
168
|
-
'Interaction, validation, and submission as parallel regions — complexity without a single tangled error flag.',
|
|
169
|
-
},
|
|
170
|
-
controls: {
|
|
171
|
-
title: 'Inputs & buttons',
|
|
172
|
-
description:
|
|
173
|
-
'Toggles, radio group, slider, and pin input — explicit states on every control surface.',
|
|
174
|
-
},
|
|
175
|
-
dialog: {
|
|
176
|
-
title: 'Dialog',
|
|
177
|
-
description:
|
|
178
|
-
'Open and closed are first-class. Dismissal paths are transitions, not surprises.',
|
|
179
|
-
},
|
|
180
|
-
overlay: {
|
|
181
|
-
title: 'Overlays',
|
|
182
|
-
description:
|
|
183
|
-
'Floating surfaces with the same open/closed discipline — anchored behavior you can reason about.',
|
|
184
|
-
},
|
|
185
|
-
} as const
|
|
186
|
-
|
|
187
|
-
export const faq = [
|
|
188
|
-
{
|
|
189
|
-
id: 'what',
|
|
190
|
-
question: 'What is Aeon UI?',
|
|
191
|
-
answer:
|
|
192
|
-
'Infrastructure for the web where behavior is modeled explicitly and the interface expresses that model completely. Headless primitives, React bindings, and an optional styled layer — published as aeon-ui-engine.',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
id: 'why',
|
|
196
|
-
question: 'Why statecharts?',
|
|
197
|
-
answer:
|
|
198
|
-
'Because products outgrow boolean soup. Statecharts name conditions, separate regions, and stay diagrammable as requirements grow — the thesis case for modern web UI is documented in our primary reference (linked in Foundation).',
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: 'totality',
|
|
202
|
-
question: 'What does “UI = f(state)” mean?',
|
|
203
|
-
answer:
|
|
204
|
-
'The machine snapshot picks what renders. If the chart includes loading, you build loading UI — and you do not imply success, failure, or empty unless the chart allows them.',
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
id: 'headless',
|
|
208
|
-
question: 'Do I have to use your styles?',
|
|
209
|
-
answer:
|
|
210
|
-
'No. The headless layer is the point: same anatomy and states with your CSS. The styled package is a convenience, not a cage.',
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
id: 'install',
|
|
214
|
-
question: 'How do I adopt it?',
|
|
215
|
-
answer: `Install ${npmPackage} from npm. Core, React, and styled UI ship together; import the layer that matches where you are in the stack.`,
|
|
216
|
-
example: npmInstallCommand,
|
|
217
|
-
},
|
|
218
|
-
] as const
|
package/apps/demo/tsconfig.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"noEmit": true,
|
|
5
|
-
"paths": {
|
|
6
|
-
"@aeon-ui/core": ["../../packages/core/src/index.ts"],
|
|
7
|
-
"@aeon-ui/primitives": ["../../packages/primitives/src/index.ts"],
|
|
8
|
-
"@aeon-ui/panda": ["../../packages/panda"],
|
|
9
|
-
"@aeon-ui/panda/themes": ["../../packages/panda/src/theme/index.ts"],
|
|
10
|
-
"@aeon-ui/panda/styled-system/css": ["../../packages/panda/styled-system/css/index.d.ts"],
|
|
11
|
-
"@aeon-ui/panda/styled-system/recipes": ["../../packages/panda/styled-system/recipes/index.d.ts"],
|
|
12
|
-
"@aeon-ui/react": ["../../packages/react/src/index.ts"],
|
|
13
|
-
"@aeon-ui/ui": ["../../packages/ui/src/index.ts"]
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"include": ["src"]
|
|
17
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'vite'
|
|
2
|
-
import { loadEnv } from 'vite'
|
|
3
|
-
import { absoluteUrl, openGraphHeadHtml } from '@aeon-ui/site'
|
|
4
|
-
import { og } from '../og.config.mjs'
|
|
5
|
-
|
|
6
|
-
export function ogMetaPlugin(mode: string): Plugin {
|
|
7
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
8
|
-
const siteOrigin = (env.VITE_SITE_ORIGIN ?? 'https://aeon-ui.com').replace(/\/$/, '')
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
name: 'aeon-og-meta',
|
|
12
|
-
transformIndexHtml(html) {
|
|
13
|
-
const fragment = openGraphHeadHtml({
|
|
14
|
-
title: og.title,
|
|
15
|
-
description: og.description,
|
|
16
|
-
url: absoluteUrl(siteOrigin, '/'),
|
|
17
|
-
image: absoluteUrl(siteOrigin, og.imagePath),
|
|
18
|
-
imageAlt: og.imageAlt,
|
|
19
|
-
siteName: og.siteName,
|
|
20
|
-
themeColor: og.themeColor,
|
|
21
|
-
})
|
|
22
|
-
const canonical = `<link rel="canonical" href="${siteOrigin}/" />`
|
|
23
|
-
const icon = `<link rel="icon" href="/favicon.svg" type="image/svg+xml" />`
|
|
24
|
-
return html.replace(
|
|
25
|
-
'<!-- OG_META -->',
|
|
26
|
-
`${canonical}\n ${icon}\n ${fragment}`,
|
|
27
|
-
)
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
}
|
package/apps/demo/vite.config.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import { fileURLToPath } from 'node:url'
|
|
3
|
-
import react from '@vitejs/plugin-react'
|
|
4
|
-
import { defineConfig } from 'vite'
|
|
5
|
-
import { ogMetaPlugin } from './vite-plugins/og-meta.js'
|
|
6
|
-
|
|
7
|
-
const root = path.dirname(fileURLToPath(import.meta.url))
|
|
8
|
-
const packages = path.resolve(root, '../../packages')
|
|
9
|
-
|
|
10
|
-
/** More specific aliases must come first — `@aeon-ui/ui` → index.ts breaks `…/styles.css`. */
|
|
11
|
-
export default defineConfig(({ mode }) => ({
|
|
12
|
-
plugins: [react(), ogMetaPlugin(mode)],
|
|
13
|
-
server: {
|
|
14
|
-
port: 5173,
|
|
15
|
-
strictPort: false,
|
|
16
|
-
},
|
|
17
|
-
resolve: {
|
|
18
|
-
alias: [
|
|
19
|
-
{
|
|
20
|
-
find: '@aeon-ui/panda/styles.css',
|
|
21
|
-
replacement: path.join(packages, 'panda/styled-system/styles.css'),
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
find: '@aeon-ui/panda/theme-runtime.css',
|
|
25
|
-
replacement: path.join(packages, 'panda/theme-runtime.css'),
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
find: '@aeon-ui/panda/scrollbars.css',
|
|
29
|
-
replacement: path.join(packages, 'panda/src/theme/scrollbars.css'),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
find: '@aeon-ui/panda/chrome.css',
|
|
33
|
-
replacement: path.join(packages, 'panda/src/theme/chrome.css'),
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
find: '@aeon-ui/panda/styled-system/css',
|
|
37
|
-
replacement: path.join(packages, 'panda/styled-system/css/index.mjs'),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
find: '@aeon-ui/panda/styled-system/recipes',
|
|
41
|
-
replacement: path.join(packages, 'panda/styled-system/recipes/index.mjs'),
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
find: '@aeon-ui/panda/themes',
|
|
45
|
-
replacement: path.join(packages, 'panda/src/theme/index.ts'),
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
find: '@aeon-ui/ui/styles.css',
|
|
49
|
-
replacement: path.join(packages, 'ui/src/styles.css'),
|
|
50
|
-
},
|
|
51
|
-
{ find: '@aeon-ui/core', replacement: path.join(packages, 'core/src/index.ts') },
|
|
52
|
-
{ find: '@aeon-ui/primitives', replacement: path.join(packages, 'primitives/src/index.ts') },
|
|
53
|
-
{ find: '@aeon-ui/react', replacement: path.join(packages, 'react/src/index.ts') },
|
|
54
|
-
{ find: '@aeon-ui/ui', replacement: path.join(packages, 'ui/src/index.ts') },
|
|
55
|
-
{ find: '@aeon-ui/panda', replacement: path.join(packages, 'panda') },
|
|
56
|
-
{ find: '@aeon-ui/site', replacement: path.join(packages, 'site/src/index.ts') },
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
optimizeDeps: {
|
|
60
|
-
include: [
|
|
61
|
-
'@aeon-ui/core',
|
|
62
|
-
'@aeon-ui/primitives',
|
|
63
|
-
'@aeon-ui/react',
|
|
64
|
-
'@aeon-ui/panda/themes',
|
|
65
|
-
'@aeon-ui/panda/styled-system/css',
|
|
66
|
-
'@aeon-ui/panda/styled-system/recipes',
|
|
67
|
-
],
|
|
68
|
-
},
|
|
69
|
-
}))
|
package/docs/API_PATTERNS.md
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# API patterns (copy-paste)
|
|
2
|
-
|
|
3
|
-
Canonical snippets for agents. Adjust names only when adding new components.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Styled app bootstrap
|
|
8
|
-
|
|
9
|
-
```tsx
|
|
10
|
-
import '@aeon-ui/panda/styles.css'
|
|
11
|
-
import '@aeon-ui/panda/theme-runtime.css'
|
|
12
|
-
import '@aeon-ui/panda/scrollbars.css'
|
|
13
|
-
import '@aeon-ui/panda/chrome.css'
|
|
14
|
-
|
|
15
|
-
import { applyAeonTheme } from '@aeon-ui/panda/themes'
|
|
16
|
-
|
|
17
|
-
applyAeonTheme('default', 'dark')
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Compound component (styled)
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
import { Dialog, Button } from '@aeon-ui/ui'
|
|
26
|
-
|
|
27
|
-
<Dialog.Root>
|
|
28
|
-
<Dialog.Trigger asChild>
|
|
29
|
-
<Button.Root variant="outline">Open</Button.Root>
|
|
30
|
-
</Dialog.Trigger>
|
|
31
|
-
<Dialog.Backdrop />
|
|
32
|
-
<Dialog.Positioner>
|
|
33
|
-
<Dialog.Content>
|
|
34
|
-
<Dialog.Title>Title</Dialog.Title>
|
|
35
|
-
<Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
|
|
36
|
-
</Dialog.Content>
|
|
37
|
-
</Dialog.Positioner>
|
|
38
|
-
</Dialog.Root>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Headless + custom CSS
|
|
44
|
-
|
|
45
|
-
```tsx
|
|
46
|
-
import { Menu } from '@aeon-ui/react'
|
|
47
|
-
|
|
48
|
-
<Menu.Root>
|
|
49
|
-
<Menu.Trigger>Actions</Menu.Trigger>
|
|
50
|
-
<Menu.Positioner>
|
|
51
|
-
<Menu.Content>
|
|
52
|
-
<Menu.Item onSelect={save}>Save</Menu.Item>
|
|
53
|
-
</Menu.Content>
|
|
54
|
-
</Menu.Positioner>
|
|
55
|
-
</Menu.Root>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
```css
|
|
59
|
-
[data-aeon-scope="menu"][data-aeon-part="content"][data-aeon-state="open"] {
|
|
60
|
-
background: var(--panel);
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Async totality
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import { Async, Button } from '@aeon-ui/ui'
|
|
70
|
-
import { useAsyncContext } from '@aeon-ui/react'
|
|
71
|
-
|
|
72
|
-
function Fetcher() {
|
|
73
|
-
const { send } = useAsyncContext()
|
|
74
|
-
return (
|
|
75
|
-
<Button.Root size="sm" onClick={() => send({ type: 'FETCH' })}>
|
|
76
|
-
Fetch
|
|
77
|
-
</Button.Root>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
<Async.Root>
|
|
82
|
-
<Async.Track />
|
|
83
|
-
<Async.Readout />
|
|
84
|
-
<Async.Actions>
|
|
85
|
-
<Fetcher />
|
|
86
|
-
</Async.Actions>
|
|
87
|
-
</Async.Root>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Field + validation
|
|
93
|
-
|
|
94
|
-
```tsx
|
|
95
|
-
import { Field } from '@aeon-ui/ui'
|
|
96
|
-
|
|
97
|
-
<Field.Root>
|
|
98
|
-
<Field.Label htmlFor="email">Email</Field.Label>
|
|
99
|
-
<Field.Control id="email" validate={(v) => /^.+@.+$/.test(v)} />
|
|
100
|
-
<Field.Message>Invalid email</Field.Message>
|
|
101
|
-
<Field.Hint>We never share your email.</Field.Hint>
|
|
102
|
-
</Field.Root>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
```tsx
|
|
106
|
-
<Field.Root>
|
|
107
|
-
<Field.Label htmlFor="notes">Notes</Field.Label>
|
|
108
|
-
<Field.Textarea id="notes" rows={5} name="message" />
|
|
109
|
-
</Field.Root>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
```tsx
|
|
113
|
-
import { Select } from '@aeon-ui/react'
|
|
114
|
-
|
|
115
|
-
<Select.Root value={value} onValueChange={setValue}>
|
|
116
|
-
<Select.Trigger>
|
|
117
|
-
<Select.ValueText>{label}</Select.ValueText>
|
|
118
|
-
</Select.Trigger>
|
|
119
|
-
<Select.Positioner>
|
|
120
|
-
<Select.Content>
|
|
121
|
-
<Select.Item value="a">Option A</Select.Item>
|
|
122
|
-
</Select.Content>
|
|
123
|
-
</Select.Positioner>
|
|
124
|
-
</Select.Root>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
```tsx
|
|
128
|
-
import { Dialog } from '@aeon-ui/react'
|
|
129
|
-
|
|
130
|
-
<Dialog.Root>
|
|
131
|
-
<Dialog.Trigger>Open</Dialog.Trigger>
|
|
132
|
-
<Dialog.Portal>
|
|
133
|
-
<Dialog.Backdrop />
|
|
134
|
-
<Dialog.Positioner>
|
|
135
|
-
<Dialog.Content>
|
|
136
|
-
<Dialog.Title>Title</Dialog.Title>
|
|
137
|
-
<Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
|
|
138
|
-
</Dialog.Content>
|
|
139
|
-
</Dialog.Positioner>
|
|
140
|
-
</Dialog.Portal>
|
|
141
|
-
</Dialog.Root>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Button lifecycle (prop)
|
|
147
|
-
|
|
148
|
-
```tsx
|
|
149
|
-
<Button.Root status="pending" aria-busy>
|
|
150
|
-
Saving…
|
|
151
|
-
</Button.Root>
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## Button lifecycle (machine)
|
|
157
|
-
|
|
158
|
-
```tsx
|
|
159
|
-
import { Button, useAeonMachine } from '@aeon-ui/react'
|
|
160
|
-
import { buttonLifecycleMachine } from '@aeon-ui/primitives'
|
|
161
|
-
|
|
162
|
-
function Submit() {
|
|
163
|
-
const [snapshot, send] = useAeonMachine(buttonLifecycleMachine)
|
|
164
|
-
const status = snapshot.value as 'idle' | 'pending' | 'success' | 'failure' | 'disabled'
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<Button.Root
|
|
168
|
-
status={status}
|
|
169
|
-
onClick={() => send({ type: 'PRESS' })}
|
|
170
|
-
>
|
|
171
|
-
Submit
|
|
172
|
-
</Button.Root>
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## App-owned XState
|
|
180
|
-
|
|
181
|
-
```tsx
|
|
182
|
-
import { useAeonMachine } from '@aeon-ui/react'
|
|
183
|
-
import { myFeatureMachine } from './machines/my-feature'
|
|
184
|
-
|
|
185
|
-
const [snapshot, send] = useAeonMachine(myFeatureMachine)
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Panda recipe in custom component
|
|
191
|
-
|
|
192
|
-
```tsx
|
|
193
|
-
import { aeonButton } from '@aeon-ui/panda/styled-system/recipes'
|
|
194
|
-
import { Button } from '@aeon-ui/react'
|
|
195
|
-
|
|
196
|
-
const styles = aeonButton({ variant: 'ghost', size: 'sm' })
|
|
197
|
-
|
|
198
|
-
<Button.Root className={styles}>Click</Button.Root>
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## New machine + anatomy (minimal)
|
|
204
|
-
|
|
205
|
-
```ts
|
|
206
|
-
// packages/primitives/src/machines/widget.ts
|
|
207
|
-
import { setup } from 'xstate'
|
|
208
|
-
export const widgetMachine = setup({ types: { events: {} as { type: 'OPEN' } } }).createMachine({
|
|
209
|
-
id: 'widget',
|
|
210
|
-
initial: 'closed',
|
|
211
|
-
states: { closed: { on: { OPEN: 'open' } }, open: { on: { CLOSE: 'closed' } } },
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
// packages/core/src/anatomy.ts
|
|
215
|
-
export const widgetAnatomy = anatomy('widget', ['root', 'trigger'] as const)
|
|
216
|
-
|
|
217
|
-
// packages/react — Root uses useAeonMachine(widgetMachine) + partAttrs(widgetAnatomy.scope, ...)
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
See [COMPONENT_CHECKLIST.md](./COMPONENT_CHECKLIST.md).
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Scroll region
|
|
225
|
-
|
|
226
|
-
```tsx
|
|
227
|
-
import { Scroll } from '@aeon-ui/ui'
|
|
228
|
-
|
|
229
|
-
<Scroll.Root axis="y" maxH="md">
|
|
230
|
-
<Scroll.Viewport>
|
|
231
|
-
<Scroll.Content>{children}</Scroll.Content>
|
|
232
|
-
</Scroll.Viewport>
|
|
233
|
-
</Scroll.Root>
|
|
234
|
-
```
|