@adea-ai/ui 0.162.14 → 0.162.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/accent-picker/accent-picker.js +1 -1
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js +1 -1
- package/dist/components/composites/accent-picker/custom-color-popover.js.map +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js +1 -1
- package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-choices.js +2 -2
- package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
- package/dist/components/composites/confirmation/confirmation.js +1 -1
- package/dist/components/composites/confirmation/confirmation.js.map +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js +1 -1
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -1
- package/dist/components/composites/list-row/list-row-control.js +1 -1
- package/dist/components/composites/list-row/list-row-control.js.map +1 -1
- package/dist/components/composites/settings/settings.js +1 -1
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js +1 -1
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -1
- package/dist/components/composites/tree/tree.js +1 -1
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js +1 -1
- package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
- package/dist/components/conversation/thread-panel.js +1 -1
- package/dist/components/conversation/thread-panel.js.map +1 -1
- package/dist/components/layout/app-shell/skip-link.js +1 -1
- package/dist/components/layout/app-shell/skip-link.js.map +1 -1
- package/dist/components/layout/side-rail/side-rail.js +1 -1
- package/dist/components/layout/side-rail/side-rail.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav-classes.js.map +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js +1 -1
- package/dist/components/layout/sidebar-nav/sidebar-nav.js.map +1 -1
- package/dist/components/layout/top-bar/top-bar.js +2 -2
- package/dist/components/layout/top-bar/top-bar.js.map +1 -1
- package/dist/components/ui/accordion/accordion.js +1 -1
- package/dist/components/ui/accordion/accordion.js.map +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js +1 -1
- package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -1
- package/dist/components/ui/attachment/attachment.js +2 -2
- package/dist/components/ui/attachment/attachment.js.map +1 -1
- package/dist/components/ui/board/board.js +2 -2
- package/dist/components/ui/board/board.js.map +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/ui/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/ui/button/button.js +1 -1
- package/dist/components/ui/button/button.js.map +1 -1
- package/dist/components/ui/checkbox/checkbox.js +1 -1
- package/dist/components/ui/checkbox/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible/collapsible.js +1 -1
- package/dist/components/ui/collapsible/collapsible.js.map +1 -1
- package/dist/components/ui/combobox/combobox.js +3 -3
- package/dist/components/ui/combobox/combobox.js.map +1 -1
- package/dist/components/ui/field/field.js +2 -2
- package/dist/components/ui/field/field.js.map +1 -1
- package/dist/components/ui/input/input-control.js +1 -1
- package/dist/components/ui/input/input-control.js.map +1 -1
- package/dist/components/ui/input-group/input-group.js +1 -1
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/input-otp/input-otp.js +1 -1
- package/dist/components/ui/input-otp/input-otp.js.map +1 -1
- package/dist/components/ui/menubar/menubar.js +1 -1
- package/dist/components/ui/menubar/menubar.js.map +1 -1
- package/dist/components/ui/native-select/native-select.js +1 -1
- package/dist/components/ui/native-select/native-select.js.map +1 -1
- package/dist/components/ui/pagination/pagination.js +1 -1
- package/dist/components/ui/pagination/pagination.js.map +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js +1 -1
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group/radio-group.js +2 -2
- package/dist/components/ui/radio-group/radio-group.js.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js +1 -1
- package/dist/components/ui/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/ui/select/select.js +1 -1
- package/dist/components/ui/select/select.js.map +1 -1
- package/dist/components/ui/slider/slider.js +1 -1
- package/dist/components/ui/slider/slider.js.map +1 -1
- package/dist/components/ui/switch/switch.js +1 -1
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/tabs/tabs.js +1 -1
- package/dist/components/ui/tabs/tabs.js.map +1 -1
- package/dist/components/ui/text-link/text-link.js +1 -1
- package/dist/components/ui/text-link/text-link.js.map +1 -1
- package/dist/components/ui/textarea/textarea.js +1 -1
- package/dist/components/ui/textarea/textarea.js.map +1 -1
- package/dist/components/ui/toast/toast.js +1 -1
- package/dist/components/ui/toast/toast.js.map +1 -1
- package/dist/components/ui/trace/trace.js +1 -1
- package/dist/components/ui/trace/trace.js.map +1 -1
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +1 -1
- package/dist/lib/overlay.js.map +1 -1
- package/dist/lib/tokens.d.ts.map +1 -1
- package/dist/lib/tokens.js +2 -2
- package/dist/lib/tokens.js.map +1 -1
- package/dist/lib/variants.d.ts +1 -1
- package/dist/lib/variants.d.ts.map +1 -1
- package/dist/lib/variants.js +1 -1
- package/dist/lib/variants.js.map +1 -1
- package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +1 -1
- package/dist/r/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
- package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +1 -1
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/dist/r/src/components/composites/list-row/list-row-control.tsx +1 -1
- package/dist/r/src/components/composites/settings/settings.tsx +1 -1
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/dist/r/src/components/composites/tree/tree.tsx +1 -1
- package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/dist/r/src/components/conversation/thread-panel.tsx +1 -1
- package/dist/r/src/components/layout/app-shell/skip-link.tsx +1 -1
- package/dist/r/src/components/layout/side-rail/side-rail.tsx +1 -1
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
- package/dist/r/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
- package/dist/r/src/components/layout/top-bar/top-bar.tsx +2 -2
- package/dist/r/src/components/ui/accordion/accordion.tsx +1 -1
- package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
- package/dist/r/src/components/ui/attachment/attachment.tsx +2 -2
- package/dist/r/src/components/ui/board/board.tsx +2 -2
- package/dist/r/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
- package/dist/r/src/components/ui/button/button.tsx +1 -1
- package/dist/r/src/components/ui/checkbox/checkbox.tsx +1 -1
- package/dist/r/src/components/ui/collapsible/collapsible.tsx +1 -1
- package/dist/r/src/components/ui/combobox/combobox.tsx +3 -3
- package/dist/r/src/components/ui/field/field.tsx +2 -2
- package/dist/r/src/components/ui/input/input-control.tsx +1 -1
- package/dist/r/src/components/ui/input-group/input-group.tsx +1 -1
- package/dist/r/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/dist/r/src/components/ui/menubar/menubar.tsx +1 -1
- package/dist/r/src/components/ui/native-select/native-select.tsx +1 -1
- package/dist/r/src/components/ui/pagination/pagination.tsx +1 -1
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +1 -1
- package/dist/r/src/components/ui/radio-group/radio-group.tsx +2 -2
- package/dist/r/src/components/ui/scroll-area/scroll-area.tsx +1 -1
- package/dist/r/src/components/ui/select/select.tsx +1 -1
- package/dist/r/src/components/ui/slider/slider.tsx +1 -1
- package/dist/r/src/components/ui/switch/switch.tsx +1 -1
- package/dist/r/src/components/ui/tabs/tabs.tsx +1 -1
- package/dist/r/src/components/ui/text-link/text-link.tsx +1 -1
- package/dist/r/src/components/ui/textarea/textarea.tsx +1 -1
- package/dist/r/src/components/ui/toast/toast.tsx +1 -1
- package/dist/r/src/components/ui/trace/trace.tsx +1 -1
- package/dist/r/src/lib/overlay.ts +1 -1
- package/dist/r/src/lib/tokens.ts +4 -2
- package/dist/r/src/lib/variants.ts +1 -1
- package/dist/r/src/styles/base.css +35 -7
- package/dist/vite/tailwind-sources.d.ts.map +1 -1
- package/dist/vite/tailwind-sources.js +16 -5
- package/dist/vite/tailwind-sources.js.map +1 -1
- package/package.json +1 -1
- package/src/components/composites/accent-picker/accent-picker.tsx +1 -1
- package/src/components/composites/accent-picker/custom-color-popover.tsx +1 -1
- package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +1 -1
- package/src/components/composites/appearance-editor/appearance-choices.tsx +2 -5
- package/src/components/composites/confirmation/confirmation.tsx +1 -1
- package/src/components/composites/icon-picker/icon-picker.tsx +1 -1
- package/src/components/composites/list-row/list-row-control.tsx +1 -1
- package/src/components/composites/settings/settings.tsx +1 -1
- package/src/components/composites/stack-trace/stack-trace.tsx +1 -1
- package/src/components/composites/tree/tree.tsx +1 -1
- package/src/components/composites/workspace-mark/workspace-mark.tsx +1 -1
- package/src/components/conversation/thread-panel.tsx +1 -1
- package/src/components/layout/app-shell/skip-link.tsx +1 -1
- package/src/components/layout/side-rail/side-rail.tsx +1 -1
- package/src/components/layout/sidebar-nav/sidebar-nav-classes.ts +1 -1
- package/src/components/layout/sidebar-nav/sidebar-nav.tsx +1 -1
- package/src/components/layout/top-bar/top-bar.tsx +2 -2
- package/src/components/ui/accordion/accordion.tsx +1 -1
- package/src/components/ui/annotation-surface/annotation-surface.tsx +1 -1
- package/src/components/ui/attachment/attachment.tsx +2 -2
- package/src/components/ui/board/board.tsx +2 -2
- package/src/components/ui/breadcrumb/breadcrumb.tsx +1 -1
- package/src/components/ui/button/button.tsx +1 -1
- package/src/components/ui/checkbox/checkbox.tsx +1 -1
- package/src/components/ui/collapsible/collapsible.tsx +1 -1
- package/src/components/ui/combobox/combobox.tsx +3 -3
- package/src/components/ui/field/field.tsx +2 -2
- package/src/components/ui/input/input-control.tsx +1 -1
- package/src/components/ui/input-group/input-group.tsx +1 -1
- package/src/components/ui/input-otp/input-otp.tsx +1 -1
- package/src/components/ui/menubar/menubar.tsx +1 -1
- package/src/components/ui/native-select/native-select.tsx +1 -1
- package/src/components/ui/pagination/pagination.tsx +1 -1
- package/src/components/ui/questionnaire/questionnaire.tsx +1 -1
- package/src/components/ui/radio-group/radio-group.tsx +2 -2
- package/src/components/ui/scroll-area/scroll-area.tsx +1 -1
- package/src/components/ui/select/select.tsx +1 -1
- package/src/components/ui/slider/slider.tsx +1 -1
- package/src/components/ui/switch/switch.tsx +1 -1
- package/src/components/ui/tabs/tabs.tsx +1 -1
- package/src/components/ui/text-link/text-link.tsx +1 -1
- package/src/components/ui/textarea/textarea.tsx +1 -1
- package/src/components/ui/toast/toast.tsx +1 -1
- package/src/components/ui/trace/trace.tsx +1 -1
- package/src/lib/overlay.ts +1 -1
- package/src/lib/tokens.ts +4 -2
- package/src/lib/variants.ts +1 -1
- package/src/styles/base.css +35 -7
- package/src/vite/tailwind-sources.ts +20 -3
|
@@ -117,7 +117,7 @@ export function MenubarTrigger(props: MenubarTriggerProps) {
|
|
|
117
117
|
'transition-colors ease-out outline-none',
|
|
118
118
|
'data-[expanded]:bg-surface-active',
|
|
119
119
|
'data-[highlighted]:bg-surface-hover',
|
|
120
|
-
'focus-visible:border-ring focus-visible:
|
|
120
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
121
121
|
props.class
|
|
122
122
|
)}
|
|
123
123
|
/>
|
|
@@ -158,7 +158,7 @@ export function NativeSelect(props: NativeSelectProps) {
|
|
|
158
158
|
'h-control-lg px-control-lg pr-9 text-sm': local.size === 'lg',
|
|
159
159
|
},
|
|
160
160
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
161
|
-
'focus-visible:border-ring focus-visible:
|
|
161
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
162
162
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
163
163
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30',
|
|
164
164
|
local.class
|
|
@@ -74,7 +74,7 @@ const paginationControl = cn(
|
|
|
74
74
|
'inline-flex h-control-md min-w-(--control-height-md) items-center justify-center gap-1 rounded-md border border-transparent px-2 text-sm tabular-nums',
|
|
75
75
|
'transition-colors ease-out outline-none select-none',
|
|
76
76
|
'hover:bg-surface-hover',
|
|
77
|
-
'focus-visible:border-ring focus-visible:
|
|
77
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
78
78
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
79
79
|
// A step at its end is `aria-disabled` and stays focusable, so it never
|
|
80
80
|
// matches `:disabled`; it takes the same look from `data-disabled`.
|
|
@@ -239,7 +239,7 @@ export function Questionnaire(props: QuestionnaireProps) {
|
|
|
239
239
|
// Not a tab stop: only the landing place for focus when a control goes away.
|
|
240
240
|
tabindex="-1"
|
|
241
241
|
class={cn(
|
|
242
|
-
'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:
|
|
242
|
+
'flex w-full max-w-xl min-w-0 flex-col gap-3 rounded-xl border bg-card p-4 outline-none focus-visible:focus-outline',
|
|
243
243
|
{
|
|
244
244
|
'border-border': settled(),
|
|
245
245
|
'border-ring': !settled(),
|
|
@@ -201,7 +201,7 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
201
201
|
'relative rounded-lg border border-border bg-card px-3 py-2.5 transition-[color,box-shadow,border-color,background-color] ease-out hover:bg-surface-hover data-[checked]:border-primary data-[disabled]:cursor-not-allowed data-[disabled]:hover:bg-card':
|
|
202
202
|
card(),
|
|
203
203
|
// The radio button is what takes focus; the card rings while it has it.
|
|
204
|
-
'has-[[data-slot=radio]:focus-visible]:border-ring has-[[data-slot=radio]:focus-visible]:
|
|
204
|
+
'has-[[data-slot=radio]:focus-visible]:border-ring has-[[data-slot=radio]:focus-visible]:focus-outline':
|
|
205
205
|
card(),
|
|
206
206
|
},
|
|
207
207
|
props.class
|
|
@@ -226,7 +226,7 @@ export function RadioGroupItem(props: RadioGroupItemProps) {
|
|
|
226
226
|
class={cn(
|
|
227
227
|
'border-input bg-transparent flex size-4 shrink-0 items-center justify-center rounded-full border',
|
|
228
228
|
'transition-[color,box-shadow,border-color,background-color] ease-out outline-none',
|
|
229
|
-
'focus-visible:border-ring focus-visible:
|
|
229
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
230
230
|
'data-[checked]:border-primary data-[checked]:text-primary',
|
|
231
231
|
'data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive-subtle',
|
|
232
232
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
|
|
@@ -43,7 +43,7 @@ export function ScrollArea(props: ScrollAreaProps) {
|
|
|
43
43
|
*/
|
|
44
44
|
tabindex={local.tabindex ?? 0}
|
|
45
45
|
class={cn(
|
|
46
|
-
'relative min-h-0 min-w-0 outline-none focus-visible:
|
|
46
|
+
'relative min-h-0 min-w-0 outline-none focus-visible:focus-outline-inset',
|
|
47
47
|
{
|
|
48
48
|
'overflow-y-auto overflow-x-hidden':
|
|
49
49
|
local.orientation === 'vertical' || local.orientation === undefined,
|
|
@@ -300,7 +300,7 @@ export function SelectTrigger(props: SelectTriggerProps) {
|
|
|
300
300
|
'whitespace-nowrap transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
301
301
|
'data-[placeholder-shown]:text-muted-foreground',
|
|
302
302
|
'hover:border-input',
|
|
303
|
-
'focus-visible:border-ring focus-visible:
|
|
303
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
304
304
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
305
305
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
306
306
|
'*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2',
|
|
@@ -136,7 +136,7 @@ export function Slider(props: SliderProps) {
|
|
|
136
136
|
'border-primary bg-background block size-4 shrink-0 rounded-full border-2 shadow-xs',
|
|
137
137
|
'transition-[color,box-shadow] ease-out outline-none',
|
|
138
138
|
'hover:ring-4 hover:ring-primary-subtle',
|
|
139
|
-
'has-[:focus-visible]:
|
|
139
|
+
'has-[:focus-visible]:focus-outline',
|
|
140
140
|
props.thumbClass
|
|
141
141
|
)}
|
|
142
142
|
>
|
|
@@ -62,7 +62,7 @@ const switchControlClass = (className?: string) =>
|
|
|
62
62
|
cn(
|
|
63
63
|
'bg-input inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent',
|
|
64
64
|
'transition-colors ease-out outline-none',
|
|
65
|
-
'peer-focus-visible:border-ring peer-focus-visible:
|
|
65
|
+
'peer-focus-visible:border-ring peer-focus-visible:focus-outline',
|
|
66
66
|
'data-[checked]:bg-primary',
|
|
67
67
|
'data-[invalid]:border-destructive',
|
|
68
68
|
'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
|
|
@@ -211,7 +211,7 @@ export function TabsTrigger(props: TabsTriggerProps) {
|
|
|
211
211
|
class={cn(
|
|
212
212
|
'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',
|
|
213
213
|
'transition-colors ease-out outline-none select-none',
|
|
214
|
-
'focus-visible:border-ring focus-visible:
|
|
214
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
215
215
|
'disabled:pointer-events-none disabled:opacity-50',
|
|
216
216
|
'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
217
217
|
'text-foreground',
|
|
@@ -18,7 +18,7 @@ export function TextLink(props: ComponentProps<'a'>) {
|
|
|
18
18
|
class={cn(
|
|
19
19
|
'rounded-sm text-foreground underline decoration-primary underline-offset-4',
|
|
20
20
|
'transition-colors ease-out hover:decoration-foreground outline-none',
|
|
21
|
-
'focus-visible:border-ring focus-visible:
|
|
21
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
22
22
|
'motion-reduce:transition-none',
|
|
23
23
|
local.class
|
|
24
24
|
)}
|
|
@@ -11,7 +11,7 @@ export const textareaVariants = cva(
|
|
|
11
11
|
'transition-[color,box-shadow,border-color] ease-out outline-none',
|
|
12
12
|
'placeholder:text-muted-foreground',
|
|
13
13
|
'selection:bg-primary selection:text-primary-foreground',
|
|
14
|
-
'focus-visible:border-ring focus-visible:
|
|
14
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
15
15
|
'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',
|
|
16
16
|
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
17
17
|
],
|
|
@@ -175,7 +175,7 @@ function ToastCard(props: { toast: ToastData<JSX.Element> }) {
|
|
|
175
175
|
</div>
|
|
176
176
|
<UiToastClose
|
|
177
177
|
aria-label="Dismiss notification"
|
|
178
|
-
class="text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:
|
|
178
|
+
class="text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:focus-outline"
|
|
179
179
|
>
|
|
180
180
|
<X class="size-3.5" />
|
|
181
181
|
</UiToastClose>
|
|
@@ -281,7 +281,7 @@ function LineHead(props: {
|
|
|
281
281
|
const lineClass =
|
|
282
282
|
'flex min-h-control-xs w-full min-w-0 items-center gap-2 rounded-md px-1.5 py-0.5 text-start outline-none'
|
|
283
283
|
const interactiveClass =
|
|
284
|
-
'cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:
|
|
284
|
+
'cursor-pointer transition-colors ease-out hover:bg-muted/60 focus-visible:focus-outline-inset focus-visible:border-ring'
|
|
285
285
|
|
|
286
286
|
export function TraceLine(props: TraceLineProps) {
|
|
287
287
|
const local = props
|
|
@@ -75,7 +75,7 @@ export const overlayDescription = 'text-muted-foreground text-sm'
|
|
|
75
75
|
export const overlayCornerClose =
|
|
76
76
|
'absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground ' +
|
|
77
77
|
'transition-colors ease-out hover:bg-surface-hover hover:text-foreground ' +
|
|
78
|
-
'focus-visible:border-ring focus-visible:
|
|
78
|
+
'focus-visible:border-ring focus-visible:focus-outline outline-none'
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* The tip: shadcn's inverted chip, foreground on background, so an explanation
|
package/dist/r/src/lib/tokens.ts
CHANGED
|
@@ -161,7 +161,8 @@ export const colorTokens: TokenDefinition[] = [
|
|
|
161
161
|
name: 'primary-subtle',
|
|
162
162
|
kind: 'color',
|
|
163
163
|
themed: true,
|
|
164
|
-
description:
|
|
164
|
+
description:
|
|
165
|
+
'Tinted primary fill: selected rows, subtle buttons. Never a focus cue: it is below 3:1.',
|
|
165
166
|
},
|
|
166
167
|
|
|
167
168
|
{
|
|
@@ -276,7 +277,8 @@ export const colorTokens: TokenDefinition[] = [
|
|
|
276
277
|
name: 'ring',
|
|
277
278
|
kind: 'color',
|
|
278
279
|
themed: true,
|
|
279
|
-
description:
|
|
280
|
+
description:
|
|
281
|
+
'The focus indicator, drawn by the `focus-outline` and `focus-ring` utilities as a solid 2px outline. Held to 3:1 on the canvas.',
|
|
280
282
|
},
|
|
281
283
|
|
|
282
284
|
// Theme-invariant glass
|
|
@@ -59,7 +59,7 @@ export type ControlSize = (typeof controlSizes)[number]
|
|
|
59
59
|
* a different state.
|
|
60
60
|
*/
|
|
61
61
|
export const controlInteractive =
|
|
62
|
-
'transition-colors ease-out outline-none focus-visible:border-ring focus-visible:
|
|
62
|
+
'transition-colors ease-out outline-none focus-visible:border-ring focus-visible:focus-outline disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50'
|
|
63
63
|
|
|
64
64
|
/** The shared focus treatment for surfaces that are not focusable controls. */
|
|
65
65
|
export const surfaceInteractive = 'transition-colors ease-out outline-none'
|
|
@@ -249,6 +249,35 @@
|
|
|
249
249
|
border-width: 0;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* The keyboard focus indicator, applied under a focus variant
|
|
254
|
+
* (`focus-visible:focus-outline`, `peer-focus-visible:focus-outline`, ...) by a
|
|
255
|
+
* control that sets `outline-none` and draws its focus on a painted part or a
|
|
256
|
+
* wrapper.
|
|
257
|
+
*
|
|
258
|
+
* The same solid 2px `--ring` outline as the global `:focus-visible` rule below.
|
|
259
|
+
* `--ring` is held to 3:1 against the canvas in both appearances and every
|
|
260
|
+
* accent (tests/focus-ring.test.ts), the WCAG 2.4.7 / 1.4.11 floor for a focus
|
|
261
|
+
* cue. The halo it replaces, a 3px box-shadow in `primary-subtle` (a 10-16% tint
|
|
262
|
+
* of the primary), never reached that floor. The offset keeps the cue legible
|
|
263
|
+
* next to a primary fill, and an outline, unlike a box-shadow, survives
|
|
264
|
+
* forced-colours mode.
|
|
265
|
+
*/
|
|
266
|
+
@utility focus-outline {
|
|
267
|
+
outline: 2px solid var(--color-ring);
|
|
268
|
+
outline-offset: 2px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* `focus-outline` drawn inside the edge, for full-width rows and scroll regions
|
|
273
|
+
* that sit flush against a clipping container, where an outset ring would be cut
|
|
274
|
+
* off.
|
|
275
|
+
*/
|
|
276
|
+
@utility focus-outline-inset {
|
|
277
|
+
outline: 2px solid var(--color-ring);
|
|
278
|
+
outline-offset: -2px;
|
|
279
|
+
}
|
|
280
|
+
|
|
252
281
|
/**
|
|
253
282
|
* Reverses `visually-hidden` at a breakpoint, for a label that is only visible
|
|
254
283
|
* when there is room for it. Written as a companion because the two rules have
|
|
@@ -540,17 +569,16 @@
|
|
|
540
569
|
-webkit-backdrop-filter: blur(2px);
|
|
541
570
|
}
|
|
542
571
|
|
|
543
|
-
/* The focus ring
|
|
544
|
-
|
|
572
|
+
/* The focus ring as one class, for a part that takes no variant prefix (a
|
|
573
|
+
dialog or drawer close). The `focus-outline` indicator on `:focus-visible`;
|
|
574
|
+
an outline follows the element's own radius. */
|
|
545
575
|
@utility focus-ring {
|
|
546
|
-
transition:
|
|
547
|
-
border-color var(--duration-normal) var(--ease-out),
|
|
548
|
-
box-shadow var(--duration-normal) var(--ease-out);
|
|
576
|
+
transition: border-color var(--duration-normal) var(--ease-out);
|
|
549
577
|
|
|
550
578
|
&:focus-visible {
|
|
551
|
-
outline: none;
|
|
552
579
|
border-color: var(--ring);
|
|
553
|
-
|
|
580
|
+
outline: 2px solid var(--color-ring);
|
|
581
|
+
outline-offset: 2px;
|
|
554
582
|
}
|
|
555
583
|
}
|
|
556
584
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-sources.d.ts","sourceRoot":"","sources":["../../src/vite/tailwind-sources.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAiB,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,MAAM,CAAA;AAEtE,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAiBtC,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,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O,CAAC,YAAY,EAAE,CAAC,CAE1F;AAqDD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;IAClC,cAAc,EAAE,MAAM,CAAA;IACtB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,oFAAoF;IACpF,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;CAC1D;AAED,MAAM,WAAW,sBAAsB;IACrC,+FAA+F;IAC/F,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAA;IAClB,iHAAiH;IACjH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,6FAA6F;IAC7F,KAAK,CAAC,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzD;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;CACnB;AAID,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,aAAa,CAU5E;AASD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAmIvE"}
|
|
@@ -6,13 +6,24 @@ import { normalizePath } from "vite";
|
|
|
6
6
|
// src/vite/tailwind-sources.ts
|
|
7
7
|
var defaultLabel = "ui-tailwind-sources";
|
|
8
8
|
var walkMemoStore = new AsyncLocalStorage();
|
|
9
|
-
var currentWalkMemo = () =>
|
|
10
|
-
|
|
9
|
+
var currentWalkMemo = () => {
|
|
10
|
+
const memo = walkMemoStore.getStore();
|
|
11
|
+
return memo && !memo.finished ? memo : void 0;
|
|
12
|
+
};
|
|
13
|
+
async function withWalkMemo(walk) {
|
|
11
14
|
if (currentWalkMemo()) return walk();
|
|
12
|
-
|
|
15
|
+
const memo = {
|
|
13
16
|
realpaths: /* @__PURE__ */ new Map(),
|
|
14
|
-
modules: /* @__PURE__ */ new Map()
|
|
15
|
-
|
|
17
|
+
modules: /* @__PURE__ */ new Map(),
|
|
18
|
+
finished: false
|
|
19
|
+
};
|
|
20
|
+
try {
|
|
21
|
+
return await walkMemoStore.run(memo, walk);
|
|
22
|
+
} finally {
|
|
23
|
+
memo.finished = true;
|
|
24
|
+
memo.realpaths.clear();
|
|
25
|
+
memo.modules.clear();
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
28
|
function modulePath(id) {
|
|
18
29
|
const withoutQuery = id.split("?")[0] ?? id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-sources.js","names":[],"sources":["../../src/vite/tailwind-sources.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks'\nimport {\n existsSync,\n mkdirSync,\n readFileSync,\n readdirSync,\n realpathSync,\n symlinkSync,\n writeFileSync,\n} from 'node:fs'\nimport { basename, dirname, extname, isAbsolute, relative, resolve, sep } from 'node:path'\nimport {\n defaultExport,\n directRuntimeExports,\n runtimeReexports,\n dynamicRuntimeImports,\n hasRuntimeDeclaration,\n parseSource,\n type SyntaxNode,\n selectNamespace,\n staticRuntimeImports,\n} from './source-parser'\n\nimport { normalizePath, type Plugin, type ResolvedConfig } from 'vite'\n\nexport type Selection =\n | { kind: 'execute' | 'side-effect' | 'all' }\n | { kind: 'named'; names: string[] }\n\ninterface RuntimeImport {\n specifier: string\n selection: Selection\n}\n\ninterface ExportTarget {\n file: string\n selection: Selection\n}\n\ninterface ParsedModule {\n file: string\n syntax: SyntaxNode\n}\n\nexport interface SourceDiscoveryOptions {\n entrypoint: string | string[]\n repositoryRoot: string\n uiPackageRoot: string\n uiSourceRoot: string\n /** Source roots of installed packages (such as the app framework) whose shared views render UI modules. */\n sourcePackageRoots?: string[]\n resolveId(specifier: string, importer: string): Promise<string | undefined>\n /** Error-message prefix naming the consumer. */\n label?: string\n}\n\nexport interface SourceDirectiveOptions {\n files: string[]\n uiPackageRoot: string\n stablePackagePath: string\n stylesheetPath: string\n label?: string\n}\n\nconst defaultLabel = 'ui-tailwind-sources'\n\n/**\n * One walk's memo: the same files are reached, resolved and parsed many times in a walk, and the\n * checks the plugin runs walk the same graph again. It lives in the walk's async context, so a\n * nested walk (the check inside a generation) shares it, while an independent walk that overlaps\n * it (a hot update, or a second call after a file changed) starts with its own, and a later walk\n * never reads an earlier answer.\n */\ninterface WalkMemo {\n realpaths: Map<string, string>\n modules: Map<string, ParsedModule>\n}\nconst walkMemoStore = new AsyncLocalStorage<WalkMemo>()\nconst currentWalkMemo = (): WalkMemo | undefined => walkMemoStore.getStore()\n\nfunction withWalkMemo<T>(walk: () => Promise<T>): Promise<T> {\n if (currentWalkMemo()) return walk()\n return walkMemoStore.run({ realpaths: new Map(), modules: new Map() }, walk)\n}\n\nfunction modulePath(id: string): string {\n const withoutQuery = id.split('?')[0] ?? id\n const absolute = resolve(withoutQuery)\n const known = currentWalkMemo()?.realpaths.get(absolute)\n if (known) return known\n let file = absolute\n try {\n file = realpathSync(absolute)\n } catch {\n // A path that does not exist (yet) stands for itself.\n }\n currentWalkMemo()?.realpaths.set(absolute, file)\n return file\n}\n\nfunction inside(path: string, root: string): boolean {\n const pathFromRoot = relative(root, path)\n return (\n pathFromRoot === '' ||\n (pathFromRoot !== '..' && !pathFromRoot.startsWith(`..${sep}`) && !isAbsolute(pathFromRoot))\n )\n}\n\nfunction isWorkspaceSourceFile(\n path: string,\n repositoryRoot: string,\n sourcePackageRoots: readonly string[] = []\n): boolean {\n if (sourcePackageRoots.some((root) => inside(path, root))) return true\n if (!inside(path, repositoryRoot)) return false\n const segments = relative(repositoryRoot, path).split(sep)\n return (\n (segments[0] === 'apps' || segments[0] === 'packages') &&\n segments.includes('src') &&\n !segments.includes('node_modules')\n )\n}\n\nfunction isCodeFile(path: string): boolean {\n return ['.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.cjs'].includes(extname(path))\n}\n\nfunction readModule(path: string, cache: Map<string, ParsedModule>): ParsedModule {\n const file = modulePath(path)\n const cached = cache.get(file)\n if (cached) return cached\n const source = readFileSync(file, 'utf8')\n const parsed: ParsedModule = { file, syntax: parseSource(file, source) }\n cache.set(file, parsed)\n return parsed\n}\n\n// A module's runtime imports depend only on its parsed source, and a walk asks for them each time\n// it reaches the module with another selection.\nconst runtimeImportsByModule = new WeakMap<ParsedModule, RuntimeImport[]>()\n\nfunction runtimeImports(parsed: ParsedModule, label: string): RuntimeImport[] {\n const known = runtimeImportsByModule.get(parsed)\n if (known) return known\n const imports = moduleRuntimeImports(parsed, label)\n runtimeImportsByModule.set(parsed, imports)\n return imports\n}\n\nfunction moduleRuntimeImports(parsed: ParsedModule, label: string): RuntimeImport[] {\n const imports: RuntimeImport[] = []\n\n for (const entry of staticRuntimeImports(parsed.syntax)) {\n if (entry.kind === 'side-effect') {\n imports.push({\n specifier: entry.specifier,\n selection: { kind: 'side-effect' },\n })\n continue\n }\n const namespace = entry.bindings.find((binding) => binding.imported === '*')\n if (namespace) {\n const selection = selectNamespace(parsed.syntax, namespace.local)\n if (selection) imports.push({ specifier: entry.specifier, selection })\n } else {\n imports.push({\n specifier: entry.specifier,\n selection: {\n kind: 'named',\n names: [...new Set(entry.bindings.map((binding) => binding.imported))].toSorted(),\n },\n })\n }\n }\n\n imports.push(...dynamicRuntimeImports(parsed.syntax, parsed.file, label))\n return imports\n}\n\nfunction localRuntimeBinding(\n file: string,\n localName: string,\n cache: Map<string, ParsedModule>\n): RuntimeImport | undefined {\n const parsed = readModule(file, cache)\n for (const entry of staticRuntimeImports(parsed.syntax)) {\n const binding = entry.bindings.find((candidate) => candidate.local === localName)\n if (binding)\n return {\n specifier: entry.specifier,\n selection:\n binding.imported === '*' ? { kind: 'all' } : { kind: 'named', names: [binding.imported] },\n }\n }\n return undefined\n}\n\nfunction hasLocalRuntimeBinding(\n file: string,\n localName: string,\n cache: Map<string, ParsedModule>\n): boolean {\n return hasRuntimeDeclaration(readModule(file, cache).syntax, localName)\n}\n\nfunction modifierExport(file: string, name: string, cache: Map<string, ParsedModule>): boolean {\n return directRuntimeExports(readModule(file, cache).syntax).includes(name)\n}\n\nexport function collectUiSourceFiles(options: SourceDiscoveryOptions): Promise<string[]> {\n return withWalkMemo(() => walkUiSourceFiles(options))\n}\n\nasync function walkUiSourceFiles(options: SourceDiscoveryOptions): Promise<string[]> {\n const label = options.label ?? defaultLabel\n const repositoryRoot = realpathSync(options.repositoryRoot)\n const uiSourceRoot = realpathSync(options.uiSourceRoot)\n const sourcePackageRoots = (options.sourcePackageRoots ?? []).map((root) => realpathSync(root))\n const entrypoints = (\n Array.isArray(options.entrypoint) ? options.entrypoint : [options.entrypoint]\n ).map((entrypoint) => realpathSync(entrypoint))\n const cache = currentWalkMemo()?.modules ?? new Map<string, ParsedModule>()\n const visited = new Set<string>()\n const files = new Set<string>()\n const publishedUiResolutions: string[] = []\n\n const resolveImport = async (\n specifier: string,\n importer: string,\n selection: Selection\n ): Promise<void> => {\n const importerIsUi = inside(importer, uiSourceRoot)\n const isPublishedUiImport = specifier === '@adea-ai/ui' || specifier.startsWith('@adea-ai/ui/')\n const resolved = await options.resolveId(specifier, importer)\n if (isPublishedUiImport)\n publishedUiResolutions.push(`${specifier} -> ${resolved ?? '(unresolved)'}`)\n if (!resolved) {\n if (isPublishedUiImport || importerIsUi)\n throw new Error(\n `[${label}] unable to resolve runtime import '${specifier}' from ${importer}`\n )\n return\n }\n\n const target = modulePath(resolved)\n if (!isCodeFile(target)) return\n if (isPublishedUiImport && !inside(target, uiSourceRoot)) {\n throw new Error(`[${label}] '${specifier}' resolved outside published UI source: ${target}`)\n }\n if (\n inside(target, uiSourceRoot) ||\n isWorkspaceSourceFile(target, repositoryRoot, sourcePackageRoots)\n ) {\n await visit(target, selection)\n return\n }\n }\n\n const resolveExportTargets = async (\n file: string,\n name: string,\n chain: Set<string>\n ): Promise<ExportTarget[]> => {\n const key = `${file}\\0${name}`\n if (chain.has(key)) return []\n const nextChain = new Set(chain).add(key)\n const parsed = readModule(file, cache)\n const targets: ExportTarget[] = []\n\n if (modifierExport(file, name, cache)) targets.push({ file, selection: { kind: 'execute' } })\n\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (entry.kind === 'empty') continue\n if (entry.kind === 'named' && !entry.source) {\n if (entry.exported !== name) continue\n const imported = localRuntimeBinding(file, entry.imported, cache)\n if (imported) {\n const resolved = await options.resolveId(imported.specifier, file)\n if (resolved)\n targets.push({\n file: modulePath(resolved),\n selection: imported.selection,\n })\n else if (inside(file, uiSourceRoot))\n throw new Error(\n `[${label}] unable to resolve local re-export '${imported.specifier}' from ${file}`\n )\n } else if (hasLocalRuntimeBinding(file, entry.imported, cache))\n targets.push({ file, selection: { kind: 'execute' } })\n continue\n }\n if (\n !entry.source ||\n (entry.kind !== 'star' && entry.exported !== name) ||\n (entry.kind === 'star' && name === 'default')\n )\n continue\n if (entry.source === '@lucide/solid') {\n targets.push({ file, selection: { kind: 'execute' } })\n continue\n }\n const resolved = await options.resolveId(entry.source, file)\n if (!resolved) {\n if (inside(file, uiSourceRoot) && entry.kind !== 'namespace')\n throw new Error(`[${label}] unable to resolve re-export '${entry.source}' from ${file}`)\n continue\n }\n if (entry.kind === 'star')\n targets.push(...(await resolveExportTargets(modulePath(resolved), name, nextChain)))\n else if (entry.kind === 'namespace')\n targets.push({\n file: modulePath(resolved),\n selection: { kind: 'all' },\n })\n else\n targets.push({\n file: modulePath(resolved),\n selection: { kind: 'named', names: [entry.imported] },\n })\n }\n if (name === 'default') {\n const entry = defaultExport(parsed.syntax)\n if (entry?.kind === 'identifier') {\n const imported = localRuntimeBinding(file, entry.name, cache)\n if (imported) {\n const resolved = await options.resolveId(imported.specifier, file)\n if (resolved)\n targets.push({\n file: modulePath(resolved),\n selection: imported.selection,\n })\n } else targets.push({ file, selection: { kind: 'execute' } })\n } else if (entry) targets.push({ file, selection: { kind: 'execute' } })\n }\n\n return deduplicateTargets(targets)\n }\n\n const runtimeExportNames = async (file: string, chain: Set<string>): Promise<string[]> => {\n if (chain.has(file)) return []\n const nextChain = new Set(chain).add(file)\n const parsed = readModule(file, cache)\n const names = new Set(directRuntimeExports(parsed.syntax))\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (!entry.source) {\n if (entry.kind === 'named') names.add(entry.exported)\n continue\n }\n if (entry.kind === 'star' && entry.source === '@lucide/solid') continue\n const resolved = await options.resolveId(entry.source, file)\n if (!resolved) {\n if (inside(file, uiSourceRoot))\n throw new Error(`[${label}] unable to resolve re-export '${entry.source}' from ${file}`)\n continue\n }\n if (entry.kind === 'named' || entry.kind === 'namespace') names.add(entry.exported)\n else if (entry.kind === 'star')\n for (const name of await runtimeExportNames(modulePath(resolved), nextChain))\n if (name !== 'default') names.add(name)\n }\n return [...names].toSorted()\n }\n\n const visit = async (path: string, selection: Selection): Promise<void> => {\n const file = modulePath(path)\n if (!isCodeFile(file)) return\n if (\n !inside(file, uiSourceRoot) &&\n !isWorkspaceSourceFile(file, repositoryRoot, sourcePackageRoots)\n )\n return\n const key = `${file}\\0${selection.kind === 'named' ? selection.names.join(',') : selection.kind}`\n if (visited.has(key)) return\n visited.add(key)\n const parsed = readModule(file, cache)\n const isUiSource = inside(file, uiSourceRoot)\n if (isUiSource) files.add(file)\n\n const moduleImports = runtimeImports(parsed, label)\n // Follow all runtime imports of every visited module. Even when a module\n // is reached through a side-effect import, its own imports may execute\n // setup code or register UI components needed by the consumer.\n for (const dependency of moduleImports) {\n await resolveImport(dependency.specifier, file, dependency.selection)\n }\n\n if (selection.kind === 'execute' || selection.kind === 'side-effect') return\n const names =\n selection.kind === 'named' ? selection.names : await runtimeExportNames(file, new Set())\n for (const name of names) {\n const targets = await resolveExportTargets(file, name, new Set())\n if (!targets.length) {\n throw new Error(`[${label}] unable to resolve runtime export '${name}' from ${file}`)\n }\n for (const target of targets) await visit(target.file, target.selection)\n }\n }\n\n for (const entrypoint of entrypoints) await visit(entrypoint, { kind: 'execute' })\n if (files.size === 0)\n throw new Error(\n `[${label}] the client import graph resolved no shared UI source files from ${entrypoints.join(', ')}; package imports: ${publishedUiResolutions.slice(0, 8).join('; ') || '(none)'}`\n )\n return [...files].toSorted()\n}\n\nfunction deduplicateTargets(targets: ExportTarget[]): ExportTarget[] {\n const unique = new Map<string, ExportTarget>()\n for (const target of targets) {\n const key = `${target.file}\\0${target.selection.kind === 'named' ? target.selection.names.join(',') : target.selection.kind}`\n unique.set(key, target)\n }\n return [...unique.values()]\n}\n\nfunction filesBelow(directory: string): string[] {\n return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {\n const path = resolve(directory, entry.name)\n if (entry.isDirectory()) return filesBelow(path)\n return entry.isFile() ? [path] : []\n })\n}\n\n/**\n * Tailwind's scanner widens a file `@source` to that file's whole directory\n * tree, so a reached `button/button.tsx` would also pull in an unused sibling\n * (and a reached package-root barrel would pull in every component). Negate\n * every file in those trees the import graph did not reach to keep discovery\n * exact to the module.\n */\nexport function formatUiSourceDirectives(options: SourceDirectiveOptions): string {\n const label = options.label ?? defaultLabel\n const packageRoot = realpathSync(options.uiPackageRoot)\n const stylesheetDirectory = dirname(resolve(options.stylesheetPath))\n const directive = (file: string, negated: boolean) => {\n if (!inside(file, packageRoot))\n throw new Error(`[${label}] source is outside published package: ${file}`)\n const stableFile = resolve(options.stablePackagePath, relative(packageRoot, file))\n const relativePath = relative(stylesheetDirectory, stableFile).replaceAll('\\\\', '/')\n if (isAbsolute(relativePath))\n throw new Error(`[${label}] generated source path is not portable: ${relativePath}`)\n return `@source ${negated ? 'not ' : ''}'${relativePath}';`\n }\n const included = [...new Set(options.files.map((path) => realpathSync(path)))].toSorted()\n const includedSet = new Set(included)\n const scannedTrees = [...new Set(included.map((file) => dirname(file)))]\n .toSorted()\n .filter((directory, index, all) => !all.slice(0, index).some((root) => inside(directory, root)))\n const excluded = scannedTrees\n .flatMap((directory) => filesBelow(directory))\n .filter((file) => !includedSet.has(file))\n .toSorted()\n return `${[\n ...included.map((file) => directive(file, false)),\n ...excluded.map((file) => directive(file, true)),\n ].join('\\n')}\\n`\n}\n\n/**\n * The rendered shared UI source modules (by package-relative path) that the\n * generated directives do not cover. Ids may carry Vite query suffixes.\n */\nexport function missingRenderedUiSources(\n renderedIds: string[],\n generatedFiles: string[],\n uiRoot: string\n): string[] {\n const uiSourceRoot = resolve(uiRoot, 'src')\n const generated = new Set(generatedFiles.map((file) => modulePath(file)))\n return [\n ...new Set(\n renderedIds\n .map((id) => modulePath(id))\n .filter((file) => isCodeFile(file) && inside(file, uiSourceRoot) && !generated.has(file))\n .map((file) => relative(uiRoot, file).replaceAll('\\\\', '/'))\n ),\n ].toSorted()\n}\n\nfunction writeIfChanged(path: string, content: string) {\n let current: string | undefined\n try {\n current = readFileSync(path, 'utf8')\n } catch {\n // The first invocation creates the ignored generated file.\n }\n if (current === content) return\n mkdirSync(dirname(path), { recursive: true })\n writeFileSync(path, content)\n}\n\n/**\n * The framework package's published `src` directory holding `file`: the\n * nearest `src` ancestor whose parent is the @adea-ai/app-framework package.\n * Its views live in subdirectories (`src/views`) and import across `src`.\n */\nfunction frameworkSourceRoot(file: string): string {\n for (\n let directory = dirname(file);\n dirname(directory) !== directory;\n directory = dirname(directory)\n ) {\n if (basename(directory) !== 'src') continue\n try {\n const manifest = JSON.parse(readFileSync(resolve(directory, '../package.json'), 'utf8')) as {\n name?: unknown\n }\n if (manifest.name === '@adea-ai/app-framework') return directory\n } catch {\n // Not the package root; keep walking up.\n }\n }\n return dirname(file)\n}\n\n/**\n * The framework's shared views (Help Center and friends) import shared UI\n * modules from its published source, so its graph counts as the app's.\n */\nexport async function frameworkSourceRoots(\n resolveId: (specifier: string, importer: string) => Promise<string | undefined>,\n entrypoint: string,\n label = defaultLabel\n): Promise<string[]> {\n const framework = await resolveId('@adea-ai/app-framework/app-help', entrypoint)\n if (!framework) return []\n const root = frameworkSourceRoot(realpathSync(modulePath(framework)))\n if (basename(root) !== 'src')\n throw new Error(\n `[${label}] @adea-ai/app-framework resolved outside its published source: ${root}`\n )\n return [root]\n}\n\nexport interface LinkedImport {\n /** The shared UI source module that imports or re-exports the specifier. */\n file: string\n selection: Selection\n}\n\nexport interface LinkedImportOptions {\n entrypoint: string | string[]\n repositoryRoot: string\n uiSourceRoot: string\n sourcePackageRoots?: string[]\n /** The external package whose uses inside shared UI source are reported. */\n specifier: string\n resolveId(specifier: string, importer: string): Promise<string | undefined>\n label?: string\n}\n\n/**\n * Every use of `specifier` inside shared UI source the dev server links.\n *\n * Vite serves the published package as native ESM, so static imports and\n * re-exports are linked even when the consumer selects one root-barrel name,\n * unlike the selective walk the Tailwind sources come from. Literal dynamic\n * imports are included without executing them, so a lazy feature cannot fail\n * later on an import the check never saw.\n */\nexport function collectLinkedImports(options: LinkedImportOptions): Promise<LinkedImport[]> {\n return withWalkMemo(() => walkLinkedImports(options))\n}\n\nasync function walkLinkedImports(options: LinkedImportOptions): Promise<LinkedImport[]> {\n const label = options.label ?? defaultLabel\n const repositoryRoot = realpathSync(options.repositoryRoot)\n const uiSourceRoot = realpathSync(options.uiSourceRoot)\n const sourcePackageRoots = (options.sourcePackageRoots ?? []).map((root) => realpathSync(root))\n const entrypoints = (\n Array.isArray(options.entrypoint) ? options.entrypoint : [options.entrypoint]\n ).map((entrypoint) => realpathSync(entrypoint))\n const cache = currentWalkMemo()?.modules ?? new Map<string, ParsedModule>()\n const visited = new Set<string>()\n const linked: LinkedImport[] = []\n const reached = (file: string) =>\n isCodeFile(file) &&\n (inside(file, uiSourceRoot) || isWorkspaceSourceFile(file, repositoryRoot, sourcePackageRoots))\n\n const visit = async (path: string): Promise<void> => {\n const file = modulePath(path)\n if (!reached(file) || visited.has(file)) return\n visited.add(file)\n const inUi = inside(file, uiSourceRoot)\n const parsed = readModule(file, cache)\n const record = (selection: Selection) => {\n if (inUi) linked.push({ file, selection })\n }\n const follow = async (specifier: string, kind: string): Promise<void> => {\n const resolved = await options.resolveId(specifier, file)\n if (!resolved) {\n if (inUi || specifier === '@adea-ai/ui' || specifier.startsWith('@adea-ai/ui/'))\n throw new Error(`[${label}] unable to resolve ${kind} '${specifier}' from ${file}`)\n return\n }\n await visit(resolved)\n }\n\n for (const dependency of runtimeImports(parsed, label)) {\n if (dependency.specifier === options.specifier) record(dependency.selection)\n else await follow(dependency.specifier, 'runtime import')\n }\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (!entry.source) continue\n if (entry.source !== options.specifier) await follow(entry.source, 're-export')\n else if (entry.kind === 'named') record({ kind: 'named', names: [entry.imported] })\n else if (entry.kind === 'empty') record({ kind: 'named', names: [] })\n else record({ kind: 'all' })\n }\n }\n\n for (const entrypoint of entrypoints) await visit(entrypoint)\n return linked\n}\n\nexport interface GraphCheckContext {\n command: ResolvedConfig['command']\n repositoryRoot: string\n /** The shared UI source modules the client graph reaches. */\n files: string[]\n /** Uses of an external package inside the shared UI source the dev server links. */\n linkedImports(specifier: string): Promise<LinkedImport[]>\n}\n\nexport interface TailwindSourcesOptions {\n /** Names the plugin, its errors and the generated `<name>-ui-tailwind-sources` cache files. */\n name: string\n /** The Vite root of the consuming app. */\n webRoot: string\n /** Client entry modules, relative to `webRoot`. */\n entrypoints: string[]\n /** The stylesheet that imports the generated directives, relative to `webRoot`. */\n styleEntry: string\n /** The monorepo root whose `apps/*` and `packages/*` sources count as the app's. Defaults to `webRoot/../..`. */\n repositoryRoot?: string\n /** More paths the dev server watches, relative to `webRoot`. */\n watch?: string[]\n /** Runs after each generation, in dev and in builds, to enforce app-specific graph rules. */\n check?(context: GraphCheckContext): void | Promise<void>\n}\n\nexport interface UiSourcePaths {\n entrypoints: string[]\n repositoryRoot: string\n stablePackagePath: string\n stylesheetPath: string\n manifestPath: string\n styleEntry: string\n}\n\n// The generated directives live in the ignored Vite cache next to the stable\n// package link they reference, so every path in them stays checkout-relative.\nexport function uiSourcePaths(options: TailwindSourcesOptions): UiSourcePaths {\n const { webRoot, name } = options\n return {\n entrypoints: options.entrypoints.map((entrypoint) => resolve(webRoot, entrypoint)),\n repositoryRoot: resolve(webRoot, options.repositoryRoot ?? '../..'),\n stablePackagePath: resolve(webRoot, 'node_modules/@adea-ai/ui'),\n stylesheetPath: resolve(webRoot, `node_modules/.cache/${name}-ui-tailwind-sources.css`),\n manifestPath: resolve(webRoot, `node_modules/.cache/${name}-ui-tailwind-sources.json`),\n styleEntry: resolve(webRoot, options.styleEntry),\n }\n}\n\ntype Resolver = (specifier: string, importer: string) => Promise<string | undefined>\n\nfunction viteResolver(config: ResolvedConfig): Resolver {\n const resolver = config.createResolver()\n return (specifier, importer) => resolver(specifier, importer, false, false)\n}\n\n/**\n * Generate Tailwind `@source` directives for exactly the published shared UI\n * modules the app's client graph reaches (static, re-exported and literal lazy\n * imports), instead of scanning every component the package ships. The client\n * build then fails if Rolldown rendered a shared UI module the directives\n * missed, so a discovery gap can never ship unstyled.\n */\nexport function tailwindSources(options: TailwindSourcesOptions): Plugin {\n const label = `${options.name}-ui-tailwind-sources`\n const paths = uiSourcePaths(options)\n let uiRoot = ''\n let uiSourceRoot = ''\n let sourcePackageRoots: string[] = []\n let repositoryRoot = ''\n let generatedFiles: string[] = []\n\n // The discovery walk and the consumer's check share one memo, and each (specifier, importer)\n // pair is resolved once per generation.\n const generate = (uncachedResolveId: Resolver, config: ResolvedConfig): Promise<string[]> => {\n const resolutions = new Map<string, Promise<string | undefined>>()\n const resolveId: Resolver = (specifier, importer) => {\n const key = `${specifier}\\0${importer}`\n let resolved = resolutions.get(key)\n if (!resolved) {\n resolved = uncachedResolveId(specifier, importer)\n resolutions.set(key, resolved)\n }\n return resolved\n }\n return withWalkMemo(() => generateWith(resolveId, config))\n }\n const generateWith = async (resolveId: Resolver, config: ResolvedConfig): Promise<string[]> => {\n const files = await collectUiSourceFiles({\n entrypoint: paths.entrypoints,\n repositoryRoot,\n uiPackageRoot: uiRoot,\n uiSourceRoot,\n sourcePackageRoots,\n resolveId,\n label,\n })\n await options.check?.({\n command: config.command,\n repositoryRoot,\n files,\n linkedImports: (specifier) =>\n collectLinkedImports({\n entrypoint: paths.entrypoints,\n repositoryRoot,\n uiSourceRoot,\n sourcePackageRoots,\n specifier,\n resolveId,\n label,\n }),\n })\n writeIfChanged(\n paths.stylesheetPath,\n formatUiSourceDirectives({\n files,\n uiPackageRoot: uiRoot,\n stablePackagePath: paths.stablePackagePath,\n stylesheetPath: paths.stylesheetPath,\n label,\n })\n )\n writeIfChanged(\n paths.manifestPath,\n `${JSON.stringify(packageRelativePaths(files, uiRoot), null, 2)}\\n`\n )\n return files\n }\n\n return {\n name: label,\n enforce: 'pre',\n async configResolved(config) {\n repositoryRoot = realpathSync(paths.repositoryRoot)\n const resolveId = viteResolver(config)\n const entrypoint = paths.entrypoints[0]\n if (!entrypoint) throw new Error(`[${label}] no client entrypoints`)\n const manifest = await resolveId('@adea-ai/ui/package.json', entrypoint)\n if (!manifest) throw new Error(`[${label}] unable to resolve @adea-ai/ui/package.json`)\n uiRoot = realpathSync(dirname(modulePath(manifest)))\n uiSourceRoot = realpathSync(resolve(uiRoot, 'src'))\n sourcePackageRoots = await frameworkSourceRoots(resolveId, entrypoint, label)\n // Bun links the package here; a hoisted install may not, while the\n // generated directives reference the package through this stable path.\n if (!existsSync(paths.stablePackagePath)) {\n mkdirSync(dirname(paths.stablePackagePath), { recursive: true })\n symlinkSync(uiRoot, paths.stablePackagePath, 'dir')\n }\n if (realpathSync(paths.stablePackagePath) !== uiRoot)\n throw new Error(\n `[${label}] stable package link ${paths.stablePackagePath} does not resolve to ${uiRoot}`\n )\n generatedFiles = await generate(resolveId, config)\n },\n configureServer(server) {\n for (const path of options.watch ?? []) server.watcher.add(resolve(options.webRoot, path))\n },\n async handleHotUpdate({ file, modules, server }) {\n if (!generatedFiles.length || !isCodeFile(file)) return\n const previous = packageRelativePaths(generatedFiles, uiRoot).join('\\n')\n generatedFiles = await generate(viteResolver(server.config), server.config)\n if (packageRelativePaths(generatedFiles, uiRoot).join('\\n') === previous) return\n // Keep lexical graph keys; aliased roots may use their physical path instead.\n const styles =\n server.moduleGraph.getModulesByFile(normalizePath(paths.styleEntry)) ??\n server.moduleGraph.getModulesByFile(normalizePath(modulePath(paths.styleEntry)))\n if (!styles) return\n for (const module of styles) server.moduleGraph.invalidateModule(module)\n // Returning only the stylesheet would drop the edited module from the\n // update list, so keep the modules Vite already selected for the file.\n return [...new Set([...modules, ...styles])]\n },\n generateBundle(_options, bundle) {\n // Server bundles render shared UI the client never ships; Tailwind only\n // styles the client.\n const environment = (this as { environment?: { config: { consumer?: string } } }).environment\n if (environment && environment.config.consumer !== 'client') return\n const renderedIds: string[] = []\n for (const output of Object.values(bundle)) {\n if (output.type !== 'chunk') continue\n for (const [id, module] of Object.entries(output.modules)) {\n // Rolldown also records wholly tree-shaken modules with zero bytes.\n if (module.renderedLength > 0) renderedIds.push(id)\n }\n }\n if (!renderedIds.some((id) => inside(modulePath(id), uiSourceRoot)))\n this.error(`[${label}] the bundle rendered no shared UI source modules`)\n const missing = missingRenderedUiSources(renderedIds, generatedFiles, uiRoot)\n if (missing.length)\n this.error(\n `[${label}] Tailwind source discovery missed rendered shared UI modules:\\n${missing.map((path) => `- ${path}`).join('\\n')}`\n )\n },\n }\n}\n\nfunction packageRelativePaths(files: string[], uiRoot: string): string[] {\n return files.map((file) => relative(uiRoot, file).replaceAll('\\\\', '/')).toSorted()\n}\n"],"mappings":";;;;;;AAgEA,IAAM,eAAe;AAarB,IAAM,gBAAgB,IAAI,kBAA4B;AACtD,IAAM,wBAA8C,cAAc,SAAS;AAE3E,SAAS,aAAgB,MAAoC;CAC3D,IAAI,gBAAgB,GAAG,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AAC,KAAK,IAAI,MAAM,UAAU;GAE1E,MAAM,SACJ,OAAO,YAAY,iBAAiB,cAAc,MAAM,UAAU,CAAC,KACnE,OAAO,YAAY,iBAAiB,cAAc,WAAW,MAAM,UAAU,CAAC,CAAC;GACjF,IAAI,CAAC,QAAQ;GACb,KAAK,MAAM,UAAU,QAAQ,OAAO,YAAY,iBAAiB,MAAM;GAGvE,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC;EAC7C;EACA,eAAe,UAAU,QAAQ;GAG/B,MAAM,cAAe,KAA6D;GAClF,IAAI,eAAe,YAAY,OAAO,aAAa,UAAU;GAC7D,MAAM,cAAwB,CAAC;GAC/B,KAAK,MAAM,UAAU,OAAO,OAAO,MAAM,GAAG;IAC1C,IAAI,OAAO,SAAS,SAAS;IAC7B,KAAK,MAAM,CAAC,IAAI,WAAW,OAAO,QAAQ,OAAO,OAAO,GAEtD,IAAI,OAAO,iBAAiB,GAAG,YAAY,KAAK,EAAE;GAEtD;GACA,IAAI,CAAC,YAAY,MAAM,OAAO,OAAO,WAAW,EAAE,GAAG,YAAY,CAAC,GAChE,KAAK,MAAM,IAAI,MAAM,kDAAkD;GACzE,MAAM,UAAU,yBAAyB,aAAa,gBAAgB,MAAM;GAC5E,IAAI,QAAQ,QACV,KAAK,MACH,IAAI,MAAM,kEAAkE,QAAQ,KAAK,SAAS,KAAK,MAAM,CAAC,CAAC,KAAK,IAAI,GAC1H;EACJ;CACF;AACF;AAEA,SAAS,qBAAqB,OAAiB,QAA0B;CACvE,OAAO,MAAM,KAAK,SAAS,SAAS,QAAQ,IAAI,CAAC,CAAC,WAAW,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS;AACpF"}
|
|
1
|
+
{"version":3,"file":"tailwind-sources.js","names":[],"sources":["../../src/vite/tailwind-sources.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks'\nimport {\n existsSync,\n mkdirSync,\n readFileSync,\n readdirSync,\n realpathSync,\n symlinkSync,\n writeFileSync,\n} from 'node:fs'\nimport { basename, dirname, extname, isAbsolute, relative, resolve, sep } from 'node:path'\nimport {\n defaultExport,\n directRuntimeExports,\n runtimeReexports,\n dynamicRuntimeImports,\n hasRuntimeDeclaration,\n parseSource,\n type SyntaxNode,\n selectNamespace,\n staticRuntimeImports,\n} from './source-parser'\n\nimport { normalizePath, type Plugin, type ResolvedConfig } from 'vite'\n\nexport type Selection =\n | { kind: 'execute' | 'side-effect' | 'all' }\n | { kind: 'named'; names: string[] }\n\ninterface RuntimeImport {\n specifier: string\n selection: Selection\n}\n\ninterface ExportTarget {\n file: string\n selection: Selection\n}\n\ninterface ParsedModule {\n file: string\n syntax: SyntaxNode\n}\n\nexport interface SourceDiscoveryOptions {\n entrypoint: string | string[]\n repositoryRoot: string\n uiPackageRoot: string\n uiSourceRoot: string\n /** Source roots of installed packages (such as the app framework) whose shared views render UI modules. */\n sourcePackageRoots?: string[]\n resolveId(specifier: string, importer: string): Promise<string | undefined>\n /** Error-message prefix naming the consumer. */\n label?: string\n}\n\nexport interface SourceDirectiveOptions {\n files: string[]\n uiPackageRoot: string\n stablePackagePath: string\n stylesheetPath: string\n label?: string\n}\n\nconst defaultLabel = 'ui-tailwind-sources'\n\n/**\n * One walk's memo: the same files are reached, resolved and parsed many times in a walk, and the\n * checks the plugin runs walk the same graph again. It lives in the walk's async context, so a\n * nested walk (the check inside a generation) shares it, while an independent walk that overlaps\n * it (a hot update, or a second call after a file changed) starts with its own, and a later walk\n * never reads an earlier answer.\n *\n * The memo ends with its walk. Anything async the walk started that outlives it (a resolver's\n * cached promise, a timer) keeps the walk's async context, and with it the store. Left filled,\n * every walk's parsed copy of the whole graph stayed reachable: in a dev server, where every hot\n * update walks again, the heap grew by the size of the graph per edit until it ran out. A walk\n * started later from such a captured context gets a memo of its own, not the finished one.\n */\ninterface WalkMemo {\n realpaths: Map<string, string>\n modules: Map<string, ParsedModule>\n finished: boolean\n}\nconst walkMemoStore = new AsyncLocalStorage<WalkMemo>()\nconst currentWalkMemo = (): WalkMemo | undefined => {\n const memo = walkMemoStore.getStore()\n return memo && !memo.finished ? memo : undefined\n}\n\nasync function withWalkMemo<T>(walk: () => Promise<T>): Promise<T> {\n if (currentWalkMemo()) return walk()\n const memo: WalkMemo = { realpaths: new Map(), modules: new Map(), finished: false }\n try {\n return await walkMemoStore.run(memo, walk)\n } finally {\n memo.finished = true\n memo.realpaths.clear()\n memo.modules.clear()\n }\n}\n\nfunction modulePath(id: string): string {\n const withoutQuery = id.split('?')[0] ?? id\n const absolute = resolve(withoutQuery)\n const known = currentWalkMemo()?.realpaths.get(absolute)\n if (known) return known\n let file = absolute\n try {\n file = realpathSync(absolute)\n } catch {\n // A path that does not exist (yet) stands for itself.\n }\n currentWalkMemo()?.realpaths.set(absolute, file)\n return file\n}\n\nfunction inside(path: string, root: string): boolean {\n const pathFromRoot = relative(root, path)\n return (\n pathFromRoot === '' ||\n (pathFromRoot !== '..' && !pathFromRoot.startsWith(`..${sep}`) && !isAbsolute(pathFromRoot))\n )\n}\n\nfunction isWorkspaceSourceFile(\n path: string,\n repositoryRoot: string,\n sourcePackageRoots: readonly string[] = []\n): boolean {\n if (sourcePackageRoots.some((root) => inside(path, root))) return true\n if (!inside(path, repositoryRoot)) return false\n const segments = relative(repositoryRoot, path).split(sep)\n return (\n (segments[0] === 'apps' || segments[0] === 'packages') &&\n segments.includes('src') &&\n !segments.includes('node_modules')\n )\n}\n\nfunction isCodeFile(path: string): boolean {\n return ['.ts', '.tsx', '.mts', '.cts', '.js', '.jsx', '.mjs', '.cjs'].includes(extname(path))\n}\n\nfunction readModule(path: string, cache: Map<string, ParsedModule>): ParsedModule {\n const file = modulePath(path)\n const cached = cache.get(file)\n if (cached) return cached\n const source = readFileSync(file, 'utf8')\n const parsed: ParsedModule = { file, syntax: parseSource(file, source) }\n cache.set(file, parsed)\n return parsed\n}\n\n// A module's runtime imports depend only on its parsed source, and a walk asks for them each time\n// it reaches the module with another selection.\nconst runtimeImportsByModule = new WeakMap<ParsedModule, RuntimeImport[]>()\n\nfunction runtimeImports(parsed: ParsedModule, label: string): RuntimeImport[] {\n const known = runtimeImportsByModule.get(parsed)\n if (known) return known\n const imports = moduleRuntimeImports(parsed, label)\n runtimeImportsByModule.set(parsed, imports)\n return imports\n}\n\nfunction moduleRuntimeImports(parsed: ParsedModule, label: string): RuntimeImport[] {\n const imports: RuntimeImport[] = []\n\n for (const entry of staticRuntimeImports(parsed.syntax)) {\n if (entry.kind === 'side-effect') {\n imports.push({\n specifier: entry.specifier,\n selection: { kind: 'side-effect' },\n })\n continue\n }\n const namespace = entry.bindings.find((binding) => binding.imported === '*')\n if (namespace) {\n const selection = selectNamespace(parsed.syntax, namespace.local)\n if (selection) imports.push({ specifier: entry.specifier, selection })\n } else {\n imports.push({\n specifier: entry.specifier,\n selection: {\n kind: 'named',\n names: [...new Set(entry.bindings.map((binding) => binding.imported))].toSorted(),\n },\n })\n }\n }\n\n imports.push(...dynamicRuntimeImports(parsed.syntax, parsed.file, label))\n return imports\n}\n\nfunction localRuntimeBinding(\n file: string,\n localName: string,\n cache: Map<string, ParsedModule>\n): RuntimeImport | undefined {\n const parsed = readModule(file, cache)\n for (const entry of staticRuntimeImports(parsed.syntax)) {\n const binding = entry.bindings.find((candidate) => candidate.local === localName)\n if (binding)\n return {\n specifier: entry.specifier,\n selection:\n binding.imported === '*' ? { kind: 'all' } : { kind: 'named', names: [binding.imported] },\n }\n }\n return undefined\n}\n\nfunction hasLocalRuntimeBinding(\n file: string,\n localName: string,\n cache: Map<string, ParsedModule>\n): boolean {\n return hasRuntimeDeclaration(readModule(file, cache).syntax, localName)\n}\n\nfunction modifierExport(file: string, name: string, cache: Map<string, ParsedModule>): boolean {\n return directRuntimeExports(readModule(file, cache).syntax).includes(name)\n}\n\nexport function collectUiSourceFiles(options: SourceDiscoveryOptions): Promise<string[]> {\n return withWalkMemo(() => walkUiSourceFiles(options))\n}\n\nasync function walkUiSourceFiles(options: SourceDiscoveryOptions): Promise<string[]> {\n const label = options.label ?? defaultLabel\n const repositoryRoot = realpathSync(options.repositoryRoot)\n const uiSourceRoot = realpathSync(options.uiSourceRoot)\n const sourcePackageRoots = (options.sourcePackageRoots ?? []).map((root) => realpathSync(root))\n const entrypoints = (\n Array.isArray(options.entrypoint) ? options.entrypoint : [options.entrypoint]\n ).map((entrypoint) => realpathSync(entrypoint))\n const cache = currentWalkMemo()?.modules ?? new Map<string, ParsedModule>()\n const visited = new Set<string>()\n const files = new Set<string>()\n const publishedUiResolutions: string[] = []\n\n const resolveImport = async (\n specifier: string,\n importer: string,\n selection: Selection\n ): Promise<void> => {\n const importerIsUi = inside(importer, uiSourceRoot)\n const isPublishedUiImport = specifier === '@adea-ai/ui' || specifier.startsWith('@adea-ai/ui/')\n const resolved = await options.resolveId(specifier, importer)\n if (isPublishedUiImport)\n publishedUiResolutions.push(`${specifier} -> ${resolved ?? '(unresolved)'}`)\n if (!resolved) {\n if (isPublishedUiImport || importerIsUi)\n throw new Error(\n `[${label}] unable to resolve runtime import '${specifier}' from ${importer}`\n )\n return\n }\n\n const target = modulePath(resolved)\n if (!isCodeFile(target)) return\n if (isPublishedUiImport && !inside(target, uiSourceRoot)) {\n throw new Error(`[${label}] '${specifier}' resolved outside published UI source: ${target}`)\n }\n if (\n inside(target, uiSourceRoot) ||\n isWorkspaceSourceFile(target, repositoryRoot, sourcePackageRoots)\n ) {\n await visit(target, selection)\n return\n }\n }\n\n const resolveExportTargets = async (\n file: string,\n name: string,\n chain: Set<string>\n ): Promise<ExportTarget[]> => {\n const key = `${file}\\0${name}`\n if (chain.has(key)) return []\n const nextChain = new Set(chain).add(key)\n const parsed = readModule(file, cache)\n const targets: ExportTarget[] = []\n\n if (modifierExport(file, name, cache)) targets.push({ file, selection: { kind: 'execute' } })\n\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (entry.kind === 'empty') continue\n if (entry.kind === 'named' && !entry.source) {\n if (entry.exported !== name) continue\n const imported = localRuntimeBinding(file, entry.imported, cache)\n if (imported) {\n const resolved = await options.resolveId(imported.specifier, file)\n if (resolved)\n targets.push({\n file: modulePath(resolved),\n selection: imported.selection,\n })\n else if (inside(file, uiSourceRoot))\n throw new Error(\n `[${label}] unable to resolve local re-export '${imported.specifier}' from ${file}`\n )\n } else if (hasLocalRuntimeBinding(file, entry.imported, cache))\n targets.push({ file, selection: { kind: 'execute' } })\n continue\n }\n if (\n !entry.source ||\n (entry.kind !== 'star' && entry.exported !== name) ||\n (entry.kind === 'star' && name === 'default')\n )\n continue\n if (entry.source === '@lucide/solid') {\n targets.push({ file, selection: { kind: 'execute' } })\n continue\n }\n const resolved = await options.resolveId(entry.source, file)\n if (!resolved) {\n if (inside(file, uiSourceRoot) && entry.kind !== 'namespace')\n throw new Error(`[${label}] unable to resolve re-export '${entry.source}' from ${file}`)\n continue\n }\n if (entry.kind === 'star')\n targets.push(...(await resolveExportTargets(modulePath(resolved), name, nextChain)))\n else if (entry.kind === 'namespace')\n targets.push({\n file: modulePath(resolved),\n selection: { kind: 'all' },\n })\n else\n targets.push({\n file: modulePath(resolved),\n selection: { kind: 'named', names: [entry.imported] },\n })\n }\n if (name === 'default') {\n const entry = defaultExport(parsed.syntax)\n if (entry?.kind === 'identifier') {\n const imported = localRuntimeBinding(file, entry.name, cache)\n if (imported) {\n const resolved = await options.resolveId(imported.specifier, file)\n if (resolved)\n targets.push({\n file: modulePath(resolved),\n selection: imported.selection,\n })\n } else targets.push({ file, selection: { kind: 'execute' } })\n } else if (entry) targets.push({ file, selection: { kind: 'execute' } })\n }\n\n return deduplicateTargets(targets)\n }\n\n const runtimeExportNames = async (file: string, chain: Set<string>): Promise<string[]> => {\n if (chain.has(file)) return []\n const nextChain = new Set(chain).add(file)\n const parsed = readModule(file, cache)\n const names = new Set(directRuntimeExports(parsed.syntax))\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (!entry.source) {\n if (entry.kind === 'named') names.add(entry.exported)\n continue\n }\n if (entry.kind === 'star' && entry.source === '@lucide/solid') continue\n const resolved = await options.resolveId(entry.source, file)\n if (!resolved) {\n if (inside(file, uiSourceRoot))\n throw new Error(`[${label}] unable to resolve re-export '${entry.source}' from ${file}`)\n continue\n }\n if (entry.kind === 'named' || entry.kind === 'namespace') names.add(entry.exported)\n else if (entry.kind === 'star')\n for (const name of await runtimeExportNames(modulePath(resolved), nextChain))\n if (name !== 'default') names.add(name)\n }\n return [...names].toSorted()\n }\n\n const visit = async (path: string, selection: Selection): Promise<void> => {\n const file = modulePath(path)\n if (!isCodeFile(file)) return\n if (\n !inside(file, uiSourceRoot) &&\n !isWorkspaceSourceFile(file, repositoryRoot, sourcePackageRoots)\n )\n return\n const key = `${file}\\0${selection.kind === 'named' ? selection.names.join(',') : selection.kind}`\n if (visited.has(key)) return\n visited.add(key)\n const parsed = readModule(file, cache)\n const isUiSource = inside(file, uiSourceRoot)\n if (isUiSource) files.add(file)\n\n const moduleImports = runtimeImports(parsed, label)\n // Follow all runtime imports of every visited module. Even when a module\n // is reached through a side-effect import, its own imports may execute\n // setup code or register UI components needed by the consumer.\n for (const dependency of moduleImports) {\n await resolveImport(dependency.specifier, file, dependency.selection)\n }\n\n if (selection.kind === 'execute' || selection.kind === 'side-effect') return\n const names =\n selection.kind === 'named' ? selection.names : await runtimeExportNames(file, new Set())\n for (const name of names) {\n const targets = await resolveExportTargets(file, name, new Set())\n if (!targets.length) {\n throw new Error(`[${label}] unable to resolve runtime export '${name}' from ${file}`)\n }\n for (const target of targets) await visit(target.file, target.selection)\n }\n }\n\n for (const entrypoint of entrypoints) await visit(entrypoint, { kind: 'execute' })\n if (files.size === 0)\n throw new Error(\n `[${label}] the client import graph resolved no shared UI source files from ${entrypoints.join(', ')}; package imports: ${publishedUiResolutions.slice(0, 8).join('; ') || '(none)'}`\n )\n return [...files].toSorted()\n}\n\nfunction deduplicateTargets(targets: ExportTarget[]): ExportTarget[] {\n const unique = new Map<string, ExportTarget>()\n for (const target of targets) {\n const key = `${target.file}\\0${target.selection.kind === 'named' ? target.selection.names.join(',') : target.selection.kind}`\n unique.set(key, target)\n }\n return [...unique.values()]\n}\n\nfunction filesBelow(directory: string): string[] {\n return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {\n const path = resolve(directory, entry.name)\n if (entry.isDirectory()) return filesBelow(path)\n return entry.isFile() ? [path] : []\n })\n}\n\n/**\n * Tailwind's scanner widens a file `@source` to that file's whole directory\n * tree, so a reached `button/button.tsx` would also pull in an unused sibling\n * (and a reached package-root barrel would pull in every component). Negate\n * every file in those trees the import graph did not reach to keep discovery\n * exact to the module.\n */\nexport function formatUiSourceDirectives(options: SourceDirectiveOptions): string {\n const label = options.label ?? defaultLabel\n const packageRoot = realpathSync(options.uiPackageRoot)\n const stylesheetDirectory = dirname(resolve(options.stylesheetPath))\n const directive = (file: string, negated: boolean) => {\n if (!inside(file, packageRoot))\n throw new Error(`[${label}] source is outside published package: ${file}`)\n const stableFile = resolve(options.stablePackagePath, relative(packageRoot, file))\n const relativePath = relative(stylesheetDirectory, stableFile).replaceAll('\\\\', '/')\n if (isAbsolute(relativePath))\n throw new Error(`[${label}] generated source path is not portable: ${relativePath}`)\n return `@source ${negated ? 'not ' : ''}'${relativePath}';`\n }\n const included = [...new Set(options.files.map((path) => realpathSync(path)))].toSorted()\n const includedSet = new Set(included)\n const scannedTrees = [...new Set(included.map((file) => dirname(file)))]\n .toSorted()\n .filter((directory, index, all) => !all.slice(0, index).some((root) => inside(directory, root)))\n const excluded = scannedTrees\n .flatMap((directory) => filesBelow(directory))\n .filter((file) => !includedSet.has(file))\n .toSorted()\n return `${[\n ...included.map((file) => directive(file, false)),\n ...excluded.map((file) => directive(file, true)),\n ].join('\\n')}\\n`\n}\n\n/**\n * The rendered shared UI source modules (by package-relative path) that the\n * generated directives do not cover. Ids may carry Vite query suffixes.\n */\nexport function missingRenderedUiSources(\n renderedIds: string[],\n generatedFiles: string[],\n uiRoot: string\n): string[] {\n const uiSourceRoot = resolve(uiRoot, 'src')\n const generated = new Set(generatedFiles.map((file) => modulePath(file)))\n return [\n ...new Set(\n renderedIds\n .map((id) => modulePath(id))\n .filter((file) => isCodeFile(file) && inside(file, uiSourceRoot) && !generated.has(file))\n .map((file) => relative(uiRoot, file).replaceAll('\\\\', '/'))\n ),\n ].toSorted()\n}\n\nfunction writeIfChanged(path: string, content: string) {\n let current: string | undefined\n try {\n current = readFileSync(path, 'utf8')\n } catch {\n // The first invocation creates the ignored generated file.\n }\n if (current === content) return\n mkdirSync(dirname(path), { recursive: true })\n writeFileSync(path, content)\n}\n\n/**\n * The framework package's published `src` directory holding `file`: the\n * nearest `src` ancestor whose parent is the @adea-ai/app-framework package.\n * Its views live in subdirectories (`src/views`) and import across `src`.\n */\nfunction frameworkSourceRoot(file: string): string {\n for (\n let directory = dirname(file);\n dirname(directory) !== directory;\n directory = dirname(directory)\n ) {\n if (basename(directory) !== 'src') continue\n try {\n const manifest = JSON.parse(readFileSync(resolve(directory, '../package.json'), 'utf8')) as {\n name?: unknown\n }\n if (manifest.name === '@adea-ai/app-framework') return directory\n } catch {\n // Not the package root; keep walking up.\n }\n }\n return dirname(file)\n}\n\n/**\n * The framework's shared views (Help Center and friends) import shared UI\n * modules from its published source, so its graph counts as the app's.\n */\nexport async function frameworkSourceRoots(\n resolveId: (specifier: string, importer: string) => Promise<string | undefined>,\n entrypoint: string,\n label = defaultLabel\n): Promise<string[]> {\n const framework = await resolveId('@adea-ai/app-framework/app-help', entrypoint)\n if (!framework) return []\n const root = frameworkSourceRoot(realpathSync(modulePath(framework)))\n if (basename(root) !== 'src')\n throw new Error(\n `[${label}] @adea-ai/app-framework resolved outside its published source: ${root}`\n )\n return [root]\n}\n\nexport interface LinkedImport {\n /** The shared UI source module that imports or re-exports the specifier. */\n file: string\n selection: Selection\n}\n\nexport interface LinkedImportOptions {\n entrypoint: string | string[]\n repositoryRoot: string\n uiSourceRoot: string\n sourcePackageRoots?: string[]\n /** The external package whose uses inside shared UI source are reported. */\n specifier: string\n resolveId(specifier: string, importer: string): Promise<string | undefined>\n label?: string\n}\n\n/**\n * Every use of `specifier` inside shared UI source the dev server links.\n *\n * Vite serves the published package as native ESM, so static imports and\n * re-exports are linked even when the consumer selects one root-barrel name,\n * unlike the selective walk the Tailwind sources come from. Literal dynamic\n * imports are included without executing them, so a lazy feature cannot fail\n * later on an import the check never saw.\n */\nexport function collectLinkedImports(options: LinkedImportOptions): Promise<LinkedImport[]> {\n return withWalkMemo(() => walkLinkedImports(options))\n}\n\nasync function walkLinkedImports(options: LinkedImportOptions): Promise<LinkedImport[]> {\n const label = options.label ?? defaultLabel\n const repositoryRoot = realpathSync(options.repositoryRoot)\n const uiSourceRoot = realpathSync(options.uiSourceRoot)\n const sourcePackageRoots = (options.sourcePackageRoots ?? []).map((root) => realpathSync(root))\n const entrypoints = (\n Array.isArray(options.entrypoint) ? options.entrypoint : [options.entrypoint]\n ).map((entrypoint) => realpathSync(entrypoint))\n const cache = currentWalkMemo()?.modules ?? new Map<string, ParsedModule>()\n const visited = new Set<string>()\n const linked: LinkedImport[] = []\n const reached = (file: string) =>\n isCodeFile(file) &&\n (inside(file, uiSourceRoot) || isWorkspaceSourceFile(file, repositoryRoot, sourcePackageRoots))\n\n const visit = async (path: string): Promise<void> => {\n const file = modulePath(path)\n if (!reached(file) || visited.has(file)) return\n visited.add(file)\n const inUi = inside(file, uiSourceRoot)\n const parsed = readModule(file, cache)\n const record = (selection: Selection) => {\n if (inUi) linked.push({ file, selection })\n }\n const follow = async (specifier: string, kind: string): Promise<void> => {\n const resolved = await options.resolveId(specifier, file)\n if (!resolved) {\n if (inUi || specifier === '@adea-ai/ui' || specifier.startsWith('@adea-ai/ui/'))\n throw new Error(`[${label}] unable to resolve ${kind} '${specifier}' from ${file}`)\n return\n }\n await visit(resolved)\n }\n\n for (const dependency of runtimeImports(parsed, label)) {\n if (dependency.specifier === options.specifier) record(dependency.selection)\n else await follow(dependency.specifier, 'runtime import')\n }\n for (const entry of runtimeReexports(parsed.syntax)) {\n if (!entry.source) continue\n if (entry.source !== options.specifier) await follow(entry.source, 're-export')\n else if (entry.kind === 'named') record({ kind: 'named', names: [entry.imported] })\n else if (entry.kind === 'empty') record({ kind: 'named', names: [] })\n else record({ kind: 'all' })\n }\n }\n\n for (const entrypoint of entrypoints) await visit(entrypoint)\n return linked\n}\n\nexport interface GraphCheckContext {\n command: ResolvedConfig['command']\n repositoryRoot: string\n /** The shared UI source modules the client graph reaches. */\n files: string[]\n /** Uses of an external package inside the shared UI source the dev server links. */\n linkedImports(specifier: string): Promise<LinkedImport[]>\n}\n\nexport interface TailwindSourcesOptions {\n /** Names the plugin, its errors and the generated `<name>-ui-tailwind-sources` cache files. */\n name: string\n /** The Vite root of the consuming app. */\n webRoot: string\n /** Client entry modules, relative to `webRoot`. */\n entrypoints: string[]\n /** The stylesheet that imports the generated directives, relative to `webRoot`. */\n styleEntry: string\n /** The monorepo root whose `apps/*` and `packages/*` sources count as the app's. Defaults to `webRoot/../..`. */\n repositoryRoot?: string\n /** More paths the dev server watches, relative to `webRoot`. */\n watch?: string[]\n /** Runs after each generation, in dev and in builds, to enforce app-specific graph rules. */\n check?(context: GraphCheckContext): void | Promise<void>\n}\n\nexport interface UiSourcePaths {\n entrypoints: string[]\n repositoryRoot: string\n stablePackagePath: string\n stylesheetPath: string\n manifestPath: string\n styleEntry: string\n}\n\n// The generated directives live in the ignored Vite cache next to the stable\n// package link they reference, so every path in them stays checkout-relative.\nexport function uiSourcePaths(options: TailwindSourcesOptions): UiSourcePaths {\n const { webRoot, name } = options\n return {\n entrypoints: options.entrypoints.map((entrypoint) => resolve(webRoot, entrypoint)),\n repositoryRoot: resolve(webRoot, options.repositoryRoot ?? '../..'),\n stablePackagePath: resolve(webRoot, 'node_modules/@adea-ai/ui'),\n stylesheetPath: resolve(webRoot, `node_modules/.cache/${name}-ui-tailwind-sources.css`),\n manifestPath: resolve(webRoot, `node_modules/.cache/${name}-ui-tailwind-sources.json`),\n styleEntry: resolve(webRoot, options.styleEntry),\n }\n}\n\ntype Resolver = (specifier: string, importer: string) => Promise<string | undefined>\n\nfunction viteResolver(config: ResolvedConfig): Resolver {\n const resolver = config.createResolver()\n return (specifier, importer) => resolver(specifier, importer, false, false)\n}\n\n/**\n * Generate Tailwind `@source` directives for exactly the published shared UI\n * modules the app's client graph reaches (static, re-exported and literal lazy\n * imports), instead of scanning every component the package ships. The client\n * build then fails if Rolldown rendered a shared UI module the directives\n * missed, so a discovery gap can never ship unstyled.\n */\nexport function tailwindSources(options: TailwindSourcesOptions): Plugin {\n const label = `${options.name}-ui-tailwind-sources`\n const paths = uiSourcePaths(options)\n let uiRoot = ''\n let uiSourceRoot = ''\n let sourcePackageRoots: string[] = []\n let repositoryRoot = ''\n let generatedFiles: string[] = []\n\n // The discovery walk and the consumer's check share one memo, and each (specifier, importer)\n // pair is resolved once per generation.\n const generate = (uncachedResolveId: Resolver, config: ResolvedConfig): Promise<string[]> => {\n const resolutions = new Map<string, Promise<string | undefined>>()\n const resolveId: Resolver = (specifier, importer) => {\n const key = `${specifier}\\0${importer}`\n let resolved = resolutions.get(key)\n if (!resolved) {\n resolved = uncachedResolveId(specifier, importer)\n resolutions.set(key, resolved)\n }\n return resolved\n }\n return withWalkMemo(() => generateWith(resolveId, config))\n }\n const generateWith = async (resolveId: Resolver, config: ResolvedConfig): Promise<string[]> => {\n const files = await collectUiSourceFiles({\n entrypoint: paths.entrypoints,\n repositoryRoot,\n uiPackageRoot: uiRoot,\n uiSourceRoot,\n sourcePackageRoots,\n resolveId,\n label,\n })\n await options.check?.({\n command: config.command,\n repositoryRoot,\n files,\n linkedImports: (specifier) =>\n collectLinkedImports({\n entrypoint: paths.entrypoints,\n repositoryRoot,\n uiSourceRoot,\n sourcePackageRoots,\n specifier,\n resolveId,\n label,\n }),\n })\n writeIfChanged(\n paths.stylesheetPath,\n formatUiSourceDirectives({\n files,\n uiPackageRoot: uiRoot,\n stablePackagePath: paths.stablePackagePath,\n stylesheetPath: paths.stylesheetPath,\n label,\n })\n )\n writeIfChanged(\n paths.manifestPath,\n `${JSON.stringify(packageRelativePaths(files, uiRoot), null, 2)}\\n`\n )\n return files\n }\n\n return {\n name: label,\n enforce: 'pre',\n async configResolved(config) {\n repositoryRoot = realpathSync(paths.repositoryRoot)\n const resolveId = viteResolver(config)\n const entrypoint = paths.entrypoints[0]\n if (!entrypoint) throw new Error(`[${label}] no client entrypoints`)\n const manifest = await resolveId('@adea-ai/ui/package.json', entrypoint)\n if (!manifest) throw new Error(`[${label}] unable to resolve @adea-ai/ui/package.json`)\n uiRoot = realpathSync(dirname(modulePath(manifest)))\n uiSourceRoot = realpathSync(resolve(uiRoot, 'src'))\n sourcePackageRoots = await frameworkSourceRoots(resolveId, entrypoint, label)\n // Bun links the package here; a hoisted install may not, while the\n // generated directives reference the package through this stable path.\n if (!existsSync(paths.stablePackagePath)) {\n mkdirSync(dirname(paths.stablePackagePath), { recursive: true })\n symlinkSync(uiRoot, paths.stablePackagePath, 'dir')\n }\n if (realpathSync(paths.stablePackagePath) !== uiRoot)\n throw new Error(\n `[${label}] stable package link ${paths.stablePackagePath} does not resolve to ${uiRoot}`\n )\n generatedFiles = await generate(resolveId, config)\n },\n configureServer(server) {\n for (const path of options.watch ?? []) server.watcher.add(resolve(options.webRoot, path))\n },\n async handleHotUpdate({ file, modules, server }) {\n if (!generatedFiles.length || !isCodeFile(file)) return\n const previous = packageRelativePaths(generatedFiles, uiRoot).join('\\n')\n generatedFiles = await generate(viteResolver(server.config), server.config)\n if (packageRelativePaths(generatedFiles, uiRoot).join('\\n') === previous) return\n // Keep lexical graph keys; aliased roots may use their physical path instead.\n const styles =\n server.moduleGraph.getModulesByFile(normalizePath(paths.styleEntry)) ??\n server.moduleGraph.getModulesByFile(normalizePath(modulePath(paths.styleEntry)))\n if (!styles) return\n for (const module of styles) server.moduleGraph.invalidateModule(module)\n // Returning only the stylesheet would drop the edited module from the\n // update list, so keep the modules Vite already selected for the file.\n return [...new Set([...modules, ...styles])]\n },\n generateBundle(_options, bundle) {\n // Server bundles render shared UI the client never ships; Tailwind only\n // styles the client.\n const environment = (this as { environment?: { config: { consumer?: string } } }).environment\n if (environment && environment.config.consumer !== 'client') return\n const renderedIds: string[] = []\n for (const output of Object.values(bundle)) {\n if (output.type !== 'chunk') continue\n for (const [id, module] of Object.entries(output.modules)) {\n // Rolldown also records wholly tree-shaken modules with zero bytes.\n if (module.renderedLength > 0) renderedIds.push(id)\n }\n }\n if (!renderedIds.some((id) => inside(modulePath(id), uiSourceRoot)))\n this.error(`[${label}] the bundle rendered no shared UI source modules`)\n const missing = missingRenderedUiSources(renderedIds, generatedFiles, uiRoot)\n if (missing.length)\n this.error(\n `[${label}] Tailwind source discovery missed rendered shared UI modules:\\n${missing.map((path) => `- ${path}`).join('\\n')}`\n )\n },\n }\n}\n\nfunction packageRelativePaths(files: string[], uiRoot: string): string[] {\n return files.map((file) => relative(uiRoot, file).replaceAll('\\\\', '/')).toSorted()\n}\n"],"mappings":";;;;;;AAgEA,IAAM,eAAe;AAoBrB,IAAM,gBAAgB,IAAI,kBAA4B;AACtD,IAAM,wBAA8C;CAClD,MAAM,OAAO,cAAc,SAAS;CACpC,OAAO,QAAQ,CAAC,KAAK,WAAW,OAAO,KAAA;AACzC;AAEA,eAAe,aAAgB,MAAoC;CACjE,IAAI,gBAAgB,GAAG,OAAO,KAAK;CACnC,MAAM,OAAiB;EAAE,2BAAW,IAAI,IAAI;EAAG,yBAAS,IAAI,IAAI;EAAG,UAAU;CAAM;CACnF,IAAI;EACF,OAAO,MAAM,cAAc,IAAI,MAAM,IAAI;CAC3C,UAAU;EACR,KAAK,WAAW;EAChB,KAAK,UAAU,MAAM;EACrB,KAAK,QAAQ,MAAM;CACrB;AACF;AAEA,SAAS,WAAW,IAAoB;CACtC,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,CAAC,MAAM;CACzC,MAAM,WAAW,QAAQ,YAAY;CACrC,MAAM,QAAQ,gBAAgB,CAAC,EAAE,UAAU,IAAI,QAAQ;CACvD,IAA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S,GAAG,MAAM,CAAC,CAAC;EAC7C;EACA,eAAe,UAAU,QAAQ;GAG/B,MAAM,cAAe,KAA6D;GAClF,IAAI,eAAe,YAAY,OAAO,aAAa,UAAU;GAC7D,MAAM,cAAwB,CAAC;GAC/B,KAAK,MAAM,UAAU,OAAO,OAAO,MAAM,GAAG;IAC1C,IAAI,OAAO,SAAS,SAAS;IAC7B,KAAK,MAAM,CAAC,IAAI,WAAW,OAAO,QAAQ,OAAO,OAAO,GAEtD,IAAI,OAAO,iBAAiB,GAAG,YAAY,KAAK,EAAE;GAEtD;GACA,IAAI,CAAC,YAAY,MAAM,OAAO,OAAO,WAAW,EAAE,GAAG,YAAY,CAAC,GAChE,KAAK,MAAM,IAAI,MAAM,kDAAkD;GACzE,MAAM,UAAU,yBAAyB,aAAa,gBAAgB,MAAM;GAC5E,IAAI,QAAQ,QACV,KAAK,MACH,IAAI,MAAM,kEAAkE,QAAQ,KAAK,SAAS,KAAK,MAAM,CAAC,CAAC,KAAK,IAAI,GAC1H;EACJ;CACF;AACF;AAEA,SAAS,qBAAqB,OAAiB,QAA0B;CACvE,OAAO,MAAM,KAAK,SAAS,SAAS,QAAQ,IAAI,CAAC,CAAC,WAAW,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS;AACpF"}
|
package/package.json
CHANGED
|
@@ -209,7 +209,7 @@ function SwatchItem(props: { id: string; label: string; row: boolean; children:
|
|
|
209
209
|
class={cn(
|
|
210
210
|
'flex cursor-pointer items-center justify-center rounded-full border border-border p-0.5 outline-none',
|
|
211
211
|
props.row ? 'size-6' : 'size-7',
|
|
212
|
-
'focus-visible:border-ring focus-visible:
|
|
212
|
+
'focus-visible:border-ring focus-visible:focus-outline',
|
|
213
213
|
'data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary',
|
|
214
214
|
'data-[disabled]:pointer-events-none data-[disabled]:opacity-50'
|
|
215
215
|
)}
|
|
@@ -191,7 +191,7 @@ function DragArea(props: {
|
|
|
191
191
|
data-slot="custom-color-area"
|
|
192
192
|
class={cn(
|
|
193
193
|
'relative w-full cursor-crosshair touch-none border border-border outline-none',
|
|
194
|
-
'focus-visible:
|
|
194
|
+
'focus-visible:focus-outline',
|
|
195
195
|
props.class
|
|
196
196
|
)}
|
|
197
197
|
style={props.style}
|
|
@@ -95,7 +95,7 @@ function AccentSwatch(props: { id: string; label: string; color: string; row: bo
|
|
|
95
95
|
return (
|
|
96
96
|
<div
|
|
97
97
|
data-accent-option={props.id}
|
|
98
|
-
class={cn('rounded-full focus-within:
|
|
98
|
+
class={cn('rounded-full focus-within:focus-outline', {
|
|
99
99
|
'flex justify-center': props.row,
|
|
100
100
|
})}
|
|
101
101
|
>
|
|
@@ -70,10 +70,7 @@ export function ModeChoices(props: AppearanceEditorProps) {
|
|
|
70
70
|
{(option) => {
|
|
71
71
|
const Icon = MODE_ICONS[option.value]
|
|
72
72
|
return (
|
|
73
|
-
<div
|
|
74
|
-
data-mode={option.value}
|
|
75
|
-
class="min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50"
|
|
76
|
-
>
|
|
73
|
+
<div data-mode={option.value} class="min-w-0 rounded-lg focus-within:focus-outline">
|
|
77
74
|
<SdkRadio
|
|
78
75
|
value={option.value}
|
|
79
76
|
class="flex w-full cursor-pointer flex-col gap-2 rounded-lg border p-2 text-center text-xs outline-none data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
@@ -265,7 +262,7 @@ export function GlassChoices(props: AppearanceEditorProps) {
|
|
|
265
262
|
>
|
|
266
263
|
<For each={SURFACES}>
|
|
267
264
|
{(option) => (
|
|
268
|
-
<div class="rounded-md focus-within:
|
|
265
|
+
<div class="rounded-md focus-within:focus-outline">
|
|
269
266
|
<SdkRadio
|
|
270
267
|
value={option.value}
|
|
271
268
|
title={
|
|
@@ -313,7 +313,7 @@ function Details(props: { details: ConfirmationDetails }) {
|
|
|
313
313
|
role="region"
|
|
314
314
|
aria-label="Proposed changes"
|
|
315
315
|
tabindex="0"
|
|
316
|
-
class="max-h-64 overflow-auto rounded-xl outline-none focus-visible:
|
|
316
|
+
class="max-h-64 overflow-auto rounded-xl outline-none focus-visible:focus-outline-inset"
|
|
317
317
|
>
|
|
318
318
|
<DiffBlock
|
|
319
319
|
patch={(diff() as Extract<ConfirmationDetails, { kind: 'diff' }>).patch}
|