aeon-ui-engine 1.4.0 → 1.8.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/CHANGELOG.md +139 -0
- package/CONSUMER.md +67 -27
- package/INTEGRATION.md +1 -1
- package/README.md +17 -8
- package/package.json +5 -2
- package/packages/cli/dist/bin.js +29 -3
- package/packages/cli/dist/{chunk-5L47SLNV.js → chunk-JMNRJCWF.js} +63 -9
- package/packages/cli/dist/index.d.ts +15 -1
- package/packages/cli/dist/index.js +3 -1
- package/packages/cli/node_modules/.bin/vitest +2 -2
- package/packages/cli/src/bin.ts +30 -2
- package/packages/cli/src/index.ts +1 -0
- package/packages/cli/src/init.ts +10 -4
- package/packages/cli/src/link.ts +61 -0
- package/packages/core/node_modules/.bin/vitest +2 -2
- package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/panda/styled-system/styles.css +0 -4
- package/packages/primitives/dist/{chunk-PB3LFHXU.js → chunk-VUPWYBGU.js} +14 -0
- package/packages/primitives/dist/index.js +1 -1
- package/packages/primitives/dist/machines/range-slider.d.ts +3 -3
- package/packages/primitives/dist/machines/slider.d.ts +22 -0
- package/packages/primitives/dist/machines/slider.js +1 -1
- package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/primitives/src/machines/slider.ts +17 -0
- package/packages/react/dist/index.d.ts +44 -5
- package/packages/react/dist/index.js +173 -48
- package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/react/src/dialog/dialog.test.tsx +27 -0
- package/packages/react/src/dialog/index.tsx +11 -3
- package/packages/react/src/floating/FloatingPositioner.tsx +19 -1
- package/packages/react/src/hooks/use-anchor-position.ts +88 -17
- package/packages/react/src/menu/index.tsx +45 -6
- package/packages/react/src/popover/index.tsx +31 -4
- package/packages/react/src/slider/index.tsx +66 -19
- package/packages/react/src/tooltip/index.tsx +7 -1
- package/packages/schemas/dist/index.js +3 -1
- package/packages/schemas/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/schemas/prompts/cursorrules.md +3 -1
- package/packages/schemas/registry/machines/slider.json +18 -1
- package/packages/schemas/src/prompts.ts +3 -1
- package/packages/tree/README.md +29 -0
- package/packages/tree/dist/index.d.ts +97 -0
- package/packages/tree/dist/index.js +107 -0
- package/packages/tree/node_modules/.bin/esbuild +21 -0
- package/packages/tree/node_modules/.bin/jiti +21 -0
- package/packages/tree/node_modules/.bin/tsc +21 -0
- package/packages/tree/node_modules/.bin/tsserver +21 -0
- package/packages/tree/node_modules/.bin/tsup +21 -0
- package/packages/tree/node_modules/.bin/tsup-node +21 -0
- package/packages/tree/node_modules/.bin/tsx +21 -0
- package/packages/tree/node_modules/.bin/vite +21 -0
- package/packages/tree/node_modules/.bin/vitest +21 -0
- package/packages/tree/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/packages/tree/package.json +42 -0
- package/packages/tree/src/exclusive-action.test.ts +54 -0
- package/packages/tree/src/exclusive-action.ts +104 -0
- package/packages/tree/src/index.ts +7 -0
- package/packages/tree/src/interpret.tsx +45 -0
- package/packages/tree/src/totality.ts +20 -0
- package/packages/tree/src/widget.ts +31 -0
- package/packages/tree/tsconfig.json +8 -0
- package/packages/tree/vitest.config.ts +8 -0
- package/scripts/link-scoped-packages.mjs +206 -0
- package/scripts/vite-aliases.mjs +9 -8
package/packages/cli/src/bin.ts
CHANGED
|
@@ -1,36 +1,64 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { initAeon } from './init.js'
|
|
3
|
+
import { linkAeon } from './link.js'
|
|
3
4
|
import { migrateAeon } from './migrate.js'
|
|
4
5
|
|
|
5
6
|
const args = process.argv.slice(2)
|
|
6
7
|
const cmd = args[0] ?? 'help'
|
|
7
8
|
const force = args.includes('--force') || args.includes('-f')
|
|
8
9
|
const checkOnly = args.includes('--check')
|
|
10
|
+
const quiet = args.includes('--quiet') || args.includes('-q')
|
|
11
|
+
|
|
12
|
+
function argValue(flag: string): string | undefined {
|
|
13
|
+
const i = args.indexOf(flag)
|
|
14
|
+
if (i >= 0 && args[i + 1] && !args[i + 1].startsWith('-')) return args[i + 1]
|
|
15
|
+
return undefined
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const cwdArg = argValue('--cwd')
|
|
9
19
|
|
|
10
20
|
function help() {
|
|
11
21
|
console.log(`aeon-ui — AI-optimized CLI for Aeon UI
|
|
12
22
|
|
|
13
23
|
Usage:
|
|
14
24
|
npx aeon-ui init [--force]
|
|
25
|
+
npx aeon-ui link [--quiet] [--force] [--cwd <dir>]
|
|
15
26
|
npx aeon-ui migrate [--check]
|
|
16
27
|
|
|
17
28
|
Commands:
|
|
18
29
|
init Inject Cursor rules, JSON schemas, system prompt, and a starter component
|
|
30
|
+
link Symlink node_modules/@aeon-ui/* → aeon-ui-engine/packages/* (also runs on postinstall)
|
|
19
31
|
migrate Scan for known workarounds and write AEON_MIGRATION_CHECKLIST.md
|
|
20
32
|
help Show this message
|
|
21
33
|
|
|
22
34
|
Options:
|
|
23
|
-
--force, -f Overwrite existing generated files (init)
|
|
35
|
+
--force, -f Overwrite existing generated files (init); replace existing @aeon-ui links (link)
|
|
24
36
|
--check Report findings only; do not write checklist (migrate)
|
|
37
|
+
--quiet, -q Suppress link output (link)
|
|
38
|
+
--cwd <dir> Project root for link (defaults to process.cwd())
|
|
25
39
|
`)
|
|
26
40
|
}
|
|
27
41
|
|
|
28
42
|
if (cmd === 'init') {
|
|
29
|
-
const result = initAeon({ force })
|
|
43
|
+
const result = initAeon({ force, cwd: cwdArg })
|
|
30
44
|
console.log(`Aeon UI init → ${result.cwd}`)
|
|
31
45
|
for (const line of result.written) console.log(` ${line}`)
|
|
46
|
+
try {
|
|
47
|
+
linkAeon({ cwd: result.cwd, quiet: true })
|
|
48
|
+
console.log(' link @aeon-ui/* (scoped packages)')
|
|
49
|
+
} catch {
|
|
50
|
+
console.log(' link skipped (install aeon-ui-engine first, then: npx aeon-ui link)')
|
|
51
|
+
}
|
|
32
52
|
console.log('\nNext: npm install aeon-ui-engine react react-dom xstate @xstate/react')
|
|
33
53
|
console.log('Docs: AEON_AI.md · paste aeon.cursorrules.md into your agent system prompt')
|
|
54
|
+
} else if (cmd === 'link') {
|
|
55
|
+
try {
|
|
56
|
+
const result = linkAeon({ quiet, force, cwd: cwdArg })
|
|
57
|
+
if (quiet) console.log(`Aeon UI link → ${result.cwd}`)
|
|
58
|
+
} catch (err) {
|
|
59
|
+
console.error(err instanceof Error ? err.message : err)
|
|
60
|
+
process.exitCode = 1
|
|
61
|
+
}
|
|
34
62
|
} else if (cmd === 'migrate') {
|
|
35
63
|
const result = migrateAeon({ write: !checkOnly })
|
|
36
64
|
console.log(`Aeon UI migrate → ${result.cwd}`)
|
package/packages/cli/src/init.ts
CHANGED
|
@@ -92,10 +92,16 @@ Generated by \`npx aeon-ui init\`.
|
|
|
92
92
|
## Next steps
|
|
93
93
|
|
|
94
94
|
1. Install: \`npm install aeon-ui-engine react react-dom xstate @xstate/react\`
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
- Postinstall links \`@aeon-ui/*\` into \`node_modules\` (re-run with \`npx aeon-ui link\` if needed).
|
|
96
|
+
2. CSS: \`import 'aeon-ui-engine/aeon.css'\` (e.g. root layout).
|
|
97
|
+
3. **Next.js:** add \`transpilePackages\` for \`@aeon-ui/ui\`, \`@aeon-ui/react\`, \`@aeon-ui/core\`, \`@aeon-ui/primitives\`, \`@aeon-ui/panda\`. Use \`"use client"\` for interactive components. No webpack aliases required.
|
|
98
|
+
4. **Vite (optional):** \`aeonUiVitePlugin()\` from \`aeon-ui-engine/vite\` still helps with optimizeDeps; scoped imports resolve via the link step alone.
|
|
99
|
+
5. Paste \`aeon.cursorrules.md\` into Cursor rules / system prompt (already mirrored to \`.cursor/rules/aeon-ui.mdc\`)
|
|
100
|
+
6. Constrain generation with JSON under \`aeon.schemas/\`
|
|
101
|
+
|
|
102
|
+
## Frameworks
|
|
103
|
+
|
|
104
|
+
Aeon is **React-first** (full catalog + styled layer). Next.js is supported. Vue / Solid / Svelte adapters exist but are thin — not the main product.
|
|
99
105
|
|
|
100
106
|
## Principle
|
|
101
107
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
3
|
+
import { existsSync } from 'node:fs'
|
|
4
|
+
import { dirname, join } from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
|
|
7
|
+
export type LinkOptions = {
|
|
8
|
+
cwd?: string
|
|
9
|
+
quiet?: boolean
|
|
10
|
+
force?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function resolveLinkScript(): string {
|
|
14
|
+
const here = dirname(fileURLToPath(import.meta.url))
|
|
15
|
+
const fromMonorepo = join(here, '../../../scripts/link-scoped-packages.mjs')
|
|
16
|
+
if (existsSync(fromMonorepo)) return fromMonorepo
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const require = createRequire(import.meta.url)
|
|
20
|
+
const engineRoot = dirname(require.resolve('aeon-ui-engine/package.json'))
|
|
21
|
+
return join(engineRoot, 'scripts/link-scoped-packages.mjs')
|
|
22
|
+
} catch {
|
|
23
|
+
throw new Error(
|
|
24
|
+
'Could not find scripts/link-scoped-packages.mjs (aeon-ui-engine not installed?)',
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Symlink `node_modules/@aeon-ui/*` → `aeon-ui-engine/packages/*`.
|
|
31
|
+
* Prefer the postinstall hook; this command re-runs linking manually.
|
|
32
|
+
*/
|
|
33
|
+
export function linkAeon(options: LinkOptions = {}) {
|
|
34
|
+
const script = resolveLinkScript()
|
|
35
|
+
const args = [script]
|
|
36
|
+
if (options.cwd) {
|
|
37
|
+
args.push('--cwd', options.cwd)
|
|
38
|
+
}
|
|
39
|
+
if (options.quiet) {
|
|
40
|
+
args.push('--quiet')
|
|
41
|
+
}
|
|
42
|
+
if (options.force) {
|
|
43
|
+
args.push('--force')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const result = spawnSync(process.execPath, args, {
|
|
47
|
+
stdio: options.quiet ? 'pipe' : 'inherit',
|
|
48
|
+
env: process.env,
|
|
49
|
+
cwd: options.cwd ?? process.cwd(),
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
if (result.status !== 0 && result.status !== null) {
|
|
53
|
+
const err = result.stderr?.toString() || `link exited with code ${result.status}`
|
|
54
|
+
throw new Error(err)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
cwd: options.cwd ?? process.cwd(),
|
|
59
|
+
status: result.status ?? 0,
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.
|
|
13
|
+
export NODE_PATH="/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.28.0_jiti@2.7.0_tsx@4.22.3_/node_modules/vitest/node_modules:/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.28.0_jiti@2.7.0_tsx@4.22.3_/node_modules:/Users/brandoncryderman/AeonUI/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.
|
|
15
|
+
export NODE_PATH="/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.28.0_jiti@2.7.0_tsx@4.22.3_/node_modules/vitest/node_modules:/Users/brandoncryderman/AeonUI/node_modules/.pnpm/vitest@4.1.8_@types+node@22.19.19_jsdom@29.1.1_vite@8.0.16_@types+node@22.19.19_esbuild@0.28.0_jiti@2.7.0_tsx@4.22.3_/node_modules:/Users/brandoncryderman/AeonUI/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.2.4","results":[[":src/machine.test.ts",{"duration":
|
|
1
|
+
{"version":"3.2.4","results":[[":src/machine.test.ts",{"duration":3.2387080000000026,"failed":false}],[":src/theme.test.ts",{"duration":3.8104999999999905,"failed":false}],[":../../apps/demo/src/aeonSchemaCompiler.test.ts",{"duration":7.737041999999974,"failed":false}],[":src/identicon.test.ts",{"duration":5.902916000000005,"failed":false}]]}
|
|
@@ -29,6 +29,14 @@ var sliderMachine = setup({
|
|
|
29
29
|
}),
|
|
30
30
|
end: assign({
|
|
31
31
|
value: ({ context }) => context.max
|
|
32
|
+
}),
|
|
33
|
+
setBounds: assign(({ context, event }) => {
|
|
34
|
+
if (event.type !== "SET_BOUNDS") return context;
|
|
35
|
+
const { min, max, step } = event;
|
|
36
|
+
return { ...context, min, max, step, value: snap(context.value, min, max, step) };
|
|
37
|
+
}),
|
|
38
|
+
setDisabled: assign({
|
|
39
|
+
disabled: ({ context, event }) => event.type === "SET_DISABLED" ? event.disabled : context.disabled
|
|
32
40
|
})
|
|
33
41
|
}
|
|
34
42
|
}).createMachine({
|
|
@@ -41,6 +49,12 @@ var sliderMachine = setup({
|
|
|
41
49
|
disabled: input.disabled ?? false
|
|
42
50
|
}),
|
|
43
51
|
initial: "interaction",
|
|
52
|
+
// Bounds and disabled follow the host regardless of interaction state, so a
|
|
53
|
+
// range that widens (audio duration arriving) stops clamping to stale limits.
|
|
54
|
+
on: {
|
|
55
|
+
SET_BOUNDS: { actions: "setBounds" },
|
|
56
|
+
SET_DISABLED: { actions: "setDisabled" }
|
|
57
|
+
},
|
|
44
58
|
states: {
|
|
45
59
|
interaction: {
|
|
46
60
|
initial: "idle",
|
|
@@ -83,14 +83,14 @@ declare const rangeSliderMachine: xstate.StateMachine<RangeSliderContext, {
|
|
|
83
83
|
type: "END";
|
|
84
84
|
thumb: 0 | 1;
|
|
85
85
|
}, {}, never, {
|
|
86
|
-
type: "setValues";
|
|
87
|
-
params: xstate.NonReducibleUnknown;
|
|
88
|
-
} | {
|
|
89
86
|
type: "setBounds";
|
|
90
87
|
params: xstate.NonReducibleUnknown;
|
|
91
88
|
} | {
|
|
92
89
|
type: "setDisabled";
|
|
93
90
|
params: xstate.NonReducibleUnknown;
|
|
91
|
+
} | {
|
|
92
|
+
type: "setValues";
|
|
93
|
+
params: xstate.NonReducibleUnknown;
|
|
94
94
|
} | {
|
|
95
95
|
type: "pointerDown";
|
|
96
96
|
params: xstate.NonReducibleUnknown;
|
|
@@ -21,6 +21,14 @@ type SliderEvent = {
|
|
|
21
21
|
type: 'HOME';
|
|
22
22
|
} | {
|
|
23
23
|
type: 'END';
|
|
24
|
+
} | {
|
|
25
|
+
type: 'SET_BOUNDS';
|
|
26
|
+
min: number;
|
|
27
|
+
max: number;
|
|
28
|
+
step: number;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'SET_DISABLED';
|
|
31
|
+
disabled: boolean;
|
|
24
32
|
};
|
|
25
33
|
declare function clamp(value: number, min: number, max: number): number;
|
|
26
34
|
declare function snap(value: number, min: number, max: number, step: number): number;
|
|
@@ -39,6 +47,14 @@ declare const sliderMachine: xstate.StateMachine<SliderContext, {
|
|
|
39
47
|
type: "HOME";
|
|
40
48
|
} | {
|
|
41
49
|
type: "END";
|
|
50
|
+
} | {
|
|
51
|
+
type: "SET_BOUNDS";
|
|
52
|
+
min: number;
|
|
53
|
+
max: number;
|
|
54
|
+
step: number;
|
|
55
|
+
} | {
|
|
56
|
+
type: "SET_DISABLED";
|
|
57
|
+
disabled: boolean;
|
|
42
58
|
}, {}, never, {
|
|
43
59
|
type: "setValue";
|
|
44
60
|
params: xstate.NonReducibleUnknown;
|
|
@@ -51,6 +67,12 @@ declare const sliderMachine: xstate.StateMachine<SliderContext, {
|
|
|
51
67
|
} | {
|
|
52
68
|
type: "end";
|
|
53
69
|
params: xstate.NonReducibleUnknown;
|
|
70
|
+
} | {
|
|
71
|
+
type: "setBounds";
|
|
72
|
+
params: xstate.NonReducibleUnknown;
|
|
73
|
+
} | {
|
|
74
|
+
type: "setDisabled";
|
|
75
|
+
params: xstate.NonReducibleUnknown;
|
|
54
76
|
}, {
|
|
55
77
|
type: "notDisabled";
|
|
56
78
|
params: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.2.4","results":[[":src/machines/dialog.test.ts",{"duration":5.771292000000017,"failed":false}],[":src/machines/select.test.ts",{"duration":6.394416000000035,"failed":false}],[":src/__tests__/dialog.test.ts",{"duration":3.686000000000007,"failed":false}],[":src/__tests__/select.test.ts",{"duration":2.8540000000000134,"failed":false}],[":src/__tests__/floating-surface.test.ts",{"duration":
|
|
1
|
+
{"version":"3.2.4","results":[[":src/machines/dialog.test.ts",{"duration":5.771292000000017,"failed":false}],[":src/machines/select.test.ts",{"duration":6.394416000000035,"failed":false}],[":src/__tests__/dialog.test.ts",{"duration":3.686000000000007,"failed":false}],[":src/__tests__/select.test.ts",{"duration":2.8540000000000134,"failed":false}],[":src/__tests__/floating-surface.test.ts",{"duration":13.199792000000002,"failed":false}],[":src/__tests__/app-nav.test.ts",{"duration":9.69079099999999,"failed":false}],[":src/__tests__/file-upload.test.ts",{"duration":7.872375000000005,"failed":false}],[":src/__tests__/range-slider.test.ts",{"duration":8.245833000000005,"failed":false}]]}
|
|
@@ -15,6 +15,8 @@ export type SliderEvent =
|
|
|
15
15
|
| { type: 'POINTER_UP' }
|
|
16
16
|
| { type: 'HOME' }
|
|
17
17
|
| { type: 'END' }
|
|
18
|
+
| { type: 'SET_BOUNDS'; min: number; max: number; step: number }
|
|
19
|
+
| { type: 'SET_DISABLED'; disabled: boolean }
|
|
18
20
|
|
|
19
21
|
function clamp(value: number, min: number, max: number) {
|
|
20
22
|
return Math.min(max, Math.max(min, value))
|
|
@@ -55,6 +57,15 @@ export const sliderMachine = setup({
|
|
|
55
57
|
end: assign({
|
|
56
58
|
value: ({ context }) => context.max,
|
|
57
59
|
}),
|
|
60
|
+
setBounds: assign(({ context, event }) => {
|
|
61
|
+
if (event.type !== 'SET_BOUNDS') return context
|
|
62
|
+
const { min, max, step } = event
|
|
63
|
+
return { ...context, min, max, step, value: snap(context.value, min, max, step) }
|
|
64
|
+
}),
|
|
65
|
+
setDisabled: assign({
|
|
66
|
+
disabled: ({ context, event }) =>
|
|
67
|
+
event.type === 'SET_DISABLED' ? event.disabled : context.disabled,
|
|
68
|
+
}),
|
|
58
69
|
},
|
|
59
70
|
}).createMachine({
|
|
60
71
|
id: 'slider',
|
|
@@ -66,6 +77,12 @@ export const sliderMachine = setup({
|
|
|
66
77
|
disabled: input.disabled ?? false,
|
|
67
78
|
}),
|
|
68
79
|
initial: 'interaction',
|
|
80
|
+
// Bounds and disabled follow the host regardless of interaction state, so a
|
|
81
|
+
// range that widens (audio duration arriving) stops clamping to stale limits.
|
|
82
|
+
on: {
|
|
83
|
+
SET_BOUNDS: { actions: 'setBounds' },
|
|
84
|
+
SET_DISABLED: { actions: 'setDisabled' },
|
|
85
|
+
},
|
|
69
86
|
states: {
|
|
70
87
|
interaction: {
|
|
71
88
|
initial: 'idle',
|
|
@@ -194,6 +194,30 @@ declare const RadioGroup: {
|
|
|
194
194
|
ItemLabel: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & react.RefAttributes<HTMLSpanElement>>;
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
+
/** Bridge executable statecharts to React — UI = f(snapshot). */
|
|
198
|
+
declare function useAeonMachine<M extends AnyStateMachine>(machine: M, options?: Parameters<typeof useMachine<M>>[1]): [xstate.StateFrom<M>, (event: xstate.EventFromLogic<M>) => void, xstate.Actor<M>];
|
|
199
|
+
|
|
200
|
+
interface SliderContextValue {
|
|
201
|
+
value: number;
|
|
202
|
+
min: number;
|
|
203
|
+
max: number;
|
|
204
|
+
step: number;
|
|
205
|
+
disabled: boolean;
|
|
206
|
+
dragging: boolean;
|
|
207
|
+
/** Nested region value from the machine: `interaction.idle` | `interaction.dragging`. */
|
|
208
|
+
interaction: 'idle' | 'dragging';
|
|
209
|
+
send: ReturnType<typeof useAeonMachine<typeof sliderMachine>>[1];
|
|
210
|
+
onValueChange?: (value: number) => void;
|
|
211
|
+
/** Snap, store and report a user-intended value. */
|
|
212
|
+
commit: (value: number) => void;
|
|
213
|
+
setValueFromClientX: (clientX: number) => void;
|
|
214
|
+
trackRef: React.RefObject<HTMLDivElement | null>;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Read the slider's live machine state from inside `Slider.Root`.
|
|
218
|
+
* `interaction` is the nested region value — the same thing the snapshot holds.
|
|
219
|
+
*/
|
|
220
|
+
declare function useSliderContext(): SliderContextValue;
|
|
197
221
|
interface SliderRootProps {
|
|
198
222
|
value?: number;
|
|
199
223
|
defaultValue?: number;
|
|
@@ -237,9 +261,6 @@ declare const RangeSlider: {
|
|
|
237
261
|
ValueText: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & react.RefAttributes<HTMLSpanElement>>;
|
|
238
262
|
};
|
|
239
263
|
|
|
240
|
-
/** Bridge executable statecharts to React — UI = f(snapshot). */
|
|
241
|
-
declare function useAeonMachine<M extends AnyStateMachine>(machine: M, options?: Parameters<typeof useMachine<M>>[1]): [xstate.StateFrom<M>, (event: xstate.EventFromLogic<M>) => void, xstate.Actor<M>];
|
|
242
|
-
|
|
243
264
|
interface FileUploadContextValue {
|
|
244
265
|
phase: 'idle' | 'dragging' | 'rejected';
|
|
245
266
|
accept: string;
|
|
@@ -519,7 +540,9 @@ declare const Combobox: {
|
|
|
519
540
|
Empty: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
520
541
|
};
|
|
521
542
|
|
|
522
|
-
type
|
|
543
|
+
type AnchorSide = 'top' | 'bottom';
|
|
544
|
+
type AnchorAlign = 'start' | 'end' | 'center';
|
|
545
|
+
type AnchorPlacement = `${AnchorSide}-${AnchorAlign}`;
|
|
523
546
|
|
|
524
547
|
interface PopoverRootProps {
|
|
525
548
|
open?: boolean;
|
|
@@ -532,6 +555,14 @@ interface PopoverPositionerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
532
555
|
/** Mount panel in document.body (default true). */
|
|
533
556
|
portalled?: boolean;
|
|
534
557
|
placement?: AnchorPlacement;
|
|
558
|
+
/** Align to this region rather than the trigger. See `FloatingPositioner`. */
|
|
559
|
+
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
560
|
+
/** Size the panel to the anchor, so it spans the region it belongs to. */
|
|
561
|
+
matchAnchorWidth?: boolean;
|
|
562
|
+
/** Gap between trigger and panel (default 4). */
|
|
563
|
+
gutter?: number;
|
|
564
|
+
/** Stack level for the portalled surface (default 50). */
|
|
565
|
+
zIndex?: number;
|
|
535
566
|
children?: ReactNode;
|
|
536
567
|
}
|
|
537
568
|
declare const Popover: {
|
|
@@ -554,6 +585,10 @@ interface MenuPositionerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
554
585
|
/** Mount menu in document.body (default true). */
|
|
555
586
|
portalled?: boolean;
|
|
556
587
|
placement?: AnchorPlacement;
|
|
588
|
+
/** Gap between trigger and menu (default 4). */
|
|
589
|
+
gutter?: number;
|
|
590
|
+
/** Stack level for the portalled surface (default 50). */
|
|
591
|
+
zIndex?: number;
|
|
557
592
|
children?: ReactNode;
|
|
558
593
|
}
|
|
559
594
|
interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -588,6 +623,10 @@ interface TooltipPositionerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
588
623
|
/** Mount tooltip in document.body (default true). */
|
|
589
624
|
portalled?: boolean;
|
|
590
625
|
placement?: AnchorPlacement;
|
|
626
|
+
/** Gap between trigger and tip (default 4). */
|
|
627
|
+
gutter?: number;
|
|
628
|
+
/** Stack level for the portalled surface (default 50). */
|
|
629
|
+
zIndex?: number;
|
|
591
630
|
children?: ReactNode;
|
|
592
631
|
}
|
|
593
632
|
declare const Tooltip: {
|
|
@@ -1172,4 +1211,4 @@ declare const Slot: react.ForwardRefExoticComponent<HTMLAttributes<HTMLElement>
|
|
|
1172
1211
|
children?: ReactNode;
|
|
1173
1212
|
} & react.RefAttributes<HTMLElement>>;
|
|
1174
1213
|
|
|
1175
|
-
export { Accordion, type AccordionItemContentProps, type AccordionItemProps, type AccordionItemTriggerProps, type AccordionRootProps, AppNav, type AppNavBreadcrumbProps, type AppNavRootProps, type AppNavSectionProps, AppShell, type AppShellRootProps, Async, AsyncActions, AsyncProvider, AsyncReadout, AsyncRoot, AsyncTrack, Avatar, type AvatarRootProps, type AvatarStatus, Bar, type BarRootProps, Button, type ButtonRootProps, type ButtonStatus, Checkbox, type CheckboxRootProps, Combobox, type ComboboxItemProps, type ComboboxRootProps, Composer, type ComposerRootProps, type ComposerState, Content, type ContentRootProps, Conversation, type ConversationItemProps, type ConversationItemState, type ConversationRootProps, Dialog, type DialogPortalProps, type DialogRootProps, Entry, type EntryListProps, type EntryRootProps, type EntryState, Field, type FieldControlProps, type FieldRootProps, type FieldTextareaProps, FileUpload, type FileUploadRootProps, Identity, type IdentityRootProps, ListRow, type ListRowRootProps, Menu, type MenuItemProps, type MenuPositionerProps, type MenuRootProps, MetricStrip, type MetricStripRootProps, Nav, type NavItemProps, type NavRootProps, Panel, type PanelContentProps, type PanelGroupProps, type PanelLabelProps, type PanelRootProps, type PanelTriggerProps, PinInput, type PinInputInputProps, type PinInputRootProps, Popover, type PopoverPositionerProps, type PopoverRootProps, type PresenceState, ProfileHeader, type ProfileHeaderRootProps, Progress, type ProgressRootProps, Prompt, type PromptRootProps, type PromptStatus, RadioGroup, type RadioGroupItemProps, type RadioGroupRootProps, RangeSlider, type RangeSliderRootProps, type RangeSliderThumbProps, Scroll, type ScrollRootProps, type ScrollViewportProps, Select, type SelectContentProps, type SelectItemProps, type SelectPositionerProps, type SelectRootProps, Separator, type SeparatorRootProps, Slider, type SliderRootProps, Slot, StatusBanner, type StatusBannerRootProps, type StatusBannerTone, StickyBar, type StickyBarRootProps, Switch, type SwitchRootProps, Tabs, type TabsContentProps, type TabsRootProps, type TabsTriggerProps, ThemeSwitcher, type ThemeSwitcherModeBtnProps, type ThemeSwitcherModesProps, type ThemeSwitcherRootProps, type ThemeSwitcherThemeSelectProps, Thread, type ThreadItemFace, type ThreadItemProps, type ThreadMessageState, type ThreadRootProps, Toast, ToastItem, type ToastPlacement, type ToastProviderProps, type ToastPublishOptions, type ToastRecord, type ToastRootProps, type ToastStore, type ToastViewportProps, Tooltip, type TooltipPositionerProps, type TooltipRootProps, asyncStatusToContentState, useAeonMachine, useAppNav, useAppNavMachine, useAppShellContext, useAsyncContext, useContentContext, useFieldContext, useFileUploadCtx as useFileUpload, useFitText, useLayoutMode, useScrollContext, useScrollState, useStickyBarContext, useToast, useToastStore };
|
|
1214
|
+
export { Accordion, type AccordionItemContentProps, type AccordionItemProps, type AccordionItemTriggerProps, type AccordionRootProps, AppNav, type AppNavBreadcrumbProps, type AppNavRootProps, type AppNavSectionProps, AppShell, type AppShellRootProps, Async, AsyncActions, AsyncProvider, AsyncReadout, AsyncRoot, AsyncTrack, Avatar, type AvatarRootProps, type AvatarStatus, Bar, type BarRootProps, Button, type ButtonRootProps, type ButtonStatus, Checkbox, type CheckboxRootProps, Combobox, type ComboboxItemProps, type ComboboxRootProps, Composer, type ComposerRootProps, type ComposerState, Content, type ContentRootProps, Conversation, type ConversationItemProps, type ConversationItemState, type ConversationRootProps, Dialog, type DialogPortalProps, type DialogRootProps, Entry, type EntryListProps, type EntryRootProps, type EntryState, Field, type FieldControlProps, type FieldRootProps, type FieldTextareaProps, FileUpload, type FileUploadRootProps, Identity, type IdentityRootProps, ListRow, type ListRowRootProps, Menu, type MenuItemProps, type MenuPositionerProps, type MenuRootProps, MetricStrip, type MetricStripRootProps, Nav, type NavItemProps, type NavRootProps, Panel, type PanelContentProps, type PanelGroupProps, type PanelLabelProps, type PanelRootProps, type PanelTriggerProps, PinInput, type PinInputInputProps, type PinInputRootProps, Popover, type PopoverPositionerProps, type PopoverRootProps, type PresenceState, ProfileHeader, type ProfileHeaderRootProps, Progress, type ProgressRootProps, Prompt, type PromptRootProps, type PromptStatus, RadioGroup, type RadioGroupItemProps, type RadioGroupRootProps, RangeSlider, type RangeSliderRootProps, type RangeSliderThumbProps, Scroll, type ScrollRootProps, type ScrollViewportProps, Select, type SelectContentProps, type SelectItemProps, type SelectPositionerProps, type SelectRootProps, Separator, type SeparatorRootProps, Slider, type SliderContextValue, type SliderRootProps, Slot, StatusBanner, type StatusBannerRootProps, type StatusBannerTone, StickyBar, type StickyBarRootProps, Switch, type SwitchRootProps, Tabs, type TabsContentProps, type TabsRootProps, type TabsTriggerProps, ThemeSwitcher, type ThemeSwitcherModeBtnProps, type ThemeSwitcherModesProps, type ThemeSwitcherRootProps, type ThemeSwitcherThemeSelectProps, Thread, type ThreadItemFace, type ThreadItemProps, type ThreadMessageState, type ThreadRootProps, Toast, ToastItem, type ToastPlacement, type ToastProviderProps, type ToastPublishOptions, type ToastRecord, type ToastRootProps, type ToastStore, type ToastViewportProps, Tooltip, type TooltipPositionerProps, type TooltipRootProps, asyncStatusToContentState, useAeonMachine, useAppNav, useAppNavMachine, useAppShellContext, useAsyncContext, useContentContext, useFieldContext, useFileUploadCtx as useFileUpload, useFitText, useLayoutMode, useScrollContext, useScrollState, useSliderContext, useStickyBarContext, useToast, useToastStore };
|