@rozenite/controls-plugin 2.1.0 → 2.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/CHANGELOG.md +26 -0
- package/dist/devtools/assets/panel-EMOeI6i6.css +1 -0
- package/dist/devtools/assets/panel-mjW0t-tQ.js +18 -0
- package/dist/devtools/panel.html +2 -2
- package/dist/react-native/cjs/package.json +3 -0
- package/dist/react-native/cjs/react-native.js +14 -0
- package/dist/react-native/cjs/src/react-native/controlsRegistry.js +70 -0
- package/dist/react-native/cjs/src/react-native/useControlsAgentTools.js +175 -0
- package/dist/react-native/cjs/src/react-native/useRozeniteControlsPlugin.js +177 -0
- package/dist/react-native/cjs/src/shared/agent-tools.js +51 -0
- package/dist/react-native/cjs/src/shared/messaging.js +2 -0
- package/dist/react-native/cjs/src/shared/serialization.js +102 -0
- package/dist/react-native/cjs/src/shared/types.js +5 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/react-native.d.ts +2 -0
- package/dist/react-native/react-native.js +11 -0
- package/dist/react-native/src/react-native/controlsRegistry.d.ts +23 -0
- package/dist/react-native/src/react-native/controlsRegistry.js +66 -0
- package/dist/react-native/src/react-native/useControlsAgentTools.d.ts +2 -0
- package/dist/react-native/src/react-native/useControlsAgentTools.js +171 -0
- package/dist/react-native/src/react-native/useRozeniteControlsPlugin.d.ts +3 -0
- package/dist/react-native/src/react-native/useRozeniteControlsPlugin.js +173 -0
- package/dist/react-native/src/shared/agent-tools.d.ts +48 -0
- package/dist/react-native/src/shared/agent-tools.js +48 -0
- package/dist/react-native/src/shared/messaging.d.ts +35 -0
- package/dist/react-native/src/shared/messaging.js +1 -0
- package/dist/react-native/src/shared/serialization.d.ts +22 -0
- package/dist/react-native/src/shared/serialization.js +96 -0
- package/dist/react-native/src/shared/types.d.ts +69 -0
- package/dist/react-native/src/shared/types.js +1 -0
- package/dist/rozenite.json +1 -1
- package/dist/sdk/package.json +3 -0
- package/dist/sdk/sdk.d.ts +10 -0
- package/dist/sdk/sdk.js +8 -0
- package/dist/sdk/src/shared/agent-tools.d.ts +48 -0
- package/dist/sdk/src/shared/agent-tools.js +51 -0
- package/dist/sdk/src/shared/messaging.d.ts +35 -0
- package/dist/sdk/src/shared/messaging.js +2 -0
- package/dist/sdk/src/shared/types.d.ts +69 -0
- package/dist/sdk/src/shared/types.js +5 -0
- package/package.json +17 -18
- package/react-native.ts +8 -1
- package/rozenite.config.ts +1 -0
- package/src/__tests__/release-bundle.test.ts +32 -0
- package/src/ui/panel.tsx +5 -3
- package/tsconfig.json +4 -5
- package/dist/devtools/assets/panel-BvIa5kqW.css +0 -1
- package/dist/devtools/assets/panel-H7O6Qof-.js +0 -18
- package/dist/react-native/chunks/useRozeniteControlsPlugin.require.cjs +0 -1
- package/dist/react-native/chunks/useRozeniteControlsPlugin.require.js +0 -466
- package/dist/react-native/index.cjs +0 -1
- package/dist/react-native/index.d.ts +0 -138
- package/dist/react-native/index.js +0 -8
- package/dist/sdk/index.cjs +0 -1
- package/dist/sdk/index.d.ts +0 -150
- package/dist/sdk/index.js +0 -55
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type ControlsTextItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'text';
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ControlsValidationResult = {
|
|
9
|
+
valid: true;
|
|
10
|
+
} | {
|
|
11
|
+
valid: false;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
export type ControlsMutableItemBase<TValue> = {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
value: TValue;
|
|
18
|
+
description?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
validate?: (nextValue: TValue) => ControlsValidationResult;
|
|
21
|
+
onUpdate: (nextValue: TValue) => void | Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export type ControlsToggleItem = ControlsMutableItemBase<boolean> & {
|
|
24
|
+
type: 'toggle';
|
|
25
|
+
};
|
|
26
|
+
export type ControlsButtonItem = {
|
|
27
|
+
id: string;
|
|
28
|
+
type: 'button';
|
|
29
|
+
title: string;
|
|
30
|
+
actionLabel?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
onPress: () => void | Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export type ControlsSelectOption = {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
export type ControlsSelectItem = ControlsMutableItemBase<string> & {
|
|
40
|
+
type: 'select';
|
|
41
|
+
options: ControlsSelectOption[];
|
|
42
|
+
};
|
|
43
|
+
export type ControlsInputItem = ControlsMutableItemBase<string> & {
|
|
44
|
+
type: 'input';
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
applyLabel?: string;
|
|
47
|
+
};
|
|
48
|
+
export type ControlsItem = ControlsTextItem | ControlsToggleItem | ControlsButtonItem | ControlsSelectItem | ControlsInputItem;
|
|
49
|
+
export type ControlsSection = {
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
items: ControlsItem[];
|
|
54
|
+
};
|
|
55
|
+
export type ControlsTextItemSnapshot = Omit<ControlsTextItem, never>;
|
|
56
|
+
export type ControlsToggleItemSnapshot = Omit<ControlsToggleItem, 'validate' | 'onUpdate'>;
|
|
57
|
+
export type ControlsButtonItemSnapshot = Omit<ControlsButtonItem, 'onPress'>;
|
|
58
|
+
export type ControlsSelectItemSnapshot = Omit<ControlsSelectItem, 'validate' | 'onUpdate'>;
|
|
59
|
+
export type ControlsInputItemSnapshot = Omit<ControlsInputItem, 'validate' | 'onUpdate'>;
|
|
60
|
+
export type ControlsItemSnapshot = ControlsTextItemSnapshot | ControlsToggleItemSnapshot | ControlsButtonItemSnapshot | ControlsSelectItemSnapshot | ControlsInputItemSnapshot;
|
|
61
|
+
export type ControlsSectionSnapshot = Omit<ControlsSection, 'items'> & {
|
|
62
|
+
items: ControlsItemSnapshot[];
|
|
63
|
+
};
|
|
64
|
+
export type RozeniteControlsPluginOptions = {
|
|
65
|
+
sections: ControlsSection[];
|
|
66
|
+
};
|
|
67
|
+
export type RozeniteControlsPluginOptionsUpdater = (previousOptions: RozeniteControlsPluginOptions) => RozeniteControlsPluginOptions;
|
|
68
|
+
export type RozeniteControlsPluginOptionsInput = RozeniteControlsPluginOptions | RozeniteControlsPluginOptionsUpdater;
|
|
69
|
+
export declare const createSection: <TSection extends ControlsSection>(section: TSection) => TSection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const createSection = (section) => section;
|
package/dist/rozenite.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@rozenite/controls-plugin","version":"2.
|
|
1
|
+
{"name":"@rozenite/controls-plugin","version":"2.3.0","description":"A Rozenite plugin for exposing app-defined controls directly in React Native DevTools.","panels":[{"name":"Controls","source":"/devtools/panel.html"}],"integrations":["react-native","react-native-web","lynx","lynx-web"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CONTROLS_AGENT_PLUGIN_ID, controlsToolDefinitions } from './src/shared/agent-tools.js';
|
|
2
|
+
export { CONTROLS_AGENT_PLUGIN_ID, controlsToolDefinitions };
|
|
3
|
+
export declare const controlsTools: {
|
|
4
|
+
readonly listSections: import("@rozenite/agent-shared").AgentToolDescriptor<undefined, import("./src/shared/agent-tools.js").ControlsListSectionsResult>;
|
|
5
|
+
readonly getItem: import("@rozenite/agent-shared").AgentToolDescriptor<import("./src/shared/agent-tools.js").ControlsSectionItemArgs, import("./src/shared/agent-tools.js").ControlsGetItemResult>;
|
|
6
|
+
readonly setValue: import("@rozenite/agent-shared").AgentToolDescriptor<import("./src/shared/agent-tools.js").ControlsSetValueArgs, import("./src/shared/agent-tools.js").ControlsSetValueResult>;
|
|
7
|
+
readonly pressButton: import("@rozenite/agent-shared").AgentToolDescriptor<import("./src/shared/agent-tools.js").ControlsSectionItemArgs, import("./src/shared/agent-tools.js").ControlsPressButtonResult>;
|
|
8
|
+
};
|
|
9
|
+
export type { ControlsGetItemArgs, ControlsGetItemResult, ControlsListSectionItemSummary, ControlsListSectionSummary, ControlsListSectionsArgs, ControlsListSectionsResult, ControlsPressButtonArgs, ControlsPressButtonResult, ControlsSectionItemArgs, ControlsSetValueArgs, ControlsSetValueResult, } from './src/shared/agent-tools.js';
|
|
10
|
+
export type { ControlsButtonItemSnapshot, ControlsInputItemSnapshot, ControlsItemSnapshot, ControlsSectionSnapshot, ControlsSelectItemSnapshot, ControlsSelectOption, ControlsTextItemSnapshot, ControlsToggleItemSnapshot, } from './src/shared/types.js';
|
package/dist/sdk/sdk.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.controlsTools = exports.controlsToolDefinitions = exports.CONTROLS_AGENT_PLUGIN_ID = void 0;
|
|
4
|
+
const agent_shared_1 = require("@rozenite/agent-shared");
|
|
5
|
+
const agent_tools_js_1 = require("./src/shared/agent-tools.js");
|
|
6
|
+
Object.defineProperty(exports, "CONTROLS_AGENT_PLUGIN_ID", { enumerable: true, get: function () { return agent_tools_js_1.CONTROLS_AGENT_PLUGIN_ID; } });
|
|
7
|
+
Object.defineProperty(exports, "controlsToolDefinitions", { enumerable: true, get: function () { return agent_tools_js_1.controlsToolDefinitions; } });
|
|
8
|
+
exports.controlsTools = (0, agent_shared_1.defineAgentToolDescriptors)(agent_tools_js_1.CONTROLS_AGENT_PLUGIN_ID, agent_tools_js_1.controlsToolDefinitions);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type AgentToolContract } from '@rozenite/agent-shared';
|
|
2
|
+
import type { ControlsItem, ControlsItemSnapshot } from './types';
|
|
3
|
+
export declare const CONTROLS_AGENT_PLUGIN_ID = "@rozenite/controls-plugin";
|
|
4
|
+
export type ControlsSectionItemArgs = {
|
|
5
|
+
sectionId: string;
|
|
6
|
+
itemId: string;
|
|
7
|
+
};
|
|
8
|
+
export type ControlsListSectionsArgs = undefined;
|
|
9
|
+
export type ControlsListSectionItemSummary = {
|
|
10
|
+
id: string;
|
|
11
|
+
type: ControlsItem['type'];
|
|
12
|
+
title: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type ControlsListSectionSummary = {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
items: ControlsListSectionItemSummary[];
|
|
20
|
+
};
|
|
21
|
+
export type ControlsListSectionsResult = {
|
|
22
|
+
sections: ControlsListSectionSummary[];
|
|
23
|
+
};
|
|
24
|
+
export type ControlsGetItemArgs = ControlsSectionItemArgs;
|
|
25
|
+
export type ControlsGetItemResult = {
|
|
26
|
+
sectionId: string;
|
|
27
|
+
item: ControlsItemSnapshot;
|
|
28
|
+
};
|
|
29
|
+
export type ControlsSetValueArgs = ControlsSectionItemArgs & {
|
|
30
|
+
value: boolean | string;
|
|
31
|
+
};
|
|
32
|
+
export type ControlsSetValueResult = {
|
|
33
|
+
applied: true;
|
|
34
|
+
sectionId: string;
|
|
35
|
+
itemId: string;
|
|
36
|
+
};
|
|
37
|
+
export type ControlsPressButtonArgs = ControlsSectionItemArgs;
|
|
38
|
+
export type ControlsPressButtonResult = {
|
|
39
|
+
pressed: true;
|
|
40
|
+
sectionId: string;
|
|
41
|
+
itemId: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const controlsToolDefinitions: {
|
|
44
|
+
readonly listSections: AgentToolContract<undefined, ControlsListSectionsResult>;
|
|
45
|
+
readonly getItem: AgentToolContract<ControlsSectionItemArgs, ControlsGetItemResult>;
|
|
46
|
+
readonly setValue: AgentToolContract<ControlsSetValueArgs, ControlsSetValueResult>;
|
|
47
|
+
readonly pressButton: AgentToolContract<ControlsSectionItemArgs, ControlsPressButtonResult>;
|
|
48
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.controlsToolDefinitions = exports.CONTROLS_AGENT_PLUGIN_ID = void 0;
|
|
4
|
+
const agent_shared_1 = require("@rozenite/agent-shared");
|
|
5
|
+
exports.CONTROLS_AGENT_PLUGIN_ID = '@rozenite/controls-plugin';
|
|
6
|
+
exports.controlsToolDefinitions = {
|
|
7
|
+
listSections: (0, agent_shared_1.defineAgentToolContract)({
|
|
8
|
+
name: 'list-sections',
|
|
9
|
+
description: 'List all controls sections with their item IDs, types, and titles. Does not include values — call get-item for that.',
|
|
10
|
+
inputSchema: { type: 'object', properties: {} },
|
|
11
|
+
}),
|
|
12
|
+
getItem: (0, agent_shared_1.defineAgentToolContract)({
|
|
13
|
+
name: 'get-item',
|
|
14
|
+
description: 'Get full details of a single controls item including its current value. For select items this includes available options.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
sectionId: { type: 'string', description: 'Section ID.' },
|
|
19
|
+
itemId: { type: 'string', description: 'Item ID.' },
|
|
20
|
+
},
|
|
21
|
+
required: ['sectionId', 'itemId'],
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
setValue: (0, agent_shared_1.defineAgentToolContract)({
|
|
25
|
+
name: 'set-value',
|
|
26
|
+
description: 'Update the value of a toggle, select, or input item. Runs the validate callback when present. Fails for text (read-only) and button items.',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
sectionId: { type: 'string', description: 'Section ID.' },
|
|
31
|
+
itemId: { type: 'string', description: 'Item ID.' },
|
|
32
|
+
value: {
|
|
33
|
+
description: 'New value. Boolean for toggle items, string for select/input items.',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['sectionId', 'itemId', 'value'],
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
pressButton: (0, agent_shared_1.defineAgentToolContract)({
|
|
40
|
+
name: 'press-button',
|
|
41
|
+
description: "Trigger a button item's action. Fails if the item is not a button or is disabled.",
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
sectionId: { type: 'string', description: 'Section ID.' },
|
|
46
|
+
itemId: { type: 'string', description: 'Item ID.' },
|
|
47
|
+
},
|
|
48
|
+
required: ['sectionId', 'itemId'],
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ControlsSectionSnapshot } from './types';
|
|
2
|
+
export type ControlsSnapshotEvent = {
|
|
3
|
+
type: 'snapshot';
|
|
4
|
+
sections: ControlsSectionSnapshot[];
|
|
5
|
+
};
|
|
6
|
+
export type ControlsGetSnapshotEvent = {
|
|
7
|
+
type: 'get-snapshot';
|
|
8
|
+
};
|
|
9
|
+
export type ControlsUpdateRequestEvent = {
|
|
10
|
+
type: 'update-request';
|
|
11
|
+
requestId: string;
|
|
12
|
+
sectionId: string;
|
|
13
|
+
itemId: string;
|
|
14
|
+
value: boolean | string;
|
|
15
|
+
};
|
|
16
|
+
export type ControlsUpdateResultEvent = {
|
|
17
|
+
type: 'update-result';
|
|
18
|
+
requestId: string;
|
|
19
|
+
sectionId: string;
|
|
20
|
+
itemId: string;
|
|
21
|
+
status: 'ok' | 'error';
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
24
|
+
export type ControlsInvokeActionEvent = {
|
|
25
|
+
type: 'invoke-action';
|
|
26
|
+
sectionId: string;
|
|
27
|
+
itemId: string;
|
|
28
|
+
action: 'press';
|
|
29
|
+
};
|
|
30
|
+
export type ControlsEvent = ControlsSnapshotEvent | ControlsGetSnapshotEvent | ControlsUpdateRequestEvent | ControlsUpdateResultEvent | ControlsInvokeActionEvent;
|
|
31
|
+
export type ControlsEventMap = {
|
|
32
|
+
[K in ControlsEvent['type']]: Extract<ControlsEvent, {
|
|
33
|
+
type: K;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type ControlsTextItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'text';
|
|
4
|
+
title: string;
|
|
5
|
+
value: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ControlsValidationResult = {
|
|
9
|
+
valid: true;
|
|
10
|
+
} | {
|
|
11
|
+
valid: false;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
export type ControlsMutableItemBase<TValue> = {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
value: TValue;
|
|
18
|
+
description?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
validate?: (nextValue: TValue) => ControlsValidationResult;
|
|
21
|
+
onUpdate: (nextValue: TValue) => void | Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export type ControlsToggleItem = ControlsMutableItemBase<boolean> & {
|
|
24
|
+
type: 'toggle';
|
|
25
|
+
};
|
|
26
|
+
export type ControlsButtonItem = {
|
|
27
|
+
id: string;
|
|
28
|
+
type: 'button';
|
|
29
|
+
title: string;
|
|
30
|
+
actionLabel?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
onPress: () => void | Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export type ControlsSelectOption = {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
export type ControlsSelectItem = ControlsMutableItemBase<string> & {
|
|
40
|
+
type: 'select';
|
|
41
|
+
options: ControlsSelectOption[];
|
|
42
|
+
};
|
|
43
|
+
export type ControlsInputItem = ControlsMutableItemBase<string> & {
|
|
44
|
+
type: 'input';
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
applyLabel?: string;
|
|
47
|
+
};
|
|
48
|
+
export type ControlsItem = ControlsTextItem | ControlsToggleItem | ControlsButtonItem | ControlsSelectItem | ControlsInputItem;
|
|
49
|
+
export type ControlsSection = {
|
|
50
|
+
id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
items: ControlsItem[];
|
|
54
|
+
};
|
|
55
|
+
export type ControlsTextItemSnapshot = Omit<ControlsTextItem, never>;
|
|
56
|
+
export type ControlsToggleItemSnapshot = Omit<ControlsToggleItem, 'validate' | 'onUpdate'>;
|
|
57
|
+
export type ControlsButtonItemSnapshot = Omit<ControlsButtonItem, 'onPress'>;
|
|
58
|
+
export type ControlsSelectItemSnapshot = Omit<ControlsSelectItem, 'validate' | 'onUpdate'>;
|
|
59
|
+
export type ControlsInputItemSnapshot = Omit<ControlsInputItem, 'validate' | 'onUpdate'>;
|
|
60
|
+
export type ControlsItemSnapshot = ControlsTextItemSnapshot | ControlsToggleItemSnapshot | ControlsButtonItemSnapshot | ControlsSelectItemSnapshot | ControlsInputItemSnapshot;
|
|
61
|
+
export type ControlsSectionSnapshot = Omit<ControlsSection, 'items'> & {
|
|
62
|
+
items: ControlsItemSnapshot[];
|
|
63
|
+
};
|
|
64
|
+
export type RozeniteControlsPluginOptions = {
|
|
65
|
+
sections: ControlsSection[];
|
|
66
|
+
};
|
|
67
|
+
export type RozeniteControlsPluginOptionsUpdater = (previousOptions: RozeniteControlsPluginOptions) => RozeniteControlsPluginOptions;
|
|
68
|
+
export type RozeniteControlsPluginOptionsInput = RozeniteControlsPluginOptions | RozeniteControlsPluginOptionsUpdater;
|
|
69
|
+
export declare const createSection: <TSection extends ControlsSection>(section: TSection) => TSection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozenite/controls-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "A Rozenite plugin for exposing app-defined controls directly in React Native DevTools.",
|
|
5
5
|
"homepage": "https://github.com/callstackincubator/rozenite#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -12,31 +12,30 @@
|
|
|
12
12
|
"url": "https://github.com/callstackincubator/rozenite.git"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
|
-
"main": "./dist/react-native/
|
|
16
|
-
"module": "./dist/react-native/
|
|
17
|
-
"types": "./dist/react-native/
|
|
15
|
+
"main": "./dist/react-native/cjs/react-native.js",
|
|
16
|
+
"module": "./dist/react-native/react-native.js",
|
|
17
|
+
"types": "./dist/react-native/react-native.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"types": "./dist/react-native/
|
|
21
|
-
"import": "./dist/react-native/
|
|
22
|
-
"require": "./dist/react-native/
|
|
20
|
+
"types": "./dist/react-native/react-native.d.ts",
|
|
21
|
+
"import": "./dist/react-native/react-native.js",
|
|
22
|
+
"require": "./dist/react-native/cjs/react-native.js"
|
|
23
23
|
},
|
|
24
24
|
"./package.json": "./package.json",
|
|
25
25
|
"./sdk": {
|
|
26
26
|
"development": "./sdk.ts",
|
|
27
|
-
"types": "./dist/sdk/
|
|
28
|
-
"
|
|
29
|
-
"require": "./dist/sdk/index.cjs"
|
|
27
|
+
"types": "./dist/sdk/sdk.d.ts",
|
|
28
|
+
"default": "./dist/sdk/sdk.js"
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
"publishConfig": {
|
|
33
32
|
"access": "public"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@rozenite/agent-bridge": "2.
|
|
37
|
-
"@rozenite/agent-shared": "2.
|
|
38
|
-
"@rozenite/plugin-bridge": "2.
|
|
39
|
-
"@rozenite/ui": "2.
|
|
35
|
+
"@rozenite/agent-bridge": "2.3.0",
|
|
36
|
+
"@rozenite/agent-shared": "2.3.0",
|
|
37
|
+
"@rozenite/plugin-bridge": "2.3.0",
|
|
38
|
+
"@rozenite/ui": "2.3.0"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
41
|
"@types/react": "~19.2.3",
|
|
@@ -47,12 +46,12 @@
|
|
|
47
46
|
"react-native-web": "^0.21.2",
|
|
48
47
|
"typescript": "~5.9.3",
|
|
49
48
|
"vite": "^7.3.1",
|
|
50
|
-
"@rozenite/
|
|
51
|
-
"rozenite": "2.
|
|
49
|
+
"@rozenite/test-utils": "2.3.0",
|
|
50
|
+
"@rozenite/vite-plugin": "2.3.0",
|
|
51
|
+
"rozenite": "2.3.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"react": "*"
|
|
55
|
-
"react-native": "*"
|
|
54
|
+
"react": "*"
|
|
56
55
|
},
|
|
57
56
|
"scripts": {
|
|
58
57
|
"build": "rozenite build",
|
package/react-native.ts
CHANGED
|
@@ -16,8 +16,15 @@ export {
|
|
|
16
16
|
|
|
17
17
|
export let useRozeniteControlsPlugin: typeof import('./src/react-native/useRozeniteControlsPlugin').useRozeniteControlsPlugin;
|
|
18
18
|
|
|
19
|
+
// Neither Lynx runtime has a `window`, so `typeof window` alone reported
|
|
20
|
+
// every Lynx app as a server and installed the no-op stub below. `lynx` is
|
|
21
|
+
// a free binding in module scope, not a property of `globalThis`. Kept
|
|
22
|
+
// inline rather than imported so this stays a foldable expression and the
|
|
23
|
+
// `require`s below can still be dropped from production bundles.
|
|
24
|
+
declare const lynx: unknown;
|
|
25
|
+
|
|
19
26
|
const isDev = process.env.NODE_ENV !== 'production';
|
|
20
|
-
const isServer = typeof window === 'undefined';
|
|
27
|
+
const isServer = typeof window === 'undefined' && typeof lynx === 'undefined';
|
|
21
28
|
|
|
22
29
|
if (isDev && !isServer) {
|
|
23
30
|
useRozeniteControlsPlugin =
|
package/rozenite.config.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { bundleForRelease, RELEASE_BUNDLE_TIMEOUT } from '@rozenite/test-utils';
|
|
4
|
+
import { describe, expect, it } from 'vitest';
|
|
5
|
+
|
|
6
|
+
// An app importing this plugin ships its React Native code -- that much is
|
|
7
|
+
// the app's own choice. What must never follow it into the bundle is the
|
|
8
|
+
// panel: the DevTools UI, its React DOM tree and `@rozenite/ui`.
|
|
9
|
+
// See docs/agents/release-bundle-testing.md.
|
|
10
|
+
const packageRoot = path.resolve(fileURLToPath(import.meta.url), '../../..');
|
|
11
|
+
const reactNativeEntry = path.join(packageRoot, 'dist/react-native/cjs/react-native.js');
|
|
12
|
+
|
|
13
|
+
describe('@rozenite/controls-plugin in a release bundle', () => {
|
|
14
|
+
it(
|
|
15
|
+
'ships no panel code when an app imports it',
|
|
16
|
+
async () => {
|
|
17
|
+
const result = await bundleForRelease({
|
|
18
|
+
resolveFrom: packageRoot,
|
|
19
|
+
files: {
|
|
20
|
+
'index.js': `require(${JSON.stringify(reactNativeEntry)});\n`,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Keeps the check below honest: the entry really did get bundled.
|
|
25
|
+
expect(result.rozeniteModules).toContain(
|
|
26
|
+
'packages/controls-plugin/dist/react-native/cjs/react-native.js',
|
|
27
|
+
);
|
|
28
|
+
expect(result.panelModules).toEqual([]);
|
|
29
|
+
},
|
|
30
|
+
RELEASE_BUNDLE_TIMEOUT,
|
|
31
|
+
);
|
|
32
|
+
});
|
package/src/ui/panel.tsx
CHANGED
|
@@ -44,7 +44,7 @@ const RowShell = ({
|
|
|
44
44
|
<div className="min-w-0">
|
|
45
45
|
<div className="text-sm font-medium text-foreground">{title}</div>
|
|
46
46
|
{description ? <div className="mt-1 text-xs text-muted-foreground">{description}</div> : null}
|
|
47
|
-
{errorMessage ? <div className="mt-1 text-xs text-
|
|
47
|
+
{errorMessage ? <div className="mt-1 text-xs text-danger">{errorMessage}</div> : null}
|
|
48
48
|
</div>
|
|
49
49
|
{children}
|
|
50
50
|
</div>
|
|
@@ -87,7 +87,8 @@ const ButtonRow = ({
|
|
|
87
87
|
return (
|
|
88
88
|
<RowShell title={item.title} description={item.description} errorMessage={uiState?.message}>
|
|
89
89
|
<Button
|
|
90
|
-
size="
|
|
90
|
+
size="sm"
|
|
91
|
+
tone="neutral"
|
|
91
92
|
variant="outline"
|
|
92
93
|
disabled={item.disabled || uiState?.pending}
|
|
93
94
|
onClick={() => onPress(sectionId, item.id)}
|
|
@@ -174,7 +175,8 @@ const InputRow = ({
|
|
|
174
175
|
onChange={(event) => onDraftChange(sectionId, item.id, event.target.value)}
|
|
175
176
|
/>
|
|
176
177
|
<Button
|
|
177
|
-
size="
|
|
178
|
+
size="sm"
|
|
179
|
+
tone="neutral"
|
|
178
180
|
variant="outline"
|
|
179
181
|
disabled={!isChanged || item.disabled || uiState?.pending}
|
|
180
182
|
onClick={() => onApply(sectionId, item.id)}
|
package/tsconfig.json
CHANGED
|
@@ -11,11 +11,7 @@
|
|
|
11
11
|
"noFallthroughCasesInSwitch": true,
|
|
12
12
|
"module": "ESNext",
|
|
13
13
|
"moduleResolution": "bundler",
|
|
14
|
-
"
|
|
15
|
-
"paths": {
|
|
16
|
-
"@rozenite/agent-shared": ["../agent-shared/src/index.ts"],
|
|
17
|
-
"@rozenite/plugin-bridge": ["../plugin-bridge/src/index.ts"]
|
|
18
|
-
},
|
|
14
|
+
"customConditions": ["development"],
|
|
19
15
|
"resolveJsonModule": true,
|
|
20
16
|
"isolatedModules": true,
|
|
21
17
|
"noEmit": true,
|
|
@@ -24,6 +20,9 @@
|
|
|
24
20
|
"include": ["src/**/*", "react-native.ts", "sdk.ts", "rozenite.config.ts"],
|
|
25
21
|
"exclude": ["node_modules", "dist", "build"],
|
|
26
22
|
"references": [
|
|
23
|
+
{
|
|
24
|
+
"path": "../agent-bridge"
|
|
25
|
+
},
|
|
27
26
|
{
|
|
28
27
|
"path": "../plugin-bridge"
|
|
29
28
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:var(--radius);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--border);border-radius:var(--radius-lg);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-thumb:hover{background-color:var(--muted-foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.right-1\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.z-10{z-index:10}.z-50{z-index:50}.row-0{grid-row:0}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-3\.5{margin-left:calc(var(--spacing) * 3.5)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-28{min-height:calc(var(--spacing) * 28)}.min-h-56{min-height:calc(var(--spacing) * 56)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-80{width:calc(var(--spacing) * 80)}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\[50\%\]{max-width:50%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[--anchor-width\]{min-width:--anchor-width}.min-w-\[240px\]{min-width:240px}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\(--transform-origin\){transform-origin:var(--transform-origin)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-\[minmax\(7rem\,25\%\)_minmax\(3rem\,1fr\)\]{grid-template-columns:minmax(7rem,25%) minmax(3rem,1fr)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-border{border-color:var(--border)}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-ring{border-color:var(--ring)}.border-sidebar-border{border-color:var(--sidebar-border)}.bg-background,.bg-background\/70{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/70{background-color:color-mix(in oklab,var(--background) 70%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-transparent{background-color:#0000}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-14{padding-right:calc(var(--spacing) * 14)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground{color:var(--foreground)}.text-muted-foreground,.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/60{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/60{color:color-mix(in oklab,var(--sidebar-foreground) 60%,transparent)}}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-\[transform\,opacity\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,scale\,opacity\]{transition-property:transform,scale,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.running{animation-play-state:running}@media(hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-0\.5:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}}.group-aria-\[orientation\=horizontal\]\/split-handle\:h-3:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){height:calc(var(--spacing) * 3)}.group-aria-\[orientation\=horizontal\]\/split-handle\:w-4:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){width:calc(var(--spacing) * 4)}.group-aria-\[orientation\=horizontal\]\/split-handle\:rotate-90:is(:where(.group\/split-handle)[aria-orientation=horizontal] *){rotate:90deg}.group-aria-\[orientation\=vertical\]\/split-handle\:h-4:is(:where(.group\/split-handle)[aria-orientation=vertical] *){height:calc(var(--spacing) * 4)}.group-aria-\[orientation\=vertical\]\/split-handle\:w-3:is(:where(.group\/split-handle)[aria-orientation=vertical] *){width:calc(var(--spacing) * 3)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted-foreground:hover{background-color:var(--muted-foreground)}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-sidebar-ring:focus-visible{--tw-ring-color:var(--sidebar-ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.aria-\[orientation\=horizontal\]\:h-px[aria-orientation=horizontal]{height:1px}.aria-\[orientation\=horizontal\]\:cursor-row-resize[aria-orientation=horizontal]{cursor:row-resize}.aria-\[orientation\=vertical\]\:w-px[aria-orientation=vertical]{width:1px}.aria-\[orientation\=vertical\]\:cursor-col-resize[aria-orientation=vertical]{cursor:col-resize}.data-\[checked\]\:translate-x-4[data-checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[checked\]\:border-primary[data-checked]{border-color:var(--primary)}.data-\[checked\]\:bg-primary[data-checked]{background-color:var(--primary)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[ending-style\]\:scale-90[data-ending-style]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[ending-style\]\:scale-95[data-ending-style]{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[ending-style\]\:opacity-0[data-ending-style]{opacity:0}.data-\[highlighted\]\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-\[highlighted\]\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.data-\[selected\]\:bg-background[data-selected]{background-color:var(--background)}.data-\[selected\]\:bg-sidebar-accent[data-selected]{background-color:var(--sidebar-accent)}.data-\[selected\]\:font-medium[data-selected]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[selected\]\:text-foreground[data-selected]{color:var(--foreground)}.data-\[selected\]\:text-sidebar-accent-foreground[data-selected]{color:var(--sidebar-accent-foreground)}.data-\[selected\]\:shadow-xs[data-selected]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[starting-style\]\:scale-90[data-starting-style]{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[starting-style\]\:scale-95[data-starting-style]{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[starting-style\]\:opacity-0[data-starting-style]{opacity:0}@media(min-width:40rem){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-3\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:h-3\.5 svg{height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:w-3\.5 svg{width:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&\:\:-webkit-search-cancel-button\]\:appearance-none::-webkit-search-cancel-button{appearance:none}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:0;--background:#fff;--foreground:#201f24;--card:#fff;--card-foreground:#201f24;--popover:#fff;--popover-foreground:#201f24;--primary:#8232ff;--primary-foreground:#fff;--secondary:#f9f8fd;--secondary-foreground:#201f24;--muted:#f9f8fd;--muted-foreground:#838289;--accent:#8232ff29;--accent-foreground:#201f24;--destructive:#fa7171;--destructive-foreground:#201f24;--border:#cfced5;--input:#cfced5;--ring:#8232ff;--sidebar:#fff;--sidebar-foreground:#201f24;--sidebar-primary:#8232ff;--sidebar-primary-foreground:#fff;--sidebar-accent:#8232ff29;--sidebar-accent-foreground:#201f24;--sidebar-border:#cfced5;--sidebar-ring:#8232ff}.dark{--background:#201f24;--foreground:#fff;--card:#201f24;--card-foreground:#fff;--popover:#2b2a2f;--popover-foreground:#fff;--primary:#8232ff;--primary-foreground:#fff;--secondary:#2b2a2f;--secondary-foreground:#fff;--muted:#2b2a2f;--muted-foreground:#cfced5;--accent:#8232ff33;--accent-foreground:#fff;--destructive:#fa7171;--destructive-foreground:#201f24;--border:#424145;--input:#424145;--ring:#8232ff;--sidebar:#201f24;--sidebar-foreground:#fff;--sidebar-primary:#8232ff;--sidebar-primary-foreground:#fff;--sidebar-accent:#8232ff33;--sidebar-accent-foreground:#fff;--sidebar-border:#424145;--sidebar-ring:#8232ff}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|