@vireo-ai/trellis-ui 0.1.1 → 0.1.4

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 (62) hide show
  1. package/package.json +2 -5
  2. package/src/components/button/styles.css +47 -26
  3. package/src/components/date-picker/styles.css +23 -1
  4. package/src/components/file-upload/styles.css +28 -0
  5. package/src/components/radio/styles.css +33 -21
  6. package/src/components/select/styles.css +44 -3
  7. package/src/components.css +1 -2
  8. package/src/theme.css +332 -46
  9. package/trellis_ui/static/trellis_ui/css/styles.css +1025 -214
  10. package/trellis_ui/static/trellis_ui/js/esm/index.js +1869 -1078
  11. package/trellis_ui/static/trellis_ui/js/esm/index.js.map +1 -1
  12. package/trellis_ui/static/trellis_ui/js/index.js +7 -7
  13. package/types/components/app/contract.d.ts +7 -2
  14. package/types/components/badge/contract.d.ts +8 -6
  15. package/types/components/box/contract.d.ts +29 -21
  16. package/types/components/box/index.d.ts +1 -1
  17. package/types/components/button/contract.d.ts +10 -7
  18. package/types/components/card/contract.d.ts +25 -11
  19. package/types/components/combobox/contract.d.ts +6 -3
  20. package/types/components/combobox/index.d.ts +3 -0
  21. package/types/components/common.d.ts +239 -2
  22. package/types/components/container/contract.d.ts +30 -0
  23. package/types/components/container/index.d.ts +1 -0
  24. package/types/components/date-picker/contract.d.ts +7 -4
  25. package/types/components/file-upload/index.d.ts +1 -0
  26. package/types/components/flex/contract.d.ts +35 -0
  27. package/types/components/flex/index.d.ts +1 -0
  28. package/types/components/frame/contract.d.ts +43 -18
  29. package/types/components/frame/index.d.ts +2 -2
  30. package/types/components/grid/contract.d.ts +40 -0
  31. package/types/components/grid/index.d.ts +1 -0
  32. package/types/components/heading/contract.d.ts +3 -2
  33. package/types/components/input/contract.d.ts +7 -3
  34. package/types/components/layout.d.ts +408 -0
  35. package/types/components/menu/contract.d.ts +1 -1
  36. package/types/components/modal/contract.d.ts +12 -6
  37. package/types/components/section/contract.d.ts +27 -0
  38. package/types/components/section/index.d.ts +1 -0
  39. package/types/components/select/contract.d.ts +10 -7
  40. package/types/components/select/index.d.ts +3 -0
  41. package/types/components/sidebar/contract.d.ts +1 -1
  42. package/types/components/stack/contract.d.ts +29 -0
  43. package/types/components/stack/index.d.ts +1 -0
  44. package/types/components/table/contract.d.ts +4 -4
  45. package/types/components/tabs/index.d.ts +1 -0
  46. package/types/components/text/contract.d.ts +3 -2
  47. package/types/components/textarea/contract.d.ts +1 -0
  48. package/types/components/toast/contract.d.ts +11 -5
  49. package/types/components/toast/index.d.ts +2 -1
  50. package/types/index.d.ts +4 -4
  51. package/types/motion/animate.d.ts +4 -0
  52. package/types/motion/presence.d.ts +1 -1
  53. package/types/runtime/index.d.ts +6 -6
  54. package/types/runtime/manifest.d.ts +5 -1
  55. package/types/runtime/merge-bindings.d.ts +9 -0
  56. package/types/runtime/stream.d.ts +1 -1
  57. package/types/runtime/theme.d.ts +8 -3
  58. package/src/components/image/styles.css +0 -10
  59. package/src/components/theme/styles.css +0 -13
  60. package/trellis_ui/static/trellis_ui/js/esm/chunks/dist-DMX3Q5Zu.js +0 -551
  61. package/trellis_ui/static/trellis_ui/js/esm/chunks/dist-DMX3Q5Zu.js.map +0 -1
  62. package/types/runtime/props.d.ts +0 -9
