@adea-ai/ui 0.162.15 → 0.162.17

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.
@@ -2,6 +2,7 @@ import {
2
2
  Brain as LucideBrain,
3
3
  Check as LucideCheck,
4
4
  ChevronsUpDown as LucideChevronsUpDown,
5
+ Sparkles as LucideSparkles,
5
6
  } from '@lucide/solid'
6
7
  import { createEffect, createMemo, createSignal, createUniqueId, For, Show } from 'solid-js'
7
8
  import { type JSX } from '@solidjs/web'
@@ -45,6 +46,7 @@ import { menuItem } from '../../../lib/overlay'
45
46
  const Brain = fastIcon(LucideBrain)
46
47
  const Check = fastIcon(LucideCheck)
47
48
  const ChevronsUpDown = fastIcon(LucideChevronsUpDown)
49
+ const Sparkles = fastIcon(LucideSparkles)
48
50
 
49
51
  /**
50
52
  * ModelSelector.
@@ -102,6 +104,20 @@ const ChevronsUpDown = fastIcon(LucideChevronsUpDown)
102
104
  * The searchable layouts trap focus while open: Tab and Shift+Tab move between
103
105
  * the tabs, the search box and the footer instead of leaving the popover, which
104
106
  * would close it.
107
+ *
108
+ * ## One scroll
109
+ *
110
+ * A searchable panel never scrolls and is never taller than the room on its
111
+ * side of the trigger: the tabs, the search box and the footer stay put, and
112
+ * the list is its only scroll, shrinking to what is left in a short window.
113
+ *
114
+ * ## Trigger
115
+ *
116
+ * With `providerIcon` (and always in the tabs layout) the trigger leads with a
117
+ * mark, as every composer pill leads with its icon: the selected model's
118
+ * provider, the footer's `icon` while the footer is chosen, else a generic
119
+ * model mark. A composer that folds its pills to their icons when narrow then
120
+ * folds this one too, whatever is selected.
105
121
  */
