@sqlrooms/ui 0.29.0-rc.2 → 0.29.0-rc.3

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,kBAAkB,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAKxE,KAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,WAAW;;;;;CAKP,CAAC;AASX,KAAK,UAAU,GAAG,OAAO,WAAW,CAAC;AAErC,KAAK,MAAM,GACP;IACE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;CACrB,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEN,UAAU,KAAK;IACb,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAoBD,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,EAAE,QAAQ,MAAM,KAAG,KAqDtD,CAAC;AAaF,KAAK,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAEtC,iBAAS,KAAK,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK;;;oBAGP,YAAY;EAwBpC;AAED,iBAAS,QAAQ;;wBAgBO,MAAM;YAtIpB,YAAY,EAAE;EAwIvB;AAED,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC"}
@@ -1,129 +0,0 @@
1
- 'use client';
2
- // Inspired by react-hot-toast library
3
- import * as React from 'react';
4
- const TOAST_LIMIT = 5;
5
- const TOAST_REMOVE_DELAY = 1000000;
6
- const actionTypes = {
7
- ADD_TOAST: 'ADD_TOAST',
8
- UPDATE_TOAST: 'UPDATE_TOAST',
9
- DISMISS_TOAST: 'DISMISS_TOAST',
10
- REMOVE_TOAST: 'REMOVE_TOAST',
11
- };
12
- let count = 0;
13
- function genId() {
14
- count = (count + 1) % Number.MAX_SAFE_INTEGER;
15
- return count.toString();
16
- }
17
- const toastTimeouts = new Map();
18
- const addToRemoveQueue = (toastId) => {
19
- if (toastTimeouts.has(toastId)) {
20
- return;
21
- }
22
- const timeout = setTimeout(() => {
23
- toastTimeouts.delete(toastId);
24
- dispatch({
25
- type: 'REMOVE_TOAST',
26
- toastId: toastId,
27
- });
28
- }, TOAST_REMOVE_DELAY);
29
- toastTimeouts.set(toastId, timeout);
30
- };
31
- export const reducer = (state, action) => {
32
- switch (action.type) {
33
- case 'ADD_TOAST':
34
- return {
35
- ...state,
36
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
37
- };
38
- case 'UPDATE_TOAST':
39
- return {
40
- ...state,
41
- toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t),
42
- };
43
- case 'DISMISS_TOAST': {
44
- const { toastId } = action;
45
- // ! Side effects ! - This could be extracted into a dismissToast() action,
46
- // but I'll keep it here for simplicity
47
- if (toastId) {
48
- addToRemoveQueue(toastId);
49
- }
50
- else {
51
- state.toasts.forEach((toast) => {
52
- addToRemoveQueue(toast.id);
53
- });
54
- }
55
- return {
56
- ...state,
57
- toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined
58
- ? {
59
- ...t,
60
- open: false,
61
- }
62
- : t),
63
- };
64
- }
65
- case 'REMOVE_TOAST':
66
- if (action.toastId === undefined) {
67
- return {
68
- ...state,
69
- toasts: [],
70
- };
71
- }
72
- return {
73
- ...state,
74
- toasts: state.toasts.filter((t) => t.id !== action.toastId),
75
- };
76
- }
77
- };
78
- const listeners = [];
79
- let memoryState = { toasts: [] };
80
- function dispatch(action) {
81
- memoryState = reducer(memoryState, action);
82
- listeners.forEach((listener) => {
83
- listener(memoryState);
84
- });
85
- }
86
- function toast({ ...props }) {
87
- const id = genId();
88
- const update = (props) => dispatch({
89
- type: 'UPDATE_TOAST',
90
- toast: { ...props, id },
91
- });
92
- const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
93
- dispatch({
94
- type: 'ADD_TOAST',
95
- toast: {
96
- ...props,
97
- id,
98
- open: true,
99
- onOpenChange: (open) => {
100
- if (!open)
101
- dismiss();
102
- },
103
- },
104
- });
105
- return {
106
- id: id,
107
- dismiss,
108
- update,
109
- };
110
- }
111
- function useToast() {
112
- const [state, setState] = React.useState(memoryState);
113
- React.useEffect(() => {
114
- listeners.push(setState);
115
- return () => {
116
- const index = listeners.indexOf(setState);
117
- if (index > -1) {
118
- listeners.splice(index, 1);
119
- }
120
- };
121
- }, [state]);
122
- return {
123
- ...state,
124
- toast,
125
- dismiss: (toastId) => dispatch({ type: 'DISMISS_TOAST', toastId }),
126
- };
127
- }
128
- export { useToast, toast };
129
- //# sourceMappingURL=use-toast.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-toast.js","sourceRoot":"","sources":["../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,sCAAsC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,GAAG,CAAC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AO,GAAG,EAAE;YACV,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;gBACf,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO;QACL,GAAG,KAAK;QACR,KAAK;QACL,OAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,eAAe,EAAE,OAAO,EAAC,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC","sourcesContent":["'use client';\n\n// Inspired by react-hot-toast library\nimport * as React from 'react';\n\nimport type {ToastActionElement, ToastProps} from '../components/toast';\n\nconst TOAST_LIMIT = 5;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n id: string;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: ToastActionElement;\n};\n\nconst actionTypes = {\n ADD_TOAST: 'ADD_TOAST',\n UPDATE_TOAST: 'UPDATE_TOAST',\n DISMISS_TOAST: 'DISMISS_TOAST',\n REMOVE_TOAST: 'REMOVE_TOAST',\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER;\n return count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n | {\n type: ActionType['ADD_TOAST'];\n toast: ToasterToast;\n }\n | {\n type: ActionType['UPDATE_TOAST'];\n toast: Partial<ToasterToast>;\n }\n | {\n type: ActionType['DISMISS_TOAST'];\n toastId?: ToasterToast['id'];\n }\n | {\n type: ActionType['REMOVE_TOAST'];\n toastId?: ToasterToast['id'];\n };\n\ninterface State {\n toasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return;\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId);\n dispatch({\n type: 'REMOVE_TOAST',\n toastId: toastId,\n });\n }, TOAST_REMOVE_DELAY);\n\n toastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case 'ADD_TOAST':\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n };\n\n case 'UPDATE_TOAST':\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? {...t, ...action.toast} : t,\n ),\n };\n\n case 'DISMISS_TOAST': {\n const {toastId} = action;\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId);\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id);\n });\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t,\n ),\n };\n }\n case 'REMOVE_TOAST':\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n };\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n };\n }\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = {toasts: []};\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action);\n listeners.forEach((listener) => {\n listener(memoryState);\n });\n}\n\ntype Toast = Omit<ToasterToast, 'id'>;\n\nfunction toast({...props}: Toast) {\n const id = genId();\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: 'UPDATE_TOAST',\n toast: {...props, id},\n });\n const dismiss = () => dispatch({type: 'DISMISS_TOAST', toastId: id});\n\n dispatch({\n type: 'ADD_TOAST',\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss();\n },\n },\n });\n\n return {\n id: id,\n dismiss,\n update,\n };\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState);\n\n React.useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({type: 'DISMISS_TOAST', toastId}),\n };\n}\n\nexport {useToast, toast};\n"]}
@@ -1,3 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
- export declare const sqlroomsTailwindPreset: (_options?: Record<string, unknown>) => Partial<Config>;
3
- //# sourceMappingURL=tailwind-preset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tailwind-preset.d.ts","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,eAAO,MAAM,sBAAsB,GAEjC,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACjC,OAAO,CAAC,MAAM,CAkJf,CAAC"}
@@ -1,152 +0,0 @@
1
- import tailwindAnimate from 'tailwindcss-animate';
2
- import typography from '@tailwindcss/typography';
3
- export const sqlroomsTailwindPreset = (
4
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
- _options) => ({
6
- darkMode: ['class'],
7
- theme: {
8
- extend: {
9
- colors: {
10
- border: 'hsl(var(--border))',
11
- input: 'hsl(var(--input))',
12
- ring: 'hsl(var(--ring))',
13
- background: 'hsl(var(--background))',
14
- foreground: 'hsl(var(--foreground))',
15
- primary: {
16
- DEFAULT: 'hsl(var(--primary))',
17
- foreground: 'hsl(var(--primary-foreground))',
18
- },
19
- secondary: {
20
- DEFAULT: 'hsl(var(--secondary))',
21
- foreground: 'hsl(var(--secondary-foreground))',
22
- },
23
- destructive: {
24
- DEFAULT: 'hsl(var(--destructive))',
25
- foreground: 'hsl(var(--destructive-foreground))',
26
- },
27
- muted: {
28
- DEFAULT: 'hsl(var(--muted))',
29
- foreground: 'hsl(var(--muted-foreground))',
30
- },
31
- accent: {
32
- DEFAULT: 'hsl(var(--accent))',
33
- foreground: 'hsl(var(--accent-foreground))',
34
- },
35
- popover: {
36
- DEFAULT: 'hsl(var(--popover))',
37
- foreground: 'hsl(var(--popover-foreground))',
38
- },
39
- card: {
40
- DEFAULT: 'hsl(var(--card))',
41
- foreground: 'hsl(var(--card-foreground))',
42
- },
43
- },
44
- borderRadius: {
45
- lg: `var(--radius)`,
46
- md: `calc(var(--radius) - 2px)`,
47
- sm: 'calc(var(--radius) - 4px)',
48
- },
49
- typography: {
50
- DEFAULT: {
51
- css: {
52
- // Improve spacing and styling for lists
53
- 'ul, ol': {
54
- paddingLeft: '1.5em',
55
- marginTop: '0.75em',
56
- marginBottom: '0.75em',
57
- },
58
- 'ul > li, ol > li': {
59
- marginTop: '0.25em',
60
- marginBottom: '0.25em',
61
- },
62
- // Better styling for code blocks
63
- pre: {
64
- backgroundColor: 'hsl(var(--muted))',
65
- color: 'hsl(var(--muted-foreground))',
66
- borderRadius: 'var(--radius)',
67
- padding: '1em',
68
- overflowX: 'auto',
69
- },
70
- code: {
71
- backgroundColor: 'hsl(var(--muted))',
72
- color: 'hsl(var(--muted-foreground))',
73
- borderRadius: '0.25em',
74
- padding: '0.2em 0.4em',
75
- fontSize: '0.875em',
76
- },
77
- // Better styling for blockquotes
78
- blockquote: {
79
- borderLeftColor: 'hsl(var(--border))',
80
- fontStyle: 'normal',
81
- color: 'hsl(var(--muted-foreground))',
82
- },
83
- // Harmonize heading styles
84
- 'h1, h2, h3, h4, h5, h6': {
85
- color: 'hsl(var(--foreground))',
86
- fontWeight: '600',
87
- },
88
- // Better link styling
89
- a: {
90
- color: 'hsl(var(--primary))',
91
- textDecoration: 'none',
92
- '&:hover': {
93
- textDecoration: 'underline',
94
- },
95
- },
96
- // Better table styling
97
- table: {
98
- width: '100%',
99
- tableLayout: 'auto',
100
- textAlign: 'left',
101
- borderCollapse: 'collapse',
102
- },
103
- th: {
104
- fontWeight: '600',
105
- borderBottomWidth: '2px',
106
- borderColor: 'hsl(var(--border))',
107
- padding: '0.5em',
108
- },
109
- td: {
110
- borderBottomWidth: '1px',
111
- borderColor: 'hsl(var(--border))',
112
- padding: '0.5em',
113
- },
114
- },
115
- },
116
- // Adjust typography for dark mode
117
- invert: {
118
- css: {
119
- color: 'hsl(var(--foreground))',
120
- pre: {
121
- backgroundColor: 'hsl(var(--muted))',
122
- color: 'hsl(var(--muted-foreground))',
123
- },
124
- code: {
125
- backgroundColor: 'hsl(var(--muted))',
126
- color: 'hsl(var(--muted-foreground))',
127
- },
128
- 'h1, h2, h3, h4, h5, h6': {
129
- color: 'hsl(var(--foreground))',
130
- },
131
- blockquote: {
132
- borderLeftColor: 'hsl(var(--border))',
133
- color: 'hsl(var(--muted-foreground))',
134
- },
135
- },
136
- },
137
- },
138
- keyframes: {
139
- 'sqlrooms-progress': {
140
- '0%': { transform: 'translateX(0) scaleX(0)' },
141
- '40%': { transform: 'translateX(0) scaleX(0.4)' },
142
- '100%': { transform: 'translateX(100%) scaleX(0.5)' },
143
- },
144
- },
145
- animation: {
146
- 'sqlrooms-progress': 'sqlrooms-progress 1s infinite linear',
147
- },
148
- },
149
- },
150
- plugins: [tailwindAnimate, typography],
151
- });
152
- //# sourceMappingURL=tailwind-preset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tailwind-preset.js","sourceRoot":"","sources":["../src/tailwind-preset.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,qBAAqB,CAAC;AAClD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAAG;AACpC,6DAA6D;AAC7D,QAAkC,EACjB,EAAE,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,MAAM,EAAE,oBAAoB;gBAC5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BACrC,KAAK,EAAE,8BAA8B;yBACtC;qBACF;iBACF;aACF;YACD,SAAS,EAAE;gBACT,mBAAmB,EAAE;oBACnB,IAAI,EAAE,EAAC,SAAS,EAAE,yBAAyB,EAAC;oBAC5C,KAAK,EAAE,EAAC,SAAS,EAAE,2BAA2B,EAAC;oBAC/C,MAAM,EAAE,EAAC,SAAS,EAAE,8BAA8B,EAAC;iBACpD;aACF;YACD,SAAS,EAAE;gBACT,mBAAmB,EAAE,sCAAsC;aAC5D;SACF;KACF;IACD,OAAO,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;CACvC,CAAC,CAAC","sourcesContent":["import {Config} from 'tailwindcss';\nimport tailwindAnimate from 'tailwindcss-animate';\nimport typography from '@tailwindcss/typography';\n\nexport const sqlroomsTailwindPreset = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _options?: Record<string, unknown>,\n): Partial<Config> => ({\n darkMode: ['class'],\n theme: {\n extend: {\n colors: {\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n },\n borderRadius: {\n lg: `var(--radius)`,\n md: `calc(var(--radius) - 2px)`,\n sm: 'calc(var(--radius) - 4px)',\n },\n typography: {\n DEFAULT: {\n css: {\n // Improve spacing and styling for lists\n 'ul, ol': {\n paddingLeft: '1.5em',\n marginTop: '0.75em',\n marginBottom: '0.75em',\n },\n 'ul > li, ol > li': {\n marginTop: '0.25em',\n marginBottom: '0.25em',\n },\n // Better styling for code blocks\n pre: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n borderRadius: 'var(--radius)',\n padding: '1em',\n overflowX: 'auto',\n },\n code: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n borderRadius: '0.25em',\n padding: '0.2em 0.4em',\n fontSize: '0.875em',\n },\n // Better styling for blockquotes\n blockquote: {\n borderLeftColor: 'hsl(var(--border))',\n fontStyle: 'normal',\n color: 'hsl(var(--muted-foreground))',\n },\n // Harmonize heading styles\n 'h1, h2, h3, h4, h5, h6': {\n color: 'hsl(var(--foreground))',\n fontWeight: '600',\n },\n // Better link styling\n a: {\n color: 'hsl(var(--primary))',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n // Better table styling\n table: {\n width: '100%',\n tableLayout: 'auto',\n textAlign: 'left',\n borderCollapse: 'collapse',\n },\n th: {\n fontWeight: '600',\n borderBottomWidth: '2px',\n borderColor: 'hsl(var(--border))',\n padding: '0.5em',\n },\n td: {\n borderBottomWidth: '1px',\n borderColor: 'hsl(var(--border))',\n padding: '0.5em',\n },\n },\n },\n // Adjust typography for dark mode\n invert: {\n css: {\n color: 'hsl(var(--foreground))',\n pre: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n },\n code: {\n backgroundColor: 'hsl(var(--muted))',\n color: 'hsl(var(--muted-foreground))',\n },\n 'h1, h2, h3, h4, h5, h6': {\n color: 'hsl(var(--foreground))',\n },\n blockquote: {\n borderLeftColor: 'hsl(var(--border))',\n color: 'hsl(var(--muted-foreground))',\n },\n },\n },\n },\n keyframes: {\n 'sqlrooms-progress': {\n '0%': {transform: 'translateX(0) scaleX(0)'},\n '40%': {transform: 'translateX(0) scaleX(0.4)'},\n '100%': {transform: 'translateX(100%) scaleX(0.5)'},\n },\n },\n animation: {\n 'sqlrooms-progress': 'sqlrooms-progress 1s infinite linear',\n },\n },\n },\n plugins: [tailwindAnimate, typography],\n});\n"]}