@@ -22,6 +22,7 @@ type TabsData = {
22
22
  cleanup: Array<() => void>;
23
23
  root: BindingObject;
24
24
  owner(): string;
25
+ ownsElement(element: Element): boolean;
25
26
  lists(): HTMLElement[];
26
27
  primaryList(): HTMLElement | null;
27
28
  listVariant(): TabsVariant;
@@ -1,10 +1,11 @@
1
+ import { type TypographyColor } from '../common';
1
2
  declare const TEXT_AS_VALUES: readonly ["span", "p", "div", "label", "kbd", "code", "strong"];
2
3
  declare const TEXT_SIZE_VALUES: readonly ["xs", "sm", "base", "lg", "xl", "2xl"];
3
4
  declare const TEXT_WEIGHT_VALUES: readonly ["normal", "medium", "semibold", "bold"];
4
- declare const TEXT_COLOR_VALUES: readonly ["default", "muted", "subtle", "danger", "inherit"];
5
+ declare const TEXT_COLOR_VALUES: readonly ["inherit", "muted", "subtle", "accent", "danger"];
5
6
  type TextAs = typeof TEXT_AS_VALUES[number];
6
7
  type TextSize = typeof TEXT_SIZE_VALUES[number];
7
8
  type TextWeight = typeof TEXT_WEIGHT_VALUES[number];
8
- type TextColor = typeof TEXT_COLOR_VALUES[number];
9
+ type TextColor = TypographyColor;
9
10
  export { TEXT_AS_VALUES, TEXT_COLOR_VALUES, TEXT_SIZE_VALUES, TEXT_WEIGHT_VALUES, };
10
11
  export type { TextAs, TextColor, TextSize, TextWeight };
@@ -7,6 +7,7 @@ declare const textareaSchema: {
7
7
  placeholder: import("../../runtime/codecs").StringCodec;
8
8
  size: import("../../runtime/codecs").OneOfCodec<"xs" | "sm" | "md" | "lg" | "xlg">;
9
9
  variant: import("../../runtime/codecs").OneOfCodec<"outline" | "filled">;
10
+ radius: import("../../runtime/codecs").OneOfCodec<"none" | "xs" | "sm" | "md" | "lg" | "full">;
10
11
  rows: import("../../runtime/codecs").NumberCodec;
11
12
  resize: import("../../runtime/codecs").OneOfCodec<"none" | "vertical" | "horizontal" | "both">;
12
13
  disabled: import("../../runtime/codecs").BoolCodec;
@@ -1,11 +1,15 @@
1
1
  import { type PropState } from '../../runtime';
2
2
  declare const TOAST_LEVELS: readonly ["info", "success", "warning", "danger", "debug"];
3
- declare const TOAST_VARIANTS: readonly ["default", "info", "success", "warning", "danger", "debug"];
3
+ declare const TOAST_COLORS: readonly ["auto", "neutral", "accent", "success", "warning", "danger"];
4
+ declare const TOAST_RESOLVED_COLORS: readonly ["neutral", "accent", "success", "warning", "danger"];
5
+ declare const TOAST_VARIANTS: readonly ["default", "soft", "surface", "solid", "outline"];
4
6
  declare const TOAST_POSITIONS: readonly ["top-right", "top-left", "top-center", "bottom-right", "bottom-left", "bottom-center"];
5
7
  declare const toastSchema: {
6
- level: import("../../runtime/codecs").OneOfCodec<"success" | "warning" | "danger" | "info" | "debug">;
7
- variant: import("../../runtime/codecs").OneOfCodec<"default" | "success" | "warning" | "danger" | "info" | "debug">;
8
+ level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
9
+ color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "success" | "warning" | "auto">;
10
+ variant: import("../../runtime/codecs").OneOfCodec<"outline" | "default" | "solid" | "soft" | "surface">;
8
11
  title: import("../../runtime/codecs").StringCodec;
12
+ description: import("../../runtime/codecs").StringCodec;
9
13
  duration: import("../../runtime/codecs").NumberCodec;
10
14
  dismissible: import("../../runtime/codecs").BoolCodec;
11
15
  class: import("../../runtime/codecs").StringCodec;
@@ -20,9 +24,11 @@ declare const toastOutletSchema: {
20
24
  class: import("../../runtime/codecs").StringCodec;
21
25
  };
22
26
  type ToastLevel = typeof TOAST_LEVELS[number];
27
+ type ToastColor = typeof TOAST_COLORS[number];
28
+ type ToastResolvedColor = typeof TOAST_RESOLVED_COLORS[number];
23
29
  type ToastVariant = typeof TOAST_VARIANTS[number];
24
30
  type ToastPosition = typeof TOAST_POSITIONS[number];
25
31
  type ToastProps = PropState<typeof toastSchema>;
26
32
  type ToastOutletProps = PropState<typeof toastOutletSchema>;
27
- export { TOAST_LEVELS, TOAST_POSITIONS, TOAST_VARIANTS, toastOutletSchema, toastSchema };
28
- export type { ToastLevel, ToastOutletProps, ToastPosition, ToastProps, ToastVariant };
33
+ export { TOAST_COLORS, TOAST_LEVELS, TOAST_POSITIONS, TOAST_RESOLVED_COLORS, TOAST_VARIANTS, toastOutletSchema, toastSchema };
34
+ export type { ToastColor, ToastLevel, ToastOutletProps, ToastPosition, ToastProps, ToastResolvedColor, ToastVariant };
@@ -2,8 +2,9 @@ import type Alpine from 'alpinejs';
2
2
  import { type CleanupStack, type TrellisAlpineComponent } from '../../runtime';
3
3
  import { type ToastOutletProps, type ToastProps } from './contract';
4
4
  type ToastDetail = {
5
- message?: unknown;
5
+ description?: unknown;
6
6
  title?: unknown;
7
+ color?: unknown;
7
8
  level?: unknown;
8
9
  variant?: unknown;
9
10
  duration?: unknown;
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Alpine as AlpineType } from 'alpinejs';
2
2
  import { motion } from './motion';
3
- import { bool, className, create, createResizable, cx, defineManifest, defineProps, defineStyles, json, number, oneOf, props, propsFromSchema, resolveStyle, string } from './runtime';
3
+ import { bool, className, create, createResizable, cx, defineManifest, defineProps, defineStyles, json, mergeBindings, number, oneOf, propsFromSchema, resolveStyle, string } from './runtime';
4
4
  type TrellisUIPlugin = (AlpineInstance: AlpineType) => void;
5
5
  declare const ui: {
6
6
  readonly bool: import("./runtime/codecs").BoolCodec;
@@ -12,6 +12,7 @@ declare const ui: {
12
12
  readonly defineProps: <T extends Record<string, import("./runtime").CodecFn<unknown>>>({ el, schema, }: import("./runtime/codecs").DefinePropsOptions<T>) => import("./runtime").PropState<T>;
13
13
  readonly defineStyles: <const T extends import("./runtime").StyleDefinition>({ definition }: import("./runtime").DefineStylesOptions<T>) => Readonly<T>;
14
14
  readonly json: import("./runtime/codecs").JsonCodecFactory;
15
+ readonly mergeBindings: ({ inputs }: import("./runtime").MergeBindingsOptions) => import("./runtime").BindingObject;
15
16
  readonly motion: {
16
17
  readonly createAnimator: <T extends string | number>(value: import("motion").MotionValue<T> | T, defaultOptions?: import("motion").ValueAnimationTransition<T>) => import("./motion").Animator<T>;
17
18
  readonly parallel: (...handles: import("./motion").MotionHandle[]) => import("./motion").MotionHandle;
@@ -31,7 +32,6 @@ declare const ui: {
31
32
  };
32
33
  readonly number: import("./runtime/codecs").NumberCodec;
33
34
  readonly oneOf: <T extends string>(allowed: readonly T[], fallback: T) => import("./runtime/codecs").OneOfCodec<T>;
34
- readonly props: ({ inputs }: import("./runtime").PropsOptions) => import("./runtime").BindingObject;
35
35
  readonly propsFromSchema: <const T extends Record<string, import("./runtime").CodecFn<unknown>>>({ schema, details, }: import("./runtime").PropsFromSchemaOptions<T>) => Record<string, import("./runtime").ManifestProp>;
36
36
  readonly resolveStyle: ({ part, props, className: override, }: import("./runtime").ResolveStyleOptions) => string;
37
37
  readonly string: import("./runtime/codecs").StringCodec;
@@ -41,6 +41,6 @@ export { trellisUi, ui };
41
41
  export default trellisUi;
42
42
  export type { TrellisUIPlugin };
43
43
  export { motion };
44
- export { bool, className, create, createResizable, cx, defineManifest, defineProps, defineStyles, json, number, oneOf, props, propsFromSchema, resolveStyle, string, };
45
- export type { ClassArray, ClassDictionary, ClassNameOptions, ClassValue, CodecFn, ComponentManifest, CreateOptions, DefineManifestOptions, DefineStylesOptions, ManifestPart, ManifestProp, ManifestPropDetails, ManifestToken, PropInput, PropState, PropsFromSchemaOptions, PropsOptions, ResizableOptions, ResizeAxis, ResizeEvent, ResizeMode, ResizePhase, ResolveStyleOptions, SchemaPropDetails, SchemaToProps, StyleDefinition, StylePart, StyleProps, StyleTree, TrellisAlpineComponent, } from './runtime';
44
+ export { bool, className, create, createResizable, cx, defineManifest, defineProps, defineStyles, json, mergeBindings, number, oneOf, propsFromSchema, resolveStyle, string, };
45
+ export type { ClassArray, ClassDictionary, ClassNameOptions, ClassValue, CodecFn, ComponentManifest, CreateOptions, DefineManifestOptions, DefineStylesOptions, ManifestPart, ManifestProp, ManifestPropDetails, ManifestToken, BindingInput, PropState, PropsFromSchemaOptions, MergeBindingsOptions, ResizableOptions, ResizeAxis, ResizeEvent, ResizeMode, ResizePhase, ResolveStyleOptions, SchemaPropDetails, SchemaToProps, StyleDefinition, StylePart, StyleProps, StyleTree, TrellisAlpineComponent, } from './runtime';
46
46
  export type { AnimateStreamPatchOptions, AnimateViewOptions, Animator, MotionHandle, MotionPreference, MotionTarget, PresenceDefinition, PresenceLifecycle, PresenceLifecycleCallbacks, PresenceLifecycleOptions, PresenceOptions, PresencePhase, PresencePreset, ResolvedViewTarget, TransformComposer, TransformContext, ViewPreset, ViewScope, } from './motion';
@@ -44,6 +44,10 @@ declare const presenceOptions: {
44
44
  duration: 0.24;
45
45
  ease: readonly [0.23, 1, 0.32, 1];
46
46
  };
47
+ sheet: {
48
+ duration: 0.24;
49
+ ease: readonly [0.23, 1, 0.32, 1];
50
+ };
47
51
  };
48
52
  export { bindStyle, bindTransform, createAnimator, motionDurations, motionEasings, noopHandle, parallel, presenceOptions, sequential, toMotionHandle, };
49
53
  export type { Animator, MotionHandle, TransformComposer, TransformContext };
@@ -2,7 +2,7 @@ import { type AnimationOptions, type DOMKeyframesDefinition } from 'motion';
2
2
  import { type MotionHandle } from './animate';
3
3
  import { type MotionPreference } from './reduced-motion';
4
4
  type PresencePhase = 'enter' | 'exit';
5
- type PresencePreset = 'popover' | 'menu' | 'modal' | 'toast' | 'sidebar' | 'fade';
5
+ type PresencePreset = 'popover' | 'menu' | 'modal' | 'toast' | 'sidebar' | 'sheet' | 'fade';
6
6
  type PresenceDefinition = PresencePreset | DOMKeyframesDefinition;
7
7
  type PresenceOptions = AnimationOptions & {
8
8
  reducedMotion?: MotionPreference;
@@ -4,7 +4,7 @@ export { className, cx, type ClassArray, type ClassDictionary, type ClassNameOpt
4
4
  export { createCollectionNavigation, type CollectionElementOptions, type CollectionItemsOptions, type CollectionKeydownOptions, type CollectionNavigation, type CollectionNavigationOptions, } from './collection-navigation';
5
5
  export { registerConfirm, unregisterConfirm, type ConfirmEventDetail, type ConfirmRuntimeOptions } from './confirm';
6
6
  export { create, type CreateOptions, type StyleTree } from './create';
7
- export { props, type BindingObject, type PropInput, type PropsOptions } from './props';
7
+ export { mergeBindings, type BindingInput, type BindingObject, type MergeBindingsOptions } from './merge-bindings';
8
8
  export { defineProps, string, number, bool, json, oneOf, type CodecFn, type PropState, type SchemaToProps } from './codecs';
9
9
  export { addListener, asBool, dispatch, isRtl, removeAttribute, setAttribute, setPresence, type AddListenerOptions, type AttributeOptions, type BoolOptions, type CleanupStack, type DispatchOptions, type ElementOptions, type PresenceOptions, } from './dom';
10
10
  export { addDismissableLayer, type DismissableLayerOptions } from './dismissable-layer';
@@ -14,7 +14,7 @@ export { createResizable, registerResizable, type ResizableOptions, type ResizeA
14
14
  export { defineManifest, propsFromSchema, type ComponentManifest, type DefineManifestOptions, type ManifestPart, type ManifestProp, type ManifestPropDetails, type ManifestToken, type PropsFromSchemaOptions, type SchemaPropDetails, } from './manifest';
15
15
  export { defineStyles, resolveStyle, type DefineStylesOptions, type ResolveStyleOptions, type StyleDefinition, type StylePart, type StyleProps, } from './styles';
16
16
  export { applyStreamPatch, applyStreamPatches, applyUiEffect, applyUiEffects, connectStream, dispatchStreamEvent, registerStream, type PatchMode, type StreamEventPayload, type StreamPatchPayload, type UiEffectPayload, } from './stream';
17
- export { applyThemeMode, createDarkModeStore, registerThemeStore, type DarkModeStore, type ThemeChangeDetail, type ThemeMode, } from './theme';
17
+ export { applyThemeMode, createThemeStore, registerThemeStore, type ResolvedThemeMode, type ThemeChangeDetail, type ThemeStore, type ThemeMode, } from './theme';
18
18
  export { lockDocumentScroll, unlockDocumentScroll } from './scroll-lock';
19
19
  type TrellisAlpineComponent<T> = Alpine.AlpineComponent<T> & {
20
20
  init(): void;
@@ -42,7 +42,7 @@ declare const ui: {
42
42
  readonly parseItemData: (raw: string | undefined) => unknown;
43
43
  readonly splitControlValues: (value: string) => string[];
44
44
  readonly createResizable: ({ element, handle, axis, min, max, step, mode, hitArea, coarseHitArea, disabled, onStart, onResize, onEnd, }: import("./resizable").ResizableOptions) => (() => void);
45
- readonly props: ({ inputs }: import("./props").PropsOptions) => import("./props").BindingObject;
45
+ readonly mergeBindings: ({ inputs }: import("./merge-bindings").MergeBindingsOptions) => import("./merge-bindings").BindingObject;
46
46
  readonly propsFromSchema: <const T extends Record<string, import("./codecs").CodecFn<unknown>>>({ schema, details, }: import("./manifest").PropsFromSchemaOptions<T>) => Record<string, import("./manifest").ManifestProp>;
47
47
  readonly resolveStyle: ({ part, props, className: override, }: import("./styles").ResolveStyleOptions) => string;
48
48
  readonly className: ({ values }: import("./class-name").ClassNameOptions) => string;
@@ -68,12 +68,12 @@ declare const ui: {
68
68
  readonly applyStreamPatches: (AlpineInstance: import("./stream").StreamAlpine, payload: import("./stream").StreamPatchPayload | import("./stream").StreamPatchPayload[]) => void;
69
69
  readonly applyUiEffect: (AlpineInstance: import("./stream").StreamAlpine, effect: import("./stream").UiEffectPayload) => void;
70
70
  readonly applyUiEffects: (AlpineInstance: import("./stream").StreamAlpine, effects: import("./stream").UiEffectPayload | import("./stream").UiEffectPayload[]) => void;
71
- readonly connectStream: (AlpineInstance: import("./stream").StreamAlpine, url: string) => Promise<{
71
+ readonly connectStream: (AlpineInstance: import("./stream").StreamAlpine, url: string) => {
72
72
  abort(reason?: string): void;
73
- }>;
73
+ };
74
74
  readonly dispatchStreamEvent: (payload: import("./stream").StreamEventPayload) => void;
75
75
  readonly applyThemeMode: (mode: import("./theme").ThemeMode) => import("./theme").ThemeChangeDetail;
76
- readonly createDarkModeStore: () => import("./theme").DarkModeStore;
76
+ readonly createThemeStore: () => import("./theme").ThemeStore;
77
77
  readonly lockDocumentScroll: () => void;
78
78
  readonly registerConfirm: ({ root }?: import("./confirm").ConfirmRuntimeOptions) => void;
79
79
  readonly registerResizable: (AlpineInstance: Alpine.Alpine) => void;
@@ -18,10 +18,14 @@ type ManifestAcceptedEvent = {
18
18
  description: string;
19
19
  detail?: Record<string, string>;
20
20
  };
21
+ type ComponentManifestMeta = {
22
+ group?: string;
23
+ };
21
24
  type ComponentManifest = {
22
25
  name: string;
23
26
  title: string;
24
27
  description: string;
28
+ meta?: ComponentManifestMeta;
25
29
  props?: Record<string, ManifestProp>;
26
30
  propSchema?: Record<string, CodecFn<unknown>>;
27
31
  slots?: Record<string, string>;
@@ -46,4 +50,4 @@ type PropsFromSchemaOptions<T extends Record<string, CodecFn<unknown>>> = {
46
50
  declare const defineManifest: <const T extends ComponentManifest>({ manifest }: DefineManifestOptions<T>) => Readonly<T>;
47
51
  declare const propsFromSchema: <const T extends Record<string, CodecFn<unknown>>>({ schema, details, }: PropsFromSchemaOptions<T>) => Record<string, ManifestProp>;
48
52
  export { defineManifest, propsFromSchema };
49
- export type { ComponentManifest, DefineManifestOptions, ManifestPart, ManifestProp, ManifestPropDetails, ManifestAcceptedEvent, ManifestToken, PropsFromSchemaOptions, PropKind, SchemaPropDetails, };
53
+ export type { ComponentManifest, DefineManifestOptions, ManifestPart, ManifestProp, ManifestPropDetails, ManifestAcceptedEvent, ComponentManifestMeta, ManifestToken, PropsFromSchemaOptions, PropKind, SchemaPropDetails, };
@@ -0,0 +1,9 @@
1
+ import { type ClassValue } from './class-name';
2
+ type AttributeValue = unknown;
3
+ export type BindingObject = Record<string, AttributeValue>;
4
+ export type BindingInput = ClassValue | BindingObject;
5
+ export type MergeBindingsOptions = {
6
+ inputs: readonly BindingInput[];
7
+ };
8
+ export declare const mergeBindings: ({ inputs }: MergeBindingsOptions) => BindingObject;
9
+ export {};
@@ -41,7 +41,7 @@ declare const dispatchStreamEvent: (payload: StreamEventPayload) => void;
41
41
  declare const isManagedHistoryState: (state: unknown) => state is ManagedHistoryState;
42
42
  declare const applyUiEffect: (AlpineInstance: StreamAlpine, effect: UiEffectPayload) => void;
43
43
  declare const applyUiEffects: (AlpineInstance: StreamAlpine, effects: UiEffectPayload | UiEffectPayload[]) => void;
44
- declare const connectStream: (AlpineInstance: StreamAlpine, url: string) => Promise<StreamController>;
44
+ declare const connectStream: (AlpineInstance: StreamAlpine, url: string) => StreamController;
45
45
  declare const registerStream: (AlpineInstance: Alpine.Alpine) => void;
46
46
  export { applyUiEffect, applyUiEffects, applyStreamPatch, applyStreamPatchNow, applyStreamPatches, connectStream, dispatchStreamEvent, isManagedHistoryState, registerStream, };
47
47
  export type { LocationPayload, PatchMode, StreamAlpine, StreamEventPayload, StreamPatchPayload, UiEffectPayload };
@@ -1,17 +1,22 @@
1
1
  import type { Alpine as AlpineType } from 'alpinejs';
2
2
  declare const THEME_VALUES: readonly ["light", "dark", "system"];
3
3
  type ThemeMode = typeof THEME_VALUES[number];
4
+ type ResolvedThemeMode = Exclude<ThemeMode, 'system'>;
4
5
  type ThemeChangeDetail = {
5
6
  mode: ThemeMode;
7
+ resolved: ResolvedThemeMode;
8
+ dark: boolean;
6
9
  on: boolean;
7
10
  };
8
- type DarkModeStore = {
11
+ type ThemeStore = {
9
12
  mode: ThemeMode;
13
+ resolved: ResolvedThemeMode;
14
+ dark: boolean;
10
15
  on: boolean;
11
16
  set: (mode: ThemeMode) => void;
12
17
  toggle: () => void;
13
18
  };
14
19
  declare const applyThemeMode: (mode: ThemeMode) => ThemeChangeDetail;
15
- declare const createDarkModeStore: () => DarkModeStore;
20
+ declare const createThemeStore: () => ThemeStore;
16
21
  declare const registerThemeStore: (AlpineInstance: AlpineType) => void;
17
- export { applyThemeMode, createDarkModeStore, registerThemeStore, type DarkModeStore, type ThemeChangeDetail, type ThemeMode, };
22
+ export { applyThemeMode, createThemeStore, registerThemeStore, type ResolvedThemeMode, type ThemeChangeDetail, type ThemeStore, type ThemeMode, };
@@ -1,10 +0,0 @@
1
- @layer components {
2
- .ui-image-outline {
3
- outline: 1px solid rgba(0, 0, 0, 0.1);
4
- outline-offset: -1px;
5
- }
6
-
7
- .dark .ui-image-outline {
8
- outline-color: rgba(255, 255, 255, 0.1);
9
- }
10
- }
@@ -1,13 +0,0 @@
1
- @layer components {
2
- [data-ui-theme-icon] [data-ui-theme-icon-when],
3
- [data-ui-theme-text] [data-ui-theme-text-when] {
4
- display: none;
5
- }
6
-
7
- html:not(.dark) [data-ui-theme-icon] [data-ui-theme-icon-when="light"],
8
- html.dark [data-ui-theme-icon] [data-ui-theme-icon-when="dark"],
9
- html:not(.dark) [data-ui-theme-text] [data-ui-theme-text-when="light"],
10
- html.dark [data-ui-theme-text] [data-ui-theme-text-when="dark"] {
11
- display: block;
12
- }
13
- }