@sero-ai/ui 0.4.1 → 0.4.2
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/.turbo/turbo-build.log +628 -615
- package/.turbo/turbo-test.log +18 -0
- package/.turbo/turbo-typecheck.log +1 -1
- package/dist/components/ai-elements/agent.cjs +6 -6
- package/dist/components/ai-elements/agent.js +6 -6
- package/dist/components/ai-elements/artifact.cjs +2 -2
- package/dist/components/ai-elements/artifact.js +2 -2
- package/dist/components/ai-elements/attachments.cjs +2 -2
- package/dist/components/ai-elements/attachments.js +2 -2
- package/dist/components/ai-elements/chain-of-thought.cjs +2 -2
- package/dist/components/ai-elements/chain-of-thought.js +2 -2
- package/dist/components/ai-elements/code-block.cjs +7 -5
- package/dist/components/ai-elements/code-block.d.cts +2 -1
- package/dist/components/ai-elements/code-block.d.ts +2 -1
- package/dist/components/ai-elements/code-block.js +7 -5
- package/dist/components/ai-elements/commit.cjs +2 -2
- package/dist/components/ai-elements/commit.js +2 -2
- package/dist/components/ai-elements/confirmation.cjs +1 -1
- package/dist/components/ai-elements/confirmation.js +1 -1
- package/dist/components/ai-elements/conversation.cjs +2 -2
- package/dist/components/ai-elements/conversation.js +2 -2
- package/dist/components/ai-elements/environment-variables.cjs +3 -3
- package/dist/components/ai-elements/environment-variables.js +3 -3
- package/dist/components/ai-elements/file-tree.cjs +1 -1
- package/dist/components/ai-elements/file-tree.js +1 -1
- package/dist/components/ai-elements/inline-citation.cjs +3 -3
- package/dist/components/ai-elements/inline-citation.js +3 -3
- package/dist/components/ai-elements/jsx-preview.cjs +1 -1
- package/dist/components/ai-elements/jsx-preview.js +1 -1
- package/dist/components/ai-elements/message.cjs +1 -1
- package/dist/components/ai-elements/message.js +1 -1
- package/dist/components/ai-elements/package-info.cjs +4 -4
- package/dist/components/ai-elements/package-info.js +4 -4
- package/dist/components/ai-elements/prompt-input-context.cjs +2 -3
- package/dist/components/ai-elements/prompt-input-context.js +2 -3
- package/dist/components/ai-elements/queue.cjs +2 -2
- package/dist/components/ai-elements/queue.js +2 -2
- package/dist/components/ai-elements/reasoning.cjs +2 -2
- package/dist/components/ai-elements/reasoning.js +2 -2
- package/dist/components/ai-elements/sandbox.cjs +3 -3
- package/dist/components/ai-elements/sandbox.js +3 -3
- package/dist/components/ai-elements/schema-display.cjs +12 -12
- package/dist/components/ai-elements/schema-display.js +12 -12
- package/dist/components/ai-elements/speech-input.cjs +18 -2
- package/dist/components/ai-elements/speech-input.js +16 -0
- package/dist/components/ai-elements/stack-trace.cjs +1 -1
- package/dist/components/ai-elements/stack-trace.js +1 -1
- package/dist/components/ai-elements/task.cjs +3 -3
- package/dist/components/ai-elements/task.js +3 -3
- package/dist/components/ai-elements/terminal.cjs +2 -2
- package/dist/components/ai-elements/terminal.js +2 -2
- package/dist/components/ai-elements/test-results.cjs +4 -4
- package/dist/components/ai-elements/test-results.js +4 -4
- package/dist/components/ai-elements/tool.cjs +4 -4
- package/dist/components/ai-elements/tool.js +4 -4
- package/dist/components/ai-elements/transcription.cjs +1 -1
- package/dist/components/ai-elements/transcription.js +1 -1
- package/dist/components/ai-elements/web-preview.cjs +2 -2
- package/dist/components/ai-elements/web-preview.js +2 -2
- package/dist/components/context-editor/CapabilitySection.cjs +2 -2
- package/dist/components/context-editor/CapabilitySection.js +2 -2
- package/dist/components/context-editor/ContextEditor.cjs +2 -2
- package/dist/components/context-editor/ContextEditor.js +2 -2
- package/dist/components/context-editor/PresetBar.cjs +3 -3
- package/dist/components/context-editor/PresetBar.js +3 -3
- package/dist/components/context-editor/SystemPromptSection.cjs +4 -4
- package/dist/components/context-editor/SystemPromptSection.js +4 -4
- package/dist/components/context-editor/parts.cjs +6 -6
- package/dist/components/context-editor/parts.js +6 -6
- package/dist/components/dashboard/activity-list.cjs +2 -2
- package/dist/components/dashboard/activity-list.js +2 -2
- package/dist/components/dashboard/empty-state.cjs +1 -1
- package/dist/components/dashboard/empty-state.js +1 -1
- package/dist/components/dashboard/item-list.cjs +2 -2
- package/dist/components/dashboard/item-list.js +2 -2
- package/dist/components/dashboard/layout.cjs +1 -1
- package/dist/components/dashboard/layout.js +1 -1
- package/dist/components/dashboard/metric.cjs +1 -1
- package/dist/components/dashboard/metric.js +1 -1
- package/dist/components/dashboard/stale-indicator.cjs +1 -1
- package/dist/components/dashboard/stale-indicator.js +1 -1
- package/dist/components/dashboard/typography.cjs +4 -4
- package/dist/components/dashboard/typography.d.cts +1 -1
- package/dist/components/dashboard/typography.d.ts +1 -1
- package/dist/components/dashboard/typography.js +4 -4
- package/dist/components/model-selection/available-model-picker.cjs +6 -6
- package/dist/components/model-selection/available-model-picker.js +6 -6
- package/dist/components/model-selection/thinking-level-picker.cjs +1 -1
- package/dist/components/model-selection/thinking-level-picker.js +1 -1
- package/dist/components/model-selection/thinking-picker.cjs +70 -0
- package/dist/components/model-selection/thinking-picker.d.cts +12 -0
- package/dist/components/model-selection/thinking-picker.d.ts +12 -0
- package/dist/components/model-selection/thinking-picker.js +70 -0
- package/dist/components/ui/accordion.cjs +2 -2
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui/alert-dialog.cjs +4 -2
- package/dist/components/ui/alert-dialog.js +4 -2
- package/dist/components/ui/alert.cjs +2 -2
- package/dist/components/ui/alert.js +2 -2
- package/dist/components/ui/avatar.cjs +2 -2
- package/dist/components/ui/avatar.js +2 -2
- package/dist/components/ui/breadcrumb.cjs +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button-group.cjs +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.cjs +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.cjs +2 -2
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/card.cjs +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.cjs +3 -2
- package/dist/components/ui/carousel.js +2 -1
- package/dist/components/ui/chart.cjs +36 -27
- package/dist/components/ui/chart.d.cts +21 -17
- package/dist/components/ui/chart.d.ts +21 -17
- package/dist/components/ui/chart.js +30 -21
- package/dist/components/ui/combobox.cjs +7 -5
- package/dist/components/ui/combobox.js +7 -5
- package/dist/components/ui/command.cjs +3 -3
- package/dist/components/ui/command.js +3 -3
- package/dist/components/ui/context-menu.cjs +10 -7
- package/dist/components/ui/context-menu.js +10 -7
- package/dist/components/ui/dialog.cjs +4 -2
- package/dist/components/ui/dialog.js +4 -2
- package/dist/components/ui/drawer.cjs +4 -2
- package/dist/components/ui/drawer.js +4 -2
- package/dist/components/ui/dropdown-menu.cjs +10 -7
- package/dist/components/ui/dropdown-menu.js +10 -7
- package/dist/components/ui/empty.cjs +2 -2
- package/dist/components/ui/empty.js +2 -2
- package/dist/components/ui/field.cjs +5 -5
- package/dist/components/ui/field.js +5 -5
- package/dist/components/ui/form.cjs +2 -2
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/hover-card.cjs +3 -1
- package/dist/components/ui/hover-card.js +3 -1
- package/dist/components/ui/input-group.cjs +3 -3
- package/dist/components/ui/input-group.js +3 -3
- package/dist/components/ui/input-otp.cjs +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/item.cjs +3 -3
- package/dist/components/ui/item.js +3 -3
- package/dist/components/ui/label.cjs +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/menubar.cjs +9 -7
- package/dist/components/ui/menubar.js +9 -7
- package/dist/components/ui/native-select.cjs +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.cjs +2 -2
- package/dist/components/ui/navigation-menu.js +2 -2
- package/dist/components/ui/plugin-safety-disclaimer.cjs +1 -1
- package/dist/components/ui/plugin-safety-disclaimer.js +1 -1
- package/dist/components/ui/popover.cjs +4 -2
- package/dist/components/ui/popover.js +4 -2
- package/dist/components/ui/select.cjs +5 -3
- package/dist/components/ui/select.js +5 -3
- package/dist/components/ui/sheet.cjs +4 -2
- package/dist/components/ui/sheet.js +4 -2
- package/dist/components/ui/sidebar.cjs +5 -5
- package/dist/components/ui/sidebar.js +5 -5
- package/dist/components/ui/table.cjs +2 -2
- package/dist/components/ui/table.js +2 -2
- package/dist/components/ui/tabs.cjs +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/toggle.cjs +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/tooltip.cjs +3 -1
- package/dist/components/ui/tooltip.js +3 -1
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/plugin-style-scope-context.cjs +10 -0
- package/dist/plugin-style-scope-context.d.cts +13 -0
- package/dist/plugin-style-scope-context.d.ts +13 -0
- package/dist/plugin-style-scope-context.js +10 -0
- package/dist/plugin-style-scope.cjs +25 -0
- package/dist/plugin-style-scope.d.cts +11 -0
- package/dist/plugin-style-scope.d.ts +11 -0
- package/dist/plugin-style-scope.js +25 -0
- package/dist/reference.cjs +15 -15
- package/dist/reference.js +15 -15
- package/dist/styles/globals.css +22 -3
- package/dist/styles/plugin-theme.css +80 -0
- package/dist/styles/plugin.css +14 -2
- package/package.json +2 -2
- package/src/components/ai-elements/agent.tsx +6 -6
- package/src/components/ai-elements/artifact.tsx +2 -2
- package/src/components/ai-elements/attachments.tsx +2 -2
- package/src/components/ai-elements/chain-of-thought.tsx +2 -2
- package/src/components/ai-elements/code-block.tsx +6 -3
- package/src/components/ai-elements/commit.tsx +2 -2
- package/src/components/ai-elements/confirmation.tsx +1 -1
- package/src/components/ai-elements/conversation.tsx +2 -2
- package/src/components/ai-elements/environment-variables.tsx +3 -3
- package/src/components/ai-elements/file-tree.tsx +1 -1
- package/src/components/ai-elements/inline-citation.tsx +3 -3
- package/src/components/ai-elements/jsx-preview.tsx +1 -1
- package/src/components/ai-elements/message.tsx +1 -1
- package/src/components/ai-elements/package-info.tsx +4 -4
- package/src/components/ai-elements/prompt-input-context.tsx +3 -2
- package/src/components/ai-elements/queue.tsx +2 -2
- package/src/components/ai-elements/reasoning.tsx +2 -2
- package/src/components/ai-elements/sandbox.tsx +3 -3
- package/src/components/ai-elements/schema-display.tsx +12 -12
- package/src/components/ai-elements/speech-input.tsx +17 -0
- package/src/components/ai-elements/stack-trace.tsx +1 -1
- package/src/components/ai-elements/task.tsx +3 -3
- package/src/components/ai-elements/terminal.tsx +2 -2
- package/src/components/ai-elements/test-results.tsx +4 -4
- package/src/components/ai-elements/tool.tsx +4 -4
- package/src/components/ai-elements/transcription.tsx +1 -1
- package/src/components/ai-elements/web-preview.tsx +2 -2
- package/src/components/context-editor/CapabilitySection.tsx +2 -2
- package/src/components/context-editor/ContextEditor.tsx +2 -2
- package/src/components/context-editor/PresetBar.tsx +3 -3
- package/src/components/context-editor/SystemPromptSection.tsx +4 -4
- package/src/components/context-editor/parts.tsx +6 -6
- package/src/components/dashboard/activity-list.tsx +2 -2
- package/src/components/dashboard/empty-state.tsx +1 -1
- package/src/components/dashboard/item-list.tsx +2 -2
- package/src/components/dashboard/layout.tsx +1 -1
- package/src/components/dashboard/metric.tsx +1 -1
- package/src/components/dashboard/stale-indicator.tsx +1 -1
- package/src/components/dashboard/typography.tsx +5 -5
- package/src/components/model-selection/available-model-picker.tsx +7 -7
- package/src/components/model-selection/thinking-level-picker.tsx +1 -1
- package/src/components/model-selection/thinking-picker.tsx +90 -0
- package/src/components/ui/accordion.tsx +2 -2
- package/src/components/ui/alert-dialog.tsx +4 -2
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/avatar.tsx +2 -2
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/button-group.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/calendar.tsx +3 -3
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/carousel.tsx +2 -1
- package/src/components/ui/chart.tsx +54 -36
- package/src/components/ui/combobox.tsx +7 -5
- package/src/components/ui/command.tsx +3 -3
- package/src/components/ui/context-menu.tsx +10 -7
- package/src/components/ui/dialog.tsx +4 -2
- package/src/components/ui/drawer.tsx +4 -2
- package/src/components/ui/dropdown-menu.tsx +10 -7
- package/src/components/ui/empty.tsx +2 -2
- package/src/components/ui/field.tsx +5 -5
- package/src/components/ui/form.tsx +2 -2
- package/src/components/ui/hover-card.tsx +3 -1
- package/src/components/ui/input-group.tsx +3 -3
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +3 -3
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +9 -7
- package/src/components/ui/native-select.tsx +1 -1
- package/src/components/ui/navigation-menu.tsx +2 -2
- package/src/components/ui/plugin-safety-disclaimer.tsx +1 -1
- package/src/components/ui/popover.tsx +4 -2
- package/src/components/ui/select.tsx +5 -3
- package/src/components/ui/sheet.tsx +4 -2
- package/src/components/ui/sidebar.tsx +5 -5
- package/src/components/ui/table.tsx +2 -2
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +3 -1
- package/src/index.ts +2 -0
- package/src/plugin-style-scope-context.ts +21 -0
- package/src/plugin-style-scope.test.tsx +38 -0
- package/src/plugin-style-scope.tsx +35 -0
- package/src/styles/globals.css +22 -3
- package/src/styles/plugin-theme.css +80 -0
- package/src/styles/plugin.css +14 -2
|
@@ -3,6 +3,7 @@ var _jsxruntime = require('react/jsx-runtime');
|
|
|
3
3
|
var _lucidereact = require('lucide-react');
|
|
4
4
|
var _radixui = require('radix-ui');
|
|
5
5
|
var _utils = require('../../lib/utils');
|
|
6
|
+
var _pluginstylescopecontext = require('../../plugin-style-scope-context');
|
|
6
7
|
function Sheet({ ...props }) {
|
|
7
8
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _radixui.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
8
9
|
}
|
|
@@ -19,7 +20,8 @@ function SheetClose({
|
|
|
19
20
|
function SheetPortal({
|
|
20
21
|
...props
|
|
21
22
|
}) {
|
|
22
|
-
|
|
23
|
+
const container = _pluginstylescopecontext.usePluginPortalContainer.call(void 0, );
|
|
24
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _radixui.Dialog.Portal, { "data-slot": "sheet-portal", container, ...props });
|
|
23
25
|
}
|
|
24
26
|
function SheetOverlay({
|
|
25
27
|
className,
|
|
@@ -112,7 +114,7 @@ function SheetDescription({
|
|
|
112
114
|
_radixui.Dialog.Description,
|
|
113
115
|
{
|
|
114
116
|
"data-slot": "sheet-description",
|
|
115
|
-
className: _utils.cn.call(void 0, "text-muted-foreground text-
|
|
117
|
+
className: _utils.cn.call(void 0, "text-muted-foreground text-base", className),
|
|
116
118
|
...props
|
|
117
119
|
}
|
|
118
120
|
);
|
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { XIcon } from "lucide-react";
|
|
4
4
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
5
5
|
import { cn } from "../../lib/utils";
|
|
6
|
+
import { usePluginPortalContainer } from "../../plugin-style-scope-context";
|
|
6
7
|
function Sheet({ ...props }) {
|
|
7
8
|
return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
8
9
|
}
|
|
@@ -19,7 +20,8 @@ function SheetClose({
|
|
|
19
20
|
function SheetPortal({
|
|
20
21
|
...props
|
|
21
22
|
}) {
|
|
22
|
-
|
|
23
|
+
const container = usePluginPortalContainer();
|
|
24
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", container, ...props });
|
|
23
25
|
}
|
|
24
26
|
function SheetOverlay({
|
|
25
27
|
className,
|
|
@@ -112,7 +114,7 @@ function SheetDescription({
|
|
|
112
114
|
SheetPrimitive.Description,
|
|
113
115
|
{
|
|
114
116
|
"data-slot": "sheet-description",
|
|
115
|
-
className: cn("text-muted-foreground text-
|
|
117
|
+
className: cn("text-muted-foreground text-base", className),
|
|
116
118
|
...props
|
|
117
119
|
}
|
|
118
120
|
);
|
|
@@ -389,7 +389,7 @@ function SidebarGroupContent({
|
|
|
389
389
|
{
|
|
390
390
|
"data-slot": "sidebar-group-content",
|
|
391
391
|
"data-sidebar": "group-content",
|
|
392
|
-
className: _utils.cn.call(void 0, "w-full text-
|
|
392
|
+
className: _utils.cn.call(void 0, "w-full text-base", className),
|
|
393
393
|
...props
|
|
394
394
|
}
|
|
395
395
|
);
|
|
@@ -417,7 +417,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
417
417
|
);
|
|
418
418
|
}
|
|
419
419
|
const sidebarMenuButtonVariants = _classvarianceauthority.cva.call(void 0,
|
|
420
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-
|
|
420
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-base outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
421
421
|
{
|
|
422
422
|
variants: {
|
|
423
423
|
variant: {
|
|
@@ -425,9 +425,9 @@ const sidebarMenuButtonVariants = _classvarianceauthority.cva.call(void 0,
|
|
|
425
425
|
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
426
426
|
},
|
|
427
427
|
size: {
|
|
428
|
-
default: "h-8 text-
|
|
428
|
+
default: "h-8 text-base",
|
|
429
429
|
sm: "h-7 text-xs",
|
|
430
|
-
lg: "h-12 text-
|
|
430
|
+
lg: "h-12 text-base group-data-[collapsible=icon]:p-0!"
|
|
431
431
|
}
|
|
432
432
|
},
|
|
433
433
|
defaultVariants: {
|
|
@@ -613,7 +613,7 @@ function SidebarMenuSubButton({
|
|
|
613
613
|
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
614
614
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
615
615
|
size === "sm" && "text-xs",
|
|
616
|
-
size === "md" && "text-
|
|
616
|
+
size === "md" && "text-base",
|
|
617
617
|
"group-data-[collapsible=icon]:hidden",
|
|
618
618
|
className
|
|
619
619
|
),
|
|
@@ -389,7 +389,7 @@ function SidebarGroupContent({
|
|
|
389
389
|
{
|
|
390
390
|
"data-slot": "sidebar-group-content",
|
|
391
391
|
"data-sidebar": "group-content",
|
|
392
|
-
className: cn("w-full text-
|
|
392
|
+
className: cn("w-full text-base", className),
|
|
393
393
|
...props
|
|
394
394
|
}
|
|
395
395
|
);
|
|
@@ -417,7 +417,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
417
417
|
);
|
|
418
418
|
}
|
|
419
419
|
const sidebarMenuButtonVariants = cva(
|
|
420
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-
|
|
420
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-base outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
421
421
|
{
|
|
422
422
|
variants: {
|
|
423
423
|
variant: {
|
|
@@ -425,9 +425,9 @@ const sidebarMenuButtonVariants = cva(
|
|
|
425
425
|
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
426
426
|
},
|
|
427
427
|
size: {
|
|
428
|
-
default: "h-8 text-
|
|
428
|
+
default: "h-8 text-base",
|
|
429
429
|
sm: "h-7 text-xs",
|
|
430
|
-
lg: "h-12 text-
|
|
430
|
+
lg: "h-12 text-base group-data-[collapsible=icon]:p-0!"
|
|
431
431
|
}
|
|
432
432
|
},
|
|
433
433
|
defaultVariants: {
|
|
@@ -613,7 +613,7 @@ function SidebarMenuSubButton({
|
|
|
613
613
|
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
614
614
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
615
615
|
size === "sm" && "text-xs",
|
|
616
|
-
size === "md" && "text-
|
|
616
|
+
size === "md" && "text-base",
|
|
617
617
|
"group-data-[collapsible=icon]:hidden",
|
|
618
618
|
className
|
|
619
619
|
),
|
|
@@ -11,7 +11,7 @@ function Table({ className, ...props }) {
|
|
|
11
11
|
"table",
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "table",
|
|
14
|
-
className: _utils.cn.call(void 0, "w-full caption-bottom text-
|
|
14
|
+
className: _utils.cn.call(void 0, "w-full caption-bottom text-base", className),
|
|
15
15
|
...props
|
|
16
16
|
}
|
|
17
17
|
)
|
|
@@ -98,7 +98,7 @@ function TableCaption({
|
|
|
98
98
|
"caption",
|
|
99
99
|
{
|
|
100
100
|
"data-slot": "table-caption",
|
|
101
|
-
className: _utils.cn.call(void 0, "text-muted-foreground mt-4 text-
|
|
101
|
+
className: _utils.cn.call(void 0, "text-muted-foreground mt-4 text-base", className),
|
|
102
102
|
...props
|
|
103
103
|
}
|
|
104
104
|
);
|
|
@@ -11,7 +11,7 @@ function Table({ className, ...props }) {
|
|
|
11
11
|
"table",
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "table",
|
|
14
|
-
className: cn("w-full caption-bottom text-
|
|
14
|
+
className: cn("w-full caption-bottom text-base", className),
|
|
15
15
|
...props
|
|
16
16
|
}
|
|
17
17
|
)
|
|
@@ -98,7 +98,7 @@ function TableCaption({
|
|
|
98
98
|
"caption",
|
|
99
99
|
{
|
|
100
100
|
"data-slot": "table-caption",
|
|
101
|
-
className: cn("text-muted-foreground mt-4 text-
|
|
101
|
+
className: cn("text-muted-foreground mt-4 text-base", className),
|
|
102
102
|
...props
|
|
103
103
|
}
|
|
104
104
|
);
|
|
@@ -60,7 +60,7 @@ function TabsTrigger({
|
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "tabs-trigger",
|
|
62
62
|
className: _utils.cn.call(void 0,
|
|
63
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-
|
|
63
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-base font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
64
64
|
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
|
|
65
65
|
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground",
|
|
66
66
|
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
@@ -60,7 +60,7 @@ function TabsTrigger({
|
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "tabs-trigger",
|
|
62
62
|
className: cn(
|
|
63
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-
|
|
63
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-base font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
64
64
|
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
|
|
65
65
|
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground",
|
|
66
66
|
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
@@ -8,7 +8,7 @@ function Textarea({ className, placeholder, "aria-label": ariaLabel, ...props })
|
|
|
8
8
|
placeholder,
|
|
9
9
|
"data-slot": "textarea",
|
|
10
10
|
className: _utils.cn.call(void 0,
|
|
11
|
-
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-
|
|
11
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-base",
|
|
12
12
|
className
|
|
13
13
|
),
|
|
14
14
|
...props
|
|
@@ -8,7 +8,7 @@ function Textarea({ className, placeholder, "aria-label": ariaLabel, ...props })
|
|
|
8
8
|
placeholder,
|
|
9
9
|
"data-slot": "textarea",
|
|
10
10
|
className: cn(
|
|
11
|
-
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-
|
|
11
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-base",
|
|
12
12
|
className
|
|
13
13
|
),
|
|
14
14
|
...props
|
|
@@ -4,7 +4,7 @@ var _classvarianceauthority = require('class-variance-authority');
|
|
|
4
4
|
var _radixui = require('radix-ui');
|
|
5
5
|
var _utils = require('../../lib/utils');
|
|
6
6
|
const toggleVariants = _classvarianceauthority.cva.call(void 0,
|
|
7
|
-
"inline-flex items-center justify-center gap-2 rounded-md text-
|
|
7
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-base font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -4,7 +4,7 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { Toggle as TogglePrimitive } from "radix-ui";
|
|
5
5
|
import { cn } from "../../lib/utils";
|
|
6
6
|
const toggleVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 rounded-md text-
|
|
7
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-base font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var _jsxruntime = require('react/jsx-runtime');
|
|
3
3
|
var _radixui = require('radix-ui');
|
|
4
4
|
var _utils = require('../../lib/utils');
|
|
5
|
+
var _pluginstylescopecontext = require('../../plugin-style-scope-context');
|
|
5
6
|
function TooltipProvider({
|
|
6
7
|
delayDuration = 0,
|
|
7
8
|
...props
|
|
@@ -31,7 +32,8 @@ function TooltipContent({
|
|
|
31
32
|
children,
|
|
32
33
|
...props
|
|
33
34
|
}) {
|
|
34
|
-
|
|
35
|
+
const container = _pluginstylescopecontext.usePluginPortalContainer.call(void 0, );
|
|
36
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _radixui.Tooltip.Portal, { container, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
35
37
|
_radixui.Tooltip.Content,
|
|
36
38
|
{
|
|
37
39
|
"data-slot": "tooltip-content",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
|
+
import { usePluginPortalContainer } from "../../plugin-style-scope-context";
|
|
5
6
|
function TooltipProvider({
|
|
6
7
|
delayDuration = 0,
|
|
7
8
|
...props
|
|
@@ -31,7 +32,8 @@ function TooltipContent({
|
|
|
31
32
|
children,
|
|
32
33
|
...props
|
|
33
34
|
}) {
|
|
34
|
-
|
|
35
|
+
const container = usePluginPortalContainer();
|
|
36
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container, children: /* @__PURE__ */ jsxs(
|
|
35
37
|
TooltipPrimitive.Content,
|
|
36
38
|
{
|
|
37
39
|
"data-slot": "tooltip-content",
|
package/dist/index.cjs
CHANGED
|
@@ -116,7 +116,11 @@ var _dashboard = require('./components/dashboard'); _createStarExport(_dashboard
|
|
|
116
116
|
var _availablemodelpicker = require('./components/model-selection/available-model-picker'); _createStarExport(_availablemodelpicker);
|
|
117
117
|
var _modelwarninglist = require('./components/model-selection/model-warning-list'); _createStarExport(_modelwarninglist);
|
|
118
118
|
var _thinkinglevelpicker = require('./components/model-selection/thinking-level-picker'); _createStarExport(_thinkinglevelpicker);
|
|
119
|
+
var _pluginstylescope = require('./plugin-style-scope');
|
|
120
|
+
var _pluginstylescopecontext = require('./plugin-style-scope-context');
|
|
119
121
|
|
|
120
122
|
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
exports.PluginStyleScope = _pluginstylescope.PluginStyleScope; exports.cn = _utils.cn; exports.useIsMobile = _usemobile.useIsMobile; exports.usePluginPortalContainer = _pluginstylescopecontext.usePluginPortalContainer;
|
package/dist/index.d.cts
CHANGED
|
@@ -132,6 +132,8 @@ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.c
|
|
|
132
132
|
export { AvailableModelPicker } from './components/model-selection/available-model-picker.cjs';
|
|
133
133
|
export { ModelWarningList } from './components/model-selection/model-warning-list.cjs';
|
|
134
134
|
export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.cjs';
|
|
135
|
+
export { PluginStyleScope, PluginStyleScopeProps } from './plugin-style-scope.cjs';
|
|
136
|
+
export { usePluginPortalContainer } from './plugin-style-scope-context.cjs';
|
|
135
137
|
import 'clsx';
|
|
136
138
|
import 'react/jsx-runtime';
|
|
137
139
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ export { DashboardComponentCatalogEntry } from './components/dashboard/catalog.j
|
|
|
132
132
|
export { AvailableModelPicker } from './components/model-selection/available-model-picker.js';
|
|
133
133
|
export { ModelWarningList } from './components/model-selection/model-warning-list.js';
|
|
134
134
|
export { ThinkingLevelPicker } from './components/model-selection/thinking-level-picker.js';
|
|
135
|
+
export { PluginStyleScope, PluginStyleScopeProps } from './plugin-style-scope.js';
|
|
136
|
+
export { usePluginPortalContainer } from './plugin-style-scope-context.js';
|
|
135
137
|
import 'clsx';
|
|
136
138
|
import 'react/jsx-runtime';
|
|
137
139
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -116,7 +116,11 @@ export * from "./components/dashboard";
|
|
|
116
116
|
export * from "./components/model-selection/available-model-picker";
|
|
117
117
|
export * from "./components/model-selection/model-warning-list";
|
|
118
118
|
export * from "./components/model-selection/thinking-level-picker";
|
|
119
|
+
import { PluginStyleScope } from "./plugin-style-scope";
|
|
120
|
+
import { usePluginPortalContainer } from "./plugin-style-scope-context";
|
|
119
121
|
export {
|
|
122
|
+
PluginStyleScope,
|
|
120
123
|
cn,
|
|
121
|
-
useIsMobile
|
|
124
|
+
useIsMobile,
|
|
125
|
+
usePluginPortalContainer
|
|
122
126
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _react = require('react');
|
|
2
|
+
const PluginStyleScopeContext = _nullishCoalesce(globalThis.__sero_plugin_style_scope_context__, () => ( _react.createContext.call(void 0, null)));
|
|
3
|
+
globalThis.__sero_plugin_style_scope_context__ = PluginStyleScopeContext;
|
|
4
|
+
function usePluginPortalContainer() {
|
|
5
|
+
return _nullishCoalesce(_optionalChain([_react.useContext.call(void 0, PluginStyleScopeContext), 'optionalAccess', _ => _.portalContainer]), () => ( void 0));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.PluginStyleScopeContext = PluginStyleScopeContext; exports.usePluginPortalContainer = usePluginPortalContainer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PluginStyleScopeValue {
|
|
4
|
+
pluginId: string;
|
|
5
|
+
portalContainer: HTMLDivElement | null;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
var __sero_plugin_style_scope_context__: Context<PluginStyleScopeValue | null> | undefined;
|
|
9
|
+
}
|
|
10
|
+
declare const PluginStyleScopeContext: Context<PluginStyleScopeValue | null>;
|
|
11
|
+
declare function usePluginPortalContainer(): HTMLElement | undefined;
|
|
12
|
+
|
|
13
|
+
export { PluginStyleScopeContext, type PluginStyleScopeValue, usePluginPortalContainer };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PluginStyleScopeValue {
|
|
4
|
+
pluginId: string;
|
|
5
|
+
portalContainer: HTMLDivElement | null;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
var __sero_plugin_style_scope_context__: Context<PluginStyleScopeValue | null> | undefined;
|
|
9
|
+
}
|
|
10
|
+
declare const PluginStyleScopeContext: Context<PluginStyleScopeValue | null>;
|
|
11
|
+
declare function usePluginPortalContainer(): HTMLElement | undefined;
|
|
12
|
+
|
|
13
|
+
export { PluginStyleScopeContext, type PluginStyleScopeValue, usePluginPortalContainer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const PluginStyleScopeContext = globalThis.__sero_plugin_style_scope_context__ ?? createContext(null);
|
|
3
|
+
globalThis.__sero_plugin_style_scope_context__ = PluginStyleScopeContext;
|
|
4
|
+
function usePluginPortalContainer() {
|
|
5
|
+
return useContext(PluginStyleScopeContext)?.portalContainer ?? void 0;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
PluginStyleScopeContext,
|
|
9
|
+
usePluginPortalContainer
|
|
10
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
|
|
2
|
+
var _react = require('react');
|
|
3
|
+
var _pluginstylescopecontext = require('./plugin-style-scope-context');
|
|
4
|
+
function PluginStyleScope({ children, pluginId, surfaceId }) {
|
|
5
|
+
const portalContainer = _react.useMemo.call(void 0, () => {
|
|
6
|
+
if (typeof document === "undefined") return null;
|
|
7
|
+
const container = document.createElement("div");
|
|
8
|
+
container.dataset.seroPlugin = pluginId;
|
|
9
|
+
container.dataset.seroPluginPortals = surfaceId;
|
|
10
|
+
return container;
|
|
11
|
+
}, [pluginId, surfaceId]);
|
|
12
|
+
_react.useInsertionEffect.call(void 0, () => {
|
|
13
|
+
if (!portalContainer) return void 0;
|
|
14
|
+
document.body.append(portalContainer);
|
|
15
|
+
return () => portalContainer.remove();
|
|
16
|
+
}, [portalContainer]);
|
|
17
|
+
const value = _react.useMemo.call(void 0,
|
|
18
|
+
() => ({ pluginId, portalContainer }),
|
|
19
|
+
[pluginId, portalContainer]
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _pluginstylescopecontext.PluginStyleScopeContext.Provider, { value, children });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.PluginStyleScope = PluginStyleScope;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface PluginStyleScopeProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
pluginId: string;
|
|
7
|
+
surfaceId: string;
|
|
8
|
+
}
|
|
9
|
+
declare function PluginStyleScope({ children, pluginId, surfaceId }: PluginStyleScopeProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { PluginStyleScope, type PluginStyleScopeProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface PluginStyleScopeProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
pluginId: string;
|
|
7
|
+
surfaceId: string;
|
|
8
|
+
}
|
|
9
|
+
declare function PluginStyleScope({ children, pluginId, surfaceId }: PluginStyleScopeProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { PluginStyleScope, type PluginStyleScopeProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useInsertionEffect, useMemo } from "react";
|
|
3
|
+
import { PluginStyleScopeContext } from "./plugin-style-scope-context";
|
|
4
|
+
function PluginStyleScope({ children, pluginId, surfaceId }) {
|
|
5
|
+
const portalContainer = useMemo(() => {
|
|
6
|
+
if (typeof document === "undefined") return null;
|
|
7
|
+
const container = document.createElement("div");
|
|
8
|
+
container.dataset.seroPlugin = pluginId;
|
|
9
|
+
container.dataset.seroPluginPortals = surfaceId;
|
|
10
|
+
return container;
|
|
11
|
+
}, [pluginId, surfaceId]);
|
|
12
|
+
useInsertionEffect(() => {
|
|
13
|
+
if (!portalContainer) return void 0;
|
|
14
|
+
document.body.append(portalContainer);
|
|
15
|
+
return () => portalContainer.remove();
|
|
16
|
+
}, [portalContainer]);
|
|
17
|
+
const value = useMemo(
|
|
18
|
+
() => ({ pluginId, portalContainer }),
|
|
19
|
+
[pluginId, portalContainer]
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ jsx(PluginStyleScopeContext.Provider, { value, children });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
PluginStyleScope
|
|
25
|
+
};
|
package/dist/reference.cjs
CHANGED
|
@@ -255,7 +255,7 @@ function Section({
|
|
|
255
255
|
children: [
|
|
256
256
|
(heading || action) && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
257
257
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
258
|
-
heading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "truncate text-
|
|
258
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "truncate text-sm font-semibold uppercase tracking-wider text-[var(--text-muted)]", children: heading }),
|
|
259
259
|
description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "truncate text-xs text-[var(--text-muted)]", children: description })
|
|
260
260
|
] }),
|
|
261
261
|
action && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "shrink-0", children: action })
|
|
@@ -292,11 +292,11 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
|
292
292
|
var textVariants = (0, import_class_variance_authority2.cva)("min-w-0", {
|
|
293
293
|
variants: {
|
|
294
294
|
variant: {
|
|
295
|
-
body: "text-
|
|
296
|
-
label: "text-
|
|
295
|
+
body: "text-base text-[var(--text-primary)]",
|
|
296
|
+
label: "text-sm font-semibold uppercase tracking-wider text-[var(--text-muted)]",
|
|
297
297
|
supporting: "text-xs text-[var(--text-secondary)]",
|
|
298
298
|
muted: "text-xs text-[var(--text-muted)]",
|
|
299
|
-
numeric: "text-
|
|
299
|
+
numeric: "text-base font-semibold tabular-nums text-[var(--text-primary)]"
|
|
300
300
|
}
|
|
301
301
|
},
|
|
302
302
|
defaultVariants: { variant: "body" }
|
|
@@ -330,7 +330,7 @@ function Text({
|
|
|
330
330
|
}
|
|
331
331
|
var headingSize = {
|
|
332
332
|
sm: "text-xs font-semibold",
|
|
333
|
-
md: "text-
|
|
333
|
+
md: "text-base font-semibold",
|
|
334
334
|
lg: "text-base font-semibold"
|
|
335
335
|
};
|
|
336
336
|
function Heading({
|
|
@@ -413,7 +413,7 @@ function Metric({
|
|
|
413
413
|
children: [
|
|
414
414
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
415
415
|
icon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { icon, size: "sm" }),
|
|
416
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate text-
|
|
416
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate text-sm font-medium uppercase tracking-wide text-[var(--text-muted)]", children: label })
|
|
417
417
|
] }),
|
|
418
418
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-baseline gap-1.5", children: [
|
|
419
419
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -575,7 +575,7 @@ var import_class_variance_authority3 = require("class-variance-authority");
|
|
|
575
575
|
var import_radix_ui2 = require("radix-ui");
|
|
576
576
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
577
577
|
var itemVariants = (0, import_class_variance_authority3.cva)(
|
|
578
|
-
"group/item flex items-center border border-transparent text-
|
|
578
|
+
"group/item flex items-center border border-transparent text-base rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
579
579
|
{
|
|
580
580
|
variants: {
|
|
581
581
|
variant: {
|
|
@@ -662,7 +662,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
662
662
|
{
|
|
663
663
|
"data-slot": "item-title",
|
|
664
664
|
className: cn(
|
|
665
|
-
"flex w-fit items-center gap-2 text-
|
|
665
|
+
"flex w-fit items-center gap-2 text-base leading-snug font-medium",
|
|
666
666
|
className
|
|
667
667
|
),
|
|
668
668
|
...props
|
|
@@ -675,7 +675,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
675
675
|
{
|
|
676
676
|
"data-slot": "item-description",
|
|
677
677
|
className: cn(
|
|
678
|
-
"text-muted-foreground line-clamp-2 text-
|
|
678
|
+
"text-muted-foreground line-clamp-2 text-base leading-normal font-normal text-balance",
|
|
679
679
|
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
680
680
|
className
|
|
681
681
|
),
|
|
@@ -723,7 +723,7 @@ function ItemListItem({
|
|
|
723
723
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ItemTitle, { className: "truncate text-xs font-medium text-[var(--text-primary)]", children: primary }),
|
|
724
724
|
secondary && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ItemDescription, { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: secondary })
|
|
725
725
|
] }),
|
|
726
|
-
trailing && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "shrink-0 text-
|
|
726
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "shrink-0 text-sm tabular-nums text-[var(--text-muted)]", children: trailing }),
|
|
727
727
|
actions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ItemActions, { children: actions })
|
|
728
728
|
]
|
|
729
729
|
}
|
|
@@ -744,7 +744,7 @@ function ItemList({
|
|
|
744
744
|
...props,
|
|
745
745
|
children: [
|
|
746
746
|
children,
|
|
747
|
-
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "px-2 text-
|
|
747
|
+
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "px-2 text-sm text-[var(--text-muted)]", children: [
|
|
748
748
|
"+",
|
|
749
749
|
overflowCount,
|
|
750
750
|
" more"
|
|
@@ -776,7 +776,7 @@ function ActivityListItem({
|
|
|
776
776
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
777
777
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
778
778
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "truncate text-xs text-[var(--text-primary)]", children: label }),
|
|
779
|
-
timestamp && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "shrink-0 text-
|
|
779
|
+
timestamp && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "shrink-0 text-sm tabular-nums text-[var(--text-muted)]", children: timestamp })
|
|
780
780
|
] }),
|
|
781
781
|
detail && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "line-clamp-1 text-xs text-[var(--text-muted)]", children: detail })
|
|
782
782
|
] })
|
|
@@ -798,7 +798,7 @@ function ActivityList({
|
|
|
798
798
|
...props,
|
|
799
799
|
children: [
|
|
800
800
|
children,
|
|
801
|
-
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: "pl-5 pt-0.5 text-
|
|
801
|
+
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: "pl-5 pt-0.5 text-sm text-[var(--text-muted)]", children: [
|
|
802
802
|
"+",
|
|
803
803
|
overflowCount,
|
|
804
804
|
" more"
|
|
@@ -890,7 +890,7 @@ var import_class_variance_authority4 = require("class-variance-authority");
|
|
|
890
890
|
var import_radix_ui3 = require("radix-ui");
|
|
891
891
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
892
892
|
var buttonVariants = (0, import_class_variance_authority4.cva)(
|
|
893
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-
|
|
893
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
894
894
|
{
|
|
895
895
|
variants: {
|
|
896
896
|
variant: {
|
|
@@ -988,7 +988,7 @@ function StaleIndicator({
|
|
|
988
988
|
{
|
|
989
989
|
"data-slot": "stale-indicator",
|
|
990
990
|
className: cn(
|
|
991
|
-
"flex items-center gap-1.5 text-
|
|
991
|
+
"flex items-center gap-1.5 text-sm text-[var(--text-muted)]",
|
|
992
992
|
className
|
|
993
993
|
),
|
|
994
994
|
...props,
|