106
122
  export type ModelSelectorFooter = {
107
123
  label: string
@@ -289,15 +305,28 @@ function ModelTrigger(props: {
289
305
  value?: string
290
306
  footer?: ModelSelectorFooter
291
307
  empty: boolean
292
- /** The list layouts' trigger mark: the selected model's provider, when the host draws marks. */
308
+ /** Lead with a mark whatever is selected: the layouts that draw provider marks. */
309
+ marked: boolean
310
+ /** The provider's mark; without it a provider is drawn as its initial. */
293
311
  providerIcon?: (provider: string) => JSX.Element
294
312
  }) {
313
+ const footerIcon = () => (props.footer?.selected ? props.footer.icon : undefined)
314
+ const provider = () => (props.footer?.selected ? undefined : props.selected?.provider)
295
315
  return (
296
316
  <>
297
- <Show when={props.providerIcon && !props.footer?.selected && props.selected?.provider}>
298
- {(provider) => <ProviderGlyph provider={provider()} icon={props.providerIcon} />}
299
- </Show>
300
- <Show when={props.footer?.selected && props.footer.icon}>
317
+ <Show
318
+ when={footerIcon()}
319
+ fallback={
320
+ <Show when={props.marked}>
321
+ <Show
322
+ when={provider()}
323
+ fallback={<Sparkles aria-hidden="true" data-slot="model-selector-mark" />}
324
+ >
325
+ {(name) => <ProviderGlyph provider={name()} icon={props.providerIcon} />}
326
+ </Show>
327
+ </Show>
328
+ }
329
+ >
301
330
  {(icon) => (
302
331
  <span aria-hidden="true" class="inline-flex size-4 shrink-0 items-center justify-center">
303
332
  {icon()}
@@ -342,6 +371,7 @@ function ModelMenu(props: PickerProps) {
342
371
  value={props.value}
343
372
  footer={props.footer}
344
373
  empty={props.models.length === 0}
374
+ marked={props.providerIcon !== undefined}
345
375
  providerIcon={props.providerIcon}
346
376
  />
347
377
  </DropdownMenuTrigger>
@@ -425,7 +455,7 @@ function PaletteFooter(props: {
425
455
  onDone: () => void
426
456
  }) {
427
457
  return (
428
- <div data-slot="model-selector-footer" class="border-t border-border p-1">
458
+ <div data-slot="model-selector-footer" class="shrink-0 border-t border-border p-1">
429
459
  <button
430
460
  type="button"
431
461
  aria-pressed={props.footer.selected ? 'true' : 'false'}
@@ -447,6 +477,12 @@ function PaletteFooter(props: {
447
477
  )
448
478
  }
449
479
 
480
+ /**
481
+ * A searchable picker's panel: a column that clips, no taller than the room on its side of the
482
+ * trigger (`--available-height`, which the positioning writes), so its list is the one scroll.
483
+ */
484
+ const palettePanel = 'flex max-h-(--available-height) w-80 max-w-full flex-col overflow-hidden'
485
+
450
486
  function ModelSearch(props: PickerProps) {
451
487
  const [open, setOpen] = createSignal(false)
452
488
  const groups = createMemo(() => groupModels(props.models))
@@ -481,19 +517,22 @@ function ModelSearch(props: PickerProps) {
481
517
  value={props.value}
482
518
  footer={props.footer}
483
519
  empty={false}
520
+ marked={props.providerIcon !== undefined}
484
521
  providerIcon={props.providerIcon}
485
522
  />
486
523
  </PopoverTrigger>
487
524
  {/* One scroll, the list's: the panel is a column that clips instead of scrolling (its arrow
488
- hung below it and gave it a second scrollbar), and the list shrinks to the room left. */}
489
- <PopoverContent hideArrow class="flex w-80 max-w-full flex-col overflow-hidden">
525
+ hung below it and gave it a second scrollbar). It is no taller than the room on its side
526
+ of the trigger, and the list shrinks to what is left, so the search box stays in view. */}
527
+ <PopoverContent hideArrow class={palettePanel}>
490
528
  <Command
529
+ class="min-h-0"
491
530
  label="Choose a model"
492
531
  defaultValue={props.selected ? modelSearchValue(props.selected).trim() : undefined}
493
532
  >
494
533
  <CommandInput placeholder="Search models" />
495
534
  <CommandEmpty>No model matches.</CommandEmpty>
496
- <CommandList>
535
+ <CommandList class="min-h-0">
497
536
  <For each={groups()}>
498
537
  {(group) => (
499
538
  <CommandGroup heading={group.provider}>
@@ -604,20 +643,19 @@ function ModelTabs(props: PickerProps & { providerIcon?: (provider: string) => J
604
643
  aria-disabled={inert() ? 'true' : undefined}
605
644
  aria-describedby={props.describedBy}
606
645
  >
607
- <Show when={!props.footer?.selected && groupOf(props.selected)}>
608
- {(provider) => <ProviderGlyph provider={provider()} icon={props.providerIcon} />}
609
- </Show>
610
646
  <ModelTrigger
611
647
  selected={props.selected}
612
648
  value={props.value}
613
649
  footer={props.footer}
614
650
  empty={props.models.length === 0}
651
+ marked
652
+ providerIcon={props.providerIcon}
615
653
  />
616
654
  </PopoverTrigger>
617
655
  <PopoverContent
618
656
  ref={(element: HTMLDivElement) => (content = element)}
619
657
  hideArrow
620
- class="flex w-80 max-w-full flex-col overflow-hidden p-0"
658
+ class={cn(palettePanel, 'p-0')}
621
659
  onOpenAutoFocus={(event: Event) => {
622
660
  event.preventDefault()
623
661
  focusSearch()
@@ -629,7 +667,7 @@ function ModelTabs(props: PickerProps & { providerIcon?: (provider: string) => J
629
667
  setTab(next)
630
668
  focusSearch()
631
669
  }}
632
- class="gap-0"
670
+ class="min-h-0 gap-0"
633
671
  >
634
672
  <TabsList fill scrollable aria-label="Providers" class="px-1.5 pt-1">
635
673
  <For each={groups()}>
@@ -649,6 +687,7 @@ function ModelTabs(props: PickerProps & { providerIcon?: (provider: string) => J
649
687
  {(group) => (
650
688
  <TabsContent value={group.provider} class="flex flex-col">
651
689
  <Command
690
+ class="min-h-0"
652
691
  label={`${group.provider} models`}
653
692
  defaultValue={
654
693
  props.selected && group.models.includes(props.selected)
@@ -658,7 +697,7 @@ function ModelTabs(props: PickerProps & { providerIcon?: (provider: string) => J
658
697
  >
659
698
  <CommandInput placeholder="Search models" />
660
699
  <CommandEmpty>No model matches.</CommandEmpty>
661
- <CommandList>
700
+ <CommandList class="min-h-0">
662
701
  <For each={group.models}>
663
702
  {(model) => (
664
703
  <CommandItem
@@ -259,7 +259,9 @@ export function MessageComposer(props: MessageComposerProps) {
259
259
  <PromptInputTools>
260
260
  <Show when={local.leading}>{(leadingSlot) => <>{leadingSlot()}</>}</Show>
261
261
  </PromptInputTools>
262
- <PromptInputTools>
262
+ {/* The send control never gives way: when the row runs out of room the leading tools (a
263
+ host's pills) truncate, while the trailing ones keep their size. */}
264
+ <PromptInputTools class="shrink-0">
263
265
  <Show when={local.trailing}>{(trailingSlot) => <>{trailingSlot()}</>}</Show>
264
266
  <PromptInputSubmit
265
267
  status={sending() ? 'submitted' : 'ready'}
@@ -334,7 +334,7 @@ export function CommandInput(props: CommandInputProps) {
334
334
  return (
335
335
  <div
336
336
  data-slot="command-input-wrapper"
337
- class="flex h-11 items-center gap-2 border-b border-border px-3"
337
+ class="flex h-11 shrink-0 items-center gap-2 border-b border-border px-3"
338
338
  >
339
339
  <Search class="size-4 shrink-0 text-muted-foreground" aria-hidden="true" />
340
340
  <CommandInputPrimitive
@@ -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,2GAA2G;IAC3G,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC3E,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAmJD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAEvF;AAoND;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CA0BhF;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EAAE,EACrB,cAAc,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B;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 = () => walkMemoStore.getStore();
10
- function withWalkMemo(walk) {
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
- return walkMemoStore.run({
15
+ const memo = {
13
16
  realpaths: /* @__PURE__ */ new Map(),
14
- modules: /* @__PURE__ */ new Map()
15
- }, walk);
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,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[],"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,CA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ACb,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.162.15",
3
+ "version": "0.162.17",
4
4
  "description": "The Adea design system: ui-sdk-backed Solid components, semantic OKLCH tokens, and the app-shell layout primitives shared by Adea and Cortana.",
5
5
  "keywords": [
6
6
  "adea",