@askrjs/themes 0.0.19 → 0.0.21

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.
Files changed (202) hide show
  1. package/README.md +24 -3
  2. package/THEMING.md +11 -4
  3. package/dist/components/_internal/block-layout.js +1 -1
  4. package/dist/components/_internal/block-layout.js.map +1 -1
  5. package/dist/components/_internal/style.js +9 -21
  6. package/dist/components/_internal/style.js.map +1 -1
  7. package/dist/components/grid/grid.js +5 -42
  8. package/dist/components/grid/grid.js.map +1 -1
  9. package/dist/components/jsx-types.d.ts +0 -3
  10. package/dist/components/theme/theme.js +11 -12
  11. package/dist/components/theme/theme.js.map +1 -1
  12. package/dist/entries/accordion.d.ts +1 -0
  13. package/dist/entries/accordion.js +1 -0
  14. package/dist/entries/alert-dialog.d.ts +1 -0
  15. package/dist/entries/alert-dialog.js +1 -0
  16. package/dist/entries/alert.d.ts +4 -0
  17. package/dist/entries/alert.js +2 -0
  18. package/dist/entries/aspect-ratio.d.ts +4 -0
  19. package/dist/entries/aspect-ratio.js +2 -0
  20. package/dist/entries/avatar.d.ts +1 -0
  21. package/dist/entries/avatar.js +1 -0
  22. package/dist/entries/badge.d.ts +4 -0
  23. package/dist/entries/badge.js +2 -0
  24. package/dist/entries/breadcrumb.d.ts +2 -0
  25. package/dist/entries/breadcrumb.js +2 -0
  26. package/dist/entries/button-group.d.ts +4 -0
  27. package/dist/entries/button-group.js +2 -0
  28. package/dist/entries/button.d.ts +1 -0
  29. package/dist/entries/button.js +1 -0
  30. package/dist/entries/calendar.d.ts +2 -0
  31. package/dist/entries/calendar.js +2 -0
  32. package/dist/entries/card.d.ts +4 -0
  33. package/dist/entries/card.js +2 -0
  34. package/dist/entries/carousel.d.ts +2 -0
  35. package/dist/entries/carousel.js +2 -0
  36. package/dist/entries/checkbox.d.ts +1 -0
  37. package/dist/entries/checkbox.js +1 -0
  38. package/dist/entries/collapsible.d.ts +1 -0
  39. package/dist/entries/collapsible.js +1 -0
  40. package/dist/entries/combobox.d.ts +2 -0
  41. package/dist/entries/combobox.js +2 -0
  42. package/dist/entries/command.d.ts +2 -0
  43. package/dist/entries/command.js +2 -0
  44. package/dist/entries/context-menu.d.ts +3 -0
  45. package/dist/entries/context-menu.js +3 -0
  46. package/dist/entries/data-table.d.ts +2 -0
  47. package/dist/entries/data-table.js +2 -0
  48. package/dist/entries/date-picker.d.ts +2 -0
  49. package/dist/entries/date-picker.js +2 -0
  50. package/dist/entries/dialog.d.ts +1 -0
  51. package/dist/entries/dialog.js +1 -0
  52. package/dist/entries/direction.d.ts +2 -0
  53. package/dist/entries/direction.js +2 -0
  54. package/dist/entries/drawer.d.ts +2 -0
  55. package/dist/entries/drawer.js +2 -0
  56. package/dist/entries/dropdown-menu.d.ts +3 -0
  57. package/dist/entries/dropdown-menu.js +3 -0
  58. package/dist/entries/empty.d.ts +2 -0
  59. package/dist/entries/empty.js +2 -0
  60. package/dist/entries/field.d.ts +4 -0
  61. package/dist/entries/field.js +2 -0
  62. package/dist/entries/form.d.ts +1 -0
  63. package/dist/entries/form.js +1 -0
  64. package/dist/entries/hover-card.d.ts +1 -0
  65. package/dist/entries/hover-card.js +1 -0
  66. package/dist/entries/input-group.d.ts +4 -0
  67. package/dist/entries/input-group.js +2 -0
  68. package/dist/entries/input-otp.d.ts +2 -0
  69. package/dist/entries/input-otp.js +2 -0
  70. package/dist/entries/input.d.ts +1 -0
  71. package/dist/entries/input.js +1 -0
  72. package/dist/entries/item.d.ts +2 -0
  73. package/dist/entries/item.js +2 -0
  74. package/dist/entries/kbd.d.ts +2 -0
  75. package/dist/entries/kbd.js +2 -0
  76. package/dist/entries/label.d.ts +1 -0
  77. package/dist/entries/label.js +1 -0
  78. package/dist/entries/menubar.d.ts +1 -0
  79. package/dist/entries/menubar.js +1 -0
  80. package/dist/entries/native-select.d.ts +2 -0
  81. package/dist/entries/native-select.js +2 -0
  82. package/dist/entries/navigation-menu.d.ts +2 -0
  83. package/dist/entries/navigation-menu.js +2 -0
  84. package/dist/entries/pagination.d.ts +2 -0
  85. package/dist/entries/pagination.js +2 -0
  86. package/dist/entries/popover.d.ts +1 -0
  87. package/dist/entries/popover.js +1 -0
  88. package/dist/entries/progress.d.ts +1 -0
  89. package/dist/entries/progress.js +1 -0
  90. package/dist/entries/radio-group.d.ts +1 -0
  91. package/dist/entries/radio-group.js +1 -0
  92. package/dist/entries/resizable.d.ts +2 -0
  93. package/dist/entries/resizable.js +2 -0
  94. package/dist/entries/scroll-area.d.ts +1 -0
  95. package/dist/entries/scroll-area.js +1 -0
  96. package/dist/entries/select.d.ts +1 -0
  97. package/dist/entries/select.js +1 -0
  98. package/dist/entries/separator.d.ts +4 -0
  99. package/dist/entries/separator.js +2 -0
  100. package/dist/entries/sheet.d.ts +3 -0
  101. package/dist/entries/sheet.js +3 -0
  102. package/dist/entries/sidebar.d.ts +4 -0
  103. package/dist/entries/sidebar.js +2 -0
  104. package/dist/entries/skeleton.d.ts +4 -0
  105. package/dist/entries/skeleton.js +2 -0
  106. package/dist/entries/slider.d.ts +1 -0
  107. package/dist/entries/slider.js +1 -0
  108. package/dist/entries/sonner.d.ts +2 -0
  109. package/dist/entries/sonner.js +2 -0
  110. package/dist/entries/spinner.d.ts +4 -0
  111. package/dist/entries/spinner.js +2 -0
  112. package/dist/entries/switch.d.ts +1 -0
  113. package/dist/entries/switch.js +1 -0
  114. package/dist/entries/table.d.ts +1 -0
  115. package/dist/entries/table.js +1 -0
  116. package/dist/entries/tabs.d.ts +4 -0
  117. package/dist/entries/tabs.js +3 -0
  118. package/dist/entries/textarea.d.ts +1 -0
  119. package/dist/entries/textarea.js +1 -0
  120. package/dist/entries/toast.d.ts +1 -0
  121. package/dist/entries/toast.js +1 -0
  122. package/dist/entries/toggle-group.d.ts +1 -0
  123. package/dist/entries/toggle-group.js +1 -0
  124. package/dist/entries/toggle.d.ts +1 -0
  125. package/dist/entries/toggle.js +1 -0
  126. package/dist/entries/tooltip.d.ts +1 -0
  127. package/dist/entries/tooltip.js +1 -0
  128. package/dist/entries/typography.d.ts +2 -0
  129. package/dist/entries/typography.js +2 -0
  130. package/dist/ssr.js +23 -11
  131. package/dist/ssr.js.map +1 -1
  132. package/dist/themes/default/index.css +1 -1
  133. package/package.json +25 -240
  134. package/src/components/_internal/block-layout.ts +2 -2
  135. package/src/components/_internal/style.ts +8 -26
  136. package/src/components/grid/grid.tsx +6 -57
  137. package/src/components/jsx-types.ts +0 -5
  138. package/src/components/theme/theme.tsx +22 -22
  139. package/src/entries/accordion.ts +1 -0
  140. package/src/entries/alert-dialog.ts +1 -0
  141. package/src/entries/alert.ts +1 -0
  142. package/src/entries/aspect-ratio.ts +1 -0
  143. package/src/entries/avatar.ts +1 -0
  144. package/src/entries/badge.ts +1 -0
  145. package/src/entries/breadcrumb.ts +9 -0
  146. package/src/entries/button-group.ts +1 -0
  147. package/src/entries/button.ts +1 -0
  148. package/src/entries/calendar.ts +14 -0
  149. package/src/entries/card.ts +1 -0
  150. package/src/entries/carousel.ts +7 -0
  151. package/src/entries/checkbox.ts +1 -0
  152. package/src/entries/collapsible.ts +1 -0
  153. package/src/entries/combobox.ts +1 -0
  154. package/src/entries/command.ts +13 -0
  155. package/src/entries/context-menu.ts +10 -0
  156. package/src/entries/data-table.ts +1 -0
  157. package/src/entries/date-picker.ts +1 -0
  158. package/src/entries/dialog.ts +1 -0
  159. package/src/entries/direction.ts +1 -0
  160. package/src/entries/drawer.ts +10 -0
  161. package/src/entries/dropdown-menu.ts +10 -0
  162. package/src/entries/empty.ts +8 -0
  163. package/src/entries/field.ts +1 -0
  164. package/src/entries/form.ts +1 -0
  165. package/src/entries/hover-card.ts +1 -0
  166. package/src/entries/input-group.ts +1 -0
  167. package/src/entries/input-otp.ts +1 -0
  168. package/src/entries/input.ts +1 -0
  169. package/src/entries/item.ts +11 -0
  170. package/src/entries/kbd.ts +1 -0
  171. package/src/entries/label.ts +1 -0
  172. package/src/entries/menubar.ts +1 -0
  173. package/src/entries/native-select.ts +1 -0
  174. package/src/entries/navigation-menu.ts +10 -0
  175. package/src/entries/pagination.ts +9 -0
  176. package/src/entries/popover.ts +1 -0
  177. package/src/entries/progress.ts +1 -0
  178. package/src/entries/radio-group.ts +1 -0
  179. package/src/entries/resizable.ts +1 -0
  180. package/src/entries/scroll-area.ts +1 -0
  181. package/src/entries/select.ts +1 -0
  182. package/src/entries/separator.ts +1 -0
  183. package/src/entries/sheet.ts +14 -0
  184. package/src/entries/sidebar.ts +1 -0
  185. package/src/entries/skeleton.ts +1 -0
  186. package/src/entries/slider.ts +1 -0
  187. package/src/entries/sonner.ts +1 -0
  188. package/src/entries/spinner.ts +1 -0
  189. package/src/entries/switch.ts +1 -0
  190. package/src/entries/table.ts +1 -0
  191. package/src/entries/tabs.ts +2 -0
  192. package/src/entries/textarea.ts +1 -0
  193. package/src/entries/toast.ts +1 -0
  194. package/src/entries/toggle-group.ts +1 -0
  195. package/src/entries/toggle.ts +1 -0
  196. package/src/entries/tooltip.ts +1 -0
  197. package/src/entries/typography.ts +12 -0
  198. package/src/parity.ts +3 -3
  199. package/src/ssr.ts +45 -20
  200. package/src/themes/default/foundations.css +6 -0
  201. package/src/themes/default/tokens.css +1 -1
  202. package/templates/theme/tokens.css +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { defineScope, getSignal, readScope, state } from \"@askrjs/askr\";\nimport type { JSXElement } from \"@askrjs/askr/foundations/structures\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeScopeValue = {\n theme: () => ThemeName;\n resolvedSystemTheme: () => \"light\" | \"dark\";\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeScopeProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\nconst STATIC_CHILDREN = Symbol.for(\"askr.static-children\");\nconst STATIC_CHILD_SLOTS_CACHE = Symbol.for(\"__askrStaticChildSlots\");\nconst documentThemeCoordinators = new WeakMap<Document, ThemeCoordinator>();\ntype ThemeCoordinator = ReturnType<typeof createThemeCoordinator>;\ntype InternalThemeScopeValue = ThemeScopeValue & {\n readonly coordinator: ThemeCoordinator | null;\n readonly depth: number;\n};\n\nconst ThemeScopeContext = defineScope<InternalThemeScopeValue>({\n theme: () => \"system\",\n resolvedSystemTheme: () => \"light\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n coordinator: null,\n depth: -1,\n});\n\nexport function theme(): ThemeScopeValue {\n return readScope(ThemeScopeContext);\n}\n\nexport function ThemeScope(props: ThemeScopeProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const scopeId = state<symbol>(Symbol(\"ThemeScope\"))();\n const scopeSignal = getSignal();\n // The first render must be identical on the server and in the browser.\n // Browser persistence is adopted from the committed root ref, after Askr's\n // hydration verifier has accepted the server markup.\n const themeState = state<ThemeName>(defaultTheme);\n const localResolvedSystemTheme = state<\"light\" | \"dark\">(\"light\");\n const persistenceAdoption = state({ complete: false })();\n const currentTheme = themeState();\n const parentScope = readScope(ThemeScopeContext);\n const ownedCoordinator = state<ThemeCoordinator>(getDefaultThemeCoordinator())();\n const coordinator = parentScope.coordinator ?? ownedCoordinator;\n const scopeDepth = parentScope.depth + 1;\n coordinator.register(scopeId, scopeDepth, currentTheme, scopeSignal, (nextTheme) => {\n if (themeState() !== nextTheme) themeState.set(nextTheme);\n });\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n coordinator.activate(scopeId, nextTheme);\n };\n\n const resolvedSystemTheme = parentScope.coordinator\n ? parentScope.resolvedSystemTheme\n : localResolvedSystemTheme;\n const value: InternalThemeScopeValue = {\n theme: themeState,\n resolvedSystemTheme,\n setTheme,\n themes,\n storageKey,\n coordinator,\n depth: scopeDepth,\n };\n\n return (\n <ThemeScopeContext value={value}>\n <div\n data-slot=\"theme-scope\"\n ref={\n parentScope.coordinator === null\n ? (element: HTMLElement | null) => {\n coordinator.attach(\n element,\n (nextTheme) => localResolvedSystemTheme.set(nextTheme),\n scopeSignal,\n );\n if (element && typeof window !== \"undefined\") {\n const onStorage = (event: StorageEvent) => {\n let storageMatches = event.storageArea == null;\n try {\n storageMatches ||= event.storageArea === window.localStorage;\n } catch {\n // Locked-down/private contexts may deny access to localStorage.\n }\n if (!storageMatches || event.key !== storageKey) {\n return;\n }\n const nextTheme = event.newValue as ThemeName | null;\n if (!nextTheme) return;\n themeState.set(nextTheme);\n coordinator.activate(scopeId, nextTheme);\n };\n window.addEventListener(\"storage\", onStorage);\n scopeSignal.addEventListener(\n \"abort\",\n () => window.removeEventListener(\"storage\", onStorage),\n { once: true },\n );\n }\n if (!element || persistenceAdoption.complete) return;\n persistenceAdoption.complete = true;\n const storedTheme = readStoredTheme(storageKey);\n if (storedTheme && storedTheme !== themeState()) {\n themeState.set(storedTheme);\n coordinator.activate(scopeId, storedTheme);\n }\n }\n : undefined\n }\n >\n {children}\n </div>\n </ThemeScopeContext>\n );\n}\n\nfunction getDefaultThemeCoordinator(): ThemeCoordinator {\n if (typeof document === \"undefined\") {\n return createThemeCoordinator();\n }\n\n const existing = documentThemeCoordinators.get(document);\n if (existing) return existing;\n\n const coordinator = createThemeCoordinator();\n documentThemeCoordinators.set(document, coordinator);\n return coordinator;\n}\n\nfunction createThemeCoordinator() {\n const scopes = new Map<\n symbol,\n {\n depth: number;\n sequence: number;\n theme: ThemeName;\n signal: AbortSignal;\n onThemeChange: (themeName: ThemeName) => void;\n }\n >();\n let nextSequence = 0;\n let explicitOwner: symbol | undefined;\n let root: Node | null = null;\n let scheduled = false;\n\n const target = (): HTMLElement | null => {\n if (root?.nodeType === 9) return (root as Document).documentElement;\n if (root && \"host\" in root) return (root as ShadowRoot).host as HTMLElement;\n return typeof document === \"undefined\" ? null : document.documentElement;\n };\n const syncActive = (): void => {\n if (explicitOwner !== undefined) return;\n let candidate: { depth: number; sequence: number; theme: ThemeName } | undefined;\n for (const scope of scopes.values()) {\n if (\n !candidate ||\n scope.depth > candidate.depth ||\n (scope.depth === candidate.depth && scope.sequence > candidate.sequence)\n ) {\n candidate = scope;\n }\n }\n if (candidate) syncThemeTarget(target(), candidate.theme);\n };\n const schedule = (): void => {\n if (typeof document === \"undefined\" || scheduled) return;\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n syncActive();\n }, 0);\n };\n\n return Object.freeze({\n attach(\n element: HTMLElement | null,\n onResolvedSystemTheme: (themeName: \"light\" | \"dark\") => void,\n signal: AbortSignal,\n ) {\n if (element) root = element.getRootNode();\n if (element && typeof window !== \"undefined\" && typeof window.matchMedia === \"function\") {\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const update = () => onResolvedSystemTheme(media.matches ? \"dark\" : \"light\");\n update();\n media.addEventListener?.(\"change\", update);\n signal.addEventListener(\"abort\", () => media.removeEventListener?.(\"change\", update), {\n once: true,\n });\n }\n schedule();\n },\n register(\n id: symbol,\n depth: number,\n themeName: ThemeName,\n signal: AbortSignal,\n onThemeChange: (themeName: ThemeName) => void,\n ) {\n const existing = scopes.get(id);\n scopes.set(id, {\n depth,\n sequence: existing?.sequence ?? nextSequence++,\n theme: themeName,\n signal,\n onThemeChange,\n });\n if (!existing) {\n signal.addEventListener(\n \"abort\",\n () => {\n scopes.delete(id);\n if (explicitOwner === id) explicitOwner = undefined;\n schedule();\n },\n { once: true },\n );\n }\n schedule();\n },\n activate(id: symbol, themeName: ThemeName) {\n const scope = scopes.get(id);\n if (scope) scope.theme = themeName;\n explicitOwner = id;\n const ownerDepth = scope?.depth;\n for (const [scopeId, registered] of scopes) {\n if (scopeId !== id && registered.depth === ownerDepth) {\n registered.theme = themeName;\n registered.onThemeChange(themeName);\n }\n }\n syncThemeTarget(target(), themeName);\n },\n });\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const activeTheme = theme();\n const { themes = activeTheme.themes, label = \"Theme\", ...rest } = props;\n const currentTheme = activeTheme.theme();\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={currentTheme}\n onChange={(event: Event) => {\n const target = getThemePickerTarget(event);\n if (target) {\n activeTheme.setTheme(target.value as ThemeName);\n }\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value} selected={option.value === currentTheme}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nfunction getThemePickerTarget(event: Event): HTMLSelectElement | null {\n if (typeof HTMLSelectElement === \"undefined\") {\n return null;\n }\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const candidates = [event.target, event.currentTarget, ...path];\n\n for (const candidate of candidates) {\n if (candidate instanceof HTMLSelectElement) {\n return candidate;\n }\n }\n\n return null;\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const activeTheme = theme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = activeTheme.theme();\n const nextTheme = getNextTheme(currentTheme, themes, activeTheme.resolvedSystemTheme());\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const renderedIcon = cloneThemeToggleIcon(themedIcon, currentTheme);\n const renderedIconSlots =\n renderThemeToggleIconSlots(currentTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n }) ?? renderedIcon;\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? renderedIconSlots);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented && !Object.is(nextTheme, currentTheme)) {\n activeTheme.setTheme(nextTheme);\n }\n }}\n >\n <span data-slot=\"theme-toggle-content\">{content}</span>\n </Button>\n );\n}\n\nfunction getNextTheme(\n currentTheme: ThemeName,\n themes: readonly ThemeName[],\n resolvedSystemTheme: \"light\" | \"dark\" = \"light\",\n): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n if (index < 0 && currentTheme === \"system\") {\n if (themes.includes(\"light\") && themes.includes(\"dark\")) {\n return resolvedSystemTheme === \"dark\" ? \"light\" : \"dark\";\n }\n }\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction renderThemeToggleIconSlots(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (getThemeIcon(theme, icons) === undefined) {\n return undefined;\n }\n\n const slots = [\n [\"light\", icons.lightIcon],\n [\"dark\", icons.darkIcon],\n [\"system\", icons.systemIcon],\n ] as const;\n const availableSlots = slots.filter(([, icon]) => icon !== undefined && icon !== null);\n\n if (availableSlots.length <= 1) {\n return undefined;\n }\n\n return availableSlots.map(([slotTheme, icon]) => (\n <span\n key={slotTheme}\n data-slot=\"theme-toggle-icon\"\n data-theme-toggle-icon={slotTheme}\n hidden={slotTheme === theme ? undefined : true}\n >\n {cloneThemeToggleIcon(icon, slotTheme)}\n </span>\n ));\n}\n\nfunction isJSXElement(value: unknown): value is JSXElement {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$typeof\" in value &&\n \"type\" in value &&\n \"props\" in value\n );\n}\n\nfunction cloneThemeToggleIcon(icon: unknown, key?: string): unknown {\n if (Array.isArray(icon)) {\n const clonedChildren = icon.map((child) => cloneThemeToggleIcon(child));\n if ((icon as unknown as Record<symbol, unknown>)[STATIC_CHILDREN] === true) {\n Object.defineProperty(clonedChildren, STATIC_CHILDREN, {\n value: true,\n configurable: true,\n });\n }\n return clonedChildren;\n }\n\n if (!isJSXElement(icon)) return icon;\n\n const props = icon.props as Record<string, unknown> | undefined;\n const clonedProps = props ? { ...props } : {};\n\n if (\"children\" in clonedProps) {\n clonedProps.children = cloneThemeToggleIcon(clonedProps.children);\n }\n\n const iconKey = (icon.key ?? key ?? null) as string | number | null;\n const clonedIcon = {\n ...icon,\n key: iconKey,\n props: clonedProps,\n };\n\n delete (clonedIcon as Record<symbol, unknown>)[STATIC_CHILD_SLOTS_CACHE];\n return clonedIcon;\n}\n\nfunction syncThemeTarget(\n html: HTMLElement | null,\n themeChoice: ThemeName | null | undefined,\n): void {\n if (!html) return;\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n return storedTheme ? (storedTheme as ThemeName) : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":";;;;AAMA,MAAa,kBAAkB;CAAC;CAAS;CAAU;CAAU;CAAU;AAAO;AA+C9E,MAAa,wBAAgD;CAC3D;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;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I,CAAC,MAAM;CAEX,IAAI,eAAe,MAAM;EACvB,KAAK,gBAAgB,YAAY;EACjC,KAAK,gBAAgB,mBAAmB;EACxC;CACF;CAEA,KAAK,aAAa,qBAAqB,WAAW;CAElD,IAAI,gBAAgB,UAClB,KAAK,gBAAgB,YAAY;MAEjC,KAAK,aAAa,cAAc,WAAW;AAE/C;AAEA,SAAS,gBAAgB,YAA2C;CAClE,IAAI,OAAO,WAAW,aAAa,OAAO,KAAA;CAC1C,IAAI;EACF,MAAM,cAAc,OAAO,aAAa,QAAQ,UAAU;EAC1D,OAAO,cAAe,cAA4B,KAAA;CACpD,QAAQ;EACN;CACF;AACF;AAEA,SAAS,iBAAiB,YAAoB,OAAwB;CACpE,IAAI,OAAO,WAAW,aAAa;CACnC,IAAI;EACF,OAAO,aAAa,QAAQ,YAAY,KAAK;CAC/C,QAAQ,CAER;AACF"}
