@k8o/arte-odyssey 10.1.2 → 10.3.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/dist/components/buttons/icon-button/icon-button.d.mts +1 -1
- package/dist/components/buttons/icon-button/icon-button.mjs +1 -1
- package/dist/components/feedback/toast/toast.mjs +2 -2
- package/dist/components/form/autocomplete/autocomplete.mjs +20 -28
- package/dist/components/form/checkbox/checkbox.mjs +1 -1
- package/dist/components/form/checkbox-card/checkbox-card.mjs +1 -1
- package/dist/components/form/checkbox-group/index.d.mts +1 -1
- package/dist/components/form/file-field/file-field.mjs +1 -1
- package/dist/components/form/number-field/number-field.mjs +1 -1
- package/dist/components/icons/index.d.mts +2 -2
- package/dist/components/icons/index.mjs +2 -2
- package/dist/components/icons/lucide-deep.d.mts +9 -0
- package/dist/components/icons/lucide-imports.d.mts +58 -0
- package/dist/components/icons/lucide-imports.mjs +58 -0
- package/dist/components/icons/lucide.d.mts +4 -1
- package/dist/components/icons/lucide.mjs +14 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +11 -11
- package/dist/components/navigation/tabs/tabs.mjs +1 -1
- package/dist/components/overlays/_internal/use-list-navigation.d.mts +40 -0
- package/dist/components/overlays/_internal/use-list-navigation.mjs +95 -0
- package/dist/components/overlays/dialog/dialog.mjs +1 -1
- package/dist/components/overlays/drawer/drawer.mjs +1 -1
- package/dist/components/overlays/dropdown-menu/dropdown-menu.d.mts +2 -1
- package/dist/components/overlays/dropdown-menu/dropdown-menu.mjs +39 -52
- package/dist/components/overlays/dropdown-menu/hooks.d.mts +14 -294
- package/dist/components/overlays/dropdown-menu/hooks.mjs +7 -18
- package/dist/components/overlays/list-box/hooks.d.mts +12 -292
- package/dist/components/overlays/list-box/hooks.mjs +7 -16
- package/dist/components/overlays/list-box/list-box.d.mts +1 -1
- package/dist/components/overlays/list-box/list-box.mjs +25 -32
- package/dist/components/overlays/popover/anchor-positioning.d.mts +26 -0
- package/dist/components/overlays/popover/anchor-positioning.mjs +44 -0
- package/dist/components/overlays/popover/hooks.d.mts +10 -13
- package/dist/components/overlays/popover/hooks.mjs +7 -14
- package/dist/components/overlays/popover/popover.d.mts +2 -3
- package/dist/components/overlays/popover/popover.mjs +31 -59
- package/dist/components/overlays/tooltip/tooltip.d.mts +1 -1
- package/dist/components/overlays/tooltip/tooltip.mjs +2 -23
- package/dist/helpers/index.mjs +2 -2
- package/dist/hooks/focus-trap/index.d.mts +19 -0
- package/dist/hooks/focus-trap/index.mjs +51 -0
- package/dist/hooks/index.mjs +4 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +34 -34
- package/dist/integrations/_shared/renderers.mjs +6 -6
- package/dist/integrations/_shared/schemas.d.mts +11 -11
- package/dist/integrations/json-render/catalog.d.mts +10 -15
- package/dist/integrations/openui/form-views.d.mts +0 -9
- package/dist/integrations/openui/form-views.mjs +0 -9
- package/dist/styles/base.css +39 -1
- package/dist/styles/tokens.css +0 -1
- package/dist/types/variables.d.mts +6 -1
- package/package.json +4 -4
|
@@ -57,14 +57,14 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
57
57
|
}>>;
|
|
58
58
|
align: z.ZodOptional<z.ZodEnum<{
|
|
59
59
|
start: "start";
|
|
60
|
-
end: "end";
|
|
61
60
|
center: "center";
|
|
61
|
+
end: "end";
|
|
62
62
|
stretch: "stretch";
|
|
63
63
|
}>>;
|
|
64
64
|
justify: z.ZodOptional<z.ZodEnum<{
|
|
65
65
|
start: "start";
|
|
66
|
-
end: "end";
|
|
67
66
|
center: "center";
|
|
67
|
+
end: "end";
|
|
68
68
|
between: "between";
|
|
69
69
|
}>>;
|
|
70
70
|
}, z.core.$strip>;
|
|
@@ -288,9 +288,9 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
288
288
|
columns: z.ZodArray<z.ZodObject<{
|
|
289
289
|
label: z.ZodString;
|
|
290
290
|
align: z.ZodOptional<z.ZodEnum<{
|
|
291
|
-
right: "right";
|
|
292
|
-
left: "left";
|
|
293
291
|
center: "center";
|
|
292
|
+
left: "left";
|
|
293
|
+
right: "right";
|
|
294
294
|
}>>;
|
|
295
295
|
}, z.core.$strip>>;
|
|
296
296
|
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
@@ -353,9 +353,9 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
353
353
|
props: z.ZodObject<{
|
|
354
354
|
name: z.ZodEnum<{
|
|
355
355
|
form: "form";
|
|
356
|
+
list: "list";
|
|
356
357
|
link: "link";
|
|
357
358
|
check: "check";
|
|
358
|
-
list: "list";
|
|
359
359
|
plus: "plus";
|
|
360
360
|
minus: "minus";
|
|
361
361
|
close: "close";
|
|
@@ -416,8 +416,8 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
416
416
|
ChevronIcon: {
|
|
417
417
|
props: z.ZodObject<{
|
|
418
418
|
direction: z.ZodEnum<{
|
|
419
|
-
right: "right";
|
|
420
419
|
left: "left";
|
|
420
|
+
right: "right";
|
|
421
421
|
up: "up";
|
|
422
422
|
down: "down";
|
|
423
423
|
}>;
|
|
@@ -449,9 +449,9 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
449
449
|
props: z.ZodObject<{
|
|
450
450
|
icon: z.ZodEnum<{
|
|
451
451
|
form: "form";
|
|
452
|
+
list: "list";
|
|
452
453
|
link: "link";
|
|
453
454
|
check: "check";
|
|
454
|
-
list: "list";
|
|
455
455
|
plus: "plus";
|
|
456
456
|
minus: "minus";
|
|
457
457
|
close: "close";
|
|
@@ -628,10 +628,10 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
628
628
|
triggerLabel: z.ZodString;
|
|
629
629
|
title: z.ZodString;
|
|
630
630
|
type: z.ZodOptional<z.ZodEnum<{
|
|
631
|
+
center: "center";
|
|
632
|
+
left: "left";
|
|
631
633
|
right: "right";
|
|
632
634
|
bottom: "bottom";
|
|
633
|
-
left: "left";
|
|
634
|
-
center: "center";
|
|
635
635
|
}>>;
|
|
636
636
|
}, z.core.$strip>;
|
|
637
637
|
slots: string[];
|
|
@@ -650,8 +650,8 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
650
650
|
triggerLabel: z.ZodString;
|
|
651
651
|
title: z.ZodString;
|
|
652
652
|
side: z.ZodOptional<z.ZodEnum<{
|
|
653
|
-
right: "right";
|
|
654
653
|
left: "left";
|
|
654
|
+
right: "right";
|
|
655
655
|
}>>;
|
|
656
656
|
}, z.core.$strip>;
|
|
657
657
|
slots: string[];
|
|
@@ -776,11 +776,8 @@ declare const catalog: import("@json-render/core").Catalog<{
|
|
|
776
776
|
* const systemPrompt = catalog.prompt({ customRules: [...arteOdysseyRules] });
|
|
777
777
|
*/
|
|
778
778
|
declare const arteOdysseyRules: readonly string[];
|
|
779
|
-
/** catalog に登録されたコンポーネント定義のマップ(型レベル)。 */
|
|
780
779
|
type ComponentSchemas = (typeof catalog)['data']['components'];
|
|
781
|
-
/** catalog に登録されたコンポーネント名のユニオン。 */
|
|
782
780
|
type ComponentName = keyof ComponentSchemas;
|
|
783
|
-
/** 指定したコンポーネントの props 型(Zod スキーマから推論)。 */
|
|
784
781
|
type ComponentProps<K extends ComponentName> = z.infer<ComponentSchemas[K]['props']>;
|
|
785
782
|
/**
|
|
786
783
|
* arte-odyssey のコンポーネントだけで構成された型付き spec の要素。
|
|
@@ -809,12 +806,10 @@ type ArteSpec = {
|
|
|
809
806
|
elements: Record<string, ArteSpecElement>;
|
|
810
807
|
state?: Spec['state'];
|
|
811
808
|
};
|
|
812
|
-
/** 検証で見つかった 1 件の問題。 */
|
|
813
809
|
type GeneratedSpecIssue = {
|
|
814
810
|
/** 問題のあった要素キー(spec 全体の問題なら未指定)。 */elementKey?: string; /** 人間(および LLM)向けの説明。 */
|
|
815
811
|
message: string;
|
|
816
812
|
};
|
|
817
|
-
/** {@link validateGeneratedSpec} の結果。 */
|
|
818
813
|
type ValidateGeneratedSpecResult = {
|
|
819
814
|
ok: true;
|
|
820
815
|
spec: ArteSpec;
|
|
@@ -3,15 +3,6 @@ import { FC } from "react";
|
|
|
3
3
|
import { ComponentRenderProps } from "@openuidev/react-lang";
|
|
4
4
|
|
|
5
5
|
//#region src/integrations/openui/form-views.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* OpenUI のフォーム状態(`useStateField`)に接続する関数コンポーネント群。
|
|
8
|
-
*
|
|
9
|
-
* `defineComponent` の `component` フィールドにそのまま渡せる FC として実装する。
|
|
10
|
-
* フックを使うので React の rules-of-hooks を満たす大文字始まり関数として
|
|
11
|
-
* 定義する必要があり、`library.tsx` の宣言的な `defineComponent` 並びから
|
|
12
|
-
* 切り出してここに集約した。値域と setter の解決だけを担当し、見た目の組み立て
|
|
13
|
-
* は `_shared/renderers` の `renderXxx` に委譲する。
|
|
14
|
-
*/
|
|
15
6
|
declare const TextFieldView: FC<ComponentRenderProps<TextFieldProps>>;
|
|
16
7
|
declare const CheckboxView: FC<ComponentRenderProps<CheckboxProps>>;
|
|
17
8
|
declare const SwitchView: FC<ComponentRenderProps<SwitchProps>>;
|
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
import { renderAutocomplete, renderCheckbox, renderCheckboxCard, renderCheckboxGroup, renderListBox, renderNumberField, renderPagination, renderPasswordInput, renderRadio, renderRadioCard, renderSelect, renderSlider, renderSwitch, renderTextField, renderTextarea } from "../_shared/renderers.mjs";
|
|
3
3
|
import { useStateField } from "@openuidev/react-lang";
|
|
4
4
|
//#region src/integrations/openui/form-views.tsx
|
|
5
|
-
/**
|
|
6
|
-
* OpenUI のフォーム状態(`useStateField`)に接続する関数コンポーネント群。
|
|
7
|
-
*
|
|
8
|
-
* `defineComponent` の `component` フィールドにそのまま渡せる FC として実装する。
|
|
9
|
-
* フックを使うので React の rules-of-hooks を満たす大文字始まり関数として
|
|
10
|
-
* 定義する必要があり、`library.tsx` の宣言的な `defineComponent` 並びから
|
|
11
|
-
* 切り出してここに集約した。値域と setter の解決だけを担当し、見た目の組み立て
|
|
12
|
-
* は `_shared/renderers` の `renderXxx` に委譲する。
|
|
13
|
-
*/
|
|
14
5
|
const TextFieldView = ({ props }) => {
|
|
15
6
|
const field = useStateField(props.name, props.defaultValue ?? "");
|
|
16
7
|
return renderTextField(props, field.value, field.setValue);
|
package/dist/styles/base.css
CHANGED
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/* dark・light themeの値を使うための宣言 */
|
|
69
68
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
70
69
|
@custom-variant light (&:where(.light, .light *));
|
|
71
70
|
|
|
@@ -73,3 +72,42 @@
|
|
|
73
72
|
@custom-variant vertical (
|
|
74
73
|
&:where(.writing-v, .writing-v *):not(.writing-h, .writing-h *)
|
|
75
74
|
);
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* Popover(top-layer)の開く時のアニメーション。
|
|
78
|
+
* :popover-open になった瞬間に keyframe を再生する。安静時の値は上書きしない
|
|
79
|
+
* (natural=opacity:1)ため固着しない。閉じる時は display:none で即時(Modal/Drawer 同様)。
|
|
80
|
+
* scale は transform ではなく `scale` プロパティを使い、CSS Anchor Positioning
|
|
81
|
+
* (inset で配置)と干渉させない。
|
|
82
|
+
*/
|
|
83
|
+
.ao-anim-scale:popover-open {
|
|
84
|
+
animation: ao-pop-in 0.18s ease;
|
|
85
|
+
}
|
|
86
|
+
.ao-anim-fade:popover-open {
|
|
87
|
+
animation: ao-fade-in 0.15s ease;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes ao-pop-in {
|
|
91
|
+
from {
|
|
92
|
+
scale: 0.92;
|
|
93
|
+
}
|
|
94
|
+
to {
|
|
95
|
+
scale: 1;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes ao-fade-in {
|
|
100
|
+
from {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
.ao-anim-scale:popover-open,
|
|
110
|
+
.ao-anim-fade:popover-open {
|
|
111
|
+
animation: none;
|
|
112
|
+
}
|
|
113
|
+
}
|
package/dist/styles/tokens.css
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
//#region src/types/variables.d.ts
|
|
2
2
|
type Status = 'success' | 'info' | 'warning' | 'error';
|
|
3
3
|
type Direction = 'up' | 'down' | 'right' | 'left';
|
|
4
|
+
/**
|
|
5
|
+
* オーバーレイの配置。物理方向(side)と整列(alignment)の組み合わせ。
|
|
6
|
+
* 旧 `@floating-ui/react` の `Placement` 互換のローカル定義。
|
|
7
|
+
*/
|
|
8
|
+
type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
4
9
|
type Option = Readonly<{
|
|
5
10
|
value: string;
|
|
6
11
|
label: string;
|
|
7
12
|
}>;
|
|
8
13
|
//#endregion
|
|
9
|
-
export { Direction, Option, Status };
|
|
14
|
+
export { Direction, Option, Placement, Status };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k8o/arte-odyssey",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "k8o's React UI library with built-in generative UI adapters (json-render & OpenUI) for LLM-driven, on-brand interfaces",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
"registry": "https://registry.npmjs.org"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@floating-ui/react": "0.27.19",
|
|
80
79
|
"baseline-status": "1.1.1",
|
|
81
80
|
"clsx": "2.1.1",
|
|
82
81
|
"lucide-react": "1.17.0",
|
|
@@ -105,12 +104,13 @@
|
|
|
105
104
|
"react": "19.2.6",
|
|
106
105
|
"react-dom": "19.2.6",
|
|
107
106
|
"storybook": "10.4.1",
|
|
107
|
+
"storybook-addon-determinism": "0.1.1",
|
|
108
108
|
"storybook-addon-mock-date": "3.0.2",
|
|
109
109
|
"storybook-addon-vrt": "0.1.0",
|
|
110
110
|
"tailwind-token-extractor": "0.2.0",
|
|
111
111
|
"tailwindcss": "4.3.0",
|
|
112
|
-
"vite": "8.0.
|
|
113
|
-
"vite-plus": "0.1.
|
|
112
|
+
"vite": "8.0.16",
|
|
113
|
+
"vite-plus": "0.1.24",
|
|
114
114
|
"vitest": "4.1.7",
|
|
115
115
|
"vitest-browser-react": "2.2.0",
|
|
116
116
|
"zod": "4.4.3"
|