{isMounted()
? undefined
- : props.tokens?.tokens.map((token) => {
+ : props.tokens?.tokens.map(token => {
if (token.content === '\n') return
return (
@@ -77,9 +77,7 @@ export function ShikiMagicMoveRenderer(props: ShikiMagicMoveRendererProps) {
...normalizeCSSProperties(token.htmlStyle),
color: token.color,
}}
- class={['shiki-magic-move-item', token.htmlClass]
- .filter(Boolean)
- .join(' ')}
+ class={['shiki-magic-move-item', token.htmlClass].filter(Boolean).join(' ')}
>
{token.content}
diff --git a/packages/shiki-magic-move/src/solid/utils.ts b/packages/shiki-magic-move/src/solid/utils.ts
index a4224b2..b2f0473 100644
--- a/packages/shiki-magic-move/src/solid/utils.ts
+++ b/packages/shiki-magic-move/src/solid/utils.ts
@@ -1,11 +1,9 @@
import type { JSX } from 'solid-js'
-export function normalizeCSSProperties(
- css?: string | Record
,
-): JSX.CSSProperties {
+export function normalizeCSSProperties(css?: string | Record): JSX.CSSProperties {
if (typeof css === 'string') {
const style: Record = {}
- css?.split(';').forEach((pair) => {
+ css?.split(';').forEach(pair => {
const [key, value] = pair.split(':')
if (key && value) style[key.trim()] = value.trim()
})
diff --git a/packages/shiki-magic-move/src/style.css b/packages/shiki-magic-move/src/style.css
index 3c005c1..5bf3b65 100644
--- a/packages/shiki-magic-move/src/style.css
+++ b/packages/shiki-magic-move/src/style.css
@@ -33,17 +33,23 @@
}
.shiki-magic-move-move {
- transition-delay: calc(calc(var(--smm-duration, 0.5s) * var(--smm-delay-move, 1)) + var(--smm-stagger, 0));
+ transition-delay: calc(
+ calc(var(--smm-duration, 0.5s) * var(--smm-delay-move, 1)) + var(--smm-stagger, 0)
+ );
z-index: 1;
}
.shiki-magic-move-enter-active {
- transition-delay: calc(calc(var(--smm-duration, 0.5s) * var(--smm-delay-enter, 1)) + var(--smm-stagger, 0));
+ transition-delay: calc(
+ calc(var(--smm-duration, 0.5s) * var(--smm-delay-enter, 1)) + var(--smm-stagger, 0)
+ );
z-index: 1;
}
.shiki-magic-move-leave-active {
- transition-delay: calc(calc(var(--smm-duration, 0.5s) * var(--smm-delay-leave, 1)) + var(--smm-stagger, 0));
+ transition-delay: calc(
+ calc(var(--smm-duration, 0.5s) * var(--smm-delay-leave, 1)) + var(--smm-stagger, 0)
+ );
}
.shiki-magic-move-enter-from,
@@ -53,4 +59,4 @@
br.shiki-magic-move-leave-active {
display: none;
-}
\ No newline at end of file
+}
diff --git a/packages/shiki-magic-move/src/types.ts b/packages/shiki-magic-move/src/types.ts
index 47440e1..5b25a6b 100644
--- a/packages/shiki-magic-move/src/types.ts
+++ b/packages/shiki-magic-move/src/types.ts
@@ -14,7 +14,8 @@ export interface KeyedToken extends ThemedToken {
htmlClass?: string
}
-export interface KeyedTokensInfo extends Pick {
+export interface KeyedTokensInfo
+ extends Pick {
code: string
hash: string
tokens: KeyedToken[]
@@ -92,7 +93,10 @@ export interface MagicMoveRenderOptions {
*
* @default () => {}
*/
- onAnimationStart?: (elements: MagicMoveElement[], container: { height: number, width: number }) => void
+ onAnimationStart?: (
+ elements: MagicMoveElement[],
+ container: { height: number; width: number },
+ ) => void
}
export interface MagicMoveDifferOptions {
@@ -111,7 +115,7 @@ export interface MagicMoveDifferOptions {
/**
* Algorithm to use to cleanup the diff
*/
- diffCleanup?: ((diffs: Diff[]) => Diff[] | void)
+ diffCleanup?: (diffs: Diff[]) => Diff[] | void
/**
* Enhance the matching algorithm to match tokens that has same content
*/
diff --git a/packages/shiki-magic-move/src/vue/ShikiMagicMove.ts b/packages/shiki-magic-move/src/vue/ShikiMagicMove.ts
index 133f90b..9090893 100644
--- a/packages/shiki-magic-move/src/vue/ShikiMagicMove.ts
+++ b/packages/shiki-magic-move/src/vue/ShikiMagicMove.ts
@@ -29,32 +29,31 @@ export const ShikiMagicMove = /* #__PURE__ */ defineComponent({
default: () => ({}),
},
},
- emits: [
- 'start',
- 'end',
- ],
+ emits: ['start', 'end'],
setup(props, { emit }) {
const machine = createMagicMoveMachine(
- code => codeToKeyedTokens(
- props.highlighter,
- code,
- {
- lang: props.lang,
- theme: props.theme,
- },
- props.options.lineNumbers,
- ),
+ code =>
+ codeToKeyedTokens(
+ props.highlighter,
+ code,
+ {
+ lang: props.lang,
+ theme: props.theme,
+ },
+ props.options.lineNumbers,
+ ),
props.options,
)
const result = computed(() => machine.commit(props.code))
- return () => h(ShikiMagicMoveRenderer, {
- tokens: result.value.current,
- options: props.options,
- previous: result.value.previous,
- onStart: () => emit('start'),
- onEnd: () => emit('end'),
- })
+ return () =>
+ h(ShikiMagicMoveRenderer, {
+ tokens: result.value.current,
+ options: props.options,
+ previous: result.value.previous,
+ onStart: () => emit('start'),
+ onEnd: () => emit('end'),
+ })
},
})
diff --git a/packages/shiki-magic-move/src/vue/ShikiMagicMovePrecompiled.ts b/packages/shiki-magic-move/src/vue/ShikiMagicMovePrecompiled.ts
index 3d2cf81..3a09286 100644
--- a/packages/shiki-magic-move/src/vue/ShikiMagicMovePrecompiled.ts
+++ b/packages/shiki-magic-move/src/vue/ShikiMagicMovePrecompiled.ts
@@ -28,10 +28,7 @@ export const ShikiMagicMovePrecompiled = /* #__PURE__ */ defineComponent({
default: () => ({}),
},
},
- emits: [
- 'start',
- 'end',
- ],
+ emits: ['start', 'end'],
setup(props, { emit }) {
const EMPTY = toKeyedTokens('', [])
@@ -46,13 +43,14 @@ export const ShikiMagicMovePrecompiled = /* #__PURE__ */ defineComponent({
return res
})
- return () => h(ShikiMagicMoveRenderer, {
- tokens: result.value.to,
- previous: result.value.from,
- options: props.options,
- animate: props.animate,
- onStart: () => emit('start'),
- onEnd: () => emit('end'),
- })
+ return () =>
+ h(ShikiMagicMoveRenderer, {
+ tokens: result.value.to,
+ previous: result.value.from,
+ options: props.options,
+ animate: props.animate,
+ onStart: () => emit('start'),
+ onEnd: () => emit('end'),
+ })
},
})
diff --git a/packages/shiki-magic-move/src/vue/ShikiMagicMoveRenderer.ts b/packages/shiki-magic-move/src/vue/ShikiMagicMoveRenderer.ts
index ef56f26..258f5d5 100644
--- a/packages/shiki-magic-move/src/vue/ShikiMagicMoveRenderer.ts
+++ b/packages/shiki-magic-move/src/vue/ShikiMagicMoveRenderer.ts
@@ -25,10 +25,7 @@ export const ShikiMagicMoveRenderer = /* #__PURE__ */ defineComponent({
type: Object as PropType,
},
},
- emits: [
- 'end',
- 'start',
- ],
+ emits: ['end', 'start'],
setup(props, { emit }) {
const container = ref()
@@ -42,19 +39,17 @@ export const ShikiMagicMoveRenderer = /* #__PURE__ */ defineComponent({
watch(
() => props.tokens,
- async (tokens) => {
+ async tokens => {
Object.assign(renderer.options, props.options)
if (props.animate) {
- if (props.previous)
- renderer.replace(props.previous)
+ if (props.previous) renderer.replace(props.previous)
await nextTick()
const process = renderer.render(tokens)
await nextTick()
emit('start')
await process
emit('end')
- }
- else {
+ } else {
renderer.replace(tokens)
}
},
@@ -62,25 +57,25 @@ export const ShikiMagicMoveRenderer = /* #__PURE__ */ defineComponent({
)
})
- return () => h(
- 'pre',
- { ref: container, class: 'shiki-magic-move-container' },
- // Render initial tokens for SSR
- isMounted
- ? undefined
- : renderList(props.tokens.tokens, (token) => {
- if (token.content === '\n')
- return h('br', { key: token.key })
- return h(
- 'span',
- {
- style: [{ color: token.color }, token.htmlStyle],
- class: ['shiki-magic-move-item', token.htmlClass],
- key: token.key,
- },
- token.content,
- )
- }),
- )
+ return () =>
+ h(
+ 'pre',
+ { ref: container, class: 'shiki-magic-move-container' },
+ // Render initial tokens for SSR
+ isMounted
+ ? undefined
+ : renderList(props.tokens.tokens, token => {
+ if (token.content === '\n') return h('br', { key: token.key })
+ return h(
+ 'span',
+ {
+ style: [{ color: token.color }, token.htmlStyle],
+ class: ['shiki-magic-move-item', token.htmlClass],
+ key: token.key,
+ },
+ token.content,
+ )
+ }),
+ )
},
})
diff --git a/packages/shiki-magic-move/src/vue/index.ts b/packages/shiki-magic-move/src/vue/index.ts
index f4e7998..93f064b 100644
--- a/packages/shiki-magic-move/src/vue/index.ts
+++ b/packages/shiki-magic-move/src/vue/index.ts
@@ -3,11 +3,7 @@ import { ShikiMagicMove } from './ShikiMagicMove'
import { ShikiMagicMovePrecompiled } from './ShikiMagicMovePrecompiled'
import { ShikiMagicMoveRenderer } from './ShikiMagicMoveRenderer'
-export {
- ShikiMagicMove,
- ShikiMagicMovePrecompiled,
- ShikiMagicMoveRenderer,
-}
+export { ShikiMagicMove, ShikiMagicMovePrecompiled, ShikiMagicMoveRenderer }
export function install(app: App) {
app.component('ShikiMagicMove', ShikiMagicMove)
diff --git a/packages/shiki-magic-move/test/diff.test.ts b/packages/shiki-magic-move/test/diff.test.ts
index 9b7df10..6d7ec1f 100644
--- a/packages/shiki-magic-move/test/diff.test.ts
+++ b/packages/shiki-magic-move/test/diff.test.ts
@@ -242,9 +242,9 @@ it('diff3 enhanceMatching', async () => {
enhanceMatching: true,
}).to
- expect(printDiff(tokens2WithoutEnhance, originKeys2))
- .not
- .toEqual(printDiff(tokens2WithEnhance, originKeys2))
+ expect(printDiff(tokens2WithoutEnhance, originKeys2)).not.toEqual(
+ printDiff(tokens2WithEnhance, originKeys2),
+ )
expect(printDiff(tokens2WithEnhance, originKeys2)).toMatchInlineSnapshot(`
"
@@ -328,7 +328,7 @@ function printDiff(info: KeyedTokensInfo, keys: string[]) {
}
function normalizeKeys(info: KeyedTokensInfo, name: string) {
- info.tokens.forEach((t) => {
+ info.tokens.forEach(t => {
t.key = t.key.replace(info.hash, name)
})
}
diff --git a/playgrounds/app/migrations/meta/0000_snapshot.json b/playgrounds/app/migrations/meta/0000_snapshot.json
index 45a7f52..03654f7 100644
--- a/playgrounds/app/migrations/meta/0000_snapshot.json
+++ b/playgrounds/app/migrations/meta/0000_snapshot.json
@@ -123,30 +123,22 @@
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
- "columns": [
- "email"
- ],
+ "columns": ["email"],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
- "columns": [
- "githubId"
- ],
+ "columns": ["githubId"],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
- "columns": [
- "githubUsername"
- ],
+ "columns": ["githubUsername"],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
- "columns": [
- "githubAvatarUrl"
- ],
+ "columns": ["githubAvatarUrl"],
"isUnique": true
}
},
@@ -166,4 +158,4 @@
"internal": {
"indexes": {}
}
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/migrations/meta/0001_snapshot.json b/playgrounds/app/migrations/meta/0001_snapshot.json
index 6f42f10..e85f6b9 100644
--- a/playgrounds/app/migrations/meta/0001_snapshot.json
+++ b/playgrounds/app/migrations/meta/0001_snapshot.json
@@ -153,12 +153,8 @@
"name": "snippets_table_userId_users_table_id_fk",
"tableFrom": "snippets_table",
"tableTo": "users_table",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
+ "columnsFrom": ["userId"],
+ "columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -225,30 +221,22 @@
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
- "columns": [
- "email"
- ],
+ "columns": ["email"],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
- "columns": [
- "githubId"
- ],
+ "columns": ["githubId"],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
- "columns": [
- "githubUsername"
- ],
+ "columns": ["githubUsername"],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
- "columns": [
- "githubAvatarUrl"
- ],
+ "columns": ["githubAvatarUrl"],
"isUnique": true
}
},
@@ -268,4 +256,4 @@
"internal": {
"indexes": {}
}
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/migrations/meta/0002_snapshot.json b/playgrounds/app/migrations/meta/0002_snapshot.json
index a30d2bd..d6fe8b0 100644
--- a/playgrounds/app/migrations/meta/0002_snapshot.json
+++ b/playgrounds/app/migrations/meta/0002_snapshot.json
@@ -153,12 +153,8 @@
"name": "snippets_table_userId_users_table_id_fk",
"tableFrom": "snippets_table",
"tableTo": "users_table",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
+ "columnsFrom": ["userId"],
+ "columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -225,30 +221,22 @@
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
- "columns": [
- "email"
- ],
+ "columns": ["email"],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
- "columns": [
- "githubId"
- ],
+ "columns": ["githubId"],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
- "columns": [
- "githubUsername"
- ],
+ "columns": ["githubUsername"],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
- "columns": [
- "githubAvatarUrl"
- ],
+ "columns": ["githubAvatarUrl"],
"isUnique": true
}
},
@@ -268,4 +256,4 @@
"internal": {
"indexes": {}
}
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/migrations/meta/0003_snapshot.json b/playgrounds/app/migrations/meta/0003_snapshot.json
index dee187a..dca9fcd 100644
--- a/playgrounds/app/migrations/meta/0003_snapshot.json
+++ b/playgrounds/app/migrations/meta/0003_snapshot.json
@@ -169,12 +169,8 @@
"name": "snippets_table_userId_users_table_id_fk",
"tableFrom": "snippets_table",
"tableTo": "users_table",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
+ "columnsFrom": ["userId"],
+ "columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -241,30 +237,22 @@
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
- "columns": [
- "email"
- ],
+ "columns": ["email"],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
- "columns": [
- "githubId"
- ],
+ "columns": ["githubId"],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
- "columns": [
- "githubUsername"
- ],
+ "columns": ["githubUsername"],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
- "columns": [
- "githubAvatarUrl"
- ],
+ "columns": ["githubAvatarUrl"],
"isUnique": true
}
},
@@ -284,4 +272,4 @@
"internal": {
"indexes": {}
}
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/migrations/meta/0004_snapshot.json b/playgrounds/app/migrations/meta/0004_snapshot.json
index 5878655..3a8c22b 100644
--- a/playgrounds/app/migrations/meta/0004_snapshot.json
+++ b/playgrounds/app/migrations/meta/0004_snapshot.json
@@ -201,12 +201,8 @@
"name": "snippets_table_userId_users_table_id_fk",
"tableFrom": "snippets_table",
"tableTo": "users_table",
- "columnsFrom": [
- "userId"
- ],
- "columnsTo": [
- "id"
- ],
+ "columnsFrom": ["userId"],
+ "columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
@@ -273,30 +269,22 @@
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
- "columns": [
- "email"
- ],
+ "columns": ["email"],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
- "columns": [
- "githubId"
- ],
+ "columns": ["githubId"],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
- "columns": [
- "githubUsername"
- ],
+ "columns": ["githubUsername"],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
- "columns": [
- "githubAvatarUrl"
- ],
+ "columns": ["githubAvatarUrl"],
"isUnique": true
}
},
@@ -316,4 +304,4 @@
"internal": {
"indexes": {}
}
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/migrations/meta/_journal.json b/playgrounds/app/migrations/meta/_journal.json
index 95663f9..3da9b90 100644
--- a/playgrounds/app/migrations/meta/_journal.json
+++ b/playgrounds/app/migrations/meta/_journal.json
@@ -38,4 +38,4 @@
"breakpoints": true
}
]
-}
\ No newline at end of file
+}
diff --git a/playgrounds/app/src/app.css b/playgrounds/app/src/app.css
index 753dd98..1c81166 100644
--- a/playgrounds/app/src/app.css
+++ b/playgrounds/app/src/app.css
@@ -49,7 +49,7 @@
}
.dark,
- [data-kb-theme="dark"] {
+ [data-kb-theme='dark'] {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
@@ -102,8 +102,8 @@
body {
@apply bg-background text-foreground;
font-feature-settings:
- "rlig" 1,
- "calt" 1;
+ 'rlig' 1,
+ 'calt' 1;
}
}
@@ -140,7 +140,6 @@
display: none;
}
-
/*
Full App Height and Letting Footer in the End
Max Width to the Main Container for Larger Screen Sizes
@@ -148,6 +147,6 @@
#app {
@apply min-h-screen flex flex-col;
}
-#app main {
- @apply w-full flex-1 max-w-screen-2xl mx-auto;
-}
\ No newline at end of file
+#app main {
+ @apply w-full flex-1 max-w-screen-2xl mx-auto;
+}
diff --git a/playgrounds/app/src/components/ui/button.tsx b/playgrounds/app/src/components/ui/button.tsx
index 93f0430..767fdb2 100644
--- a/playgrounds/app/src/components/ui/button.tsx
+++ b/playgrounds/app/src/components/ui/button.tsx
@@ -1,46 +1,46 @@
-import type { JSX, ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { JSX, ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import * as ButtonPrimitive from "@kobalte/core/button"
-import type { PolymorphicProps } from "@kobalte/core/polymorphic"
-import type { VariantProps } from "class-variance-authority"
-import { cva } from "class-variance-authority"
+import * as ButtonPrimitive from '@kobalte/core/button'
+import type { PolymorphicProps } from '@kobalte/core/polymorphic'
+import type { VariantProps } from 'class-variance-authority'
+import { cva } from 'class-variance-authority'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const buttonVariants = cva(
- "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
+ 'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
{
variants: {
variant: {
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
- outline: "border border-input hover:bg-accent hover:text-accent-foreground",
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
- ghost: "hover:bg-accent hover:text-accent-foreground",
- link: "text-primary underline-offset-4 hover:underline"
+ default: 'bg-primary text-primary-foreground hover:bg-primary/90',
+ destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
+ outline: 'border border-input hover:bg-accent hover:text-accent-foreground',
+ secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
+ link: 'text-primary underline-offset-4 hover:underline',
},
size: {
- default: "h-10 px-4 py-2",
- sm: "h-9 rounded-md px-3",
- lg: "h-11 rounded-md px-8",
- icon: "size-10"
- }
+ default: 'h-10 px-4 py-2',
+ sm: 'h-9 rounded-md px-3',
+ lg: 'h-11 rounded-md px-8',
+ icon: 'size-10',
+ },
},
defaultVariants: {
- variant: "default",
- size: "default"
- }
- }
+ variant: 'default',
+ size: 'default',
+ },
+ },
)
-type ButtonProps = ButtonPrimitive.ButtonRootProps &
+type ButtonProps = ButtonPrimitive.ButtonRootProps &
VariantProps & { class?: string | undefined; children?: JSX.Element }
-const Button = (
- props: PolymorphicProps>
+const Button = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as ButtonProps, ["variant", "size", "class"])
+ const [local, others] = splitProps(props as ButtonProps, ['variant', 'size', 'class'])
return (
> = (props) => {
- const [local, others] = splitProps(props, ["class"])
+const Card: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
return (
)
}
-const CardHeader: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
- return
+const CardHeader: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
+ return
}
-const CardTitle: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
+const CardTitle: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
return (
-
+
)
}
-const CardDescription: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
- return
+const CardDescription: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
+ return
}
-const CardContent: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
- return
+const CardContent: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
+ return
}
-const CardFooter: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
- return
+const CardFooter: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
+ return
}
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/playgrounds/app/src/components/ui/dialog.tsx b/playgrounds/app/src/components/ui/dialog.tsx
index 96981fc..82e945e 100644
--- a/playgrounds/app/src/components/ui/dialog.tsx
+++ b/playgrounds/app/src/components/ui/dialog.tsx
@@ -1,16 +1,16 @@
-import type { Component, ComponentProps, JSX, ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { Component, ComponentProps, JSX, ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import * as DialogPrimitive from "@kobalte/core/dialog"
-import type { PolymorphicProps } from "@kobalte/core/polymorphic"
+import * as DialogPrimitive from '@kobalte/core/dialog'
+import type { PolymorphicProps } from '@kobalte/core/polymorphic'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const Dialog = DialogPrimitive.Root
const DialogTrigger = DialogPrimitive.Trigger
-const DialogPortal: Component = (props) => {
- const [, rest] = splitProps(props, ["children"])
+const DialogPortal: Component = props => {
+ const [, rest] = splitProps(props, ['children'])
return (
@@ -20,41 +20,41 @@ const DialogPortal: Component
= (props) => {
)
}
-type DialogOverlayProps =
+type DialogOverlayProps =
DialogPrimitive.DialogOverlayProps & { class?: string | undefined }
-const DialogOverlay = (
- props: PolymorphicProps>
+const DialogOverlay = (
+ props: PolymorphicProps>,
) => {
- const [, rest] = splitProps(props as DialogOverlayProps, ["class"])
+ const [, rest] = splitProps(props as DialogOverlayProps, ['class'])
return (
)
}
-type DialogContentProps =
+type DialogContentProps =
DialogPrimitive.DialogContentProps & {
class?: string | undefined
children?: JSX.Element
}
-const DialogContent = (
- props: PolymorphicProps>
+const DialogContent = (
+ props: PolymorphicProps>,
) => {
- const [, rest] = splitProps(props as DialogContentProps, ["class", "children"])
+ const [, rest] = splitProps(props as DialogContentProps, ['class', 'children'])
return (
@@ -80,51 +80,51 @@ const DialogContent = (
)
}
-const DialogHeader: Component> = (props) => {
- const [, rest] = splitProps(props, ["class"])
+const DialogHeader: Component> = props => {
+ const [, rest] = splitProps(props, ['class'])
return (
-
+
)
}
-const DialogFooter: Component> = (props) => {
- const [, rest] = splitProps(props, ["class"])
+const DialogFooter: Component> = props => {
+ const [, rest] = splitProps(props, ['class'])
return (
)
}
-type DialogTitleProps = DialogPrimitive.DialogTitleProps & {
+type DialogTitleProps = DialogPrimitive.DialogTitleProps & {
class?: string | undefined
}
-const DialogTitle = (
- props: PolymorphicProps>
+const DialogTitle = (
+ props: PolymorphicProps>,
) => {
- const [, rest] = splitProps(props as DialogTitleProps, ["class"])
+ const [, rest] = splitProps(props as DialogTitleProps, ['class'])
return (
)
}
-type DialogDescriptionProps =
+type DialogDescriptionProps =
DialogPrimitive.DialogDescriptionProps & {
class?: string | undefined
}
-const DialogDescription = (
- props: PolymorphicProps>
+const DialogDescription = (
+ props: PolymorphicProps>,
) => {
- const [, rest] = splitProps(props as DialogDescriptionProps, ["class"])
+ const [, rest] = splitProps(props as DialogDescriptionProps, ['class'])
return (
)
@@ -137,5 +137,5 @@ export {
DialogHeader,
DialogFooter,
DialogTitle,
- DialogDescription
+ DialogDescription,
}
diff --git a/playgrounds/app/src/components/ui/label.tsx b/playgrounds/app/src/components/ui/label.tsx
index 0a8db1d..5cd8ca0 100644
--- a/playgrounds/app/src/components/ui/label.tsx
+++ b/playgrounds/app/src/components/ui/label.tsx
@@ -1,15 +1,15 @@
-import type { Component, ComponentProps } from "solid-js"
-import { splitProps } from "solid-js"
+import type { Component, ComponentProps } from 'solid-js'
+import { splitProps } from 'solid-js'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
-const Label: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
+const Label: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
return (
diff --git a/playgrounds/app/src/components/ui/number-field.tsx b/playgrounds/app/src/components/ui/number-field.tsx
index 51a1b8c..33fcecb 100644
--- a/playgrounds/app/src/components/ui/number-field.tsx
+++ b/playgrounds/app/src/components/ui/number-field.tsx
@@ -1,84 +1,84 @@
-import type { Component, ComponentProps, JSX, ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { Component, ComponentProps, JSX, ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import * as NumberFieldPrimitive from "@kobalte/core/number-field"
-import type { PolymorphicProps } from "@kobalte/core/polymorphic"
+import * as NumberFieldPrimitive from '@kobalte/core/number-field'
+import type { PolymorphicProps } from '@kobalte/core/polymorphic'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const NumberField = NumberFieldPrimitive.Root
-const NumberFieldGroup: Component> = (props) => {
- const [local, others] = splitProps(props, ["class"])
+const NumberFieldGroup: Component> = props => {
+ const [local, others] = splitProps(props, ['class'])
return (
)
}
-type NumberFieldLabelProps =
+type NumberFieldLabelProps =
NumberFieldPrimitive.NumberFieldLabelProps & {
class?: string | undefined
}
-const NumberFieldLabel = (
- props: PolymorphicProps>
+const NumberFieldLabel = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as NumberFieldLabelProps, ["class"])
+ const [local, others] = splitProps(props as NumberFieldLabelProps, ['class'])
return (
)
}
-type NumberFieldInputProps =
+type NumberFieldInputProps =
NumberFieldPrimitive.NumberFieldInputProps & {
class?: string | undefined
}
-const NumberFieldInput = (
- props: PolymorphicProps>
+const NumberFieldInput = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as NumberFieldInputProps, ["class"])
+ const [local, others] = splitProps(props as NumberFieldInputProps, ['class'])
return (
)
}
-type NumberFieldIncrementTriggerProps =
+type NumberFieldIncrementTriggerProps =
NumberFieldPrimitive.NumberFieldIncrementTriggerProps & {
class?: string | undefined
children?: JSX.Element
}
-const NumberFieldIncrementTrigger = (
- props: PolymorphicProps>
+const NumberFieldIncrementTrigger = (
+ props: PolymorphicProps>,
) => {
const [local, others] = splitProps(props as NumberFieldIncrementTriggerProps, [
- "class",
- "children"
+ 'class',
+ 'children',
])
return (
@@ -100,24 +100,24 @@ const NumberFieldIncrementTrigger = (
)
}
-type NumberFieldDecrementTriggerProps =
+type NumberFieldDecrementTriggerProps =
NumberFieldPrimitive.NumberFieldDecrementTriggerProps & {
class?: string | undefined
children?: JSX.Element
}
-const NumberFieldDecrementTrigger = (
- props: PolymorphicProps>
+const NumberFieldDecrementTrigger = (
+ props: PolymorphicProps>,
) => {
const [local, others] = splitProps(props as NumberFieldDecrementTriggerProps, [
- "class",
- "children"
+ 'class',
+ 'children',
])
return (
@@ -139,35 +139,35 @@ const NumberFieldDecrementTrigger = (
)
}
-type NumberFieldDescriptionProps =
+type NumberFieldDescriptionProps =
NumberFieldPrimitive.NumberFieldDescriptionProps & {
class?: string | undefined
}
-const NumberFieldDescription = (
- props: PolymorphicProps>
+const NumberFieldDescription = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as NumberFieldDescriptionProps, ["class"])
+ const [local, others] = splitProps(props as NumberFieldDescriptionProps, ['class'])
return (
)
}
-type NumberFieldErrorMessageProps =
+type NumberFieldErrorMessageProps =
NumberFieldPrimitive.NumberFieldErrorMessageProps & {
class?: string | undefined
}
-const NumberFieldErrorMessage = (
- props: PolymorphicProps>
+const NumberFieldErrorMessage = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as NumberFieldErrorMessageProps, ["class"])
+ const [local, others] = splitProps(props as NumberFieldErrorMessageProps, ['class'])
return (
)
@@ -181,5 +181,5 @@ export {
NumberFieldIncrementTrigger,
NumberFieldDecrementTrigger,
NumberFieldDescription,
- NumberFieldErrorMessage
+ NumberFieldErrorMessage,
}
diff --git a/playgrounds/app/src/components/ui/resizable.tsx b/playgrounds/app/src/components/ui/resizable.tsx
index eabded4..ba7774a 100644
--- a/playgrounds/app/src/components/ui/resizable.tsx
+++ b/playgrounds/app/src/components/ui/resizable.tsx
@@ -1,18 +1,18 @@
-import type { ValidComponent } from "solid-js"
-import { Show, splitProps } from "solid-js"
+import type { ValidComponent } from 'solid-js'
+import { Show, splitProps } from 'solid-js'
-import type { DynamicProps, HandleProps, RootProps } from "@corvu/resizable"
-import ResizablePrimitive from "@corvu/resizable"
+import type { DynamicProps, HandleProps, RootProps } from '@corvu/resizable'
+import ResizablePrimitive from '@corvu/resizable'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
-type ResizableProps = RootProps & { class?: string }
+type ResizableProps = RootProps & { class?: string }
-const Resizable = (props: DynamicProps>) => {
- const [, rest] = splitProps(props as ResizableProps, ["class"])
+const Resizable = (props: DynamicProps>) => {
+ const [, rest] = splitProps(props as ResizableProps, ['class'])
return (
)
@@ -20,20 +20,20 @@ const Resizable = (props: DynamicProps = HandleProps & {
+type ResizableHandleProps = HandleProps & {
class?: string
withHandle?: boolean
}
-const ResizableHandle = (
- props: DynamicProps>
+const ResizableHandle = (
+ props: DynamicProps>,
) => {
- const [, rest] = splitProps(props as ResizableHandleProps, ["class", "withHandle"])
+ const [, rest] = splitProps(props as ResizableHandleProps, ['class', 'withHandle'])
return (
div]:rotate-90",
- props.class
+ 'relative flex w-px shrink-0 items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90',
+ props.class,
)}
{...rest}
>
diff --git a/playgrounds/app/src/components/ui/select.tsx b/playgrounds/app/src/components/ui/select.tsx
index a938c34..91a229c 100644
--- a/playgrounds/app/src/components/ui/select.tsx
+++ b/playgrounds/app/src/components/ui/select.tsx
@@ -1,30 +1,30 @@
-import type { JSX, ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { JSX, ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import type { PolymorphicProps } from "@kobalte/core/polymorphic"
-import * as SelectPrimitive from "@kobalte/core/select"
+import type { PolymorphicProps } from '@kobalte/core/polymorphic'
+import * as SelectPrimitive from '@kobalte/core/select'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const Select = SelectPrimitive.Root
const SelectValue = SelectPrimitive.Value
const SelectHiddenSelect = SelectPrimitive.HiddenSelect
-type SelectTriggerProps =
+type SelectTriggerProps =
SelectPrimitive.SelectTriggerProps & {
class?: string | undefined
children?: JSX.Element
}
-const SelectTrigger = (
- props: PolymorphicProps>
+const SelectTrigger = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as SelectTriggerProps, ["class", "children"])
+ const [local, others] = splitProps(props as SelectTriggerProps, ['class', 'children'])
return (
@@ -47,19 +47,19 @@ const SelectTrigger = (
)
}
-type SelectContentProps =
+type SelectContentProps =
SelectPrimitive.SelectContentProps & { class?: string | undefined }
-const SelectContent = (
- props: PolymorphicProps>
+const SelectContent = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as SelectContentProps, ["class"])
+ const [local, others] = splitProps(props as SelectContentProps, ['class'])
return (
@@ -69,20 +69,20 @@ const SelectContent = (
)
}
-type SelectItemProps = SelectPrimitive.SelectItemProps & {
+type SelectItemProps = SelectPrimitive.SelectItemProps & {
class?: string | undefined
children?: JSX.Element
}
-const SelectItem = (
- props: PolymorphicProps>
+const SelectItem = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as SelectItemProps, ["class", "children"])
+ const [local, others] = splitProps(props as SelectItemProps, ['class', 'children'])
return (
diff --git a/playgrounds/app/src/components/ui/tabs.tsx b/playgrounds/app/src/components/ui/tabs.tsx
index ee151c8..c84949c 100644
--- a/playgrounds/app/src/components/ui/tabs.tsx
+++ b/playgrounds/app/src/components/ui/tabs.tsx
@@ -1,83 +1,83 @@
-import type { ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import type { PolymorphicProps } from "@kobalte/core/polymorphic"
-import * as TabsPrimitive from "@kobalte/core/tabs"
+import type { PolymorphicProps } from '@kobalte/core/polymorphic'
+import * as TabsPrimitive from '@kobalte/core/tabs'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const Tabs = TabsPrimitive.Root
-type TabsListProps = TabsPrimitive.TabsListProps & {
+type TabsListProps = TabsPrimitive.TabsListProps & {
class?: string | undefined
}
-const TabsList = (
- props: PolymorphicProps>
+const TabsList = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TabsListProps, ["class"])
+ const [local, others] = splitProps(props as TabsListProps, ['class'])
return (
)
}
-type TabsTriggerProps = TabsPrimitive.TabsTriggerProps & {
+type TabsTriggerProps = TabsPrimitive.TabsTriggerProps & {
class?: string | undefined
}
-const TabsTrigger = (
- props: PolymorphicProps>
+const TabsTrigger = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TabsTriggerProps, ["class"])
+ const [local, others] = splitProps(props as TabsTriggerProps, ['class'])
return (
)
}
-type TabsContentProps = TabsPrimitive.TabsContentProps & {
+type TabsContentProps = TabsPrimitive.TabsContentProps & {
class?: string | undefined
}
-const TabsContent = (
- props: PolymorphicProps>
+const TabsContent = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TabsContentProps, ["class"])
+ const [local, others] = splitProps(props as TabsContentProps, ['class'])
return (
)
}
-type TabsIndicatorProps = TabsPrimitive.TabsIndicatorProps & {
+type TabsIndicatorProps = TabsPrimitive.TabsIndicatorProps & {
class?: string | undefined
}
-const TabsIndicator = (
- props: PolymorphicProps>
+const TabsIndicator = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TabsIndicatorProps, ["class"])
+ const [local, others] = splitProps(props as TabsIndicatorProps, ['class'])
return (
diff --git a/playgrounds/app/src/components/ui/text-field.tsx b/playgrounds/app/src/components/ui/text-field.tsx
index 05a5bac..e9489c3 100644
--- a/playgrounds/app/src/components/ui/text-field.tsx
+++ b/playgrounds/app/src/components/ui/text-field.tsx
@@ -1,70 +1,70 @@
-import type { ValidComponent } from "solid-js"
-import { splitProps } from "solid-js"
+import type { ValidComponent } from 'solid-js'
+import { splitProps } from 'solid-js'
-import type { PolymorphicProps } from "@kobalte/core"
-import * as TextFieldPrimitive from "@kobalte/core/text-field"
-import { cva } from "class-variance-authority"
+import type { PolymorphicProps } from '@kobalte/core'
+import * as TextFieldPrimitive from '@kobalte/core/text-field'
+import { cva } from 'class-variance-authority'
-import { cn } from "~/lib/utils"
+import { cn } from '~/lib/utils'
const TextField = TextFieldPrimitive.Root
-type TextFieldInputProps =
+type TextFieldInputProps =
TextFieldPrimitive.TextFieldInputProps & {
class?: string | undefined
type:
- | "button"
- | "checkbox"
- | "color"
- | "date"
- | "datetime-local"
- | "email"
- | "file"
- | "hidden"
- | "image"
- | "month"
- | "number"
- | "password"
- | "radio"
- | "range"
- | "reset"
- | "search"
- | "submit"
- | "tel"
- | "text"
- | "time"
- | "url"
- | "week"
+ | 'button'
+ | 'checkbox'
+ | 'color'
+ | 'date'
+ | 'datetime-local'
+ | 'email'
+ | 'file'
+ | 'hidden'
+ | 'image'
+ | 'month'
+ | 'number'
+ | 'password'
+ | 'radio'
+ | 'range'
+ | 'reset'
+ | 'search'
+ | 'submit'
+ | 'tel'
+ | 'text'
+ | 'time'
+ | 'url'
+ | 'week'
}
-const TextFieldInput = (
- props: PolymorphicProps>
+const TextFieldInput = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TextFieldInputProps, ["type", "class"])
+ const [local, others] = splitProps(props as TextFieldInputProps, ['type', 'class'])
return (
)
}
-type TextFieldTextAreaProps =
+type TextFieldTextAreaProps =
TextFieldPrimitive.TextFieldTextAreaProps & { class?: string | undefined }
-const TextFieldTextArea = (
- props: PolymorphicProps>
+const TextFieldTextArea = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TextFieldTextAreaProps, ["class"])
+ const [local, others] = splitProps(props as TextFieldTextAreaProps, ['class'])
return (
@@ -72,60 +72,60 @@ const TextFieldTextArea = (
}
const labelVariants = cva(
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
+ 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
{
variants: {
variant: {
- label: "data-[invalid]:text-destructive",
- description: "text-destructive",
- error: "font-normal text-muted-foreground"
- }
+ label: 'data-[invalid]:text-destructive',
+ description: 'text-destructive',
+ error: 'font-normal text-muted-foreground',
+ },
},
defaultVariants: {
- variant: "label"
- }
- }
+ variant: 'label',
+ },
+ },
)
-type TextFieldLabelProps =
+type TextFieldLabelProps =
TextFieldPrimitive.TextFieldLabelProps & { class?: string | undefined }
-const TextFieldLabel = (
- props: PolymorphicProps>
+const TextFieldLabel = (
+ props: PolymorphicProps>,
) => {
- const [local, others] = splitProps(props as TextFieldLabelProps, ["class"])
+ const [local, others] = splitProps(props as TextFieldLabelProps, ['class'])
return
}
-type TextFieldDescriptionProps =
+type TextFieldDescriptionProps =
TextFieldPrimitive.TextFieldDescriptionProps & {
class?: string | undefined
}
-const TextFieldDescription =