1
+ {"version":3,"file":"theme.js","names":[],"sources":["../../../src/components/theme/theme.tsx"],"sourcesContent":["import type { JSX } from \"@askrjs/askr/jsx-runtime\";\nimport { defineScope, getSignal, readScope, state } from \"@askrjs/askr\";\nimport { cloneElement, isElement, type JSXElement } from \"@askrjs/askr/foundations/structures\";\nimport { Button } from \"@askrjs/ui\";\nimport type { ButtonNativeProps, PressEvent } from \"@askrjs/ui\";\n\nexport const CAT_THEME_NAMES = [\"tabby\", \"ginger\", \"tuxedo\", \"calico\", \"torty\"] as const;\n\nexport type CatThemeName = (typeof CAT_THEME_NAMES)[number];\nexport type ThemeName = \"light\" | \"dark\" | \"system\" | CatThemeName | (string & {});\n\nexport type ThemeOption = {\n value: ThemeName;\n label: string;\n};\n\nexport type ThemeScopeValue = {\n theme: () => ThemeName;\n resolvedSystemTheme: () => \"light\" | \"dark\";\n setTheme: (theme: ThemeName) => void;\n themes: readonly ThemeOption[];\n storageKey: string;\n};\n\nexport type ThemeScopeProps = {\n children?: unknown;\n defaultTheme?: ThemeName;\n themes?: readonly ThemeOption[];\n storageKey?: string;\n};\n\nexport type ThemePickerProps = Omit<\n JSX.IntrinsicElements[\"select\"],\n \"children\" | \"value\" | \"defaultValue\" | \"onChange\"\n> & {\n themes?: readonly ThemeOption[];\n label?: string;\n};\n\nexport type ThemeToggleRenderContext = {\n theme: ThemeName;\n nextTheme: ThemeName;\n};\n\nexport type ThemeToggleProps = Omit<ButtonNativeProps, \"children\" | \"onPress\"> & {\n children?: unknown | ((context: ThemeToggleRenderContext) => unknown);\n lightIcon?: unknown;\n darkIcon?: unknown;\n systemIcon?: unknown;\n themes?: readonly ThemeName[];\n onPress?: (event: PressEvent) => void;\n};\n\nexport const DEFAULT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"system\", label: \"System\" },\n { value: \"light\", label: \"Light\" },\n { value: \"dark\", label: \"Dark\" },\n];\n\nexport const CAT_THEME_OPTIONS: readonly ThemeOption[] = [\n { value: \"tabby\", label: \"Tabby\" },\n { value: \"ginger\", label: \"Ginger\" },\n { value: \"tuxedo\", label: \"Tuxedo\" },\n { value: \"calico\", label: \"Calico\" },\n { value: \"torty\", label: \"Torty\" },\n];\n\nconst DEFAULT_STORAGE_KEY = \"askr-theme\";\nconst STATIC_CHILDREN = Symbol.for(\"askr.static-children\");\nconst documentThemeCoordinators = new WeakMap<Document, ThemeCoordinator>();\ntype ThemeCoordinator = ReturnType<typeof createThemeCoordinator>;\ntype InternalThemeScopeValue = ThemeScopeValue & {\n readonly coordinator: ThemeCoordinator | null;\n readonly depth: number;\n};\n\nconst ThemeScopeContext = defineScope<InternalThemeScopeValue>({\n theme: () => \"system\",\n resolvedSystemTheme: () => \"light\",\n setTheme: () => undefined,\n themes: DEFAULT_THEME_OPTIONS,\n storageKey: DEFAULT_STORAGE_KEY,\n coordinator: null,\n depth: -1,\n});\n\nexport function theme(): ThemeScopeValue {\n return readScope(ThemeScopeContext);\n}\n\nexport function ThemeScope(props: ThemeScopeProps): JSX.Element {\n const {\n children,\n defaultTheme = \"system\",\n themes = DEFAULT_THEME_OPTIONS,\n storageKey = DEFAULT_STORAGE_KEY,\n } = props;\n\n const scopeId = state<symbol>(Symbol(\"ThemeScope\"))();\n const scopeSignal = getSignal();\n // The first render must be identical on the server and in the browser.\n // Browser persistence is adopted from the committed root ref, after Askr's\n // hydration verifier has accepted the server markup.\n const themeState = state<ThemeName>(defaultTheme);\n const localResolvedSystemTheme = state<\"light\" | \"dark\">(\"light\");\n const persistenceAdoption = state({ complete: false })();\n const currentTheme = themeState();\n const parentScope = readScope(ThemeScopeContext);\n const ownedCoordinator = state<ThemeCoordinator>(getDefaultThemeCoordinator())();\n const coordinator = parentScope.coordinator ?? ownedCoordinator;\n const scopeDepth = parentScope.depth + 1;\n coordinator.register(scopeId, scopeDepth, currentTheme, scopeSignal, (nextTheme) => {\n if (themeState() !== nextTheme) themeState.set(nextTheme);\n });\n\n const setTheme = (nextTheme: ThemeName) => {\n themeState.set(nextTheme);\n writeStoredTheme(storageKey, nextTheme);\n coordinator.activate(scopeId, nextTheme);\n };\n\n const resolvedSystemTheme = parentScope.coordinator\n ? parentScope.resolvedSystemTheme\n : localResolvedSystemTheme;\n const value: InternalThemeScopeValue = {\n theme: themeState,\n resolvedSystemTheme,\n setTheme,\n themes,\n storageKey,\n coordinator,\n depth: scopeDepth,\n };\n\n return (\n <ThemeScopeContext value={value}>\n <div\n data-slot=\"theme-scope\"\n ref={\n parentScope.coordinator === null\n ? (element: HTMLElement | null) => {\n coordinator.attach(\n element,\n (nextTheme) => localResolvedSystemTheme.set(nextTheme),\n scopeSignal,\n );\n if (element && typeof window !== \"undefined\") {\n const onStorage = (event: StorageEvent) => {\n let storageMatches = event.storageArea == null;\n try {\n storageMatches ||= event.storageArea === window.localStorage;\n } catch {\n // Locked-down/private contexts may deny access to localStorage.\n }\n if (!storageMatches || event.key !== storageKey) {\n return;\n }\n const nextTheme = event.newValue as ThemeName | null;\n if (!nextTheme) return;\n themeState.set(nextTheme);\n coordinator.activate(scopeId, nextTheme);\n };\n window.addEventListener(\"storage\", onStorage);\n scopeSignal.addEventListener(\n \"abort\",\n () => window.removeEventListener(\"storage\", onStorage),\n { once: true },\n );\n }\n if (!element || persistenceAdoption.complete) return;\n persistenceAdoption.complete = true;\n const storedTheme = readStoredTheme(storageKey);\n if (storedTheme && storedTheme !== themeState()) {\n themeState.set(storedTheme);\n coordinator.activate(scopeId, storedTheme);\n }\n }\n : undefined\n }\n >\n {children}\n </div>\n </ThemeScopeContext>\n );\n}\n\nfunction getDefaultThemeCoordinator(): ThemeCoordinator {\n if (typeof document === \"undefined\") {\n return createThemeCoordinator();\n }\n\n const existing = documentThemeCoordinators.get(document);\n if (existing) return existing;\n\n const coordinator = createThemeCoordinator();\n documentThemeCoordinators.set(document, coordinator);\n return coordinator;\n}\n\nfunction removeEmptyGeneratedStyleRegistries(root: Node | null): void {\n const ownerDocument =\n root?.nodeType === 9\n ? (root as Document)\n : (root?.ownerDocument ?? (typeof document === \"undefined\" ? null : document));\n if (!ownerDocument) return;\n\n for (const registry of ownerDocument.querySelectorAll<HTMLStyleElement>(\n \"style[data-askr-style-registry]\",\n )) {\n if (!registry.textContent?.trim()) registry.remove();\n }\n}\n\nfunction createThemeCoordinator() {\n const scopes = new Map<\n symbol,\n {\n depth: number;\n sequence: number;\n theme: ThemeName;\n signal: AbortSignal;\n onThemeChange: (themeName: ThemeName) => void;\n }\n >();\n let nextSequence = 0;\n let explicitOwner: symbol | undefined;\n let root: Node | null = null;\n let scheduled = false;\n\n const target = (): HTMLElement | null => {\n if (root?.nodeType === 9) return (root as Document).documentElement;\n if (root && \"host\" in root) return (root as ShadowRoot).host as HTMLElement;\n return typeof document === \"undefined\" ? null : document.documentElement;\n };\n const syncActive = (): void => {\n if (explicitOwner !== undefined) return;\n let candidate: { depth: number; sequence: number; theme: ThemeName } | undefined;\n for (const scope of scopes.values()) {\n if (\n !candidate ||\n scope.depth > candidate.depth ||\n (scope.depth === candidate.depth && scope.sequence > candidate.sequence)\n ) {\n candidate = scope;\n }\n }\n if (candidate) syncThemeTarget(target(), candidate.theme);\n };\n const schedule = (): void => {\n if (typeof document === \"undefined\" || scheduled) return;\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n syncActive();\n if (scopes.size === 0) removeEmptyGeneratedStyleRegistries(root);\n }, 0);\n };\n\n return Object.freeze({\n attach(\n element: HTMLElement | null,\n onResolvedSystemTheme: (themeName: \"light\" | \"dark\") => void,\n signal: AbortSignal,\n ) {\n if (element) root = element.getRootNode();\n if (element && typeof window !== \"undefined\" && typeof window.matchMedia === \"function\") {\n const media = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const update = () => onResolvedSystemTheme(media.matches ? \"dark\" : \"light\");\n update();\n media.addEventListener?.(\"change\", update);\n signal.addEventListener(\"abort\", () => media.removeEventListener?.(\"change\", update), {\n once: true,\n });\n }\n schedule();\n },\n register(\n id: symbol,\n depth: number,\n themeName: ThemeName,\n signal: AbortSignal,\n onThemeChange: (themeName: ThemeName) => void,\n ) {\n const existing = scopes.get(id);\n scopes.set(id, {\n depth,\n sequence: existing?.sequence ?? nextSequence++,\n theme: themeName,\n signal,\n onThemeChange,\n });\n if (!existing) {\n signal.addEventListener(\n \"abort\",\n () => {\n scopes.delete(id);\n if (explicitOwner === id) explicitOwner = undefined;\n schedule();\n },\n { once: true },\n );\n }\n schedule();\n },\n activate(id: symbol, themeName: ThemeName) {\n const scope = scopes.get(id);\n if (scope) scope.theme = themeName;\n explicitOwner = id;\n const ownerDepth = scope?.depth;\n for (const [scopeId, registered] of scopes) {\n if (scopeId !== id && registered.depth === ownerDepth) {\n registered.theme = themeName;\n registered.onThemeChange(themeName);\n }\n }\n syncThemeTarget(target(), themeName);\n },\n });\n}\n\nexport function ThemePicker(props: ThemePickerProps): JSX.Element {\n const activeTheme = theme();\n const { themes = activeTheme.themes, label = \"Theme\", ...rest } = props;\n const currentTheme = activeTheme.theme();\n\n return (\n <select\n {...rest}\n aria-label={rest[\"aria-label\"] ?? label}\n data-slot=\"theme-picker\"\n value={currentTheme}\n onChange={(event: Event) => {\n const target = getThemePickerTarget(event);\n if (target) {\n activeTheme.setTheme(target.value as ThemeName);\n }\n }}\n >\n {themes.map((option) => (\n <option key={option.value} value={option.value} selected={option.value === currentTheme}>\n {option.label}\n </option>\n ))}\n </select>\n );\n}\n\nfunction getThemePickerTarget(event: Event): HTMLSelectElement | null {\n if (typeof HTMLSelectElement === \"undefined\") {\n return null;\n }\n\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const candidates = [event.target, event.currentTarget, ...path];\n\n for (const candidate of candidates) {\n if (candidate instanceof HTMLSelectElement) {\n return candidate;\n }\n }\n\n return null;\n}\n\nexport function ThemeToggle(props: ThemeToggleProps): JSX.Element {\n const activeTheme = theme();\n const {\n children,\n lightIcon,\n darkIcon,\n systemIcon,\n themes = [\"light\", \"dark\"],\n onPress,\n ...rest\n } = props;\n\n const currentTheme = activeTheme.theme();\n const nextTheme = getNextTheme(currentTheme, themes, activeTheme.resolvedSystemTheme());\n const renderContext = { theme: currentTheme, nextTheme };\n const ariaLabel = (rest as Record<string, unknown>)[\"aria-label\"];\n const themedIcon = resolveThemeToggleIcon(currentTheme, nextTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n });\n const renderedIcon = cloneThemeToggleIcon(themedIcon, currentTheme);\n const renderedIconSlots =\n renderThemeToggleIconSlots(currentTheme, {\n lightIcon,\n darkIcon,\n systemIcon,\n }) ?? renderedIcon;\n const content =\n typeof children === \"function\" ? children(renderContext) : (children ?? renderedIconSlots);\n\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n aria-label={typeof ariaLabel === \"string\" ? ariaLabel : `Switch to ${nextTheme} theme`}\n data-theme-control=\"toggle\"\n data-theme-choice={currentTheme}\n data-next-theme={nextTheme}\n onPress={(event) => {\n onPress?.(event);\n if (!event.defaultPrevented && !Object.is(nextTheme, currentTheme)) {\n activeTheme.setTheme(nextTheme);\n }\n }}\n >\n <span data-slot=\"theme-toggle-content\">{content}</span>\n </Button>\n );\n}\n\nfunction getNextTheme(\n currentTheme: ThemeName,\n themes: readonly ThemeName[],\n resolvedSystemTheme: \"light\" | \"dark\" = \"light\",\n): ThemeName {\n if (themes.length === 0) return currentTheme;\n const index = themes.indexOf(currentTheme);\n if (index < 0 && currentTheme === \"system\") {\n if (themes.includes(\"light\") && themes.includes(\"dark\")) {\n return resolvedSystemTheme === \"dark\" ? \"light\" : \"dark\";\n }\n }\n return themes[index >= 0 && index < themes.length - 1 ? index + 1 : 0]!;\n}\n\nfunction getThemeIcon(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (theme === \"light\") return icons.lightIcon;\n if (theme === \"dark\") return icons.darkIcon;\n if (theme === \"system\") return icons.systemIcon;\n return undefined;\n}\n\nexport function resolveThemeToggleIcon(\n theme: ThemeName,\n nextTheme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);\n}\n\nfunction renderThemeToggleIconSlots(\n theme: ThemeName,\n icons: Pick<ThemeToggleProps, \"lightIcon\" | \"darkIcon\" | \"systemIcon\">,\n): unknown {\n if (getThemeIcon(theme, icons) === undefined) {\n return undefined;\n }\n\n const slots = [\n [\"light\", icons.lightIcon],\n [\"dark\", icons.darkIcon],\n [\"system\", icons.systemIcon],\n ] as const;\n const availableSlots = slots.filter(([, icon]) => icon !== undefined && icon !== null);\n\n if (availableSlots.length <= 1) {\n return undefined;\n }\n\n return availableSlots.map(([slotTheme, icon]) => (\n <span\n key={slotTheme}\n data-slot=\"theme-toggle-icon\"\n data-theme-toggle-icon={slotTheme}\n hidden={slotTheme === theme ? undefined : true}\n >\n {cloneThemeToggleIcon(icon, slotTheme)}\n </span>\n ));\n}\n\nfunction cloneThemeToggleIcon(icon: unknown, key?: string): unknown {\n if (Array.isArray(icon)) {\n const clonedChildren = icon.map((child) => cloneThemeToggleIcon(child));\n if ((icon as unknown as Record<symbol, unknown>)[STATIC_CHILDREN] === true) {\n Object.defineProperty(clonedChildren, STATIC_CHILDREN, {\n value: true,\n configurable: true,\n });\n }\n return clonedChildren;\n }\n\n if (!isElement(icon)) return icon;\n\n const props = icon.props as Record<string, unknown> | undefined;\n const clonedProps = props ? { ...props } : {};\n\n if (\"children\" in clonedProps) {\n clonedProps.children = cloneThemeToggleIcon(clonedProps.children);\n }\n\n const clonedIcon = cloneElement(icon, clonedProps);\n return {\n ...clonedIcon,\n key: icon.key ?? key ?? null,\n } satisfies JSXElement;\n}\n\nfunction syncThemeTarget(\n html: HTMLElement | null,\n themeChoice: ThemeName | null | undefined,\n): void {\n if (!html) return;\n\n if (themeChoice == null) {\n html.removeAttribute(\"data-theme\");\n html.removeAttribute(\"data-theme-choice\");\n return;\n }\n\n html.setAttribute(\"data-theme-choice\", themeChoice);\n\n if (themeChoice === \"system\") {\n html.removeAttribute(\"data-theme\");\n } else {\n html.setAttribute(\"data-theme\", themeChoice);\n }\n}\n\nfunction readStoredTheme(storageKey: string): ThemeName | undefined {\n if (typeof window === \"undefined\") return undefined;\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n return storedTheme ? (storedTheme as ThemeName) : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction writeStoredTheme(storageKey: string, theme: ThemeName): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // Storage can be unavailable in private or locked-down browser contexts.\n }\n}\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB;CAAC;CAAS;CAAU;CAAU;CAAU;AAAO;AA+C9E,MAAa,wBAAgD;CAC3D;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAQ,OAAO;CAAO;AACjC;AAEA,MAAa,oBAA4C;CACvD;EAAE,OAAO;EAAS,OAAO;CAAQ;CACjC;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAA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BAAgB,mBAAmB;EACxC;CACF;CAEA,KAAK,aAAa,qBAAqB,WAAW;CAElD,IAAI,gBAAgB,UAClB,KAAK,gBAAgB,YAAY;MAEjC,KAAK,aAAa,cAAc,WAAW;AAE/C;AAEA,SAAS,gBAAgB,YAA2C;CAClE,IAAI,OAAO,WAAW,aAAa,OAAO,KAAA;CAC1C,IAAI;EACF,MAAM,cAAc,OAAO,aAAa,QAAQ,UAAU;EAC1D,OAAO,cAAe,cAA4B,KAAA;CACpD,QAAQ;EACN;CACF;AACF;AAEA,SAAS,iBAAiB,YAAoB,OAAwB;CACpE,IAAI,OAAO,WAAW,aAAa;CACnC,IAAI;EACF,OAAO,aAAa,QAAQ,YAAY,KAAK;CAC/C,QAAQ,CAER;AACF"}
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/accordion";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/accordion";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/alert-dialog";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/alert-dialog";
@@ -0,0 +1,4 @@
1
+ import { AlertHeadingTag, AlertProps, AlertVariant } from "../components/alert/alert.types.js";
2
+ import { Alert } from "../components/alert/alert.js";
3
+ import "../components/alert/index.js";
4
+ export { Alert, type AlertHeadingTag, type AlertProps, type AlertVariant };
@@ -0,0 +1,2 @@
1
+ import { Alert } from "../components/alert/alert.js";
2
+ export { Alert };
@@ -0,0 +1,4 @@
1
+ import { AspectRatioAsChildProps, AspectRatioProps } from "../components/aspect-ratio/aspect-ratio.types.js";
2
+ import { AspectRatio } from "../components/aspect-ratio/aspect-ratio.js";
3
+ import "../components/aspect-ratio/index.js";
4
+ export { AspectRatio, type AspectRatioAsChildProps, type AspectRatioProps };
@@ -0,0 +1,2 @@
1
+ import { AspectRatio } from "../components/aspect-ratio/aspect-ratio.js";
2
+ export { AspectRatio };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/avatar";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/avatar";
@@ -0,0 +1,4 @@
1
+ import { BadgeAsChildProps, BadgeOwnProps, BadgeProps } from "../components/badge/badge.types.js";
2
+ import { Badge } from "../components/badge/badge.js";
3
+ import "../components/badge/index.js";
4
+ export { Badge, type BadgeAsChildProps, type BadgeOwnProps, type BadgeProps };
@@ -0,0 +1,2 @@
1
+ import { Badge } from "../components/badge/badge.js";
2
+ export { Badge };
@@ -0,0 +1,2 @@
1
+ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../components/catalog.js";
2
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -0,0 +1,2 @@
1
+ import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "../components/catalog.js";
2
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -0,0 +1,4 @@
1
+ import { ButtonGroupOrientation, ButtonGroupProps } from "../components/button-group/button-group.types.js";
2
+ import { ButtonGroup } from "../components/button-group/button-group.js";
3
+ import "../components/button-group/index.js";
4
+ export { ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps };
@@ -0,0 +1,2 @@
1
+ import { ButtonGroup } from "../components/button-group/button-group.js";
2
+ export { ButtonGroup };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/button";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/button";
@@ -0,0 +1,2 @@
1
+ import { Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow } from "../components/catalog.js";
2
+ export { Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow };
@@ -0,0 +1,2 @@
1
+ import { Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow } from "../components/catalog.js";
2
+ export { Calendar, CalendarBody, CalendarCaption, CalendarCell, CalendarDay, CalendarGrid, CalendarHead, CalendarHeader, CalendarNav, CalendarNextButton, CalendarPreviousButton, CalendarRow };
@@ -0,0 +1,4 @@
1
+ import { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleHeadingTag, CardTitleProps, CardVariant } from "../components/card/card.types.js";
2
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../components/card/card.js";
3
+ import "../components/card/index.js";
4
+ export { Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleHeadingTag, type CardTitleProps, type CardVariant };
@@ -0,0 +1,2 @@
1
+ import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../components/card/card.js";
2
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,2 @@
1
+ import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../components/catalog.js";
2
+ export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
@@ -0,0 +1,2 @@
1
+ import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../components/catalog.js";
2
+ export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/checkbox";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/checkbox";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/collapsible";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/collapsible";
@@ -0,0 +1,2 @@
1
+ import { Combobox, ComboboxInput, ComboboxList, ComboboxOption } from "../components/catalog.js";
2
+ export { Combobox, ComboboxInput, ComboboxList, ComboboxOption };
@@ -0,0 +1,2 @@
1
+ import { Combobox, ComboboxInput, ComboboxList, ComboboxOption } from "../components/catalog.js";
2
+ export { Combobox, ComboboxInput, ComboboxList, ComboboxOption };
@@ -0,0 +1,2 @@
1
+ import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "../components/catalog.js";
2
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,2 @@
1
+ import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "../components/catalog.js";
2
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandGroupHeading, CommandHeader, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,3 @@
1
+ import { DropdownContent } from "../components/overlays/dropdown-content.js";
2
+ import { Dropdown as ContextMenu, DropdownGroup as ContextMenuGroup, DropdownItem as ContextMenuItem, DropdownLabel as ContextMenuLabel, DropdownPortal as ContextMenuPortal, DropdownSeparator as ContextMenuSeparator, DropdownTrigger as ContextMenuTrigger } from "@askrjs/ui/dropdown";
3
+ export { ContextMenu, DropdownContent as ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger };
@@ -0,0 +1,3 @@
1
+ import { DropdownContent } from "../components/overlays/dropdown-content.js";
2
+ import { Dropdown as ContextMenu, DropdownGroup as ContextMenuGroup, DropdownItem as ContextMenuItem, DropdownLabel as ContextMenuLabel, DropdownPortal as ContextMenuPortal, DropdownSeparator as ContextMenuSeparator, DropdownTrigger as ContextMenuTrigger } from "@askrjs/ui/dropdown";
3
+ export { ContextMenu, DropdownContent as ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger };
@@ -0,0 +1,2 @@
1
+ import { DataTable } from "../components/catalog.js";
2
+ export { DataTable };
@@ -0,0 +1,2 @@
1
+ import { DataTable } from "../components/catalog.js";
2
+ export { DataTable };
@@ -0,0 +1,2 @@
1
+ import { DatePicker, DatePickerInput } from "../components/catalog.js";
2
+ export { DatePicker, DatePickerInput };
@@ -0,0 +1,2 @@
1
+ import { DatePicker, DatePickerInput } from "../components/catalog.js";
2
+ export { DatePicker, DatePickerInput };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/dialog";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/dialog";
@@ -0,0 +1,2 @@
1
+ import { Direction } from "../components/catalog.js";
2
+ export { Direction };
@@ -0,0 +1,2 @@
1
+ import { Direction } from "../components/catalog.js";
2
+ export { Direction };
@@ -0,0 +1,2 @@
1
+ import { Dialog as Drawer, DialogClose as DrawerClose, DialogContent as DrawerContent, DialogDescription as DrawerDescription, DialogOverlay as DrawerOverlay, DialogPortal as DrawerPortal, DialogTitle as DrawerTitle, DialogTrigger as DrawerTrigger } from "@askrjs/ui/dialog";
2
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,2 @@
1
+ import { Dialog as Drawer, DialogClose as DrawerClose, DialogContent as DrawerContent, DialogDescription as DrawerDescription, DialogOverlay as DrawerOverlay, DialogPortal as DrawerPortal, DialogTitle as DrawerTitle, DialogTrigger as DrawerTrigger } from "@askrjs/ui/dialog";
2
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,3 @@
1
+ import { DropdownContent } from "../components/overlays/dropdown-content.js";
2
+ import { Dropdown as DropdownMenu, DropdownGroup as DropdownMenuGroup, DropdownItem as DropdownMenuItem, DropdownLabel as DropdownMenuLabel, DropdownPortal as DropdownMenuPortal, DropdownSeparator as DropdownMenuSeparator, DropdownTrigger as DropdownMenuTrigger } from "@askrjs/ui/dropdown";
3
+ export { DropdownMenu, DropdownContent as DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger };
@@ -0,0 +1,3 @@
1
+ import { DropdownContent } from "../components/overlays/dropdown-content.js";
2
+ import { Dropdown as DropdownMenu, DropdownGroup as DropdownMenuGroup, DropdownItem as DropdownMenuItem, DropdownLabel as DropdownMenuLabel, DropdownPortal as DropdownMenuPortal, DropdownSeparator as DropdownMenuSeparator, DropdownTrigger as DropdownMenuTrigger } from "@askrjs/ui/dropdown";
3
+ export { DropdownMenu, DropdownContent as DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger };
@@ -0,0 +1,2 @@
1
+ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../components/catalog.js";
2
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,2 @@
1
+ import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "../components/catalog.js";
2
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,4 @@
1
+ import { FieldErrorProps, FieldHintProps, FieldProps } from "../components/field/field.types.js";
2
+ import { Field, FieldError, FieldHint } from "../components/field/field.js";
3
+ import "../components/field/index.js";
4
+ export { Field, FieldError, type FieldErrorProps, FieldHint, type FieldHintProps, type FieldProps };
@@ -0,0 +1,2 @@
1
+ import { Field, FieldError, FieldHint } from "../components/field/field.js";
2
+ export { Field, FieldError, FieldHint };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/form";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/form";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/hover-card";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/hover-card";
@@ -0,0 +1,4 @@
1
+ import { InputGroupOrientation, InputGroupProps, InputGroupTextAsChildProps, InputGroupTextProps } from "../components/input-group/input-group.types.js";
2
+ import { InputGroup, InputGroupText } from "../components/input-group/input-group.js";
3
+ import "../components/input-group/index.js";
4
+ export { InputGroup, type InputGroupOrientation, type InputGroupProps, InputGroupText, type InputGroupTextAsChildProps, type InputGroupTextProps };
@@ -0,0 +1,2 @@
1
+ import { InputGroup, InputGroupText } from "../components/input-group/input-group.js";
2
+ export { InputGroup, InputGroupText };
@@ -0,0 +1,2 @@
1
+ import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../components/catalog.js";
2
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,2 @@
1
+ import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "../components/catalog.js";
2
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/input";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/input";
@@ -0,0 +1,2 @@
1
+ import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle } from "../components/catalog.js";
2
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle };
@@ -0,0 +1,2 @@
1
+ import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle } from "../components/catalog.js";
2
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemTitle };
@@ -0,0 +1,2 @@
1
+ import { Kbd } from "../components/catalog.js";
2
+ export { Kbd };
@@ -0,0 +1,2 @@
1
+ import { Kbd } from "../components/catalog.js";
2
+ export { Kbd };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/label";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/label";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/menubar";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/menubar";
@@ -0,0 +1,2 @@
1
+ import { NativeSelect } from "../components/catalog.js";
2
+ export { NativeSelect };
@@ -0,0 +1,2 @@
1
+ import { NativeSelect } from "../components/catalog.js";
2
+ export { NativeSelect };
@@ -0,0 +1,2 @@
1
+ import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport } from "../components/catalog.js";
2
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport };
@@ -0,0 +1,2 @@
1
+ import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport } from "../components/catalog.js";
2
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport };
@@ -0,0 +1,2 @@
1
+ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../components/catalog.js";
2
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -0,0 +1,2 @@
1
+ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "../components/catalog.js";
2
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/popover";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/popover";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/progress";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/progress";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/radio-group";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/radio-group";
@@ -0,0 +1,2 @@
1
+ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../components/catalog.js";
2
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -0,0 +1,2 @@
1
+ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../components/catalog.js";
2
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/scroll-area";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/scroll-area";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/select";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/select";
@@ -0,0 +1,4 @@
1
+ import { SeparatorAsChildProps, SeparatorNativeProps, SeparatorOwnProps, SeparatorProps } from "../components/separator/separator.types.js";
2
+ import { Separator } from "../components/separator/separator.js";
3
+ import "../components/separator/index.js";
4
+ export { Separator, type SeparatorAsChildProps, type SeparatorNativeProps, type SeparatorOwnProps, type SeparatorProps };
@@ -0,0 +1,2 @@
1
+ import { Separator } from "../components/separator/separator.js";
2
+ export { Separator };
@@ -0,0 +1,3 @@
1
+ import { SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "../components/catalog.js";
2
+ import { Dialog as Sheet, DialogClose as SheetClose, DialogOverlay as SheetOverlay, DialogPortal as SheetPortal, DialogTrigger as SheetTrigger } from "@askrjs/ui/dialog";
3
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
@@ -0,0 +1,3 @@
1
+ import { SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "../components/catalog.js";
2
+ import { Dialog as Sheet, DialogClose as SheetClose, DialogOverlay as SheetOverlay, DialogPortal as SheetPortal, DialogTrigger as SheetTrigger } from "@askrjs/ui/dialog";
3
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
@@ -0,0 +1,4 @@
1
+ import { SidebarButtonProps, SidebarCollapsible, SidebarPartProps, SidebarProps, SidebarRailProps, SidebarSide, SidebarTooltipSide, SidebarVariant } from "../components/sidebar/sidebar.types.js";
2
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarRail, SidebarScope, SidebarTrigger } from "../components/sidebar/sidebar.js";
3
+ import "../components/sidebar/index.js";
4
+ export { Sidebar, type SidebarButtonProps, type SidebarCollapsible, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, type SidebarPartProps, type SidebarProps, SidebarRail, type SidebarRailProps, SidebarScope, type SidebarSide, type SidebarTooltipSide, SidebarTrigger, type SidebarVariant };
@@ -0,0 +1,2 @@
1
+ import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarRail, SidebarScope, SidebarTrigger } from "../components/sidebar/sidebar.js";
2
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarRail, SidebarScope, SidebarTrigger };
@@ -0,0 +1,4 @@
1
+ import { SkeletonAsChildProps, SkeletonOwnProps, SkeletonProps } from "../components/skeleton/skeleton.types.js";
2
+ import { Skeleton } from "../components/skeleton/skeleton.js";
3
+ import "../components/skeleton/index.js";
4
+ export { Skeleton, type SkeletonAsChildProps, type SkeletonOwnProps, type SkeletonProps };
@@ -0,0 +1,2 @@
1
+ import { Skeleton } from "../components/skeleton/skeleton.js";
2
+ export { Skeleton };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/slider";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/slider";
@@ -0,0 +1,2 @@
1
+ import { Sonner, Toaster } from "../components/catalog.js";
2
+ export { Sonner, Toaster };
@@ -0,0 +1,2 @@
1
+ import { Sonner, Toaster } from "../components/catalog.js";
2
+ export { Sonner, Toaster };
@@ -0,0 +1,4 @@
1
+ import { SpinnerOwnProps, SpinnerProps, SpinnerSize } from "../components/spinner/spinner.types.js";
2
+ import { Spinner } from "../components/spinner/spinner.js";
3
+ import "../components/spinner/index.js";
4
+ export { Spinner, type SpinnerOwnProps, type SpinnerProps, type SpinnerSize };
@@ -0,0 +1,2 @@
1
+ import { Spinner } from "../components/spinner/spinner.js";
2
+ export { Spinner };
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/switch";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/switch";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/table";
@@ -0,0 +1 @@
1
+ export * from "@askrjs/ui/table";