@adea-ai/app-framework 0.44.1 → 0.45.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.45.0","commit":"eefe9d41f82961b4538b0582b832890d56a386c1"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import { type AppearanceEditorTab } from '@adea-ai/ui/components/composites/appearance-editor';
|
|
2
|
+
import { type JSX } from 'solid-js';
|
|
3
|
+
export type AppearanceControlTab = AppearanceEditorTab;
|
|
1
4
|
type AppearanceControlProps = {
|
|
2
5
|
open: boolean;
|
|
3
6
|
onOpen(): void;
|
|
4
7
|
onClose(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Split the panel into Global, Terminal and Code tabs and select one. The app
|
|
10
|
+
* owns the selection so its own links can open the panel on a given tab.
|
|
11
|
+
*/
|
|
12
|
+
tab?: AppearanceControlTab;
|
|
13
|
+
onTabChange?(tab: AppearanceControlTab): void;
|
|
14
|
+
/** App rows closing the Terminal tab, composed with `AppearanceSettingsRow`. */
|
|
15
|
+
terminalRows?: JSX.Element;
|
|
16
|
+
/** App rows closing the Code tab, composed with `AppearanceSettingsRow`. */
|
|
17
|
+
codeRows?: JSX.Element;
|
|
5
18
|
};
|
|
6
|
-
export declare function AppearancePanel():
|
|
19
|
+
export declare function AppearancePanel(): JSX.Element;
|
|
7
20
|
/** Device-local preview and persistence around the shared live popover. */
|
|
8
|
-
export declare function AppearanceControl(props: AppearanceControlProps):
|
|
21
|
+
export declare function AppearanceControl(props: AppearanceControlProps): JSX.Element;
|
|
9
22
|
export {};
|
|
@@ -290,6 +290,16 @@ function AppearanceHost(props) {
|
|
|
290
290
|
},
|
|
291
291
|
children: (control) => createComponent(AppearancePopover, mergeProps(editorProps, {
|
|
292
292
|
triggerVariant: "toolbar",
|
|
293
|
+
get tab() {
|
|
294
|
+
return control().tab;
|
|
295
|
+
},
|
|
296
|
+
onTabChange: (tab) => control().onTabChange?.(tab),
|
|
297
|
+
get terminalRows() {
|
|
298
|
+
return control().terminalRows;
|
|
299
|
+
},
|
|
300
|
+
get codeRows() {
|
|
301
|
+
return control().codeRows;
|
|
302
|
+
},
|
|
293
303
|
get open() {
|
|
294
304
|
return control().open;
|
|
295
305
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/app-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
"tar": "^7.5.22"
|
|
427
427
|
},
|
|
428
428
|
"devDependencies": {
|
|
429
|
-
"@adea-ai/ui": "0.
|
|
429
|
+
"@adea-ai/ui": "0.158.0",
|
|
430
430
|
"@babel/core": "8.1.0",
|
|
431
431
|
"@babel/preset-typescript": "^8.0.7",
|
|
432
432
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
"vite-plus": "1.5.1"
|
|
449
449
|
},
|
|
450
450
|
"peerDependencies": {
|
|
451
|
-
"@adea-ai/ui": "^0.
|
|
451
|
+
"@adea-ai/ui": "^0.158.0",
|
|
452
452
|
"lucide-solid": "^1.51.0",
|
|
453
453
|
"solid-js": "^1.9.15"
|
|
454
454
|
},
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
AppearancePopover,
|
|
11
11
|
type AppearanceDraft,
|
|
12
12
|
type AppearanceEditorProps,
|
|
13
|
+
type AppearanceEditorTab,
|
|
13
14
|
} from '@adea-ai/ui/components/composites/appearance-editor'
|
|
14
15
|
import {
|
|
15
16
|
accents as accentPresets,
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
onMount,
|
|
45
46
|
Show,
|
|
46
47
|
untrack,
|
|
48
|
+
type JSX,
|
|
47
49
|
} from 'solid-js'
|
|
48
50
|
import { MonitorCog } from 'lucide-solid'
|
|
49
51
|
import { themeAccentsForRecords } from '@adea-ai/ui/lib/theme-projection'
|
|
@@ -66,10 +68,22 @@ function customAccentValue(accent: string): string {
|
|
|
66
68
|
return accent === 'theme' || accentPresetById(accent) || isThemeAccentId(accent) ? '' : accent
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
export type AppearanceControlTab = AppearanceEditorTab
|
|
72
|
+
|
|
69
73
|
type AppearanceControlProps = {
|
|
70
74
|
open: boolean
|
|
71
75
|
onOpen(): void
|
|
72
76
|
onClose(): void
|
|
77
|
+
/**
|
|
78
|
+
* Split the panel into Global, Terminal and Code tabs and select one. The app
|
|
79
|
+
* owns the selection so its own links can open the panel on a given tab.
|
|
80
|
+
*/
|
|
81
|
+
tab?: AppearanceControlTab
|
|
82
|
+
onTabChange?(tab: AppearanceControlTab): void
|
|
83
|
+
/** App rows closing the Terminal tab, composed with `AppearanceSettingsRow`. */
|
|
84
|
+
terminalRows?: JSX.Element
|
|
85
|
+
/** App rows closing the Code tab, composed with `AppearanceSettingsRow`. */
|
|
86
|
+
codeRows?: JSX.Element
|
|
73
87
|
}
|
|
74
88
|
|
|
75
89
|
export function AppearancePanel() {
|
|
@@ -436,6 +450,10 @@ function AppearanceHost(props: { popover?: AppearanceControlProps }) {
|
|
|
436
450
|
<AppearancePopover
|
|
437
451
|
{...editorProps}
|
|
438
452
|
triggerVariant="toolbar"
|
|
453
|
+
tab={control().tab}
|
|
454
|
+
onTabChange={(tab) => control().onTabChange?.(tab)}
|
|
455
|
+
terminalRows={control().terminalRows}
|
|
456
|
+
codeRows={control().codeRows}
|
|
439
457
|
open={control().open}
|
|
440
458
|
onOpen={() => {
|
|
441
459
|
openDraft()
|