aeon-ui-engine 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changeset/README.md +23 -0
- package/.changeset/combobox-and-changesets.md +9 -0
- package/.changeset/config.json +30 -0
- package/.changeset/framework-adapters.md +12 -0
- package/.changeset/scene-3d.md +6 -0
- package/.changeset/scene-plane.md +8 -0
- package/.changeset/site-og.md +5 -0
- package/.cursor/rules/aeon-ui.mdc +22 -0
- package/ACCESSIBILITY.md +32 -0
- package/AGENTS.md +226 -0
- package/COMPONENTS.md +36 -0
- package/FRAMEWORKS.md +57 -0
- package/INTEGRATION.md +89 -0
- package/LICENSE +21 -0
- package/PHILOSOPHY.md +71 -0
- package/PUBLISHING.md +85 -0
- package/README.md +154 -0
- package/SCENE.md +113 -0
- package/STATES.md +243 -0
- package/apps/demo/index.html +31 -0
- package/apps/demo/og.config.mjs +15 -0
- package/apps/demo/package.json +41 -0
- package/apps/demo/public/favicon.svg +16 -0
- package/apps/demo/public/og.png +0 -0
- package/apps/demo/public/og.svg +35 -0
- package/apps/demo/scripts/generate-og-png.mjs +60 -0
- package/apps/demo/src/App.tsx +31 -0
- package/apps/demo/src/aeonDiagrams.ts +100 -0
- package/apps/demo/src/app.css +16 -0
- package/apps/demo/src/components/ActionCluster.tsx +20 -0
- package/apps/demo/src/components/AsyncMachineDemo.tsx +97 -0
- package/apps/demo/src/components/ButtonLifecycleDemo.tsx +63 -0
- package/apps/demo/src/components/CodeExample.tsx +7 -0
- package/apps/demo/src/components/ComboboxDemo.tsx +30 -0
- package/apps/demo/src/components/DiagramsSection.tsx +38 -0
- package/apps/demo/src/components/FieldStateDemo.tsx +51 -0
- package/apps/demo/src/components/GridMesh.tsx +8 -0
- package/apps/demo/src/components/HeroInstall.tsx +10 -0
- package/apps/demo/src/components/LandingFaq.tsx +29 -0
- package/apps/demo/src/components/LandingFooter.tsx +22 -0
- package/apps/demo/src/components/LandingHeader.tsx +60 -0
- package/apps/demo/src/components/LandingHero.tsx +55 -0
- package/apps/demo/src/components/LayersSection.tsx +51 -0
- package/apps/demo/src/components/MermaidDiagram.tsx +84 -0
- package/apps/demo/src/components/PhilosophySection.tsx +33 -0
- package/apps/demo/src/components/PlaygroundBlock.tsx +23 -0
- package/apps/demo/src/components/PlaygroundSection.tsx +204 -0
- package/apps/demo/src/components/SceneSection.tsx +157 -0
- package/apps/demo/src/components/ScrollRegionDemo.tsx +74 -0
- package/apps/demo/src/components/ThemeSwitcher.tsx +76 -0
- package/apps/demo/src/demo-layout.css +264 -0
- package/apps/demo/src/landing.css +1094 -0
- package/apps/demo/src/main.tsx +14 -0
- package/apps/demo/src/nav.ts +9 -0
- package/apps/demo/src/site.ts +347 -0
- package/apps/demo/tsconfig.json +17 -0
- package/apps/demo/vite-plugins/og-meta.ts +30 -0
- package/apps/demo/vite.config.ts +69 -0
- package/docs/API_PATTERNS.md +234 -0
- package/docs/ARCHITECTURE.md +125 -0
- package/docs/COMPONENT_CHECKLIST.md +103 -0
- package/docs/FILE_MAP.md +122 -0
- package/docs/GLOSSARY.md +125 -0
- package/docs/INDEX.md +53 -0
- package/docs/LAYOUT_COORDINATES.md +178 -0
- package/docs/MACHINES.md +166 -0
- package/docs/MIGRATION_FROM_ARK.md +295 -0
- package/docs/VITE_CONSUMER.md +114 -0
- package/package.json +25 -0
- package/packages/core/README.md +69 -0
- package/packages/core/package.json +37 -0
- package/packages/core/src/anatomy.ts +144 -0
- package/packages/core/src/attrs.ts +47 -0
- package/packages/core/src/index.ts +8 -0
- package/packages/core/src/layout.ts +176 -0
- package/packages/core/src/machine.test.ts +18 -0
- package/packages/core/src/machine.ts +15 -0
- package/packages/core/src/philosophy.ts +10 -0
- package/packages/core/src/scroll.ts +72 -0
- package/packages/core/src/theme.test.ts +14 -0
- package/packages/core/src/theme.ts +53 -0
- package/packages/core/src/types.ts +25 -0
- package/packages/core/theme-transition.css +58 -0
- package/packages/core/tsconfig.json +8 -0
- package/packages/core/vitest.config.ts +8 -0
- package/packages/geometry/README.md +7 -0
- package/packages/geometry/package.json +35 -0
- package/packages/geometry/src/index.ts +3 -0
- package/packages/geometry/src/patterns.ts +55 -0
- package/packages/geometry/src/scene-attrs.ts +11 -0
- package/packages/geometry/src/svg.ts +60 -0
- package/packages/geometry/tsconfig.json +8 -0
- package/packages/panda/README.md +66 -0
- package/packages/panda/package.json +40 -0
- package/packages/panda/panda.config.ts +229 -0
- package/packages/panda/scripts/emit-theme-runtime.ts +37 -0
- package/packages/panda/src/recipes/accordion.ts +95 -0
- package/packages/panda/src/recipes/async.ts +76 -0
- package/packages/panda/src/recipes/badge.ts +44 -0
- package/packages/panda/src/recipes/button-group.ts +33 -0
- package/packages/panda/src/recipes/button.ts +91 -0
- package/packages/panda/src/recipes/checkbox.ts +41 -0
- package/packages/panda/src/recipes/combobox.ts +121 -0
- package/packages/panda/src/recipes/dialog.ts +96 -0
- package/packages/panda/src/recipes/field-shared.ts +29 -0
- package/packages/panda/src/recipes/field.ts +72 -0
- package/packages/panda/src/recipes/floating.ts +170 -0
- package/packages/panda/src/recipes/index.ts +14 -0
- package/packages/panda/src/recipes/scroll-region.ts +55 -0
- package/packages/panda/src/recipes/select.ts +111 -0
- package/packages/panda/src/recipes/switch.ts +51 -0
- package/packages/panda/src/recipes/tabs.ts +50 -0
- package/packages/panda/src/theme/catalog-types.ts +24 -0
- package/packages/panda/src/theme/catalog.ts +73 -0
- package/packages/panda/src/theme/chrome.css +75 -0
- package/packages/panda/src/theme/global-theme-css.ts +42 -0
- package/packages/panda/src/theme/index.ts +5 -0
- package/packages/panda/src/theme/palette.ts +65 -0
- package/packages/panda/src/theme/scrollbars.css +96 -0
- package/packages/panda/src/theme/semantic-tokens.ts +17 -0
- package/packages/panda/src/theme/themes.config.ts +516 -0
- package/packages/panda/src/theme/tokens.ts +51 -0
- package/packages/panda/styled-system/css/conditions.mjs +36 -0
- package/packages/panda/styled-system/css/css.d.ts +22 -0
- package/packages/panda/styled-system/css/css.mjs +45 -0
- package/packages/panda/styled-system/css/cva.d.ts +6 -0
- package/packages/panda/styled-system/css/cva.mjs +87 -0
- package/packages/panda/styled-system/css/cx.d.ts +5 -0
- package/packages/panda/styled-system/css/cx.mjs +15 -0
- package/packages/panda/styled-system/css/index.d.ts +5 -0
- package/packages/panda/styled-system/css/index.mjs +4 -0
- package/packages/panda/styled-system/css/sva.d.ts +4 -0
- package/packages/panda/styled-system/css/sva.mjs +41 -0
- package/packages/panda/styled-system/helpers.mjs +339 -0
- package/packages/panda/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/packages/panda/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/packages/panda/styled-system/jsx/bleed.d.ts +10 -0
- package/packages/panda/styled-system/jsx/bleed.mjs +14 -0
- package/packages/panda/styled-system/jsx/box.d.ts +10 -0
- package/packages/panda/styled-system/jsx/box.mjs +14 -0
- package/packages/panda/styled-system/jsx/center.d.ts +10 -0
- package/packages/panda/styled-system/jsx/center.mjs +14 -0
- package/packages/panda/styled-system/jsx/circle.d.ts +10 -0
- package/packages/panda/styled-system/jsx/circle.mjs +14 -0
- package/packages/panda/styled-system/jsx/container.d.ts +10 -0
- package/packages/panda/styled-system/jsx/container.mjs +14 -0
- package/packages/panda/styled-system/jsx/cq.d.ts +10 -0
- package/packages/panda/styled-system/jsx/cq.mjs +14 -0
- package/packages/panda/styled-system/jsx/divider.d.ts +10 -0
- package/packages/panda/styled-system/jsx/divider.mjs +14 -0
- package/packages/panda/styled-system/jsx/factory-helper.mjs +22 -0
- package/packages/panda/styled-system/jsx/factory.d.ts +3 -0
- package/packages/panda/styled-system/jsx/factory.mjs +80 -0
- package/packages/panda/styled-system/jsx/flex.d.ts +10 -0
- package/packages/panda/styled-system/jsx/flex.mjs +14 -0
- package/packages/panda/styled-system/jsx/float.d.ts +10 -0
- package/packages/panda/styled-system/jsx/float.mjs +14 -0
- package/packages/panda/styled-system/jsx/grid-item.d.ts +10 -0
- package/packages/panda/styled-system/jsx/grid-item.mjs +14 -0
- package/packages/panda/styled-system/jsx/grid.d.ts +10 -0
- package/packages/panda/styled-system/jsx/grid.mjs +14 -0
- package/packages/panda/styled-system/jsx/hstack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/hstack.mjs +14 -0
- package/packages/panda/styled-system/jsx/index.d.ts +24 -0
- package/packages/panda/styled-system/jsx/index.mjs +22 -0
- package/packages/panda/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/packages/panda/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/packages/panda/styled-system/jsx/link-overlay.d.ts +10 -0
- package/packages/panda/styled-system/jsx/link-overlay.mjs +14 -0
- package/packages/panda/styled-system/jsx/spacer.d.ts +10 -0
- package/packages/panda/styled-system/jsx/spacer.mjs +14 -0
- package/packages/panda/styled-system/jsx/square.d.ts +10 -0
- package/packages/panda/styled-system/jsx/square.mjs +14 -0
- package/packages/panda/styled-system/jsx/stack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/stack.mjs +14 -0
- package/packages/panda/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/packages/panda/styled-system/jsx/visually-hidden.mjs +14 -0
- package/packages/panda/styled-system/jsx/vstack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/vstack.mjs +14 -0
- package/packages/panda/styled-system/jsx/wrap.d.ts +10 -0
- package/packages/panda/styled-system/jsx/wrap.mjs +14 -0
- package/packages/panda/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/packages/panda/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/packages/panda/styled-system/patterns/bleed.d.ts +22 -0
- package/packages/panda/styled-system/patterns/bleed.mjs +24 -0
- package/packages/panda/styled-system/patterns/box.d.ts +21 -0
- package/packages/panda/styled-system/patterns/box.mjs +15 -0
- package/packages/panda/styled-system/patterns/center.d.ts +21 -0
- package/packages/panda/styled-system/patterns/center.mjs +21 -0
- package/packages/panda/styled-system/patterns/circle.d.ts +21 -0
- package/packages/panda/styled-system/patterns/circle.mjs +25 -0
- package/packages/panda/styled-system/patterns/container.d.ts +21 -0
- package/packages/panda/styled-system/patterns/container.mjs +21 -0
- package/packages/panda/styled-system/patterns/cq.d.ts +22 -0
- package/packages/panda/styled-system/patterns/cq.mjs +21 -0
- package/packages/panda/styled-system/patterns/divider.d.ts +23 -0
- package/packages/panda/styled-system/patterns/divider.mjs +25 -0
- package/packages/panda/styled-system/patterns/flex.d.ts +27 -0
- package/packages/panda/styled-system/patterns/flex.mjs +26 -0
- package/packages/panda/styled-system/patterns/float.d.ts +24 -0
- package/packages/panda/styled-system/patterns/float.mjs +52 -0
- package/packages/panda/styled-system/patterns/grid-item.d.ts +26 -0
- package/packages/panda/styled-system/patterns/grid-item.mjs +25 -0
- package/packages/panda/styled-system/patterns/grid.d.ts +25 -0
- package/packages/panda/styled-system/patterns/grid.mjs +27 -0
- package/packages/panda/styled-system/patterns/hstack.d.ts +22 -0
- package/packages/panda/styled-system/patterns/hstack.mjs +24 -0
- package/packages/panda/styled-system/patterns/index.d.ts +21 -0
- package/packages/panda/styled-system/patterns/index.mjs +20 -0
- package/packages/panda/styled-system/patterns/link-overlay.d.ts +21 -0
- package/packages/panda/styled-system/patterns/link-overlay.mjs +24 -0
- package/packages/panda/styled-system/patterns/spacer.d.ts +21 -0
- package/packages/panda/styled-system/patterns/spacer.mjs +21 -0
- package/packages/panda/styled-system/patterns/square.d.ts +21 -0
- package/packages/panda/styled-system/patterns/square.mjs +24 -0
- package/packages/panda/styled-system/patterns/stack.d.ts +24 -0
- package/packages/panda/styled-system/patterns/stack.mjs +24 -0
- package/packages/panda/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/packages/panda/styled-system/patterns/visually-hidden.mjs +18 -0
- package/packages/panda/styled-system/patterns/vstack.d.ts +22 -0
- package/packages/panda/styled-system/patterns/vstack.mjs +24 -0
- package/packages/panda/styled-system/patterns/wrap.d.ts +25 -0
- package/packages/panda/styled-system/patterns/wrap.mjs +25 -0
- package/packages/panda/styled-system/recipes/aeon-accordion.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-accordion.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-async.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-async.mjs +56 -0
- package/packages/panda/styled-system/recipes/aeon-badge.d.ts +31 -0
- package/packages/panda/styled-system/recipes/aeon-badge.mjs +32 -0
- package/packages/panda/styled-system/recipes/aeon-button-group.d.ts +39 -0
- package/packages/panda/styled-system/recipes/aeon-button-group.mjs +37 -0
- package/packages/panda/styled-system/recipes/aeon-button.d.ts +39 -0
- package/packages/panda/styled-system/recipes/aeon-button.mjs +39 -0
- package/packages/panda/styled-system/recipes/aeon-checkbox.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-checkbox.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-combobox.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-combobox.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-dialog.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-dialog.mjs +60 -0
- package/packages/panda/styled-system/recipes/aeon-field.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-field.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-menu.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-menu.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-popover.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-popover.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-scroll.d.ts +43 -0
- package/packages/panda/styled-system/recipes/aeon-scroll.mjs +63 -0
- package/packages/panda/styled-system/recipes/aeon-select.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-select.mjs +56 -0
- package/packages/panda/styled-system/recipes/aeon-switch.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-switch.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-tabs.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-tabs.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-toast.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-toast.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-tooltip.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-tooltip.mjs +48 -0
- package/packages/panda/styled-system/recipes/create-recipe.mjs +82 -0
- package/packages/panda/styled-system/recipes/index.d.ts +18 -0
- package/packages/panda/styled-system/recipes/index.mjs +17 -0
- package/packages/panda/styled-system/styles.css +2157 -0
- package/packages/panda/styled-system/tokens/index.d.ts +9 -0
- package/packages/panda/styled-system/tokens/index.mjs +2156 -0
- package/packages/panda/styled-system/tokens/tokens.d.ts +60 -0
- package/packages/panda/styled-system/types/composition.d.ts +164 -0
- package/packages/panda/styled-system/types/conditions.d.ts +322 -0
- package/packages/panda/styled-system/types/csstype.d.ts +21298 -0
- package/packages/panda/styled-system/types/global.d.ts +20 -0
- package/packages/panda/styled-system/types/index.d.ts +8 -0
- package/packages/panda/styled-system/types/jsx.d.ts +52 -0
- package/packages/panda/styled-system/types/parts.d.ts +8 -0
- package/packages/panda/styled-system/types/pattern.d.ts +78 -0
- package/packages/panda/styled-system/types/prop-type.d.ts +240 -0
- package/packages/panda/styled-system/types/recipe.d.ts +181 -0
- package/packages/panda/styled-system/types/selectors.d.ts +59 -0
- package/packages/panda/styled-system/types/static-css.d.ts +56 -0
- package/packages/panda/styled-system/types/style-props.d.ts +7491 -0
- package/packages/panda/styled-system/types/system-types.d.ts +193 -0
- package/packages/panda/theme-runtime.css +842 -0
- package/packages/panda/tsconfig.json +8 -0
- package/packages/primitives/README.md +54 -0
- package/packages/primitives/package.json +41 -0
- package/packages/primitives/src/__tests__/floating-surface.test.ts +29 -0
- package/packages/primitives/src/index.ts +9 -0
- package/packages/primitives/src/machines/accordion.ts +56 -0
- package/packages/primitives/src/machines/async.ts +108 -0
- package/packages/primitives/src/machines/button.ts +66 -0
- package/packages/primitives/src/machines/dialog.ts +61 -0
- package/packages/primitives/src/machines/field.ts +85 -0
- package/packages/primitives/src/machines/popover.ts +52 -0
- package/packages/primitives/src/machines/tabs.ts +46 -0
- package/packages/primitives/src/machines/toast.ts +48 -0
- package/packages/primitives/src/machines/toggle.ts +61 -0
- package/packages/primitives/tsconfig.json +8 -0
- package/packages/primitives/vitest.config.ts +8 -0
- package/packages/react/README.md +65 -0
- package/packages/react/package.json +52 -0
- package/packages/react/src/accordion/index.tsx +179 -0
- package/packages/react/src/async/actions.tsx +22 -0
- package/packages/react/src/async/context.tsx +54 -0
- package/packages/react/src/async/index.tsx +21 -0
- package/packages/react/src/async/legacy-region.tsx +38 -0
- package/packages/react/src/async/readout.tsx +34 -0
- package/packages/react/src/async/root.tsx +39 -0
- package/packages/react/src/async/track.tsx +59 -0
- package/packages/react/src/avatar/avatar.test.tsx +27 -0
- package/packages/react/src/avatar/index.tsx +122 -0
- package/packages/react/src/button/index.tsx +70 -0
- package/packages/react/src/checkbox/index.tsx +180 -0
- package/packages/react/src/combobox/index.tsx +430 -0
- package/packages/react/src/dialog/dialog.test.tsx +50 -0
- package/packages/react/src/dialog/index.tsx +275 -0
- package/packages/react/src/field/index.tsx +172 -0
- package/packages/react/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/react/src/hooks/use-anchor-position.ts +33 -0
- package/packages/react/src/hooks/use-focus-trap.ts +51 -0
- package/packages/react/src/hooks/use-layout-mode.ts +22 -0
- package/packages/react/src/hooks/use-outside-click.ts +19 -0
- package/packages/react/src/hooks/use-portalled.ts +16 -0
- package/packages/react/src/hooks/use-scroll-lock.ts +13 -0
- package/packages/react/src/index.ts +18 -0
- package/packages/react/src/menu/index.tsx +195 -0
- package/packages/react/src/popover/index.tsx +191 -0
- package/packages/react/src/scroll/index.tsx +98 -0
- package/packages/react/src/scroll/use-scroll-state.ts +30 -0
- package/packages/react/src/select/index.tsx +372 -0
- package/packages/react/src/select/select.test.tsx +60 -0
- package/packages/react/src/switch/index.tsx +215 -0
- package/packages/react/src/tabs/index.tsx +140 -0
- package/packages/react/src/toast/context.tsx +28 -0
- package/packages/react/src/toast/index.tsx +20 -0
- package/packages/react/src/toast/primitives.tsx +129 -0
- package/packages/react/src/toast/provider.tsx +111 -0
- package/packages/react/src/toast/toast-item.tsx +32 -0
- package/packages/react/src/tooltip/index.tsx +191 -0
- package/packages/react/src/utils/merge-props.ts +24 -0
- package/packages/react/tsconfig.json +8 -0
- package/packages/react/vitest.config.ts +9 -0
- package/packages/react/vitest.setup.ts +5 -0
- package/packages/react-scene/README.md +11 -0
- package/packages/react-scene/package.json +47 -0
- package/packages/react-scene/scene-3d.css +37 -0
- package/packages/react-scene/scene-room.css +95 -0
- package/packages/react-scene/src/index.ts +20 -0
- package/packages/react-scene/src/procedural-grid.tsx +35 -0
- package/packages/react-scene/src/scene-layer.tsx +38 -0
- package/packages/react-scene/src/scene-plane.tsx +69 -0
- package/packages/react-scene/src/scene-room.tsx +81 -0
- package/packages/react-scene/src/scene-root.tsx +49 -0
- package/packages/react-scene/src/scene-slot.tsx +41 -0
- package/packages/react-scene/src/scene-stage.tsx +37 -0
- package/packages/react-scene/src/scene-surface.tsx +20 -0
- package/packages/react-scene/src/signal-bars.tsx +57 -0
- package/packages/react-scene/src/use-signal-visualizer.ts +103 -0
- package/packages/react-scene/tsconfig.json +8 -0
- package/packages/scene/README.md +5 -0
- package/packages/scene/package.json +32 -0
- package/packages/scene/src/index.ts +2 -0
- package/packages/scene/src/room.ts +40 -0
- package/packages/scene/src/transform.ts +60 -0
- package/packages/scene/tsconfig.json +8 -0
- package/packages/signal/README.md +9 -0
- package/packages/signal/package.json +32 -0
- package/packages/signal/src/analyser.ts +113 -0
- package/packages/signal/src/bands.ts +33 -0
- package/packages/signal/src/index.ts +3 -0
- package/packages/signal/src/motion.ts +80 -0
- package/packages/signal/tsconfig.json +8 -0
- package/packages/site/README.md +19 -0
- package/packages/site/package.json +32 -0
- package/packages/site/src/index.ts +8 -0
- package/packages/site/src/open-graph.ts +90 -0
- package/packages/site/tsconfig.json +8 -0
- package/packages/solid/README.md +30 -0
- package/packages/solid/package.json +42 -0
- package/packages/solid/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/solid/src/index.ts +2 -0
- package/packages/solid/src/switch/index.tsx +191 -0
- package/packages/solid/src/utils/merge-props.ts +3 -0
- package/packages/solid/tsconfig.json +10 -0
- package/packages/surface/README.md +10 -0
- package/packages/surface/package.json +33 -0
- package/packages/surface/src/index.ts +1 -0
- package/packages/surface/src/materials.ts +14 -0
- package/packages/surface/surface.css +113 -0
- package/packages/surface/tsconfig.json +8 -0
- package/packages/svelte/README.md +45 -0
- package/packages/svelte/package.json +49 -0
- package/packages/svelte/src/Switch.svelte +86 -0
- package/packages/svelte/src/SwitchControl.svelte +45 -0
- package/packages/svelte/src/SwitchHiddenInput.svelte +12 -0
- package/packages/svelte/src/SwitchLabel.svelte +9 -0
- package/packages/svelte/src/SwitchThumb.svelte +16 -0
- package/packages/svelte/src/hooks/use-aeon-machine.ts +23 -0
- package/packages/svelte/src/index.ts +2 -0
- package/packages/svelte/src/switch-context.ts +13 -0
- package/packages/svelte/tsconfig.json +8 -0
- package/packages/ui/README.md +63 -0
- package/packages/ui/package.json +45 -0
- package/packages/ui/src/accordion.tsx +27 -0
- package/packages/ui/src/async.tsx +43 -0
- package/packages/ui/src/badge.tsx +18 -0
- package/packages/ui/src/button.tsx +38 -0
- package/packages/ui/src/checkbox.tsx +24 -0
- package/packages/ui/src/cn.ts +1 -0
- package/packages/ui/src/combobox.tsx +29 -0
- package/packages/ui/src/dialog.tsx +32 -0
- package/packages/ui/src/field.tsx +33 -0
- package/packages/ui/src/index.ts +17 -0
- package/packages/ui/src/menu.tsx +25 -0
- package/packages/ui/src/popover.tsx +22 -0
- package/packages/ui/src/scroll.tsx +51 -0
- package/packages/ui/src/select.tsx +33 -0
- package/packages/ui/src/styles.css +2 -0
- package/packages/ui/src/switch.tsx +22 -0
- package/packages/ui/src/tabs.tsx +22 -0
- package/packages/ui/src/toast.tsx +36 -0
- package/packages/ui/src/tooltip.tsx +19 -0
- package/packages/ui/tsconfig.json +12 -0
- package/packages/vue/README.md +40 -0
- package/packages/vue/package.json +42 -0
- package/packages/vue/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/vue/src/index.ts +2 -0
- package/packages/vue/src/switch/index.ts +208 -0
- package/packages/vue/src/utils/part-props.ts +8 -0
- package/packages/vue/tsconfig.json +8 -0
- package/pnpm-workspace.yaml +3 -0
- package/scripts/ensure-headless-built.mjs +25 -0
- package/tsconfig.base.json +21 -0
- package/vercel.json +12 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
import { navLinks } from '../nav.js'
|
|
3
|
+
import { site } from '../site.js'
|
|
4
|
+
import { Button } from '@aeon-ui/ui'
|
|
5
|
+
import { ThemeSwitcher } from './ThemeSwitcher.js'
|
|
6
|
+
|
|
7
|
+
export function LandingHeader() {
|
|
8
|
+
const [scrolled, setScrolled] = useState(false)
|
|
9
|
+
const [active, setActive] = useState('')
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const onScroll = () => {
|
|
13
|
+
setScrolled(window.scrollY > 4)
|
|
14
|
+
const offset = 120
|
|
15
|
+
for (const link of [...navLinks].reverse()) {
|
|
16
|
+
const el = document.getElementById(link.sectionId)
|
|
17
|
+
if (el && el.getBoundingClientRect().top <= offset) {
|
|
18
|
+
setActive(link.href)
|
|
19
|
+
return
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
setActive('')
|
|
23
|
+
}
|
|
24
|
+
onScroll()
|
|
25
|
+
window.addEventListener('scroll', onScroll, { passive: true })
|
|
26
|
+
return () => window.removeEventListener('scroll', onScroll)
|
|
27
|
+
}, [])
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<header className={`landing-header${scrolled ? ' landing-header--scrolled' : ''}`}>
|
|
31
|
+
<div className="landing-header__shell">
|
|
32
|
+
<a href="#" className="landing-header__brand" onClick={(e) => e.preventDefault()}>
|
|
33
|
+
{site.brand}
|
|
34
|
+
</a>
|
|
35
|
+
<nav className="landing-header__nav" aria-label="Primary">
|
|
36
|
+
{navLinks.map((l) => (
|
|
37
|
+
<a
|
|
38
|
+
key={l.href}
|
|
39
|
+
href={l.href}
|
|
40
|
+
className={active === l.href ? 'is-active' : undefined}
|
|
41
|
+
>
|
|
42
|
+
{l.label}
|
|
43
|
+
</a>
|
|
44
|
+
))}
|
|
45
|
+
</nav>
|
|
46
|
+
<div className="landing-header__utilities">
|
|
47
|
+
<ThemeSwitcher />
|
|
48
|
+
<a href="#playground" className="landing-header__cta">
|
|
49
|
+
<Button.Root size="xs">
|
|
50
|
+
<span className="landing-header__cta-label landing-header__cta-label--long">
|
|
51
|
+
{site.heroCtaPrimary}
|
|
52
|
+
</span>
|
|
53
|
+
<span className="landing-header__cta-label landing-header__cta-label--short">Demo</span>
|
|
54
|
+
</Button.Root>
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</header>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Button } from '@aeon-ui/ui'
|
|
2
|
+
import { HeroInstallLine } from './HeroInstall.js'
|
|
3
|
+
import { site } from '../site.js'
|
|
4
|
+
import { AsyncMachineDemo } from './AsyncMachineDemo.js'
|
|
5
|
+
|
|
6
|
+
export function LandingHero() {
|
|
7
|
+
return (
|
|
8
|
+
<section className="hero">
|
|
9
|
+
<div className="container hero__grid">
|
|
10
|
+
<div className="hero__copy">
|
|
11
|
+
<p className="hero__eyebrow">{site.heroEyebrow}</p>
|
|
12
|
+
<h1 className="hero__title">
|
|
13
|
+
{site.heroTitle}
|
|
14
|
+
<br />
|
|
15
|
+
<span className="text-accent">{site.heroAccent}</span>
|
|
16
|
+
</h1>
|
|
17
|
+
<p className="hero__lead">{site.heroLead}</p>
|
|
18
|
+
<p className="hero__sub">{site.heroSub}</p>
|
|
19
|
+
<HeroInstallLine />
|
|
20
|
+
<Button.Group className="hero__actions">
|
|
21
|
+
<a href="#playground">
|
|
22
|
+
<Button.Root>{site.heroCtaPrimary}</Button.Root>
|
|
23
|
+
</a>
|
|
24
|
+
<a href="#layers">
|
|
25
|
+
<Button.Root variant="outline">{site.heroCtaSecondary}</Button.Root>
|
|
26
|
+
</a>
|
|
27
|
+
</Button.Group>
|
|
28
|
+
<div className="hero__stats panel" role="list">
|
|
29
|
+
{site.heroStats.map((s, i) => (
|
|
30
|
+
<div
|
|
31
|
+
key={s.label}
|
|
32
|
+
className="hero__stat"
|
|
33
|
+
role="listitem"
|
|
34
|
+
data-aeon-scope="hero"
|
|
35
|
+
data-aeon-part="stat"
|
|
36
|
+
data-aeon-state={i === 0 ? 'active' : 'inactive'}
|
|
37
|
+
>
|
|
38
|
+
<span className="hero__stat-label">{s.label}</span>
|
|
39
|
+
<span className="hero__stat-detail">{s.detail}</span>
|
|
40
|
+
<code className="hero__stat-example">{s.example}</code>
|
|
41
|
+
</div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="hero__visual">
|
|
46
|
+
<div className="panel state-card" data-aeon-scope="hero" data-aeon-part="preview">
|
|
47
|
+
<p className="state-card__label">{site.stateCardLabel}</p>
|
|
48
|
+
<p className="state-card__hint">{site.stateCardHint}</p>
|
|
49
|
+
<AsyncMachineDemo variant="hero" />
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { commitments, layers, site } from '../site.js'
|
|
2
|
+
import { CodeExample } from './CodeExample.js'
|
|
3
|
+
|
|
4
|
+
export function LayersSection() {
|
|
5
|
+
return (
|
|
6
|
+
<section id="layers" className="section">
|
|
7
|
+
<div className="container">
|
|
8
|
+
<header className="section-header">
|
|
9
|
+
<p className="section-label">{site.layersLabel}</p>
|
|
10
|
+
<h2 className="section-title">{site.layersTitle}</h2>
|
|
11
|
+
<p className="section-lead">{site.layersLead}</p>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<div className="layers__commitments panel" role="list">
|
|
15
|
+
{commitments.map((c) => (
|
|
16
|
+
<div key={c.id} className="layers__commitment" role="listitem">
|
|
17
|
+
<h3>{c.title}</h3>
|
|
18
|
+
<p>{c.description}</p>
|
|
19
|
+
</div>
|
|
20
|
+
))}
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div className="layers__grid" role="list">
|
|
24
|
+
{layers.map((l, index) => (
|
|
25
|
+
<article
|
|
26
|
+
key={l.id}
|
|
27
|
+
className="panel layer-card"
|
|
28
|
+
role="listitem"
|
|
29
|
+
data-aeon-scope="layers"
|
|
30
|
+
data-aeon-part="card"
|
|
31
|
+
>
|
|
32
|
+
<span className="layer-card__index" aria-hidden>
|
|
33
|
+
{String(index + 1).padStart(2, '0')}
|
|
34
|
+
</span>
|
|
35
|
+
<h3>{l.title}</h3>
|
|
36
|
+
<p>{l.description}</p>
|
|
37
|
+
<ul>
|
|
38
|
+
{l.highlights.map((h) => (
|
|
39
|
+
<li key={h}>{h}</li>
|
|
40
|
+
))}
|
|
41
|
+
</ul>
|
|
42
|
+
<div className="layer-card__example">
|
|
43
|
+
<CodeExample code={l.example} />
|
|
44
|
+
</div>
|
|
45
|
+
</article>
|
|
46
|
+
))}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</section>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { useEffect, useId, useState } from 'react'
|
|
2
|
+
|
|
3
|
+
let mermaidReady = false
|
|
4
|
+
|
|
5
|
+
function ensureMermaid(mermaid: typeof import('mermaid').default) {
|
|
6
|
+
if (mermaidReady) return
|
|
7
|
+
mermaid.initialize({
|
|
8
|
+
startOnLoad: false,
|
|
9
|
+
theme: 'base',
|
|
10
|
+
themeVariables: {
|
|
11
|
+
fontFamily: 'Instrument Sans, system-ui, sans-serif',
|
|
12
|
+
fontSize: '14px',
|
|
13
|
+
primaryColor: '#1a1f2e',
|
|
14
|
+
primaryTextColor: '#e8ecf4',
|
|
15
|
+
primaryBorderColor: '#5eead4',
|
|
16
|
+
lineColor: '#8b95a8',
|
|
17
|
+
secondaryColor: '#12161f',
|
|
18
|
+
tertiaryColor: '#0e1118',
|
|
19
|
+
noteBkgColor: '#12161f',
|
|
20
|
+
noteTextColor: '#b8c0d0',
|
|
21
|
+
noteBorderColor: '#3d4556',
|
|
22
|
+
},
|
|
23
|
+
state: {
|
|
24
|
+
nodeSpacing: 48,
|
|
25
|
+
rankSpacing: 56,
|
|
26
|
+
},
|
|
27
|
+
flowchart: {
|
|
28
|
+
curve: 'basis',
|
|
29
|
+
padding: 12,
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
mermaidReady = true
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface MermaidDiagramProps {
|
|
36
|
+
source: string
|
|
37
|
+
title?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function MermaidDiagram({ source, title }: MermaidDiagramProps) {
|
|
41
|
+
const reactId = useId().replace(/:/g, '')
|
|
42
|
+
const [svg, setSvg] = useState<string | null>(null)
|
|
43
|
+
const [error, setError] = useState<string | null>(null)
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
let cancelled = false
|
|
47
|
+
const run = async () => {
|
|
48
|
+
try {
|
|
49
|
+
const mermaid = (await import('mermaid')).default
|
|
50
|
+
ensureMermaid(mermaid)
|
|
51
|
+
const { svg: rendered } = await mermaid.render(`aeon-mmd-${reactId}`, source)
|
|
52
|
+
if (!cancelled) {
|
|
53
|
+
setSvg(rendered)
|
|
54
|
+
setError(null)
|
|
55
|
+
}
|
|
56
|
+
} catch (e) {
|
|
57
|
+
if (!cancelled) {
|
|
58
|
+
setError(e instanceof Error ? e.message : 'Diagram failed to render')
|
|
59
|
+
setSvg(null)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
void run()
|
|
65
|
+
return () => {
|
|
66
|
+
cancelled = true
|
|
67
|
+
}
|
|
68
|
+
}, [source, reactId])
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<figure className="diagram-card__figure">
|
|
72
|
+
{title ? <figcaption className="sr-only">{title}</figcaption> : null}
|
|
73
|
+
<div className="diagram-card__mermaid" aria-hidden={!!error}>
|
|
74
|
+
{error ? (
|
|
75
|
+
<pre className="diagram-card__error">{error}</pre>
|
|
76
|
+
) : svg ? (
|
|
77
|
+
<div dangerouslySetInnerHTML={{ __html: svg }} />
|
|
78
|
+
) : (
|
|
79
|
+
<p className="diagram-card__loading">Rendering diagram…</p>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
</figure>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Button } from '@aeon-ui/ui'
|
|
2
|
+
import { philosophyTenets, site } from '../site.js'
|
|
3
|
+
import { CodeExample } from './CodeExample.js'
|
|
4
|
+
|
|
5
|
+
export function PhilosophySection() {
|
|
6
|
+
return (
|
|
7
|
+
<section id="philosophy" className="section">
|
|
8
|
+
<div className="container">
|
|
9
|
+
<header className="section-header">
|
|
10
|
+
<p className="section-label">{site.philosophyLabel}</p>
|
|
11
|
+
<h2 className="section-title">{site.philosophyTitle}</h2>
|
|
12
|
+
<p className="section-lead">{site.philosophyLead}</p>
|
|
13
|
+
</header>
|
|
14
|
+
|
|
15
|
+
<div className="panel thesis__grid">
|
|
16
|
+
{philosophyTenets.map((t) => (
|
|
17
|
+
<article key={t.title} className="thesis__card">
|
|
18
|
+
<h3>{t.title}</h3>
|
|
19
|
+
<p>{t.body}</p>
|
|
20
|
+
<CodeExample code={t.example} />
|
|
21
|
+
</article>
|
|
22
|
+
))}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div className="thesis__cta">
|
|
26
|
+
<a href={site.thesisUrl} target="_blank" rel="noreferrer">
|
|
27
|
+
<Button.Root variant="outline">{site.thesisCta}</Button.Root>
|
|
28
|
+
</a>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
import { CodeExample } from './CodeExample.js'
|
|
3
|
+
|
|
4
|
+
export interface PlaygroundBlockProps {
|
|
5
|
+
title: string
|
|
6
|
+
description: string
|
|
7
|
+
example: string
|
|
8
|
+
children: ReactNode
|
|
9
|
+
last?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function PlaygroundBlock({ title, description, example, children, last }: PlaygroundBlockProps) {
|
|
13
|
+
return (
|
|
14
|
+
<section
|
|
15
|
+
className={`playground__block${last ? ' playground__block--last' : ''}`}
|
|
16
|
+
>
|
|
17
|
+
<h3 className="playground__block-title">{title}</h3>
|
|
18
|
+
<p className="playground__block-sub">{description}</p>
|
|
19
|
+
<CodeExample code={example} />
|
|
20
|
+
{children}
|
|
21
|
+
</section>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Accordion,
|
|
3
|
+
Button,
|
|
4
|
+
Checkbox,
|
|
5
|
+
Dialog,
|
|
6
|
+
Menu,
|
|
7
|
+
Popover,
|
|
8
|
+
Switch,
|
|
9
|
+
Tabs,
|
|
10
|
+
Tooltip,
|
|
11
|
+
useToast,
|
|
12
|
+
} from '@aeon-ui/ui'
|
|
13
|
+
import { ComboboxDemo } from './ComboboxDemo.js'
|
|
14
|
+
import { useState } from 'react'
|
|
15
|
+
import {
|
|
16
|
+
accordionExamples,
|
|
17
|
+
playgroundBlocks,
|
|
18
|
+
site,
|
|
19
|
+
tabsExamples,
|
|
20
|
+
} from '../site.js'
|
|
21
|
+
import { AsyncMachineDemo } from './AsyncMachineDemo.js'
|
|
22
|
+
import { ButtonLifecycleDemo } from './ButtonLifecycleDemo.js'
|
|
23
|
+
import { CodeExample } from './CodeExample.js'
|
|
24
|
+
import { FieldStateDemo } from './FieldStateDemo.js'
|
|
25
|
+
import { ScrollRegionDemo } from './ScrollRegionDemo.js'
|
|
26
|
+
import { PlaygroundBlock } from './PlaygroundBlock.js'
|
|
27
|
+
|
|
28
|
+
function ToastDemo() {
|
|
29
|
+
const { publish } = useToast()
|
|
30
|
+
return (
|
|
31
|
+
<Button.Root
|
|
32
|
+
size="sm"
|
|
33
|
+
variant="outline"
|
|
34
|
+
onClick={() =>
|
|
35
|
+
publish({
|
|
36
|
+
title: 'Saved',
|
|
37
|
+
description: 'Your preferences were updated.',
|
|
38
|
+
durationMs: 4000,
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
>
|
|
42
|
+
Show toast
|
|
43
|
+
</Button.Root>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function PlaygroundSection() {
|
|
48
|
+
const [notifications, setNotifications] = useState(true)
|
|
49
|
+
const b = playgroundBlocks
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<section id="playground" className="section">
|
|
53
|
+
<div className="container">
|
|
54
|
+
<header className="section-header">
|
|
55
|
+
<p className="section-label">{site.playgroundLabel}</p>
|
|
56
|
+
<h2 className="section-title">{site.playgroundTitle}</h2>
|
|
57
|
+
<p className="section-lead">{site.playgroundLead}</p>
|
|
58
|
+
</header>
|
|
59
|
+
|
|
60
|
+
<div className="panel playground">
|
|
61
|
+
<PlaygroundBlock {...b.async}>
|
|
62
|
+
<AsyncMachineDemo />
|
|
63
|
+
</PlaygroundBlock>
|
|
64
|
+
|
|
65
|
+
<PlaygroundBlock {...b.buttonLifecycle}>
|
|
66
|
+
<ButtonLifecycleDemo />
|
|
67
|
+
</PlaygroundBlock>
|
|
68
|
+
|
|
69
|
+
<PlaygroundBlock {...b.field}>
|
|
70
|
+
<FieldStateDemo />
|
|
71
|
+
</PlaygroundBlock>
|
|
72
|
+
|
|
73
|
+
<PlaygroundBlock {...b.scroll}>
|
|
74
|
+
<ScrollRegionDemo />
|
|
75
|
+
</PlaygroundBlock>
|
|
76
|
+
|
|
77
|
+
<PlaygroundBlock {...b.buttons}>
|
|
78
|
+
<Button.Group className="playground-button-row">
|
|
79
|
+
<Button.Root>Primary</Button.Root>
|
|
80
|
+
<Button.Root variant="outline">Outline</Button.Root>
|
|
81
|
+
<Button.Root variant="ghost">Ghost</Button.Root>
|
|
82
|
+
</Button.Group>
|
|
83
|
+
</PlaygroundBlock>
|
|
84
|
+
|
|
85
|
+
<PlaygroundBlock {...b.toggle}>
|
|
86
|
+
<div className="demo-stack">
|
|
87
|
+
<Switch.Root checked={notifications} onCheckedChange={setNotifications}>
|
|
88
|
+
<Switch.Control>
|
|
89
|
+
<Switch.Thumb />
|
|
90
|
+
</Switch.Control>
|
|
91
|
+
<Switch.Label>Enable notifications</Switch.Label>
|
|
92
|
+
</Switch.Root>
|
|
93
|
+
<Checkbox.Root checked={notifications} onCheckedChange={setNotifications}>
|
|
94
|
+
<Checkbox.Control>
|
|
95
|
+
<Checkbox.Indicator />
|
|
96
|
+
</Checkbox.Control>
|
|
97
|
+
<Checkbox.Label>Email digest</Checkbox.Label>
|
|
98
|
+
</Checkbox.Root>
|
|
99
|
+
</div>
|
|
100
|
+
</PlaygroundBlock>
|
|
101
|
+
|
|
102
|
+
<PlaygroundBlock {...b.combobox}>
|
|
103
|
+
<ComboboxDemo />
|
|
104
|
+
</PlaygroundBlock>
|
|
105
|
+
|
|
106
|
+
<PlaygroundBlock {...b.dialog}>
|
|
107
|
+
<Dialog.Root>
|
|
108
|
+
<Dialog.Trigger>Open dialog</Dialog.Trigger>
|
|
109
|
+
<Dialog.Backdrop />
|
|
110
|
+
<Dialog.Positioner>
|
|
111
|
+
<Dialog.Content>
|
|
112
|
+
<Dialog.Title>Example modal</Dialog.Title>
|
|
113
|
+
<Dialog.Description>
|
|
114
|
+
Press Escape or click outside — both close via the dialog machine.
|
|
115
|
+
</Dialog.Description>
|
|
116
|
+
<Dialog.CloseTrigger>Close</Dialog.CloseTrigger>
|
|
117
|
+
</Dialog.Content>
|
|
118
|
+
</Dialog.Positioner>
|
|
119
|
+
</Dialog.Root>
|
|
120
|
+
</PlaygroundBlock>
|
|
121
|
+
|
|
122
|
+
<PlaygroundBlock {...b.overlay}>
|
|
123
|
+
<div className="demo-stack demo-overlay-row">
|
|
124
|
+
<Menu.Root>
|
|
125
|
+
<Menu.Trigger>Menu</Menu.Trigger>
|
|
126
|
+
<Menu.Positioner>
|
|
127
|
+
<Menu.Content>
|
|
128
|
+
<Menu.Item>Save draft</Menu.Item>
|
|
129
|
+
<Menu.Item>Duplicate</Menu.Item>
|
|
130
|
+
<Menu.Separator />
|
|
131
|
+
<Menu.Item>Delete</Menu.Item>
|
|
132
|
+
</Menu.Content>
|
|
133
|
+
</Menu.Positioner>
|
|
134
|
+
</Menu.Root>
|
|
135
|
+
|
|
136
|
+
<Popover.Root>
|
|
137
|
+
<Popover.Trigger>Popover</Popover.Trigger>
|
|
138
|
+
<Popover.Positioner>
|
|
139
|
+
<Popover.Content>
|
|
140
|
+
<p style={{ margin: 0 }}>Anchored panel — open/closed is explicit on the machine.</p>
|
|
141
|
+
<Popover.CloseTrigger>Close</Popover.CloseTrigger>
|
|
142
|
+
</Popover.Content>
|
|
143
|
+
</Popover.Positioner>
|
|
144
|
+
</Popover.Root>
|
|
145
|
+
|
|
146
|
+
<Tooltip.Root>
|
|
147
|
+
<Tooltip.Trigger>
|
|
148
|
+
<span className="demo-tooltip-anchor">Tooltip</span>
|
|
149
|
+
</Tooltip.Trigger>
|
|
150
|
+
<Tooltip.Positioner>
|
|
151
|
+
<Tooltip.Content>State-first floating copy</Tooltip.Content>
|
|
152
|
+
</Tooltip.Positioner>
|
|
153
|
+
</Tooltip.Root>
|
|
154
|
+
|
|
155
|
+
<ToastDemo />
|
|
156
|
+
</div>
|
|
157
|
+
</PlaygroundBlock>
|
|
158
|
+
|
|
159
|
+
<PlaygroundBlock {...b.tabsAccordion} last>
|
|
160
|
+
<Tabs.Root defaultValue="philosophy" className="demo-spaced-bottom">
|
|
161
|
+
<Tabs.List>
|
|
162
|
+
<Tabs.Trigger value="philosophy">{tabsExamples.philosophy.label}</Tabs.Trigger>
|
|
163
|
+
<Tabs.Trigger value="machines">{tabsExamples.machines.label}</Tabs.Trigger>
|
|
164
|
+
<Tabs.Trigger value="anatomy">{tabsExamples.anatomy.label}</Tabs.Trigger>
|
|
165
|
+
</Tabs.List>
|
|
166
|
+
<Tabs.Content value="philosophy">
|
|
167
|
+
<p>{tabsExamples.philosophy.content}</p>
|
|
168
|
+
<CodeExample code={tabsExamples.philosophy.example} />
|
|
169
|
+
</Tabs.Content>
|
|
170
|
+
<Tabs.Content value="machines">
|
|
171
|
+
<p>{tabsExamples.machines.content}</p>
|
|
172
|
+
<CodeExample code={tabsExamples.machines.example} />
|
|
173
|
+
</Tabs.Content>
|
|
174
|
+
<Tabs.Content value="anatomy">
|
|
175
|
+
<p>{tabsExamples.anatomy.content}</p>
|
|
176
|
+
<CodeExample code={tabsExamples.anatomy.example} />
|
|
177
|
+
</Tabs.Content>
|
|
178
|
+
</Tabs.Root>
|
|
179
|
+
<Accordion.Root defaultValue={['what']}>
|
|
180
|
+
<Accordion.Item value="what">
|
|
181
|
+
<Accordion.ItemTrigger value="what">
|
|
182
|
+
{accordionExamples.what.trigger}
|
|
183
|
+
</Accordion.ItemTrigger>
|
|
184
|
+
<Accordion.ItemContent value="what">
|
|
185
|
+
<p>{accordionExamples.what.content}</p>
|
|
186
|
+
<CodeExample code={accordionExamples.what.example} />
|
|
187
|
+
</Accordion.ItemContent>
|
|
188
|
+
</Accordion.Item>
|
|
189
|
+
<Accordion.Item value="why">
|
|
190
|
+
<Accordion.ItemTrigger value="why">
|
|
191
|
+
{accordionExamples.why.trigger}
|
|
192
|
+
</Accordion.ItemTrigger>
|
|
193
|
+
<Accordion.ItemContent value="why">
|
|
194
|
+
<p>{accordionExamples.why.content}</p>
|
|
195
|
+
<CodeExample code={accordionExamples.why.example} />
|
|
196
|
+
</Accordion.ItemContent>
|
|
197
|
+
</Accordion.Item>
|
|
198
|
+
</Accordion.Root>
|
|
199
|
+
</PlaygroundBlock>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</section>
|
|
203
|
+
)
|
|
204
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
import { Button } from '@aeon-ui/ui'
|
|
3
|
+
import { createDemoSignal, type DemoSignal } from '@aeon-ui/signal'
|
|
4
|
+
import { surfaceMaterials } from '@aeon-ui/surface'
|
|
5
|
+
import {
|
|
6
|
+
ProceduralGrid,
|
|
7
|
+
SceneLayer,
|
|
8
|
+
ScenePlane,
|
|
9
|
+
SceneRoot,
|
|
10
|
+
SceneSlot,
|
|
11
|
+
SceneStage,
|
|
12
|
+
SceneSurface,
|
|
13
|
+
SignalBars,
|
|
14
|
+
} from '@aeon-ui/react-scene'
|
|
15
|
+
import { site } from '../site.js'
|
|
16
|
+
|
|
17
|
+
export function SceneSection() {
|
|
18
|
+
const [demo, setDemo] = useState<DemoSignal | null>(null)
|
|
19
|
+
const playing = demo !== null
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
return () => {
|
|
23
|
+
demo?.stop()
|
|
24
|
+
}
|
|
25
|
+
}, [demo])
|
|
26
|
+
|
|
27
|
+
const toggleDemo = () => {
|
|
28
|
+
if (demo) {
|
|
29
|
+
demo.stop()
|
|
30
|
+
setDemo(null)
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
const next = createDemoSignal({ frequency: 92 })
|
|
34
|
+
next.start()
|
|
35
|
+
setDemo(next)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<section id="scene" className="section">
|
|
40
|
+
<div className="container">
|
|
41
|
+
<header className="section-header">
|
|
42
|
+
<p className="section-label">{site.sceneLabel}</p>
|
|
43
|
+
<h2 className="section-title">{site.sceneTitle}</h2>
|
|
44
|
+
<p className="section-lead">{site.sceneLead}</p>
|
|
45
|
+
</header>
|
|
46
|
+
|
|
47
|
+
<div className="scene-demo panel">
|
|
48
|
+
<SceneRoot className="scene-demo__stage" state={playing ? 'active' : 'idle'}>
|
|
49
|
+
<ProceduralGrid cell={28} lineColor="rgba(94, 234, 212, 0.08)" />
|
|
50
|
+
<div className="scene-demo__swatches" role="list" aria-label="Surface materials">
|
|
51
|
+
{surfaceMaterials.map((material) => (
|
|
52
|
+
<SceneSurface
|
|
53
|
+
key={material}
|
|
54
|
+
material={material}
|
|
55
|
+
role="listitem"
|
|
56
|
+
className="scene-demo__swatch"
|
|
57
|
+
title={material}
|
|
58
|
+
/>
|
|
59
|
+
))}
|
|
60
|
+
</div>
|
|
61
|
+
<div className="scene-demo__viz">
|
|
62
|
+
<SignalBars
|
|
63
|
+
barCount={7}
|
|
64
|
+
active={playing}
|
|
65
|
+
analyser={demo?.analyser ?? null}
|
|
66
|
+
className="scene-demo__bars"
|
|
67
|
+
/>
|
|
68
|
+
<Button.Root size="sm" variant={playing ? 'outline' : 'solid'} onClick={toggleDemo}>
|
|
69
|
+
{playing ? 'Stop demo signal' : 'Start demo signal'}
|
|
70
|
+
</Button.Root>
|
|
71
|
+
</div>
|
|
72
|
+
</SceneRoot>
|
|
73
|
+
|
|
74
|
+
<div className="scene-demo__code">
|
|
75
|
+
<pre>
|
|
76
|
+
<code>{`import '@aeon-ui/surface/surface.css'
|
|
77
|
+
import { SignalBars, SceneSurface } from '@aeon-ui/react-scene'
|
|
78
|
+
import { attachMediaAnalyser } from '@aeon-ui/signal'`}</code>
|
|
79
|
+
</pre>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div className="scene-demo panel scene-demo--3d">
|
|
84
|
+
<header className="scene-demo__3d-header">
|
|
85
|
+
<h3 className="scene-demo__3d-title">{site.scene3dTitle}</h3>
|
|
86
|
+
<p className="scene-demo__3d-lead">{site.scene3dLead}</p>
|
|
87
|
+
</header>
|
|
88
|
+
|
|
89
|
+
<SceneStage className="scene-3d-demo" minHeight={340} perspective={{ distance: 980, origin: '50% 36%' }}>
|
|
90
|
+
<SceneLayer part="sky" transform={{ z: -130 }}>
|
|
91
|
+
<ScenePlane
|
|
92
|
+
part="sky"
|
|
93
|
+
style={{
|
|
94
|
+
background: 'linear-gradient(180deg, #243044 0%, #121820 55%, #0a0e14 100%)',
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
</SceneLayer>
|
|
98
|
+
|
|
99
|
+
<SceneLayer part="back-wall" transform={{ z: -85 }}>
|
|
100
|
+
<ScenePlane part="back-wall" material="stone" style={{ opacity: 0.85 }} />
|
|
101
|
+
</SceneLayer>
|
|
102
|
+
|
|
103
|
+
<SceneLayer part="wall-left" transform={{ z: -55, rotateY: 42 }} origin="0% 100%">
|
|
104
|
+
<ScenePlane
|
|
105
|
+
part="wall-left"
|
|
106
|
+
wall="left"
|
|
107
|
+
material="brick"
|
|
108
|
+
fill={false}
|
|
109
|
+
style={{ width: '54%', height: '78%', bottom: 0, left: 0 }}
|
|
110
|
+
/>
|
|
111
|
+
</SceneLayer>
|
|
112
|
+
|
|
113
|
+
<SceneLayer part="wall-right" transform={{ z: -55, rotateY: -42 }} origin="100% 100%">
|
|
114
|
+
<ScenePlane
|
|
115
|
+
part="wall-right"
|
|
116
|
+
wall="right"
|
|
117
|
+
material="brick"
|
|
118
|
+
fill={false}
|
|
119
|
+
style={{ width: '54%', height: '78%', bottom: 0, right: 0 }}
|
|
120
|
+
/>
|
|
121
|
+
</SceneLayer>
|
|
122
|
+
|
|
123
|
+
<SceneLayer part="ground" transform={{ z: 0, rotateX: 56 }} origin="50% 0%">
|
|
124
|
+
<ScenePlane part="ground" material="gravel">
|
|
125
|
+
<SceneSlot
|
|
126
|
+
part="board"
|
|
127
|
+
transform={{ z: 28 }}
|
|
128
|
+
style={{
|
|
129
|
+
left: '14%',
|
|
130
|
+
right: '14%',
|
|
131
|
+
top: '22%',
|
|
132
|
+
padding: '1rem 1.25rem',
|
|
133
|
+
borderRadius: 8,
|
|
134
|
+
background: 'rgba(18, 22, 28, 0.72)',
|
|
135
|
+
border: '1px dashed rgba(94, 234, 212, 0.35)',
|
|
136
|
+
color: 'var(--text-muted)',
|
|
137
|
+
fontSize: '0.8rem',
|
|
138
|
+
textAlign: 'center',
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
Your UI mounts here — tables, HUD, controls
|
|
142
|
+
</SceneSlot>
|
|
143
|
+
</ScenePlane>
|
|
144
|
+
</SceneLayer>
|
|
145
|
+
</SceneStage>
|
|
146
|
+
|
|
147
|
+
<div className="scene-demo__code">
|
|
148
|
+
<pre>
|
|
149
|
+
<code>{`import '@aeon-ui/react-scene/scene-3d.css'
|
|
150
|
+
import { SceneStage, SceneLayer, ScenePlane, SceneSlot } from '@aeon-ui/react-scene'`}</code>
|
|
151
|
+
</pre>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</section>
|
|
156
|
+
)
|
|
157
|
+
}
|