From 2d74dac7595d0f97f5d41ccdba065df5af31f203 Mon Sep 17 00:00:00 2001 From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com> Date: Thu, 11 Apr 2024 20:48:33 -0400 Subject: [PATCH 001/322] next: initial svelte 5 setup (#445) Co-authored-by: AdrianGonz97 <31664583+AdrianGonz97@users.noreply.github.com> --- eslint.config.js | 9 +- package.json | 11 +- packages/bits-ui/package.json | 13 +- .../components/accordion-content.svelte | 79 +- .../components/accordion-header.svelte | 35 +- .../components/accordion-item.svelte | 52 +- .../components/accordion-trigger.svelte | 67 +- .../accordion/components/accordion.svelte | 94 +- .../bits-ui/src/lib/bits/accordion/index.ts | 3 +- .../src/lib/bits/accordion/state.svelte.ts | 315 ++++++ .../bits-ui/src/lib/bits/accordion/types.ts | 113 +-- .../components/aspect-ratio.svelte | 12 +- .../lib/bits/avatar/components/avatar.svelte | 15 +- packages/bits-ui/src/lib/bits/avatar/index.ts | 2 +- .../src/lib/bits/avatar/state.svelte.ts | 0 packages/bits-ui/src/lib/bits/avatar/types.ts | 47 +- .../bits-ui/src/lib/bits/utilities/index.ts | 1 + .../lib/bits/utilities/with-transition.svelte | 64 ++ packages/bits-ui/src/lib/internal/attrs.ts | 8 + packages/bits-ui/src/lib/internal/context.ts | 12 + packages/bits-ui/src/lib/internal/events.ts | 79 ++ packages/bits-ui/src/lib/internal/index.ts | 1 + packages/bits-ui/src/lib/internal/kbd.ts | 36 + packages/bits-ui/src/lib/internal/types.ts | 53 +- packages/bits-ui/svelte.config.js | 4 +- pnpm-lock.yaml | 922 ++++++++---------- sites/docs/package.json | 8 +- .../lib/components/api-ref/props-table.svelte | 6 +- .../src/lib/components/api-section.svelte | 5 +- .../components/demos/accordion-demo.svelte | 2 +- .../src/routes/docs/[...slug]/+page.svelte | 13 +- sites/docs/svelte.config.js | 20 +- 32 files changed, 1290 insertions(+), 811 deletions(-) create mode 100644 packages/bits-ui/src/lib/bits/accordion/state.svelte.ts create mode 100644 packages/bits-ui/src/lib/bits/avatar/state.svelte.ts create mode 100644 packages/bits-ui/src/lib/bits/utilities/index.ts create mode 100644 packages/bits-ui/src/lib/bits/utilities/with-transition.svelte create mode 100644 packages/bits-ui/src/lib/internal/context.ts diff --git a/eslint.config.js b/eslint.config.js index cf3a7aad5..7cfb7c8d4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,4 +2,11 @@ import config, { DEFAULT_IGNORES } from "@huntabyte/eslint-config"; const ignores = ["**/extended-types"]; -export default config({ svelte: true, ignores: [...DEFAULT_IGNORES, ...ignores] }); +export default config({ svelte: true, ignores: [...DEFAULT_IGNORES, ...ignores] }).override( + "antfu/typescript/rules", + { + rules: { + "ts/consistent-type-definitions": "off", + }, + } +); diff --git a/package.json b/package.json index ed33d2e24..78bf9cb39 100644 --- a/package.json +++ b/package.json @@ -18,15 +18,16 @@ "license": "MIT", "devDependencies": { "@changesets/cli": "^2.27.1", - "@huntabyte/eslint-config": "^0.1.1", + "@huntabyte/eslint-config": "^0.3.1", + "@huntabyte/eslint-plugin": "^0.1.0", "@svitejs/changesets-changelog-github-compact": "^1.1.0", - "eslint": "^8.56.0", - "eslint-plugin-svelte": "^2.35.1", + "eslint": "^9.0.0", + "eslint-plugin-svelte": "^2.37.0", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.2.2", "prettier-plugin-tailwindcss": "0.5.13", - "svelte": "^4.2.9", - "svelte-eslint-parser": "^0.33.1", + "svelte": "5.0.0-next.100", + "svelte-eslint-parser": "^0.34.1", "wrangler": "^3.44.0" }, "type": "module", diff --git a/packages/bits-ui/package.json b/packages/bits-ui/package.json index 50aa18ebe..aaabfa1b6 100644 --- a/packages/bits-ui/package.json +++ b/packages/bits-ui/package.json @@ -30,23 +30,23 @@ "@melt-ui/pp": "^0.3.0", "@sveltejs/kit": "^2.5.0", "@sveltejs/package": "^2.2.7", - "@sveltejs/vite-plugin-svelte": "^3.0.2", + "@sveltejs/vite-plugin-svelte": "^3.1.0", "@testing-library/dom": "^9.3.4", "@testing-library/jest-dom": "^6.4.1", "@testing-library/svelte": "^4.1.0", "@testing-library/user-event": "^14.5.2", "@types/jest-axe": "^3.5.9", + "@types/node": "^20.12.2", "@types/testing-library__jest-dom": "^5.14.9", - "autoprefixer": "^10.4.17", "jest-axe": "^8.0.0", "jsdom": "^24.0.0", "publint": "^0.2.7", "resize-observer-polyfill": "^1.5.1", - "svelte": "^4.2.9", - "svelte-check": "^3.6.3", + "svelte": "5.0.0-next.100", + "svelte-check": "^3.6.9", "tslib": "^2.6.2", "typescript": "^5.3.3", - "vite": "^5.0.12", + "vite": "^5.2.8", "vitest": "^1.2.2" }, "svelte": "./dist/index.js", @@ -55,9 +55,10 @@ "dependencies": { "@internationalized/date": "^3.5.1", "@melt-ui/svelte": "0.76.2", + "esm-env": "^1.0.0", "nanoid": "^5.0.5" }, "peerDependencies": { - "svelte": "^4.0.0" + "svelte": "^5.0.0" } } diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte index b23e48374..9a0e60b9b 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte @@ -1,68 +1,27 @@ - - type T = $$Generic; - type In = $$Generic; - type Out = $$Generic; - - type $$Props = ContentProps; - - export let transition: $$Props["transition"] = undefined; - export let transitionConfig: $$Props["transitionConfig"] = undefined; - export let inTransition: $$Props["inTransition"] = undefined; - export let inTransitionConfig: ContentProps["inTransitionConfig"] = undefined; - export let outTransition: $$Props["outTransition"] = undefined; - export let outTransitionConfig: $$Props["outTransitionConfig"] = undefined; - export let asChild: $$Props["asChild"] = false; - export let el: $$Props["el"] = undefined; + -{#if asChild && $isSelected(props)} - -{:else if transition && $isSelected(props)} -
- -
-{:else if inTransition && outTransition && $isSelected(props)} -
- -
-{:else if inTransition && $isSelected(props)} -
- -
-{:else if outTransition && $isSelected(props)} -
- -
-{:else if $isSelected(props)} -
- -
+{#if asChild && content.item.isSelected} + {#if child} + {@render child(mergedProps)} + {/if} +{:else} + {/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte index 58b6951d5..95f9d943c 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte @@ -1,29 +1,22 @@ -{#if asChild} - +{#if asChild && child} + {@render child(mergedProps)} {:else} -
- +
+ {#if children} + {@render children()} + {/if}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte index e385a4d75..53bba18af 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte @@ -1,29 +1,41 @@ -{#if asChild} - +{#if asChild && child} + {@render child(mergedProps)} {:else} -
- +
+ {#if children} + {@render children()} + {/if}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte index 05f317676..8832b41fc 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte @@ -1,38 +1,49 @@ -{#if asChild} - +{#if asChild && child} + {@render child(mergedProps)} {:else} - {/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte index 871ba9047..e15bb9b6a 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte @@ -1,62 +1,46 @@ -{#if asChild} - +{#if asChild && child} + {@render child(restProps)} {:else} -
- +
+ {#if children} + {@render children()} + {/if}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/index.ts b/packages/bits-ui/src/lib/bits/accordion/index.ts index ab8414247..9bec951f4 100644 --- a/packages/bits-ui/src/lib/bits/accordion/index.ts +++ b/packages/bits-ui/src/lib/bits/accordion/index.ts @@ -5,10 +5,9 @@ export { default as Trigger } from "./components/accordion-trigger.svelte"; export { default as Content } from "./components/accordion-content.svelte"; export type { - AccordionProps as Props, + AccordionRootProps as Props, AccordionItemProps as ItemProps, AccordionHeaderProps as HeaderProps, AccordionTriggerProps as TriggerProps, AccordionContentProps as ContentProps, - AccordionTriggerEvents as TriggerEvents, } from "./types.js"; diff --git a/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts b/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts new file mode 100644 index 000000000..07b60a239 --- /dev/null +++ b/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts @@ -0,0 +1,315 @@ +import { getContext, setContext } from "svelte"; +import { + type EventCallback, + type OnChangeFn, + composeHandlers, + dataDisabledAttrs, + kbd, + openClosedAttrs, + verifyContextDeps, +} from "$lib/internal/index.js"; + +/** + * BASE + */ +interface AccordionBaseStateProps { + el?: HTMLElement | null; + disabled?: boolean; + forceVisible?: boolean; +} + +class AccordionBaseState { + el: HTMLElement | null | undefined = $state(null); + disabled: boolean = $state(false); + forceVisible: boolean = $state(false); + + constructor(props: AccordionBaseStateProps) { + this.el = props.el ?? this.el; + this.disabled = props.disabled ?? this.disabled; + this.forceVisible = props.forceVisible ?? this.forceVisible; + } +} + +/** + * SINGLE + */ + +interface AccordionSingleStateProps extends AccordionBaseStateProps { + value?: string; + onValueChange?: OnChangeFn; +} + +export class AccordionSingleState extends AccordionBaseState { + value: string = $state(""); + onValueChange: OnChangeFn = () => {}; + isMulti = false as const; + + constructor(props: AccordionSingleStateProps) { + super(props); + + this.value = props.value ?? this.value; + this.onValueChange = props.onValueChange ?? this.onValueChange; + + $effect.pre(() => { + this.onValueChange?.(this.value); + }); + } +} + +/** + * MULTIPLE + */ +interface AccordionMultiStateProps extends AccordionBaseStateProps { + value?: string[]; + onValueChange?: OnChangeFn; +} + +export class AccordionMultiState extends AccordionBaseState { + value: string[] = $state([]); + onValueChange: OnChangeFn = () => {}; + isMulti = true as const; + + constructor(props: AccordionMultiStateProps) { + super(props); + + this.value = props.value ?? this.value; + this.onValueChange = props.onValueChange ?? this.onValueChange; + + $effect.pre(() => { + this.onValueChange?.(this.value); + }); + } +} + +/** + * ITEM + */ + +type AccordionItemStateProps = { + value: string; + disabled?: boolean; + rootState: AccordionState; +}; + +export class AccordionItemState { + value: string = $state(""); + disabled: boolean = $state(false); + isSelected: boolean = $state(false); + root: AccordionState; + + constructor(props: AccordionItemStateProps) { + this.value = props.value; + this.disabled = props?.disabled ?? false; + this.root = props.rootState; + + $effect(() => { + if (this.root.isMulti) { + this.isSelected = this.root.value.includes(this.value); + } else { + this.isSelected = this.root.value === this.value; + } + }); + } + + updateValue() { + if (this.root.isMulti) { + if (this.root.value.includes(this.value)) { + this.root.value = this.root.value.filter((v) => v !== this.value); + } else { + this.root.value.push(this.value); + } + } else { + if (this.root.value === this.value) { + this.root.value = ""; + } else { + this.root.value = this.value; + } + } + } + + createTrigger(props: AccordionTriggerStateProps) { + return new AccordionTriggerState(props, this); + } + + createContent() { + return new AccordionContentState(this); + } +} + +/** + * TRIGGER + */ + +type AccordionTriggerStateProps = { + onclick?: (e: MouseEvent) => void; + onkeydown?: (e: KeyboardEvent) => void; + disabled: boolean; +}; + +const defaultAccordionTriggerProps = { + disabled: false, + el: null, + handlers: { + click: undefined, + keydown: undefined, + }, +}; + +class AccordionTriggerState { + disabled: boolean = $state(false); + el: HTMLElement | null | undefined = $state(); + root: AccordionState = undefined as unknown as AccordionState; + itemState: AccordionItemState = undefined as unknown as AccordionItemState; + handlers: { + click: EventCallback | undefined; + keydown: EventCallback | undefined; + } = $state(defaultAccordionTriggerProps.handlers); + isDisabled: boolean = $state(false); + attrs: Record = $derived({ + disabled: this.disabled, + "aria-expanded": this.itemState.isSelected ? "true" : "false", + "aria-disabled": this.isDisabled ? "true" : "false", + "data-disabled": this.isDisabled ? "" : undefined, + "data-value": this.itemState.value, + "data-state": openClosedAttrs(this.itemState.isSelected), + "data-accordion-trigger": "", + }); + + constructor(props: AccordionTriggerStateProps, itemState: AccordionItemState) { + this.disabled = props.disabled || itemState.disabled || itemState.root.disabled; + this.itemState = itemState; + this.root = itemState.root; + this.handlers.click = props.onclick; + this.handlers.keydown = props.onkeydown; + + $effect(() => { + this.isDisabled = this.disabled || this.itemState.disabled || this.root.disabled; + }); + } + + onclick = composeHandlers(this.handlers.click, () => { + if (this.isDisabled) return; + this.itemState.updateValue(); + }); + + onkeydown = composeHandlers(this.handlers.keydown, (e: KeyboardEvent) => { + const handledKeys = [kbd.ARROW_DOWN, kbd.ARROW_UP, kbd.HOME, kbd.END, kbd.SPACE, kbd.ENTER]; + if (this.isDisabled || !handledKeys.includes(e.key)) return; + + e.preventDefault(); + + if ([kbd.SPACE, kbd.ENTER].includes(e.key)) { + this.itemState.updateValue(); + return; + } + + if (!this.root.el || !this.el) return; + + const items = Array.from( + this.root.el.querySelectorAll("[data-accordion-trigger]") + ); + if (!items.length) return; + + const candidateItems = items.filter((item) => !item.dataset.disabled); + if (!candidateItems.length) return; + + const currentIndex = candidateItems.indexOf(this.el); + + switch (e.key) { + case kbd.ARROW_DOWN: + candidateItems[(currentIndex + 1) % candidateItems.length]?.focus(); + return; + case kbd.ARROW_UP: + candidateItems[ + (currentIndex - 1 + candidateItems.length) % candidateItems.length + ]?.focus(); + return; + case kbd.HOME: + candidateItems[0]?.focus(); + return; + case kbd.END: + candidateItems[candidateItems.length - 1]?.focus(); + } + }); + + get props() { + return { + ...this.attrs, + onclick: this.onclick, + onkeydown: this.onkeydown, + }; + } +} + +/** + * CONTENT + */ + +class AccordionContentState { + item: AccordionItemState = $state() as AccordionItemState; + attrs: Record = $derived({ + "data-state": openClosedAttrs(this.item.isSelected), + "data-disabled": dataDisabledAttrs(this.item.root.disabled || this.item.disabled), + "data-value": this.item.value, + "data-accordion-content": "", + }); + + constructor(item: AccordionItemState) { + this.item = item; + } + + get props() { + return this.attrs; + } +} + +/** + * CONTEXT METHODS + */ + +export const ACCORDION_ROOT_KEY = Symbol("Accordion.Root"); +export const ACCORDION_ITEM_KEY = Symbol("Accordion.Item"); + +type AccordionState = AccordionSingleState | AccordionMultiState; + +type InitAccordionProps = { + type: "single" | "multiple"; + value?: string | string[]; +}; + +export function setAccordionRootState(props: InitAccordionProps) { + const rootState = + props.type === "single" + ? new AccordionSingleState({ value: props.value as string }) + : new AccordionMultiState({ value: props.value as string[] }); + setContext(ACCORDION_ROOT_KEY, rootState); + return rootState; +} + +export function getAccordionRootState(): AccordionState { + return getContext(ACCORDION_ROOT_KEY); +} + +export function setAccordionItemState(props: Omit) { + verifyContextDeps(ACCORDION_ROOT_KEY); + const rootState = getAccordionRootState(); + const itemState = new AccordionItemState({ ...props, rootState }); + setContext(ACCORDION_ITEM_KEY, itemState); + return itemState; +} + +export function getAccordionItemState(): AccordionItemState { + return getContext(ACCORDION_ITEM_KEY); +} + +export function getAccordionTriggerState(props: AccordionTriggerStateProps): AccordionTriggerState { + verifyContextDeps(ACCORDION_ITEM_KEY); + const itemState = getAccordionItemState(); + return itemState.createTrigger(props); +} + +export function getAccordionContentState(): AccordionContentState { + verifyContextDeps(ACCORDION_ITEM_KEY); + const itemState = getAccordionItemState(); + return itemState.createContent(); +} diff --git a/packages/bits-ui/src/lib/bits/accordion/types.ts b/packages/bits-ui/src/lib/bits/accordion/types.ts index de440bbe7..e782e99d5 100644 --- a/packages/bits-ui/src/lib/bits/accordion/types.ts +++ b/packages/bits-ui/src/lib/bits/accordion/types.ts @@ -1,74 +1,77 @@ -import type { HTMLButtonAttributes } from "svelte/elements"; import type { - AccordionHeadingProps as MeltAccordionHeadingProps, - AccordionItemProps as MeltAccordionItemProps, - CreateAccordionProps as MeltAccordionProps, -} from "@melt-ui/svelte"; -import type { CustomEventHandler } from "$lib/index.js"; -import type { - DOMElement, - Expand, - HTMLDivAttributes, - ObjectVariation, - OmitForceVisible, - OmitValue, - OnChangeFn, + PrimitiveButtonAttributes, + PrimitiveDivAttributes, Transition, - TransitionProps, + TransitionParams, + WithAsChild, } from "$lib/internal/index.js"; -export type AccordionPropsWithoutHTML = Expand< - OmitValue>> & { - /** - * The value of the accordion. - * You can bind this to a value to programmatically control the open state. - */ - value?: MeltAccordionProps["defaultValue"]; +interface BaseAccordionProps { + disabled?: boolean; + forceVisible?: boolean; +} - /** - * A callback function called when the value changes. - */ - onValueChange?: OnChangeFn["defaultValue"]>; - } & DOMElement ->; +interface SingleAccordionProps extends BaseAccordionProps { + type: "single"; + value?: string; + onValueChange?: (value: string) => void; +} -export type AccordionItemPropsWithoutHTML = Expand< - ObjectVariation & DOMElement ->; +interface MultipleAccordionProps extends BaseAccordionProps { + type: "multiple"; + value?: string[]; + onValueChange?: (value: string[]) => void; +} -export type AccordionHeaderPropsWithoutHTML = Expand< - { - /** - * The heading level of the accordion header. - */ - level?: ObjectVariation["level"]; - } & DOMElement ->; +export type AccordionRootPropsWithoutHTML = + | WithAsChild + | WithAsChild; -export type AccordionTriggerPropsWithoutHTML = DOMElement; +export type AccordionRootProps = AccordionRootPropsWithoutHTML & PrimitiveDivAttributes; -export type AccordionContentPropsWithoutHTML< - T extends Transition = Transition, - In extends Transition = Transition, - Out extends Transition = Transition, -> = Expand & DOMElement>; +export type AccordionTriggerPropsWithoutHTML = WithAsChild<{ + disabled?: boolean; + onclick?: (e: MouseEvent) => void; + onkeydown?: (e: KeyboardEvent) => void; +}>; -export type AccordionProps = AccordionPropsWithoutHTML & - Omit; +export type AccordionTriggerProps = AccordionTriggerPropsWithoutHTML & + Omit; -export type AccordionItemProps = AccordionItemPropsWithoutHTML & HTMLDivAttributes; +export type AccordionItemContext = { + value: string; + disabled: boolean; +}; -export type AccordionHeaderProps = AccordionHeaderPropsWithoutHTML & HTMLDivAttributes; +export type AccordionItemPropsWithoutHTML = WithAsChild<{ + value: string; + disabled?: boolean; +}>; -export type AccordionTriggerProps = AccordionTriggerPropsWithoutHTML & HTMLButtonAttributes; +export type AccordionItemProps = AccordionItemPropsWithoutHTML & PrimitiveDivAttributes; + +export type AccordionContentPropsWithoutHTML< + T extends Transition = Transition, + In extends Transition = Transition, + Out extends Transition = Transition, +> = WithAsChild<{ + transition?: T; + transitionConfig?: TransitionParams; + inTransition?: In; + inTransitionConfig?: TransitionParams; + outTransition?: Out; + outTransitionConfig?: TransitionParams; +}>; export type AccordionContentProps< T extends Transition = Transition, In extends Transition = Transition, Out extends Transition = Transition, -> = AccordionContentPropsWithoutHTML & HTMLDivAttributes; +> = AccordionContentPropsWithoutHTML & PrimitiveDivAttributes; -export type AccordionTriggerEvents = { - click: CustomEventHandler; - keydown: CustomEventHandler; -}; +export type AccordionHeaderPropsWithoutHTML = WithAsChild<{ + asChild?: boolean; + level?: 1 | 2 | 3 | 4 | 5 | 6; +}>; + +export type AccordionHeaderProps = AccordionHeaderPropsWithoutHTML & PrimitiveDivAttributes; diff --git a/packages/bits-ui/src/lib/bits/aspect-ratio/components/aspect-ratio.svelte b/packages/bits-ui/src/lib/bits/aspect-ratio/components/aspect-ratio.svelte index b4287d55f..753be08fd 100644 --- a/packages/bits-ui/src/lib/bits/aspect-ratio/components/aspect-ratio.svelte +++ b/packages/bits-ui/src/lib/bits/aspect-ratio/components/aspect-ratio.svelte @@ -1,13 +1,7 @@
@@ -18,8 +12,8 @@ style:right="0" style:bottom="0" style:left="0" - {...$$restProps} - {...attrs} + {...restProps} + data-aspect-ratio-root="" >
diff --git a/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte b/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte index 86c42eac3..75e92ae7b 100644 --- a/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte +++ b/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte @@ -1,13 +1,14 @@ + +{#if transition && condition} +
+ {#if children} + {@render children()} + {/if} +
+{:else if inTransition && outTransition && condition} +
+ {#if children} + {@render children()} + {/if} +
+{:else if inTransition && condition} +
+ {#if children} + {@render children()} + {/if} +
+{:else if outTransition && condition} +
+ {#if children} + {@render children()} + {/if} +
+{:else if condition} +
+ {#if children} + {@render children()} + {/if} +
+{/if} diff --git a/packages/bits-ui/src/lib/internal/attrs.ts b/packages/bits-ui/src/lib/internal/attrs.ts index 36b72716a..d92d5bbfd 100644 --- a/packages/bits-ui/src/lib/internal/attrs.ts +++ b/packages/bits-ui/src/lib/internal/attrs.ts @@ -55,3 +55,11 @@ export function disabledAttrs(disabled: boolean | undefined | null) { ? { "aria-disabled": "true", "data-disabled": "" } : { "aria-disabled": undefined, "data-disabled": undefined }; } + +export function openClosedAttrs(condition: boolean): "true" | "false" { + return condition ? "true" : "false"; +} + +export function dataDisabledAttrs(condition: boolean): "" | undefined { + return condition ? "" : undefined; +} diff --git a/packages/bits-ui/src/lib/internal/context.ts b/packages/bits-ui/src/lib/internal/context.ts new file mode 100644 index 000000000..7e7421e36 --- /dev/null +++ b/packages/bits-ui/src/lib/internal/context.ts @@ -0,0 +1,12 @@ +import { getAllContexts } from "svelte"; +import { DEV } from "esm-env"; + +export function verifyContextDeps(...deps: symbol[]) { + if (DEV) { + const ctx = getAllContexts(); + const missing = deps.filter((dep) => !ctx.has(dep)); + if (missing.length > 0) { + throw new Error(`Missing context dependencies: ${missing.join(", ")}`); + } + } +} diff --git a/packages/bits-ui/src/lib/internal/events.ts b/packages/bits-ui/src/lib/internal/events.ts index a5b4f5ea5..e84129a7c 100644 --- a/packages/bits-ui/src/lib/internal/events.ts +++ b/packages/bits-ui/src/lib/internal/events.ts @@ -34,3 +34,82 @@ export function createDispatcher() { export type CreateDispatcher = { createDispatcher: typeof createDispatcher; }; + +export type EventCallback = ( + event: E & { currentTarget: EventTarget & T } +) => void; + +export function composeHandlers( + ...handlers: Array | undefined> +): (e: E & { currentTarget: EventTarget & T }) => void { + return (e: E & { currentTarget: EventTarget & T }) => { + for (const handler of handlers) { + if (handler && !e.defaultPrevented) { + handler(e); + } + } + }; +} + +export type GeneralEventListener = (evt: E) => unknown; + +export function addEventListener( + target: Window, + event: E, + handler: (this: Window, ev: HTMLElementEventMap[E]) => unknown, + options?: boolean | AddEventListenerOptions +): VoidFunction; + +export function addEventListener( + target: Document, + event: E, + handler: (this: Document, ev: HTMLElementEventMap[E]) => unknown, + options?: boolean | AddEventListenerOptions +): VoidFunction; + +export function addEventListener( + target: EventTarget, + event: E, + handler: GeneralEventListener, + options?: boolean | AddEventListenerOptions +): VoidFunction; +/** + * Adds an event listener to the specified target element(s) for the given event(s), and returns a function to remove it. + * @param target The target element(s) to add the event listener to. + * @param event The event(s) to listen for. + * @param handler The function to be called when the event is triggered. + * @param options An optional object that specifies characteristics about the event listener. + * @returns A function that removes the event listener from the target element(s). + */ +export function addEventListener( + target: Window | Document | EventTarget, + event: string | string[], + handler: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions +) { + const events = Array.isArray(event) ? event : [event]; + + // Add the event listener to each specified event for the target element(s). + events.forEach((_event) => target.addEventListener(_event, handler, options)); + + // Return a function that removes the event listener from the target element(s). + return () => { + events.forEach((_event) => target.removeEventListener(_event, handler, options)); + }; +} + +export function handleAndDispatchCustomEvent( + name: string, + handler: ((event: E) => void) | undefined, + detail: { originalEvent: OriginalEvent } & (E extends CustomEvent ? D : never) +) { + const target = detail.originalEvent.target; + const event = new CustomEvent(name, { + bubbles: false, + cancelable: true, + detail, + }); + if (handler) target.addEventListener(name, handler as EventListener, { once: true }); + + target.dispatchEvent(event); +} diff --git a/packages/bits-ui/src/lib/internal/index.ts b/packages/bits-ui/src/lib/internal/index.ts index ef30075ff..9e4a193f7 100644 --- a/packages/bits-ui/src/lib/internal/index.ts +++ b/packages/bits-ui/src/lib/internal/index.ts @@ -9,3 +9,4 @@ export * from "./style.js"; export * from "./types.js"; export * from "./updater.js"; export * from "./focus.js"; +export * from "./context.js"; diff --git a/packages/bits-ui/src/lib/internal/kbd.ts b/packages/bits-ui/src/lib/internal/kbd.ts index 58eb31c0f..b3676de55 100644 --- a/packages/bits-ui/src/lib/internal/kbd.ts +++ b/packages/bits-ui/src/lib/internal/kbd.ts @@ -35,3 +35,39 @@ export function getKbd() { ASTERISK: "*", }; } + +export const kbd = { + ALT: "Alt", + ARROW_DOWN: "ArrowDown", + ARROW_LEFT: "ArrowLeft", + ARROW_RIGHT: "ArrowRight", + ARROW_UP: "ArrowUp", + BACKSPACE: "Backspace", + CAPS_LOCK: "CapsLock", + CONTROL: "Control", + DELETE: "Delete", + END: "End", + ENTER: "Enter", + ESCAPE: "Escape", + F1: "F1", + F10: "F10", + F11: "F11", + F12: "F12", + F2: "F2", + F3: "F3", + F4: "F4", + F5: "F5", + F6: "F6", + F7: "F7", + F8: "F8", + F9: "F9", + HOME: "Home", + META: "Meta", + PAGE_DOWN: "PageDown", + PAGE_UP: "PageUp", + SHIFT: "Shift", + SPACE: " ", + TAB: "Tab", + CTRL: "Control", + ASTERISK: "*", +}; diff --git a/packages/bits-ui/src/lib/internal/types.ts b/packages/bits-ui/src/lib/internal/types.ts index e5f2617cb..ab3105fd0 100644 --- a/packages/bits-ui/src/lib/internal/types.ts +++ b/packages/bits-ui/src/lib/internal/types.ts @@ -1,5 +1,11 @@ +import type { Snippet } from "svelte"; import type { Action } from "svelte/action"; -import type { HTMLAttributes } from "svelte/elements"; +import type { + HTMLAttributes, + HTMLButtonAttributes, + HTMLImgAttributes, + HTMLInputAttributes, +} from "svelte/elements"; import type { TransitionConfig } from "svelte/transition"; export type ObjectVariation = T extends object ? T : never; @@ -42,6 +48,7 @@ export type Expand = T extends object export type Prettify = { [K in keyof T]: T[K]; + // eslint-disable-next-line ts/ban-types } & {}; export type Builder = { @@ -111,3 +118,47 @@ export type TransitionProps< */ outTransitionConfig?: TransitionParams; }>; + +export type Primitive = T; + +export type PrimitiveButtonAttributes = Primitive; +export type PrimitiveDivAttributes = Primitive; +export type PrimitiveInputAttributes = Primitive; +export type PrimitiveSpanAttributes = Primitive; +export type PrimitiveImgAttributes = Primitive; +export type PrimitiveHeadingAttributes = Primitive; + +export type AsChildProps = { + child: Snippet<[U]>; + children?: never; + asChild: true; + el?: HTMLElement; +} & Omit; + +export type DefaultProps = { + asChild?: never; + child?: never; + children?: Snippet; + el?: HTMLElement; +} & Omit; + +// eslint-disable-next-line ts/ban-types +export type WithAsChild = {}> = + | DefaultProps + | AsChildProps; + +/** + * Constructs a new type by omitting properties from type + * 'T' that exist in type 'U'. + * + * @template T - The base object type from which properties will be omitted. + * @template U - The object type whose properties will be omitted from 'T'. + * @example + * type Result = Without<{ a: number; b: string; }, { b: string; }>; + * // Result type will be { a: number; } + */ +export type Without = Omit; + +export type ElementRef = { value?: HTMLElement | null | undefined }; + +export type Ref = { value: T }; diff --git a/packages/bits-ui/svelte.config.js b/packages/bits-ui/svelte.config.js index a93ef75df..64f0af506 100644 --- a/packages/bits-ui/svelte.config.js +++ b/packages/bits-ui/svelte.config.js @@ -1,10 +1,10 @@ // @ts-check -import { preprocessMeltUI, sequence } from "@melt-ui/pp"; +import { preprocessMeltUI } from "@melt-ui/pp"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; /** @type {import('@sveltejs/kit').Config} */ const config = { - preprocess: [sequence([vitePreprocess(), preprocessMeltUI()])], + preprocess: [vitePreprocess(), preprocessMeltUI()], }; export default config; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 17f588af9..ce7c437f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,32 +12,35 @@ importers: specifier: ^2.27.1 version: 2.27.1 '@huntabyte/eslint-config': - specifier: ^0.1.1 - version: 0.1.1(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.35.1)(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3) + specifier: ^0.3.1 + version: 0.3.1(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.37.0)(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3) + '@huntabyte/eslint-plugin': + specifier: ^0.1.0 + version: 0.1.0(eslint@9.0.0) '@svitejs/changesets-changelog-github-compact': specifier: ^1.1.0 version: 1.1.0 eslint: - specifier: ^8.56.0 - version: 8.57.0 + specifier: ^9.0.0 + version: 9.0.0 eslint-plugin-svelte: - specifier: ^2.35.1 - version: 2.35.1(eslint@8.57.0)(svelte@4.2.12) + specifier: ^2.37.0 + version: 2.37.0(eslint@9.0.0)(svelte@5.0.0-next.100) prettier: specifier: ^3.2.5 version: 3.2.5 prettier-plugin-svelte: specifier: ^3.2.2 - version: 3.2.2(prettier@3.2.5)(svelte@4.2.12) + version: 3.2.2(prettier@3.2.5)(svelte@5.0.0-next.100) prettier-plugin-tailwindcss: specifier: 0.5.13 version: 0.5.13(prettier-plugin-svelte@3.2.2)(prettier@3.2.5) svelte: - specifier: ^4.2.9 - version: 4.2.12 + specifier: 5.0.0-next.100 + version: 5.0.0-next.100 svelte-eslint-parser: - specifier: ^0.33.1 - version: 0.33.1(svelte@4.2.12) + specifier: ^0.34.1 + version: 0.34.1(svelte@5.0.0-next.100) wrangler: specifier: ^3.44.0 version: 3.44.0 @@ -49,23 +52,26 @@ importers: version: 3.5.2 '@melt-ui/svelte': specifier: 0.76.2 - version: 0.76.2(svelte@4.2.12) + version: 0.76.2(svelte@5.0.0-next.100) + esm-env: + specifier: ^1.0.0 + version: 1.0.0 nanoid: specifier: ^5.0.5 version: 5.0.6 devDependencies: '@melt-ui/pp': specifier: ^0.3.0 - version: 0.3.0(@melt-ui/svelte@0.76.2)(svelte@4.2.12) + version: 0.3.0(@melt-ui/svelte@0.76.2)(svelte@5.0.0-next.100) '@sveltejs/kit': specifier: ^2.5.0 - version: 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7) + version: 2.5.5(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8) '@sveltejs/package': specifier: ^2.2.7 - version: 2.3.0(svelte@4.2.12)(typescript@5.4.3) + version: 2.3.0(svelte@5.0.0-next.100)(typescript@5.4.3) '@sveltejs/vite-plugin-svelte': - specifier: ^3.0.2 - version: 3.0.2(svelte@4.2.12)(vite@5.2.7) + specifier: ^3.1.0 + version: 3.1.0(svelte@5.0.0-next.100)(vite@5.2.8) '@testing-library/dom': specifier: ^9.3.4 version: 9.3.4 @@ -74,19 +80,19 @@ importers: version: 6.4.2(vitest@1.4.0) '@testing-library/svelte': specifier: ^4.1.0 - version: 4.1.0(svelte@4.2.12) + version: 4.1.0(svelte@5.0.0-next.100) '@testing-library/user-event': specifier: ^14.5.2 version: 14.5.2(@testing-library/dom@9.3.4) '@types/jest-axe': specifier: ^3.5.9 version: 3.5.9 + '@types/node': + specifier: ^20.12.2 + version: 20.12.2 '@types/testing-library__jest-dom': specifier: ^5.14.9 version: 5.14.9 - autoprefixer: - specifier: ^10.4.17 - version: 10.4.19(postcss@8.4.38) jest-axe: specifier: ^8.0.0 version: 8.0.0 @@ -100,11 +106,11 @@ importers: specifier: ^1.5.1 version: 1.5.1 svelte: - specifier: ^4.2.9 - version: 4.2.12 + specifier: 5.0.0-next.100 + version: 5.0.0-next.100 svelte-check: - specifier: ^3.6.3 - version: 3.6.8(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@4.2.12) + specifier: ^3.6.9 + version: 3.6.9(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@5.0.0-next.100) tslib: specifier: ^2.6.2 version: 2.6.2 @@ -112,11 +118,11 @@ importers: specifier: ^5.3.3 version: 5.4.3 vite: - specifier: ^5.0.12 - version: 5.2.7(@types/node@20.12.2) + specifier: ^5.2.8 + version: 5.2.8(@types/node@20.12.2) vitest: specifier: ^1.2.2 - version: 1.4.0(jsdom@24.0.0) + version: 1.4.0(@types/node@20.12.2)(jsdom@24.0.0) sites/docs: dependencies: @@ -125,14 +131,14 @@ importers: version: 3.5.2 '@melt-ui/svelte': specifier: 0.76.2 - version: 0.76.2(svelte@4.2.12) + version: 0.76.2(svelte@5.0.0-next.100) bits-ui: specifier: workspace:* version: link:../../packages/bits-ui devDependencies: '@melt-ui/pp': specifier: ^0.3.0 - version: 0.3.0(@melt-ui/svelte@0.76.2)(svelte@4.2.12) + version: 0.3.0(@melt-ui/svelte@0.76.2)(svelte@5.0.0-next.100) '@prettier/sync': specifier: 0.3.0 version: 0.3.0(prettier@3.2.5) @@ -141,10 +147,10 @@ importers: version: 4.2.0(@sveltejs/kit@2.5.5)(wrangler@3.44.0) '@sveltejs/kit': specifier: ^2.5.0 - version: 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7) + version: 2.5.5(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8) '@sveltejs/vite-plugin-svelte': - specifier: ^3.0.2 - version: 3.0.2(svelte@4.2.12)(vite@5.2.7) + specifier: ^3.1.0 + version: 3.1.0(svelte@5.0.0-next.100)(vite@5.2.8) '@tailwindcss/typography': specifier: ^0.5.10 version: 0.5.12(tailwindcss@3.4.3) @@ -174,13 +180,13 @@ importers: version: 0.3.4(esbuild@0.20.2) mdsx: specifier: ^0.0.5 - version: 0.0.5(svelte@4.2.12) + version: 0.0.5(svelte@5.0.0-next.100) mode-watcher: specifier: ^0.2.0 - version: 0.2.2(svelte@4.2.12) + version: 0.2.2(svelte@5.0.0-next.100) phosphor-svelte: specifier: ^1.4.2 - version: 1.4.2(svelte@4.2.12) + version: 1.4.2(svelte@5.0.0-next.100) postcss: specifier: ^8.4.33 version: 8.4.38 @@ -200,11 +206,11 @@ importers: specifier: ^1.1.1 version: 1.2.2 svelte: - specifier: ^4.2.9 - version: 4.2.12 + specifier: 5.0.0-next.100 + version: 5.0.0-next.100 svelte-check: - specifier: ^3.6.3 - version: 3.6.8(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@4.2.12) + specifier: ^3.6.9 + version: 3.6.9(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@5.0.0-next.100) tailwind-merge: specifier: ^2.2.1 version: 2.2.2 @@ -230,8 +236,8 @@ importers: specifier: ^5.0.0 version: 5.0.0 vite: - specifier: ^5.0.12 - version: 5.2.7(@types/node@20.12.2) + specifier: ^5.2.8 + version: 5.2.8(@types/node@20.12.2) packages: @@ -256,8 +262,8 @@ packages: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - /@antfu/eslint-config@2.11.6(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.35.1)(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3): - resolution: {integrity: sha512-v8f1uskX9w3c7IwvQu1pw02d19qc0o//LjILVlzv3B81bsO22x4hJkwQdJEhvypR3Z82vhCnCXfa6yoMddW1pg==} + /@antfu/eslint-config@2.13.3(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.37.0)(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3): + resolution: {integrity: sha512-DCyrnFgWtIc0mUTn8HeVB15Z/t9oEQZk8ce6S14Kq6z42LbMfZxPu6hs4SmPFYWLJoEzYq87dxsRv3glOX+aGw==} hasBin: true peerDependencies: '@unocss/eslint-plugin': '>=0.50.0' @@ -268,7 +274,8 @@ packages: eslint-plugin-react: ^7.33.2 eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-react-refresh: ^0.4.4 - eslint-plugin-svelte: ^2.35.1 + eslint-plugin-solid: ^0.13.2 + eslint-plugin-svelte: '>=2.35.1' prettier-plugin-astro: ^0.13.0 prettier-plugin-slidev: ^1.0.5 svelte-eslint-parser: ^0.33.1 @@ -287,6 +294,8 @@ packages: optional: true eslint-plugin-react-refresh: optional: true + eslint-plugin-solid: + optional: true eslint-plugin-svelte: optional: true prettier-plugin-astro: @@ -298,38 +307,38 @@ packages: dependencies: '@antfu/install-pkg': 0.3.2 '@clack/prompts': 0.7.0 - '@stylistic/eslint-plugin': 1.7.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/eslint-plugin': 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 - eslint-config-flat-gitignore: 0.1.3 - eslint-flat-config-utils: 0.1.2 - eslint-merge-processors: 0.1.0(eslint@8.57.0) - eslint-plugin-antfu: 2.1.2(eslint@8.57.0) - eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0) - eslint-plugin-import-x: 0.4.4(eslint@8.57.0)(typescript@5.4.3) - eslint-plugin-jsdoc: 48.2.2(eslint@8.57.0) - eslint-plugin-jsonc: 2.14.1(eslint@8.57.0) - eslint-plugin-markdown: 4.0.1(eslint@8.57.0) - eslint-plugin-n: 16.6.2(eslint@8.57.0) + '@stylistic/eslint-plugin': 1.7.0(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.6.0(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 + eslint-config-flat-gitignore: 0.1.5 + eslint-flat-config-utils: 0.2.2 + eslint-merge-processors: 0.1.0(eslint@9.0.0) + eslint-plugin-antfu: 2.1.2(eslint@9.0.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.0.0) + eslint-plugin-import-x: 0.5.0(eslint@9.0.0)(typescript@5.4.3) + eslint-plugin-jsdoc: 48.2.3(eslint@9.0.0) + eslint-plugin-jsonc: 2.15.0(eslint@9.0.0) + eslint-plugin-markdown: 4.0.1(eslint@9.0.0) + eslint-plugin-n: 17.2.0(eslint@9.0.0) eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-perfectionist: 2.7.0(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3)(vue-eslint-parser@9.4.2) - eslint-plugin-svelte: 2.35.1(eslint@8.57.0)(svelte@4.2.12) - eslint-plugin-toml: 0.10.0(eslint@8.57.0) - eslint-plugin-unicorn: 51.0.1(eslint@8.57.0) - eslint-plugin-unused-imports: 3.1.0(@typescript-eslint/eslint-plugin@7.4.0)(eslint@8.57.0) - eslint-plugin-vitest: 0.4.1(@typescript-eslint/eslint-plugin@7.4.0)(eslint@8.57.0)(typescript@5.4.3) - eslint-plugin-vue: 9.24.0(eslint@8.57.0) - eslint-plugin-yml: 1.13.2(eslint@8.57.0) - eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.4.21)(eslint@8.57.0) + eslint-plugin-perfectionist: 2.8.0(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3)(vue-eslint-parser@9.4.2) + eslint-plugin-svelte: 2.37.0(eslint@9.0.0)(svelte@5.0.0-next.100) + eslint-plugin-toml: 0.11.0(eslint@9.0.0) + eslint-plugin-unicorn: 52.0.0(eslint@9.0.0) + eslint-plugin-unused-imports: 3.1.0(@typescript-eslint/eslint-plugin@7.6.0)(eslint@9.0.0) + eslint-plugin-vitest: 0.5.1(@typescript-eslint/eslint-plugin@7.6.0)(eslint@9.0.0)(typescript@5.4.3) + eslint-plugin-vue: 9.24.1(eslint@9.0.0) + eslint-plugin-yml: 1.14.0(eslint@9.0.0) + eslint-processor-vue-blocks: 0.1.1(@vue/compiler-sfc@3.4.21)(eslint@9.0.0) globals: 15.0.0 jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 parse-gitignore: 2.0.0 picocolors: 1.0.0 - svelte-eslint-parser: 0.33.1(svelte@4.2.12) + svelte-eslint-parser: 0.34.1(svelte@5.0.0-next.100) toml-eslint-parser: 0.9.3 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.2(eslint@9.0.0) yaml-eslint-parser: 1.2.2 yargs: 17.7.2 transitivePeerDependencies: @@ -1497,13 +1506,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): + /@eslint-community/eslint-utils@4.4.0(eslint@9.0.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.57.0 + eslint: 9.0.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1529,9 +1538,26 @@ packages: - supports-color dev: true - /@eslint/js@8.57.0: - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@eslint/eslintrc@3.0.2: + resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 10.0.1 + globals: 14.0.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@9.0.0: + resolution: {integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true /@fal-works/esbuild-plugin-global-externals@2.1.2: @@ -1576,11 +1602,11 @@ packages: yargs: 17.7.2 dev: true - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + /@humanwhocodes/config-array@0.12.3: + resolution: {integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.2 + '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -1592,29 +1618,31 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.2: - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} dev: true - /@huntabyte/eslint-config@0.1.1(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.35.1)(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3): - resolution: {integrity: sha512-asDHBTG4SF89RAVPtrlaPLr+EvUGKzeFV9IhXO0iSYGYiUkaq32qE1IbEvtAJojncaxMU9A2iEZAFjvE7msASg==} + /@huntabyte/eslint-config@0.3.1(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.37.0)(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3): + resolution: {integrity: sha512-aLnVtA+n556gtv+NfCfIi1OoM0j0tsHP9ERlVaaJ3p+AHoZyT6FYefEInX6Snxwt4U5WzmL/gJ8w0QbyZdyH4w==} hasBin: true peerDependencies: - eslint: '>=8.40.0' - eslint-plugin-svelte: ^2.35.1 - svelte-eslint-parser: ^0.33.1 + eslint: ^9.0.0 + eslint-plugin-svelte: ^2.37.0 + svelte-eslint-parser: ^0.34.1 dependencies: - '@antfu/eslint-config': 2.11.6(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.35.1)(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3) + '@antfu/eslint-config': 2.13.3(@vue/compiler-sfc@3.4.21)(eslint-plugin-svelte@2.37.0)(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3) '@antfu/install-pkg': 0.3.2 '@clack/prompts': 0.7.0 - '@huntabyte/eslint-plugin': 0.0.1(eslint@8.57.0) + '@huntabyte/eslint-plugin': 0.1.0(eslint@9.0.0) + '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/parser': 7.6.0(eslint@9.0.0)(typescript@5.4.3) chalk: 5.3.0 - eslint: 8.57.0 - eslint-flat-config-utils: 0.1.2 - eslint-plugin-svelte: 2.35.1(eslint@8.57.0)(svelte@4.2.12) + eslint: 9.0.0 + eslint-flat-config-utils: 0.2.2 + eslint-plugin-svelte: 2.37.0(eslint@9.0.0)(svelte@5.0.0-next.100) local-pkg: 0.5.0 parse-gitignore: 2.0.0 - svelte-eslint-parser: 0.33.1(svelte@4.2.12) + svelte-eslint-parser: 0.34.1(svelte@5.0.0-next.100) yargs: 17.7.2 transitivePeerDependencies: - '@unocss/eslint-plugin' @@ -1625,6 +1653,7 @@ packages: - eslint-plugin-react - eslint-plugin-react-hooks - eslint-plugin-react-refresh + - eslint-plugin-solid - prettier-plugin-astro - prettier-plugin-slidev - supports-color @@ -1633,12 +1662,12 @@ packages: - vitest dev: true - /@huntabyte/eslint-plugin@0.0.1(eslint@8.57.0): - resolution: {integrity: sha512-Ksf//Ey+BcnUxvzKHTzyjZXzrfdnEda2rrNv9ygl4dlQHSI9WY9fhlh9Fn1LPqrWUz66mQHk0Bw/4wEf4R+XIw==} + /@huntabyte/eslint-plugin@0.1.0(eslint@9.0.0): + resolution: {integrity: sha512-u2TIbkMD8R+eke49PofIfu/hI542ZiLTynNVTtKkhIh1vmQiIPzcnVdVjuZ/aNvjIjpH9FnowyY2Xd+i4llqLQ==} peerDependencies: eslint: '*' dependencies: - eslint: 8.57.0 + eslint: 9.0.0 dev: true /@internationalized/date@3.5.2: @@ -1785,20 +1814,20 @@ packages: - supports-color dev: true - /@melt-ui/pp@0.3.0(@melt-ui/svelte@0.76.2)(svelte@4.2.12): + /@melt-ui/pp@0.3.0(@melt-ui/svelte@0.76.2)(svelte@5.0.0-next.100): resolution: {integrity: sha512-b07Bdh8l2KcwKVCXOY+SoBw1dk9eWvQfMSi6SoacpRVyVmmfpi0kV4oGt3HYF0tUCB3sEmVicxse50ZzZxEzEA==} engines: {pnpm: '>=8.6.3'} peerDependencies: '@melt-ui/svelte': '>= 0.29.0' svelte: ^3.55.0 || ^4.0.0 || ^5.0.0-next.1 dependencies: - '@melt-ui/svelte': 0.76.2(svelte@4.2.12) + '@melt-ui/svelte': 0.76.2(svelte@5.0.0-next.100) estree-walker: 3.0.3 - magic-string: 0.30.8 - svelte: 4.2.12 + magic-string: 0.30.9 + svelte: 5.0.0-next.100 dev: true - /@melt-ui/svelte@0.76.2(svelte@4.2.12): + /@melt-ui/svelte@0.76.2(svelte@5.0.0-next.100): resolution: {integrity: sha512-7SbOa11tXUS95T3fReL+dwDs5FyJtCEqrqG3inRziDws346SYLsxOQ6HmX+4BkIsQh1R8U3XNa+EMmdMt38lMA==} peerDependencies: svelte: '>=3 <5' @@ -1809,7 +1838,7 @@ packages: dequal: 2.0.3 focus-trap: 7.5.4 nanoid: 5.0.6 - svelte: 4.2.12 + svelte: 5.0.0-next.100 /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -2232,73 +2261,73 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@stylistic/eslint-plugin-js@1.7.0(eslint@8.57.0): + /@stylistic/eslint-plugin-js@1.7.0(eslint@9.0.0): resolution: {integrity: sha512-PN6On/+or63FGnhhMKSQfYcWutRlzOiYlVdLM6yN7lquoBTqUJHYnl4TA4MHwiAt46X5gRxDr1+xPZ1lOLcL+Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: '>=8.40.0' dependencies: - '@types/eslint': 8.56.6 + '@types/eslint': 8.56.7 acorn: 8.11.3 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.0.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 dev: true - /@stylistic/eslint-plugin-jsx@1.7.0(eslint@8.57.0): + /@stylistic/eslint-plugin-jsx@1.7.0(eslint@9.0.0): resolution: {integrity: sha512-BACdBwXakQvjYIST5N2WWhRbvhRsIxa/F59BiZol+0IH4FSmDXhie7v/yaxDIIA9CbfElzOmIA5nWNYTVXcnwQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: '>=8.40.0' dependencies: - '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) - '@types/eslint': 8.56.6 - eslint: 8.57.0 + '@stylistic/eslint-plugin-js': 1.7.0(eslint@9.0.0) + '@types/eslint': 8.56.7 + eslint: 9.0.0 estraverse: 5.3.0 picomatch: 4.0.2 dev: true - /@stylistic/eslint-plugin-plus@1.7.0(eslint@8.57.0)(typescript@5.4.3): + /@stylistic/eslint-plugin-plus@1.7.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-AabDw8sXsc70Ydx3qnbeTlRHZnIwY6UKEenBPURPhY3bfYWX+/pDpZH40HkOu94v8D0DUrocPkeeEUxl4e0JDg==} peerDependencies: eslint: '*' dependencies: - '@types/eslint': 8.56.6 - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 + '@types/eslint': 8.56.7 + '@typescript-eslint/utils': 6.21.0(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@stylistic/eslint-plugin-ts@1.7.0(eslint@8.57.0)(typescript@5.4.3): + /@stylistic/eslint-plugin-ts@1.7.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-QsHv98mmW1xaucVYQTyLDgEpybPJ/6jPPxVBrIchntWWwj74xCWKUiw79hu+TpYj/Pbhd9rkqJYLNq3pQGYuyA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: '>=8.40.0' dependencies: - '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) - '@types/eslint': 8.56.6 - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 + '@stylistic/eslint-plugin-js': 1.7.0(eslint@9.0.0) + '@types/eslint': 8.56.7 + '@typescript-eslint/utils': 6.21.0(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@stylistic/eslint-plugin@1.7.0(eslint@8.57.0)(typescript@5.4.3): + /@stylistic/eslint-plugin@1.7.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-ThMUjGIi/jeWYNvOdjZkoLw1EOVs0tEuKXDgWvTn8uWaEz55HuPlajKxjKLpv19C+qRDbKczJfzUODfCdME53A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: '>=8.40.0' dependencies: - '@stylistic/eslint-plugin-js': 1.7.0(eslint@8.57.0) - '@stylistic/eslint-plugin-jsx': 1.7.0(eslint@8.57.0) - '@stylistic/eslint-plugin-plus': 1.7.0(eslint@8.57.0)(typescript@5.4.3) - '@stylistic/eslint-plugin-ts': 1.7.0(eslint@8.57.0)(typescript@5.4.3) - '@types/eslint': 8.56.6 - eslint: 8.57.0 + '@stylistic/eslint-plugin-js': 1.7.0(eslint@9.0.0) + '@stylistic/eslint-plugin-jsx': 1.7.0(eslint@9.0.0) + '@stylistic/eslint-plugin-plus': 1.7.0(eslint@9.0.0)(typescript@5.4.3) + '@stylistic/eslint-plugin-ts': 1.7.0(eslint@9.0.0)(typescript@5.4.3) + '@types/eslint': 8.56.7 + eslint: 9.0.0 transitivePeerDependencies: - supports-color - typescript @@ -2311,13 +2340,13 @@ packages: wrangler: ^3.28.4 dependencies: '@cloudflare/workers-types': 4.20240329.0 - '@sveltejs/kit': 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7) + '@sveltejs/kit': 2.5.5(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8) esbuild: 0.19.12 worktop: 0.8.0-next.18 wrangler: 3.44.0 dev: true - /@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7): + /@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8): resolution: {integrity: sha512-ULe3PB00q4+wYRL+IS5FDPsCEVnhEITofm7b9Yz8malcH3r1SAnW/JJ6T13hIMeu8QNRIuVQWo+P4+2VklbnLQ==} engines: {node: '>=18.13'} hasBin: true @@ -2327,24 +2356,24 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.3 dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.2.7) + '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@5.0.0-next.100)(vite@5.2.8) '@types/cookie': 0.6.0 cookie: 0.6.0 devalue: 4.3.2 esm-env: 1.0.0 import-meta-resolve: 4.0.0 kleur: 4.1.5 - magic-string: 0.30.8 + magic-string: 0.30.9 mrmime: 2.0.0 sade: 1.8.1 set-cookie-parser: 2.6.0 sirv: 2.0.4 - svelte: 4.2.12 + svelte: 5.0.0-next.100 tiny-glob: 0.2.9 - vite: 5.2.7(@types/node@20.12.2) + vite: 5.2.8(@types/node@20.12.2) dev: true - /@sveltejs/package@2.3.0(svelte@4.2.12)(typescript@5.4.3): + /@sveltejs/package@2.3.0(svelte@5.0.0-next.100)(typescript@5.4.3): resolution: {integrity: sha512-wmtwEfi3gQnmtotAjygRHR6cmLfpblQl1dU764f3N2I5DPe34llFs44bHOYcuk91Bp2sSq6bWUmNwxGlYCchOA==} engines: {node: ^16.14 || >=18} hasBin: true @@ -2355,13 +2384,13 @@ packages: kleur: 4.1.5 sade: 1.8.1 semver: 7.6.0 - svelte: 4.2.12 - svelte2tsx: 0.7.5(svelte@4.2.12)(typescript@5.4.3) + svelte: 5.0.0-next.100 + svelte2tsx: 0.7.5(svelte@5.0.0-next.100)(typescript@5.4.3) transitivePeerDependencies: - typescript dev: true - /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7): + /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8): resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} engines: {node: ^18.0.0 || >=20} peerDependencies: @@ -2369,30 +2398,30 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.2.7) + '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@5.0.0-next.100)(vite@5.2.8) debug: 4.3.4 - svelte: 4.2.12 - vite: 5.2.7(@types/node@20.12.2) + svelte: 5.0.0-next.100 + vite: 5.2.8(@types/node@20.12.2) transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.7): - resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==} + /@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.100)(vite@5.2.8): + resolution: {integrity: sha512-sY6ncCvg+O3njnzbZexcVtUqOBE3iYmQPJ9y+yXSkOwG576QI/xJrBnQSRXFLGwJNBa0T78JEKg5cIR0WOAuUw==} engines: {node: ^18.0.0 || >=20} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.2.7) + '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@5.0.0-next.100)(vite@5.2.8) debug: 4.3.4 deepmerge: 4.3.1 kleur: 4.1.5 - magic-string: 0.30.8 - svelte: 4.2.12 - svelte-hmr: 0.15.3(svelte@4.2.12) - vite: 5.2.7(@types/node@20.12.2) - vitefu: 0.2.5(vite@5.2.7) + magic-string: 0.30.9 + svelte: 5.0.0-next.100 + svelte-hmr: 0.16.0(svelte@5.0.0-next.100) + vite: 5.2.8(@types/node@20.12.2) + vitefu: 0.2.5(vite@5.2.8) transitivePeerDependencies: - supports-color dev: true @@ -2467,17 +2496,17 @@ packages: dom-accessibility-api: 0.6.3 lodash: 4.17.21 redent: 3.0.0 - vitest: 1.4.0(jsdom@24.0.0) + vitest: 1.4.0(@types/node@20.12.2)(jsdom@24.0.0) dev: true - /@testing-library/svelte@4.1.0(svelte@4.2.12): + /@testing-library/svelte@4.1.0(svelte@5.0.0-next.100): resolution: {integrity: sha512-MJqe7x9WowkiAVdk9mvazEC2ktFZdmK2OqFVoO557PC37aBemQ4ozqdK3yrG34Zg9kuln3qgTVeLSh08e69AMw==} engines: {node: '>= 10'} peerDependencies: svelte: ^3 || ^4 dependencies: '@testing-library/dom': 9.3.4 - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true /@testing-library/user-event@14.5.2(@testing-library/dom@9.3.4): @@ -2509,8 +2538,8 @@ packages: '@types/ms': 0.7.34 dev: true - /@types/eslint@8.56.6: - resolution: {integrity: sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A==} + /@types/eslint@8.56.7: + resolution: {integrity: sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==} dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -2659,8 +2688,8 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==} + /@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -2671,13 +2700,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/type-utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/parser': 7.6.0(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/type-utils': 7.6.0(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -2688,8 +2717,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==} + /@typescript-eslint/parser@7.6.0(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2698,25 +2727,17 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 typescript: 5.4.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@5.62.0: - resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - dev: true - /@typescript-eslint/scope-manager@6.21.0: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2725,16 +2746,16 @@ packages: '@typescript-eslint/visitor-keys': 6.21.0 dev: true - /@typescript-eslint/scope-manager@7.4.0: - resolution: {integrity: sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==} + /@typescript-eslint/scope-manager@7.6.0: + resolution: {integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/visitor-keys': 7.6.0 dev: true - /@typescript-eslint/type-utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==} + /@typescript-eslint/type-utils@7.6.0(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -2743,52 +2764,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.3) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.3) debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 ts-api-utils: 1.3.0(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@5.62.0: - resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@typescript-eslint/types@6.21.0: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/types@7.4.0: - resolution: {integrity: sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==} + /@typescript-eslint/types@7.6.0: + resolution: {integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.3): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.6.0 - tsutils: 3.21.0(typescript@5.4.3) - typescript: 5.4.3 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.3): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2811,8 +2806,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.4.0(typescript@5.4.3): - resolution: {integrity: sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==} + /@typescript-eslint/typescript-estree@7.6.0(typescript@5.4.3): + resolution: {integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -2820,12 +2815,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/visitor-keys': 7.6.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.3 + minimatch: 9.0.4 semver: 7.6.0 ts-api-utils: 1.3.0(typescript@5.4.3) typescript: 5.4.3 @@ -2833,72 +2828,44 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.4.3) - eslint: 8.57.0 - eslint-scope: 5.1.1 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.3): + /@typescript-eslint/utils@6.21.0(eslint@9.0.0)(typescript@5.4.3): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.3) - eslint: 8.57.0 + eslint: 9.0.0 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@7.4.0(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==} + /@typescript-eslint/utils@7.6.0(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - eslint: 8.57.0 + '@typescript-eslint/scope-manager': 7.6.0 + '@typescript-eslint/types': 7.6.0 + '@typescript-eslint/typescript-estree': 7.6.0(typescript@5.4.3) + eslint: 9.0.0 semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@5.62.0: - resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.62.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@typescript-eslint/visitor-keys@6.21.0: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2907,11 +2874,11 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@7.4.0: - resolution: {integrity: sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==} + /@typescript-eslint/visitor-keys@7.6.0: + resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/types': 7.6.0 eslint-visitor-keys: 3.4.3 dev: true @@ -2938,7 +2905,7 @@ packages: /@vitest/snapshot@1.4.0: resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==} dependencies: - magic-string: 0.30.8 + magic-string: 0.30.9 pathe: 1.1.2 pretty-format: 29.7.0 dev: true @@ -2984,7 +2951,7 @@ packages: '@vue/compiler-ssr': 3.4.21 '@vue/shared': 3.4.21 estree-walker: 2.0.2 - magic-string: 0.30.8 + magic-string: 0.30.9 postcss: 8.4.38 source-map-js: 1.2.0 dev: true @@ -3008,6 +2975,13 @@ packages: acorn: 8.11.3 dev: true + /acorn-typescript@1.4.13(acorn@8.11.3): + resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==} + peerDependencies: + acorn: '>=8.9.0' + dependencies: + acorn: 8.11.3 + /acorn-walk@8.3.2: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} @@ -3298,12 +3272,6 @@ packages: engines: {node: '>=6'} dev: true - /builtins@5.0.1: - resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} - dependencies: - semver: 7.6.0 - dev: true - /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -3516,15 +3484,6 @@ packages: engines: {node: '>=6'} dev: true - /code-red@1.0.4: - resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - '@types/estree': 1.0.5 - acorn: 8.11.3 - estree-walker: 3.0.3 - periscopic: 3.1.0 - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -3654,13 +3613,6 @@ packages: which: 2.0.2 dev: true - /css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.2.0 - /css.escape@1.5.1: resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} dev: true @@ -3954,6 +3906,14 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /enhanced-resolve@5.16.0: + resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} + engines: {node: '>=10.13.0'} + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + dev: true + /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -4203,36 +4163,28 @@ packages: engines: {node: '>=12'} dev: true - /eslint-compat-utils@0.1.2(eslint@8.57.0): - resolution: {integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==} - engines: {node: '>=12'} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - eslint: 8.57.0 - dev: true - - /eslint-compat-utils@0.5.0(eslint@8.57.0): + /eslint-compat-utils@0.5.0(eslint@9.0.0): resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' dependencies: - eslint: 8.57.0 + eslint: 9.0.0 semver: 7.6.0 dev: true - /eslint-config-flat-gitignore@0.1.3: - resolution: {integrity: sha512-oQD+dEZv3RThN60tFqGFt+NJcO1DmssUcP+T/nlX+ZzEoEvVUYH0GU9X/VlmDXsbMsS9mONI1HrlxLgtKojw7w==} + /eslint-config-flat-gitignore@0.1.5: + resolution: {integrity: sha512-hEZLwuZjDBGDERA49c2q7vxc8sCGv8EdBp6PQYzGOMcHIgrfG9YOM6s/4jx24zhD+wnK9AI8mgN5RxSss5nClQ==} dependencies: find-up: 7.0.0 parse-gitignore: 2.0.0 dev: true - /eslint-flat-config-utils@0.1.2: - resolution: {integrity: sha512-NfeUJrbARSHGux2no/zz+YOjfMuPXpedcxRTqov3mlx9PJV2CYAJEj2EjbNSEyHMXQwNCfTtQVZXMSiktQTcpA==} + /eslint-flat-config-utils@0.2.2: + resolution: {integrity: sha512-iWjXCsGBuyqlGhmam4V9IXlxpDfnc7l0VC1YzncROF2PYIPSRpejugrIp2bXPT5mutKF3zq69Vbt7J9su9E/Lw==} dependencies: - '@types/eslint': 8.56.6 + '@types/eslint': 8.56.7 + pathe: 1.1.2 dev: true /eslint-import-resolver-node@0.3.9: @@ -4245,56 +4197,55 @@ packages: - supports-color dev: true - /eslint-merge-processors@0.1.0(eslint@8.57.0): + /eslint-merge-processors@0.1.0(eslint@9.0.0): resolution: {integrity: sha512-IvRXXtEajLeyssvW4wJcZ2etxkR9mUf4zpNwgI+m/Uac9RfXHskuJefkHUcawVzePnd6xp24enp5jfgdHzjRdQ==} peerDependencies: eslint: '*' dependencies: - eslint: 8.57.0 + eslint: 9.0.0 dev: true - /eslint-plugin-antfu@2.1.2(eslint@8.57.0): + /eslint-plugin-antfu@2.1.2(eslint@9.0.0): resolution: {integrity: sha512-s7ZTOM3uq0iqpp6gF0UEotnvup7f2PHBUftCytLZX0+6C9j9KadKZQh6bVVngAyFgsmeD9+gcBopOYLClb2oDg==} peerDependencies: eslint: '*' dependencies: - eslint: 8.57.0 + eslint: 9.0.0 dev: true - /eslint-plugin-es-x@7.6.0(eslint@8.57.0): + /eslint-plugin-es-x@7.6.0(eslint@9.0.0): resolution: {integrity: sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@eslint-community/regexpp': 4.10.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.0.0 + eslint-compat-utils: 0.5.0(eslint@9.0.0) dev: true - /eslint-plugin-eslint-comments@3.2.0(eslint@8.57.0): + /eslint-plugin-eslint-comments@3.2.0(eslint@9.0.0): resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.57.0 + eslint: 9.0.0 ignore: 5.3.1 dev: true - /eslint-plugin-import-x@0.4.4(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-+6vns/GOAL0K5tzQ7ZescD2vFBz3cICZqT9R5CQ9h/bTA+Jkae8DuHT2gYhFb2K97kzsLnmPmKM51Iq9g6vTRA==} + /eslint-plugin-import-x@0.5.0(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-C7R8Z4IzxmsoOPMtSzwuOBW5FH6iRlxHR6iTks+MzVlrk3r3TUxokkWTx3ypdj9nGOEP+CG/5e6ebZzHbxgbbQ==} engines: {node: '>=16'} peerDependencies: - eslint: ^7.2.0 || ^8 || ^9.0.0-0 + eslint: ^8.56.0 || ^9.0.0-0 dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.3) debug: 4.3.4 doctrine: 3.0.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.0.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.3 is-glob: 4.0.3 @@ -4305,8 +4256,8 @@ packages: - typescript dev: true - /eslint-plugin-jsdoc@48.2.2(eslint@8.57.0): - resolution: {integrity: sha512-S0Gk+rpT5w/ephKCncUY7kUsix9uE4B9XI8D/fS1/26d8okE+vZsuG1IvIt4B6sJUdQqsnzi+YXfmh+HJG11CA==} + /eslint-plugin-jsdoc@48.2.3(eslint@9.0.0): + resolution: {integrity: sha512-r9DMAmFs66VNvNqRLLjHejdnJtILrt3xGi+Qx0op0oRfFGVpOR1Hb3BC++MacseHx93d8SKYPhyrC9BS7Os2QA==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -4316,7 +4267,7 @@ packages: comment-parser: 1.4.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.0.0 esquery: 1.5.0 is-builtin-module: 3.2.1 semver: 7.6.0 @@ -4325,15 +4276,15 @@ packages: - supports-color dev: true - /eslint-plugin-jsonc@2.14.1(eslint@8.57.0): - resolution: {integrity: sha512-Tei6G4N7pZulP5MHi0EIdtseiCqUPkDMd0O8Zrw4muMIlsjJ5/B9X+U3Pfo6B7l0mTL9LN9FwuWT70dRJ6z7tg==} + /eslint-plugin-jsonc@2.15.0(eslint@9.0.0): + resolution: {integrity: sha512-wAphMVgTQPAKAYV8d/QEkEYDg8uer9nMQ85N17IUiJcAWLxJs83/Exe59dEH9yKUpvpLf46H+wR7/U7lZ3/NpQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + eslint: 9.0.0 + eslint-compat-utils: 0.5.0(eslint@9.0.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 @@ -4341,35 +4292,32 @@ packages: synckit: 0.6.2 dev: true - /eslint-plugin-markdown@4.0.1(eslint@8.57.0): + /eslint-plugin-markdown@4.0.1(eslint@9.0.0): resolution: {integrity: sha512-5/MnGvYU0i8MbHH5cg8S+Vl3DL+bqRNYshk1xUO86DilNBaxtTkhH+5FD0/yO03AmlI6+lfNFdk2yOw72EPzpA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8' dependencies: - eslint: 8.57.0 + eslint: 9.0.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-n@16.6.2(eslint@8.57.0): - resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==} - engines: {node: '>=16.0.0'} + /eslint-plugin-n@17.2.0(eslint@9.0.0): + resolution: {integrity: sha512-XBkFQxjTFKy9oc925ezHcDoZ8VLdGfxRkdZf0poR4TjC+zvm28pG2Tc7ZZpD1/UxSAzbw6Zz0WpnpUX3KruAAA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=7.0.0' + eslint: '>=8.23.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - builtins: 5.0.1 - eslint: 8.57.0 - eslint-plugin-es-x: 7.6.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + enhanced-resolve: 5.16.0 + eslint: 9.0.0 + eslint-plugin-es-x: 7.6.0(eslint@9.0.0) get-tsconfig: 4.7.3 - globals: 13.24.0 + globals: 14.0.0 ignore: 5.3.1 - is-builtin-module: 3.2.1 - is-core-module: 2.13.1 - minimatch: 3.1.2 - resolve: 1.22.8 + minimatch: 9.0.4 semver: 7.6.0 dev: true @@ -4378,8 +4326,8 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-perfectionist@2.7.0(eslint@8.57.0)(svelte-eslint-parser@0.33.1)(svelte@4.2.12)(typescript@5.4.3)(vue-eslint-parser@9.4.2): - resolution: {integrity: sha512-RpSMc0T0DT9DlOj4APzwlAjCqQMxFdsIYlupe73eDkKLn1mMK7fVw2z3nj2y822szKOpvHA7bDa56ySOlr4GXw==} + /eslint-plugin-perfectionist@2.8.0(eslint@9.0.0)(svelte-eslint-parser@0.34.1)(svelte@5.0.0-next.100)(typescript@5.4.3)(vue-eslint-parser@9.4.2): + resolution: {integrity: sha512-XBjQ4ctU1rOzQ4bFJoUowe8XdsIIz42JqNrouFlae1TO78HjoyYBaRP8+gAHDDQCSdHY10pbChyzlJeBA6D51w==} peerDependencies: astro-eslint-parser: ^0.16.0 eslint: '>=8.0.0' @@ -4396,75 +4344,75 @@ packages: vue-eslint-parser: optional: true dependencies: - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 + '@typescript-eslint/utils': 6.21.0(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 minimatch: 9.0.4 natural-compare-lite: 1.4.0 - svelte: 4.2.12 - svelte-eslint-parser: 0.33.1(svelte@4.2.12) - vue-eslint-parser: 9.4.2(eslint@8.57.0) + svelte: 5.0.0-next.100 + svelte-eslint-parser: 0.34.1(svelte@5.0.0-next.100) + vue-eslint-parser: 9.4.2(eslint@9.0.0) transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-svelte@2.35.1(eslint@8.57.0)(svelte@4.2.12): - resolution: {integrity: sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug==} + /eslint-plugin-svelte@2.37.0(eslint@9.0.0)(svelte@5.0.0-next.100): + resolution: {integrity: sha512-H/2Gz7agYHEMEEzRuLYuCmAIdjuBnbhFG9hOK0yCdSBvvJGJMkjo+lR6j67OIvLOavgp4L7zA5LnDKi8WqdPhQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0-0 - svelte: ^3.37.0 || ^4.0.0 + eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.95 peerDependenciesMeta: svelte: optional: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@jridgewell/sourcemap-codec': 1.4.15 debug: 4.3.4 - eslint: 8.57.0 - eslint-compat-utils: 0.1.2(eslint@8.57.0) + eslint: 9.0.0 + eslint-compat-utils: 0.5.0(eslint@9.0.0) esutils: 2.0.3 - known-css-properties: 0.29.0 + known-css-properties: 0.30.0 postcss: 8.4.38 postcss-load-config: 3.1.4(postcss@8.4.38) postcss-safe-parser: 6.0.0(postcss@8.4.38) postcss-selector-parser: 6.0.16 semver: 7.6.0 - svelte: 4.2.12 - svelte-eslint-parser: 0.33.1(svelte@4.2.12) + svelte: 5.0.0-next.100 + svelte-eslint-parser: 0.34.1(svelte@5.0.0-next.100) transitivePeerDependencies: - supports-color - ts-node dev: true - /eslint-plugin-toml@0.10.0(eslint@8.57.0): - resolution: {integrity: sha512-HzhRjePs4FDszPRY6ryHXV90MsSEkJsWnP175x33Iop/W6/hb80qjzImO5LlQfqhX3B0TkotOFSIigNI4AdGsw==} + /eslint-plugin-toml@0.11.0(eslint@9.0.0): + resolution: {integrity: sha512-sau+YvPU4fWTjB+qtBt3n8WS87aoDCs+BVbSUAemGaIsRNbvR9uEk+Tt892iLHTGvp/DPWYoCX4/8DoyAbB+sQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.0.0 + eslint-compat-utils: 0.5.0(eslint@9.0.0) lodash: 4.17.21 toml-eslint-parser: 0.9.3 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-unicorn@51.0.1(eslint@8.57.0): - resolution: {integrity: sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==} + /eslint-plugin-unicorn@52.0.0(eslint@9.0.0): + resolution: {integrity: sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.56.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@eslint/eslintrc': 2.1.4 ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.36.1 - eslint: 8.57.0 + eslint: 9.0.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -4479,7 +4427,7 @@ packages: - supports-color dev: true - /eslint-plugin-unused-imports@3.1.0(@typescript-eslint/eslint-plugin@7.4.0)(eslint@8.57.0): + /eslint-plugin-unused-imports@3.1.0(@typescript-eslint/eslint-plugin@7.6.0)(eslint@9.0.0): resolution: {integrity: sha512-9l1YFCzXKkw1qtAru1RWUtG2EVDZY0a0eChKXcL+EZ5jitG7qxdctu4RnvhOJHv4xfmUf7h+JJPINlVpGhZMrw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4489,17 +4437,17 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 + '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 eslint-rule-composer: 0.3.0 dev: true - /eslint-plugin-vitest@0.4.1(@typescript-eslint/eslint-plugin@7.4.0)(eslint@8.57.0)(typescript@5.4.3): - resolution: {integrity: sha512-+PnZ2u/BS+f5FiuHXz4zKsHPcMKHie+K+1Uvu/x91ovkCMEOJqEI8E9Tw1Wzx2QRz4MHOBHYf1ypO8N1K0aNAA==} + /eslint-plugin-vitest@0.5.1(@typescript-eslint/eslint-plugin@7.6.0)(eslint@9.0.0)(typescript@5.4.3): + resolution: {integrity: sha512-g137wC+LCq2N+tfqK39Nl6Rs2N9u+zu6lWxaVgpN3wX+Kq6zSyxjPSI/ZBXUjP+qandT3z1DM5wK5IjD4XrAIw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': '*' - eslint: '>=8.0.0' + eslint: ^8.57.0 || ^9.0.0 vitest: '*' peerDependenciesMeta: '@typescript-eslint/eslint-plugin': @@ -4507,42 +4455,42 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.4.0(@typescript-eslint/parser@7.4.0)(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - eslint: 8.57.0 + '@typescript-eslint/eslint-plugin': 7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.6.0(eslint@9.0.0)(typescript@5.4.3) + eslint: 9.0.0 transitivePeerDependencies: - supports-color - typescript dev: true - /eslint-plugin-vue@9.24.0(eslint@8.57.0): - resolution: {integrity: sha512-9SkJMvF8NGMT9aQCwFc5rj8Wo1XWSMSHk36i7ZwdI614BU7sIOR28ZjuFPKp8YGymZN12BSEbiSwa7qikp+PBw==} + /eslint-plugin-vue@9.24.1(eslint@9.0.0): + resolution: {integrity: sha512-wk3SuwmS1pZdcuJlokGYEi/buDOwD6KltvhIZyOnpJ/378dcQ4zchu9PAMbbLAaydCz1iYc5AozszcOOgZIIOg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) + eslint: 9.0.0 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.0.16 semver: 7.6.0 - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.2(eslint@9.0.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-yml@1.13.2(eslint@8.57.0): - resolution: {integrity: sha512-1i71VhmsG5UxE41rIJmJjhlTTxYy7upAY5Hqj8AdBc7rfJzRIZr3a2spuOS8+N7ZDCWsHAWY3J6lzQNQHDv6Uw==} + /eslint-plugin-yml@1.14.0(eslint@9.0.0): + resolution: {integrity: sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.0.0 + eslint-compat-utils: 0.5.0(eslint@9.0.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.2 @@ -4550,14 +4498,14 @@ packages: - supports-color dev: true - /eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.4.21)(eslint@8.57.0): + /eslint-processor-vue-blocks@0.1.1(@vue/compiler-sfc@3.4.21)(eslint@9.0.0): resolution: {integrity: sha512-9+dU5lU881log570oBwpelaJmOfOzSniben7IWEDRYQPPWwlvaV7NhOtsTuUWDqpYT+dtKKWPsgz4OkOi+aZnA==} peerDependencies: '@vue/compiler-sfc': ^3.3.0 eslint: ^8.50.0 dependencies: '@vue/compiler-sfc': 3.4.21 - eslint: 8.57.0 + eslint: 9.0.0 dev: true /eslint-rule-composer@0.3.0: @@ -4565,17 +4513,17 @@ packages: engines: {node: '>=4.0.0'} dev: true - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 - estraverse: 4.3.0 + estraverse: 5.3.0 dev: true - /eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-scope@8.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -4586,41 +4534,42 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: true + + /eslint@9.0.0: + resolution: {integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/eslintrc': 3.0.2 + '@eslint/js': 9.0.0 + '@humanwhocodes/config-array': 0.12.3 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -4635,6 +4584,14 @@ packages: /esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} + + /espree@10.0.1: + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 4.0.0 dev: true /espree@9.6.1: @@ -4664,7 +4621,6 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 '@types/estree': 1.0.5 - dev: true /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} @@ -4673,11 +4629,6 @@ packages: estraverse: 5.3.0 dev: true - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -4739,6 +4690,7 @@ packages: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: '@types/estree': 1.0.5 + dev: true /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} @@ -4843,11 +4795,11 @@ packages: web-streams-polyfill: 3.3.3 dev: true - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + /file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 dev: true /fill-range@7.0.1: @@ -4889,13 +4841,12 @@ packages: pkg-dir: 4.2.0 dev: true - /flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + /flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 dev: true /flatted@3.3.1: @@ -5108,6 +5059,11 @@ packages: type-fest: 0.20.2 dev: true + /globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + dev: true + /globals@15.0.0: resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} engines: {node: '>=18'} @@ -6049,8 +6005,8 @@ packages: engines: {node: '>=6'} dev: true - /known-css-properties@0.29.0: - resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==} + /known-css-properties@0.30.0: + resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==} dev: true /levn@0.4.1: @@ -6191,8 +6147,8 @@ packages: sourcemap-codec: 1.4.8 dev: true - /magic-string@0.30.8: - resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} + /magic-string@0.30.9: + resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -6498,22 +6454,19 @@ packages: '@types/mdast': 4.0.3 dev: true - /mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - - /mdsx@0.0.5(svelte@4.2.12): + /mdsx@0.0.5(svelte@5.0.0-next.100): resolution: {integrity: sha512-crYbZC0L5kQjaRABvHIXj9H2O1qikIw9KKqS3bo2En4XVgvHH7TO5bJ2X86PxJK7H6QEBAubjUma9+qpbsPC5A==} peerDependencies: svelte: ^4.0.0 dependencies: esrap: 1.2.1 hast-util-to-html: 9.0.0 - magic-string: 0.30.8 + magic-string: 0.30.9 mdast-util-to-markdown: 2.1.0 rehype-stringify: 10.0.0 remark-parse: 11.0.0 remark-rehype: 11.1.0 - svelte: 4.2.12 + svelte: 5.0.0-next.100 unified: 11.0.4 unist-util-visit: 5.0.0 vfile: 6.0.1 @@ -7228,12 +7181,12 @@ packages: ufo: 1.5.3 dev: true - /mode-watcher@0.2.2(svelte@4.2.12): + /mode-watcher@0.2.2(svelte@5.0.0-next.100): resolution: {integrity: sha512-QjkHQL9pXrr7Vb0P3WbOWAF8mv1Q6jEwUZ5GUyCnI9eEoXH234zuaOGChUF7ZQtjxwtmXDzKFSW/36TvLDg1/A==} peerDependencies: svelte: ^4.0.0 dependencies: - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true /mri@1.2.0: @@ -7652,13 +7605,14 @@ packages: '@types/estree': 1.0.5 estree-walker: 3.0.3 is-reference: 3.0.2 + dev: true - /phosphor-svelte@1.4.2(svelte@4.2.12): + /phosphor-svelte@1.4.2(svelte@5.0.0-next.100): resolution: {integrity: sha512-wdHKlZbE5D3ad1dd4K9bqWxpOb6gIwe+/ZeXGI9YpdKqECxqd+g3/NsLYE1+/hjlXixTWhQ7VMVIxTtBRXegCg==} peerDependencies: svelte: '>=3' dependencies: - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true /picocolors@1.0.0: @@ -7860,14 +7814,14 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier-plugin-svelte@3.2.2(prettier@3.2.5)(svelte@4.2.12): + /prettier-plugin-svelte@3.2.2(prettier@3.2.5)(svelte@5.0.0-next.100): resolution: {integrity: sha512-ZzzE/wMuf48/1+Lf2Ffko0uDa6pyCfgHV6+uAhtg2U0AAXGrhCSW88vEJNAkAxW5qyrFY1y1zZ4J8TgHrjW++Q==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 dependencies: prettier: 3.2.5 - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true /prettier-plugin-tailwindcss@0.5.13(prettier-plugin-svelte@3.2.2)(prettier@3.2.5): @@ -7923,7 +7877,7 @@ packages: optional: true dependencies: prettier: 3.2.5 - prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.12) + prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@5.0.0-next.100) dev: true /prettier@2.8.8: @@ -8308,13 +8262,6 @@ packages: glob: 7.2.3 dev: true - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - /rollup-plugin-inject@3.0.2: resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. @@ -8583,6 +8530,7 @@ packages: /source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + dev: true /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -8839,8 +8787,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check@3.6.8(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@4.2.12): - resolution: {integrity: sha512-rhXU7YCDtL+lq2gCqfJDXKTxJfSsCgcd08d7VWBFxTw6IWIbMWSaASbAOD3N0VV9TYSSLUqEBiratLd8WxAJJA==} + /svelte-check@3.6.9(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@5.0.0-next.100): + resolution: {integrity: sha512-hDQrk3L0osX07djQyMiXocKysTLfusqi8AriNcCiQxhQR49/LonYolcUGMtZ0fbUR8HTR198Prrgf52WWU9wEg==} hasBin: true peerDependencies: svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 @@ -8851,8 +8799,8 @@ packages: import-fresh: 3.3.0 picocolors: 1.0.0 sade: 1.8.1 - svelte: 4.2.12 - svelte-preprocess: 5.1.3(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@4.2.12)(typescript@5.4.3) + svelte: 5.0.0-next.100 + svelte-preprocess: 5.1.3(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@5.0.0-next.100)(typescript@5.4.3) typescript: 5.4.3 transitivePeerDependencies: - '@babel/core' @@ -8866,11 +8814,11 @@ packages: - sugarss dev: true - /svelte-eslint-parser@0.33.1(svelte@4.2.12): - resolution: {integrity: sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==} + /svelte-eslint-parser@0.34.1(svelte@5.0.0-next.100): + resolution: {integrity: sha512-9+uLA1pqI9AZioKVGJzYYmlOZWxfoCXSbAM9iaNm7H01XlYlzRTtJfZgl9o3StQGN41PfGJIbkKkfk3e/pHFfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - svelte: ^3.37.0 || ^4.0.0 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.94 peerDependenciesMeta: svelte: optional: true @@ -8880,19 +8828,19 @@ packages: espree: 9.6.1 postcss: 8.4.38 postcss-scss: 4.0.9(postcss@8.4.38) - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true - /svelte-hmr@0.15.3(svelte@4.2.12): - resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==} + /svelte-hmr@0.16.0(svelte@5.0.0-next.100): + resolution: {integrity: sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==} engines: {node: ^12.20 || ^14.13.1 || >= 16} peerDependencies: svelte: ^3.19.0 || ^4.0.0 dependencies: - svelte: 4.2.12 + svelte: 5.0.0-next.100 dev: true - /svelte-preprocess@5.1.3(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@4.2.12)(typescript@5.4.3): + /svelte-preprocess@5.1.3(postcss-load-config@5.0.3)(postcss@8.4.38)(svelte@5.0.0-next.100)(typescript@5.4.3): resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==} engines: {node: '>= 16.0.0', pnpm: ^8.0.0} requiresBuild: true @@ -8932,16 +8880,16 @@ packages: dependencies: '@types/pug': 2.0.10 detect-indent: 6.1.0 - magic-string: 0.30.8 + magic-string: 0.30.9 postcss: 8.4.38 postcss-load-config: 5.0.3(postcss@8.4.38) sorcery: 0.11.0 strip-indent: 3.0.0 - svelte: 4.2.12 + svelte: 5.0.0-next.100 typescript: 5.4.3 dev: true - /svelte2tsx@0.7.5(svelte@4.2.12)(typescript@5.4.3): + /svelte2tsx@0.7.5(svelte@5.0.0-next.100)(typescript@5.4.3): resolution: {integrity: sha512-+y8z4YLGsCYN8yjkqPXrqg6yKa73IZfU2WC3MVxiM0YU2/HbGZ1Tiq1ceKCOhMQVBFWjOgC/C465wN/ux6FsDQ==} peerDependencies: svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 @@ -8949,28 +8897,27 @@ packages: dependencies: dedent-js: 1.0.1 pascal-case: 3.1.2 - svelte: 4.2.12 + svelte: 5.0.0-next.100 typescript: 5.4.3 dev: true - /svelte@4.2.12: - resolution: {integrity: sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==} - engines: {node: '>=16'} + /svelte@5.0.0-next.100: + resolution: {integrity: sha512-pLQMPPXPPPcogl0yPphFIRaBFDiCKSgCdM78E0A0f6DPDJBL9Qxyu0uU4LyUAXYMKQbV+UTBTOwhdyj6KU9h8g==} + engines: {node: '>=18'} dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.25 '@types/estree': 1.0.5 acorn: 8.11.3 + acorn-typescript: 1.4.13(acorn@8.11.3) aria-query: 5.3.0 axobject-query: 4.0.0 - code-red: 1.0.4 - css-tree: 2.3.1 - estree-walker: 3.0.3 + esm-env: 1.0.0 + esrap: 1.2.1 is-reference: 3.0.2 locate-character: 3.0.0 - magic-string: 0.30.8 - periscopic: 3.1.0 + magic-string: 0.30.9 + zimmerframe: 1.1.2 /symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -9037,6 +8984,11 @@ packages: - ts-node dev: true + /tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + dev: true + /term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -9171,23 +9123,9 @@ packages: resolution: {integrity: sha512-pefrkcd4lmIVR0LA49Imjf9DYLK8vtWhqBPA3Ya1ir8xCW0O2yjL9dsCVvI7pCodLC5q7smNpEtDR2yVulQxOg==} dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true - /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tsutils@3.21.0(typescript@5.4.3): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.4.3 - dev: true - /tty-table@4.2.3: resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} engines: {node: '>=8.0.0'} @@ -9547,7 +9485,7 @@ packages: vfile-message: 4.0.2 dev: true - /vite-node@1.4.0: + /vite-node@1.4.0(@types/node@20.12.2): resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -9556,7 +9494,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.7(@types/node@20.12.2) + vite: 5.2.8(@types/node@20.12.2) transitivePeerDependencies: - '@types/node' - less @@ -9568,8 +9506,8 @@ packages: - terser dev: true - /vite@5.2.7(@types/node@20.12.2): - resolution: {integrity: sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==} + /vite@5.2.8(@types/node@20.12.2): + resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -9604,7 +9542,7 @@ packages: fsevents: 2.3.3 dev: true - /vitefu@0.2.5(vite@5.2.7): + /vitefu@0.2.5(vite@5.2.8): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 @@ -9612,10 +9550,10 @@ packages: vite: optional: true dependencies: - vite: 5.2.7(@types/node@20.12.2) + vite: 5.2.8(@types/node@20.12.2) dev: true - /vitest@1.4.0(jsdom@24.0.0): + /vitest@1.4.0(@types/node@20.12.2)(jsdom@24.0.0): resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -9640,6 +9578,7 @@ packages: jsdom: optional: true dependencies: + '@types/node': 20.12.2 '@vitest/expect': 1.4.0 '@vitest/runner': 1.4.0 '@vitest/snapshot': 1.4.0 @@ -9651,15 +9590,15 @@ packages: execa: 8.0.1 jsdom: 24.0.0 local-pkg: 0.5.0 - magic-string: 0.30.8 + magic-string: 0.30.9 pathe: 1.1.2 picocolors: 1.0.0 std-env: 3.7.0 strip-literal: 2.1.0 tinybench: 2.6.0 tinypool: 0.8.3 - vite: 5.2.7(@types/node@20.12.2) - vite-node: 1.4.0 + vite: 5.2.8(@types/node@20.12.2) + vite-node: 1.4.0(@types/node@20.12.2) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -9671,14 +9610,14 @@ packages: - terser dev: true - /vue-eslint-parser@9.4.2(eslint@8.57.0): + /vue-eslint-parser@9.4.2(eslint@9.0.0): resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -10029,7 +9968,6 @@ packages: /zimmerframe@1.1.2: resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} - dev: true /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} diff --git a/sites/docs/package.json b/sites/docs/package.json index d78a3ea71..fccb7ad1f 100644 --- a/sites/docs/package.json +++ b/sites/docs/package.json @@ -19,7 +19,7 @@ "@prettier/sync": "0.3.0", "@sveltejs/adapter-cloudflare": "^4.2.0", "@sveltejs/kit": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^3.0.2", + "@sveltejs/vite-plugin-svelte": "^3.1.0", "@tailwindcss/typography": "^0.5.10", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.3", @@ -38,8 +38,8 @@ "rehype-slug": "^6.0.0", "remark-gfm": "^4.0.0", "shiki": "^1.1.1", - "svelte": "^4.2.9", - "svelte-check": "^3.6.3", + "svelte": "5.0.0-next.100", + "svelte-check": "^3.6.9", "tailwind-merge": "^2.2.1", "tailwind-variants": "^0.1.20", "tailwindcss": "^3.4.1", @@ -48,7 +48,7 @@ "unified": "^11.0.4", "unist-builder": "^4.0.0", "unist-util-visit": "^5.0.0", - "vite": "^5.0.12" + "vite": "^5.2.8" }, "type": "module", "dependencies": { diff --git a/sites/docs/src/lib/components/api-ref/props-table.svelte b/sites/docs/src/lib/components/api-ref/props-table.svelte index a89fd1286..40524ccaf 100644 --- a/sites/docs/src/lib/components/api-ref/props-table.svelte +++ b/sites/docs/src/lib/components/api-ref/props-table.svelte @@ -6,7 +6,7 @@ import { parseMarkdown } from "$lib/utils/index.js"; export let props: PropObj>; - export let slot = false; + export let slotted = false; $: propData = Object.entries(props).map(([name, prop]) => { const { type, description, default: defaultVal, required } = prop as PropSchema; @@ -18,7 +18,7 @@ {slot ? "Slot" : ""} Property{slotted ? "Slot" : ""} Property Type Description @@ -42,7 +42,7 @@ {@html parseMarkdown(description)}

- {#if !slot} + {#if !slotted}
Default: diff --git a/sites/docs/src/lib/components/api-section.svelte b/sites/docs/src/lib/components/api-section.svelte index ac4018b0d..d4677d19d 100644 --- a/sites/docs/src/lib/components/api-section.svelte +++ b/sites/docs/src/lib/components/api-section.svelte @@ -6,6 +6,9 @@ import { parseMarkdown } from "$lib/utils/index.js"; export let schemas: APISchema[] = []; + + // eslint-disable-next-line no-unused-expressions, svelte/valid-compile + $page

API Reference

@@ -29,7 +32,7 @@ {/if} {#if schema.slotProps} - + {/if} {#if schema.dataAttributes && schema.dataAttributes.length} diff --git a/sites/docs/src/lib/components/demos/accordion-demo.svelte b/sites/docs/src/lib/components/demos/accordion-demo.svelte index 46d5b2c6d..64857d79e 100644 --- a/sites/docs/src/lib/components/demos/accordion-demo.svelte +++ b/sites/docs/src/lib/components/demos/accordion-demo.svelte @@ -21,7 +21,7 @@ ]; - + {#each items as item, i} diff --git a/sites/docs/src/routes/docs/[...slug]/+page.svelte b/sites/docs/src/routes/docs/[...slug]/+page.svelte index b5f701885..fad1af37a 100644 --- a/sites/docs/src/routes/docs/[...slug]/+page.svelte +++ b/sites/docs/src/routes/docs/[...slug]/+page.svelte @@ -1,19 +1,16 @@
- {doc.title} - {doc.description} + {data.metadata.title} + {data.metadata.description}
diff --git a/sites/docs/svelte.config.js b/sites/docs/svelte.config.js index 0bbca6cdd..630d187ae 100644 --- a/sites/docs/svelte.config.js +++ b/sites/docs/svelte.config.js @@ -3,7 +3,7 @@ import url from "node:url"; import adapter from "@sveltejs/adapter-cloudflare"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import { mdsx } from "mdsx"; -import { preprocessMeltUI, sequence } from "@melt-ui/pp"; +import { preprocessMeltUI } from "@melt-ui/pp"; import { mdsxConfig } from "./mdsx.config.js"; const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); @@ -12,16 +12,14 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); const config = { preprocess: [ mdsx(mdsxConfig), - sequence([ - vitePreprocess({ - style: { - css: { - postcss: path.join(__dirname, "postcss.config.cjs"), - }, - }, - }), - preprocessMeltUI(), - ]), + vitePreprocess({ + style: { + css: { + postcss: path.join(__dirname, "postcss.config.cjs"), + }, + }, + }), + preprocessMeltUI(), ], extensions: [".svelte", ".md"], From 6a22de29040c5efb2533d1a4c4caa55329db28b1 Mon Sep 17 00:00:00 2001 From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:28:51 -0400 Subject: [PATCH 002/322] next: Avatar & Accordion Updates (#452) --- .../components/accordion-content.svelte | 13 +- .../components/accordion-header.svelte | 19 ++- .../components/accordion-item.svelte | 11 +- .../components/accordion-trigger.svelte | 13 +- .../accordion/components/accordion.svelte | 20 +-- .../bits-ui/src/lib/bits/accordion/ctx.ts | 61 -------- .../src/lib/bits/accordion/state.svelte.ts | 92 ++++++++---- .../avatar/components/avatar-fallback.svelte | 23 +-- .../avatar/components/avatar-image.svelte | 23 +-- .../lib/bits/avatar/components/avatar.svelte | 37 +++-- packages/bits-ui/src/lib/bits/avatar/ctx.ts | 43 ------ .../src/lib/bits/avatar/state.svelte.ts | 140 ++++++++++++++++++ packages/bits-ui/src/lib/bits/avatar/types.ts | 6 - .../lib/bits/utilities/with-transition.svelte | 31 ++-- packages/bits-ui/src/lib/internal/attrs.ts | 4 +- .../lib/components/demos/avatar-demo.svelte | 2 +- 16 files changed, 293 insertions(+), 245 deletions(-) delete mode 100644 packages/bits-ui/src/lib/bits/accordion/ctx.ts delete mode 100644 packages/bits-ui/src/lib/bits/avatar/ctx.ts diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte index 9a0e60b9b..9e095b7b3 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte @@ -8,7 +8,12 @@ import type { AccordionContentProps } from "../types.js"; import WithTransition from "$lib/bits/utilities/with-transition.svelte"; - let { child, asChild, ...restProps }: AccordionContentProps = $props(); + let { + child, + asChild, + el = $bindable(), + ...restProps + }: AccordionContentProps = $props(); const content = getAccordionContentState(); @@ -19,9 +24,7 @@ {#if asChild && content.item.isSelected} - {#if child} - {@render child(mergedProps)} - {/if} + {@render child?.(mergedProps)} {:else} - + {/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte index 95f9d943c..56c6a11ce 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte @@ -1,7 +1,14 @@ -{#if asChild && child} - {@render child(mergedProps)} +{#if asChild} + {@render child?.(mergedProps)} {:else} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte index 53bba18af..b30075674 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte @@ -7,7 +7,7 @@ value, children, child, - el, + el = $bindable(), ...restProps }: AccordionItemProps = $props(); @@ -25,17 +25,16 @@ const mergedProps = $derived({ ...restProps, + ...item.props, "data-state": item.isSelected ? "open" : "closed", "data-disabled": isDisabled ? "" : undefined, }); -{#if asChild && child} - {@render child(mergedProps)} +{#if asChild} + {@render child?.(mergedProps)} {:else}
- {#if children} - {@render children()} - {/if} + {@render children?.()}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte index 8832b41fc..7de657eca 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte @@ -6,6 +6,7 @@ disabled = false, asChild, el, + id, onkeydown = undefined, onclick = undefined, children, @@ -23,7 +24,9 @@ trigger.disabled = disabled; }); $effect.pre(() => { - trigger.el = el; + if (id) { + trigger.id = id; + } }); $effect.pre(() => { trigger.handlers.click = onclick; @@ -38,12 +41,10 @@ }); -{#if asChild && child} - {@render child(mergedProps)} +{#if asChild} + {@render child?.(mergedProps)} {:else} {/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte index e15bb9b6a..6743ffc98 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion.svelte @@ -10,11 +10,13 @@ child, type, value = $bindable(), - el, + el = $bindable(), + id, + onValueChange, ...restProps }: AccordionRootProps = $props(); - const rootState = setAccordionRootState({ type, value }); + const rootState = setAccordionRootState({ type, value, id, onValueChange }); $effect.pre(() => { if (value !== undefined) { @@ -25,7 +27,9 @@ value = rootState.value; }); $effect.pre(() => { - rootState.el = el; + if (id) { + rootState.id = id; + } }); $effect.pre(() => { rootState.disabled = disabled; @@ -35,12 +39,10 @@ }); -{#if asChild && child} - {@render child(restProps)} +{#if asChild} + {@render child?.(restProps)} {:else} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{/if} diff --git a/packages/bits-ui/src/lib/bits/accordion/ctx.ts b/packages/bits-ui/src/lib/bits/accordion/ctx.ts deleted file mode 100644 index bc1cdca31..000000000 --- a/packages/bits-ui/src/lib/bits/accordion/ctx.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { type CreateAccordionProps, createAccordion } from "@melt-ui/svelte"; -import { getContext, setContext } from "svelte"; -import type { ItemProps } from "./index.js"; -import { createBitAttrs, getOptionUpdater, removeUndefined } from "$lib/internal/index.js"; - -function getAccordionData() { - const NAME = "accordion" as const; - const ITEM_NAME = "accordion-item"; - const PARTS = ["root", "content", "header", "item", "trigger"] as const; - - return { NAME, ITEM_NAME, PARTS }; -} - -export function setCtx(props: CreateAccordionProps) { - const initAccordion = createAccordion(removeUndefined(props)); - const { NAME, PARTS } = getAccordionData(); - const getAttrs = createBitAttrs(NAME, PARTS); - const accordion = { - ...initAccordion, - getAttrs, - updateOption: getOptionUpdater(initAccordion.options), - }; - - setContext(NAME, accordion); - return accordion; -} - -export function getCtx() { - const { NAME } = getAccordionData(); - return getContext>(NAME); -} - -export function setItem(props: ItemProps) { - const { ITEM_NAME } = getAccordionData(); - setContext(ITEM_NAME, { ...props }); - const ctx = getCtx(); - return { ...ctx, props }; -} - -export function getItemProps() { - const { ITEM_NAME } = getAccordionData(); - return getContext(ITEM_NAME); -} - -export function getContent() { - const ctx = getCtx(); - const { value: props } = getItemProps(); - return { - ...ctx, - props, - }; -} - -export function getTrigger() { - const ctx = getCtx(); - const { value, disabled } = getItemProps(); - return { - ...ctx, - props: { value, disabled }, - }; -} diff --git a/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts b/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts index 07b60a239..9fcdfff96 100644 --- a/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts +++ b/packages/bits-ui/src/lib/bits/accordion/state.svelte.ts @@ -4,6 +4,7 @@ import { type OnChangeFn, composeHandlers, dataDisabledAttrs, + generateId, kbd, openClosedAttrs, verifyContextDeps, @@ -13,21 +14,34 @@ import { * BASE */ interface AccordionBaseStateProps { - el?: HTMLElement | null; + id?: string | null; disabled?: boolean; forceVisible?: boolean; } +interface AccordionRootAttrs { + id: string; + "data-accordion-root": string; +} + class AccordionBaseState { - el: HTMLElement | null | undefined = $state(null); + id: string = $state(generateId()); disabled: boolean = $state(false); forceVisible: boolean = $state(false); + attrs: AccordionRootAttrs = $derived({ + id: this.id, + "data-accordion-root": "", + }); constructor(props: AccordionBaseStateProps) { - this.el = props.el ?? this.el; + this.id = props.id ?? this.id; this.disabled = props.disabled ?? this.disabled; this.forceVisible = props.forceVisible ?? this.forceVisible; } + + get props() { + return this.attrs; + } } /** @@ -37,6 +51,7 @@ class AccordionBaseState { interface AccordionSingleStateProps extends AccordionBaseStateProps { value?: string; onValueChange?: OnChangeFn; + id?: string | null; } export class AccordionSingleState extends AccordionBaseState { @@ -91,11 +106,18 @@ type AccordionItemStateProps = { rootState: AccordionState; }; +interface AccordionItemAttrs { + "data-accordion-item": string; +} + export class AccordionItemState { value: string = $state(""); disabled: boolean = $state(false); isSelected: boolean = $state(false); root: AccordionState; + attrs: AccordionItemAttrs = { + "data-accordion-item": "", + }; constructor(props: AccordionItemStateProps) { this.value = props.value; @@ -127,6 +149,10 @@ export class AccordionItemState { } } + get props() { + return this.attrs; + } + createTrigger(props: AccordionTriggerStateProps) { return new AccordionTriggerState(props, this); } @@ -143,29 +169,29 @@ export class AccordionItemState { type AccordionTriggerStateProps = { onclick?: (e: MouseEvent) => void; onkeydown?: (e: KeyboardEvent) => void; - disabled: boolean; + disabled?: boolean; + id?: string; }; -const defaultAccordionTriggerProps = { - disabled: false, - el: null, - handlers: { - click: undefined, - keydown: undefined, - }, +interface AccordionTriggerHandlers { + click?: EventCallback; + keydown?: EventCallback; +} + +const defaultAccordionTriggerHandlers: AccordionTriggerHandlers = { + click: () => {}, + keydown: () => {}, }; class AccordionTriggerState { disabled: boolean = $state(false); - el: HTMLElement | null | undefined = $state(); + id: string = $state(generateId()); root: AccordionState = undefined as unknown as AccordionState; itemState: AccordionItemState = undefined as unknown as AccordionItemState; - handlers: { - click: EventCallback | undefined; - keydown: EventCallback | undefined; - } = $state(defaultAccordionTriggerProps.handlers); + handlers: AccordionTriggerHandlers = $state(defaultAccordionTriggerHandlers); isDisabled: boolean = $state(false); attrs: Record = $derived({ + id: this.id, disabled: this.disabled, "aria-expanded": this.itemState.isSelected ? "true" : "false", "aria-disabled": this.isDisabled ? "true" : "false", @@ -179,8 +205,9 @@ class AccordionTriggerState { this.disabled = props.disabled || itemState.disabled || itemState.root.disabled; this.itemState = itemState; this.root = itemState.root; - this.handlers.click = props.onclick; - this.handlers.keydown = props.onkeydown; + this.handlers.click = props.onclick ?? this.onclick; + this.handlers.keydown = props.onkeydown ?? this.onkeydown; + this.id = props.id ?? this.id; $effect(() => { this.isDisabled = this.disabled || this.itemState.disabled || this.root.disabled; @@ -198,22 +225,25 @@ class AccordionTriggerState { e.preventDefault(); - if ([kbd.SPACE, kbd.ENTER].includes(e.key)) { + if (e.key === kbd.SPACE || e.key === kbd.ENTER) { this.itemState.updateValue(); return; } - if (!this.root.el || !this.el) return; + if (!this.root.id || !this.id) return; + + const rootEl = document.getElementById(this.root.id); + if (!rootEl) return; + const itemEl = document.getElementById(this.id); + if (!itemEl) return; - const items = Array.from( - this.root.el.querySelectorAll("[data-accordion-trigger]") - ); + const items = Array.from(rootEl.querySelectorAll("[data-accordion-trigger]")); if (!items.length) return; const candidateItems = items.filter((item) => !item.dataset.disabled); if (!candidateItems.length) return; - const currentIndex = candidateItems.indexOf(this.el); + const currentIndex = candidateItems.indexOf(itemEl); switch (e.key) { case kbd.ARROW_DOWN: @@ -275,13 +305,23 @@ type AccordionState = AccordionSingleState | AccordionMultiState; type InitAccordionProps = { type: "single" | "multiple"; value?: string | string[]; + id?: string | null; + onValueChange?: OnChangeFn | OnChangeFn; }; export function setAccordionRootState(props: InitAccordionProps) { const rootState = props.type === "single" - ? new AccordionSingleState({ value: props.value as string }) - : new AccordionMultiState({ value: props.value as string[] }); + ? new AccordionSingleState({ + value: props.value as string, + id: props.id, + onValueChange: props.onValueChange as OnChangeFn, + }) + : new AccordionMultiState({ + value: props.value as string[], + id: props.id, + onValueChange: props.onValueChange as OnChangeFn, + }); setContext(ACCORDION_ROOT_KEY, rootState); return rootState; } diff --git a/packages/bits-ui/src/lib/bits/avatar/components/avatar-fallback.svelte b/packages/bits-ui/src/lib/bits/avatar/components/avatar-fallback.svelte index 3f6100e50..3db643a3f 100644 --- a/packages/bits-ui/src/lib/bits/avatar/components/avatar-fallback.svelte +++ b/packages/bits-ui/src/lib/bits/avatar/components/avatar-fallback.svelte @@ -1,27 +1,16 @@ {#if asChild} - + {@render child?.(restProps)} {:else} - - + + {@render children?.()} {/if} diff --git a/packages/bits-ui/src/lib/bits/avatar/components/avatar-image.svelte b/packages/bits-ui/src/lib/bits/avatar/components/avatar-image.svelte index 63c83ce52..e77f31d4f 100644 --- a/packages/bits-ui/src/lib/bits/avatar/components/avatar-image.svelte +++ b/packages/bits-ui/src/lib/bits/avatar/components/avatar-image.svelte @@ -1,27 +1,14 @@ {#if asChild} - + {@render child?.({ src, alt, ...restProps })} {:else} - + {/if} diff --git a/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte b/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte index 75e92ae7b..f9c252acf 100644 --- a/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte +++ b/packages/bits-ui/src/lib/bits/avatar/components/avatar.svelte @@ -1,38 +1,37 @@ {#if asChild} - + {@render child?.(restProps)} {:else} -
- +
+ {@render children?.()}
{/if} diff --git a/packages/bits-ui/src/lib/bits/avatar/ctx.ts b/packages/bits-ui/src/lib/bits/avatar/ctx.ts deleted file mode 100644 index 651450afd..000000000 --- a/packages/bits-ui/src/lib/bits/avatar/ctx.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { type Avatar as AvatarReturn, type CreateAvatarProps, createAvatar } from "@melt-ui/svelte"; -import { getContext, setContext } from "svelte"; -import { createBitAttrs, getOptionUpdater, removeUndefined } from "$lib/internal/index.js"; - -export function getAvatarData() { - const NAME = "avatar" as const; - const PARTS = ["root", "image", "fallback"] as const; - - return { - NAME, - PARTS, - }; -} - -type GetReturn = Omit, "updateOption">; - -export function setCtx(props: CreateAvatarProps) { - const { NAME, PARTS } = getAvatarData(); - const getAttrs = createBitAttrs(NAME, PARTS); - const avatar = { ...createAvatar(removeUndefined(props)), getAttrs }; - - setContext(NAME, avatar); - return { - ...avatar, - updateOption: getOptionUpdater(avatar.options), - }; -} - -export function getImage(src: string | undefined | null = "") { - const { NAME } = getAvatarData(); - const avatar = getContext(NAME); - if (!src) { - avatar.options.src.set(""); - } else { - avatar.options.src.set(src); - } - return avatar; -} - -export function getCtx() { - const { NAME } = getAvatarData(); - return getContext(NAME); -} diff --git a/packages/bits-ui/src/lib/bits/avatar/state.svelte.ts b/packages/bits-ui/src/lib/bits/avatar/state.svelte.ts index e69de29bb..e90376acc 100644 --- a/packages/bits-ui/src/lib/bits/avatar/state.svelte.ts +++ b/packages/bits-ui/src/lib/bits/avatar/state.svelte.ts @@ -0,0 +1,140 @@ +import { getContext, setContext } from "svelte"; +import type { AvatarImageLoadingStatus } from "./types.js"; +import type { OnChangeFn } from "$lib/internal/types.js"; +import { styleToString } from "$lib/internal/style.js"; + +/** + * ROOT + */ +interface AvatarStateProps { + delayMs?: number; + loadingStatus?: AvatarImageLoadingStatus; + onLoadingStatusChange?: OnChangeFn; +} + +interface AvatarRootAttrs { + "data-avatar-root": string; +} + +type AvatarImageSrc = string | null | undefined; + +class AvatarRootState { + src: AvatarImageSrc = $state(null); + delayMs: number = $state(0); + loadingStatus: AvatarImageLoadingStatus = $state("loading"); + onLoadingStatusChange: AvatarStateProps["onLoadingStatusChange"] = $state(() => {}); + attrs: AvatarRootAttrs = { + "data-avatar-root": "", + }; + + #imageTimerId: number = 0; + + constructor(props: AvatarStateProps) { + this.delayMs = props.delayMs ?? this.delayMs; + this.onLoadingStatusChange = props.onLoadingStatusChange ?? this.onLoadingStatusChange; + + $effect.pre(() => { + if (!this.src) return; + this.#loadImage(this.src); + }); + } + + #loadImage(src: string) { + // clear any existing timers before creating a new one + window.clearTimeout(this.#imageTimerId); + const image = new Image(); + image.src = src; + image.onload = () => { + // if its 0 then we don't need to add a delay + if (this.delayMs !== 0) { + this.#imageTimerId = window.setTimeout(() => { + this.loadingStatus = "loaded"; + }, this.delayMs); + } else { + this.loadingStatus = "loaded"; + } + }; + image.onerror = () => { + this.loadingStatus = "error"; + }; + } + + createImage(src: AvatarImageSrc) { + return new AvatarImageState(src, this); + } + + createFallback() { + return new AvatarFallbackState(this); + } +} + +/** + * IMAGE + */ + +interface AvatarImageAttrs { + style: string; + "data-avatar-image": string; +} + +class AvatarImageState { + root: AvatarRootState = undefined as unknown as AvatarRootState; + attrs: AvatarImageAttrs = $derived({ + style: styleToString({ + display: this.root.loadingStatus === "loaded" ? "block" : "none", + }), + "data-avatar-image": "", + }); + + constructor(src: AvatarImageSrc, root: AvatarRootState) { + this.root = root; + root.src = src; + } +} + +/** + * FALLBACK + */ + +interface AvatarFallbackAttrs { + style: string; + "data-avatar-fallback": string; +} + +class AvatarFallbackState { + root: AvatarRootState = undefined as unknown as AvatarRootState; + attrs: AvatarFallbackAttrs = $derived({ + style: styleToString({ + display: this.root.loadingStatus === "loaded" ? "none" : "block", + }), + "data-avatar-fallback": "", + }); + + constructor(root: AvatarRootState) { + this.root = root; + } +} + +/** + * CONTEXT METHODS + */ + +export const AVATAR_ROOT_KEY = Symbol("Avatar.Root"); + +export function setAvatarRootState(props: AvatarStateProps) { + const rootState = new AvatarRootState(props); + setContext(AVATAR_ROOT_KEY, rootState); + return rootState; +} + +export function getAvatarRootState(): AvatarRootState { + return getContext(AVATAR_ROOT_KEY); +} + +export function getAvatarImageState(src: AvatarImageSrc) { + return getAvatarRootState().createImage(src); +} + +export function getAvatarFallbackState() { + return getAvatarRootState().createFallback(); +} diff --git a/packages/bits-ui/src/lib/bits/avatar/types.ts b/packages/bits-ui/src/lib/bits/avatar/types.ts index 91e408894..0b4a07369 100644 --- a/packages/bits-ui/src/lib/bits/avatar/types.ts +++ b/packages/bits-ui/src/lib/bits/avatar/types.ts @@ -10,12 +10,6 @@ import type { export type AvatarImageLoadingStatus = "loading" | "loaded" | "error"; export type AvatarRootPropsWithoutHTML = WithAsChild<{ - /** - * The source of the image. If the image fails to load, - * the `Avatar.Fallback` component will be rendered instead. - */ - src: string; - /** * The delay in milliseconds to wait before showing the avatar once * the image has loaded. This can be used to prevent sudden flickering diff --git a/packages/bits-ui/src/lib/bits/utilities/with-transition.svelte b/packages/bits-ui/src/lib/bits/utilities/with-transition.svelte index 4c1890454..8ccc80ccd 100644 --- a/packages/bits-ui/src/lib/bits/utilities/with-transition.svelte +++ b/packages/bits-ui/src/lib/bits/utilities/with-transition.svelte @@ -12,6 +12,7 @@ outTransitionConfig?: TransitionConfig; condition?: boolean; children?: Snippet; + el?: HTMLElement; }; let { @@ -23,42 +24,34 @@ outTransitionConfig, children, condition, + el = $bindable(), ...restProps }: Props = $props(); {#if transition && condition} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{:else if inTransition && outTransition && condition}
- {#if children} - {@render children()} - {/if} + {@render children?.()}
{:else if inTransition && condition} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{:else if outTransition && condition} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{:else if condition} -
- {#if children} - {@render children()} - {/if} +
+ {@render children?.()}
{/if} diff --git a/packages/bits-ui/src/lib/internal/attrs.ts b/packages/bits-ui/src/lib/internal/attrs.ts index d92d5bbfd..e53a1e89b 100644 --- a/packages/bits-ui/src/lib/internal/attrs.ts +++ b/packages/bits-ui/src/lib/internal/attrs.ts @@ -56,8 +56,8 @@ export function disabledAttrs(disabled: boolean | undefined | null) { : { "aria-disabled": undefined, "data-disabled": undefined }; } -export function openClosedAttrs(condition: boolean): "true" | "false" { - return condition ? "true" : "false"; +export function openClosedAttrs(condition: boolean): "open" | "closed" { + return condition ? "open" : "closed"; } export function dataDisabledAttrs(condition: boolean): "" | undefined { diff --git a/sites/docs/src/lib/components/demos/avatar-demo.svelte b/sites/docs/src/lib/components/demos/avatar-demo.svelte index 332085f03..a21e3dcab 100644 --- a/sites/docs/src/lib/components/demos/avatar-demo.svelte +++ b/sites/docs/src/lib/components/demos/avatar-demo.svelte @@ -1,6 +1,6 @@ Date: Mon, 15 Apr 2024 19:48:47 -0400 Subject: [PATCH 003/322] next: Box helpers (#457) Co-authored-by: Anatol Zakrividoroga <53095479+anatolzak@users.noreply.github.com> fix accordion presence transition (#463) --- .vscode/settings.json | 2 +- package.json | 2 +- packages/bits-ui/other/setupTest.ts | 2 + packages/bits-ui/package.json | 16 +- .../lib/bits/accordion/accordion.svelte.ts | 394 ++++++++++++++++++ .../components/accordion-content.svelte | 55 ++- .../components/accordion-header.svelte | 5 +- .../components/accordion-item.svelte | 25 +- .../components/accordion-trigger.svelte | 38 +- .../accordion/components/accordion.svelte | 54 +-- .../src/lib/bits/accordion/state.svelte.ts | 355 ---------------- .../bits-ui/src/lib/bits/accordion/types.ts | 12 +- .../components/aspect-ratio.svelte | 4 +- .../src/lib/bits/avatar/avatar.svelte.ts | 177 ++++++++ .../avatar/components/avatar-fallback.svelte | 25 +- .../avatar/components/avatar-image.svelte | 26 +- .../lib/bits/avatar/components/avatar.svelte | 41 +- .../src/lib/bits/avatar/state.svelte.ts | 140 ------- packages/bits-ui/src/lib/bits/avatar/types.ts | 13 +- .../src/lib/bits/checkbox/checkbox.svelte.ts | 164 ++++++++ .../components/checkbox-indicator.svelte | 34 -- .../checkbox/components/checkbox-input.svelte | 16 +- .../bits/checkbox/components/checkbox.svelte | 101 +++-- packages/bits-ui/src/lib/bits/checkbox/ctx.ts | 32 -- .../bits-ui/src/lib/bits/checkbox/index.ts | 9 +- .../bits-ui/src/lib/bits/checkbox/types.ts | 73 +++- .../bits/collapsible/collapsible.svelte.ts | 193 +++++++++ .../components/collapsible-content.svelte | 103 ++--- .../components/collapsible-trigger.svelte | 43 +- .../collapsible/components/collapsible.svelte | 66 ++- .../bits-ui/src/lib/bits/collapsible/ctx.ts | 32 -- .../bits-ui/src/lib/bits/collapsible/index.ts | 3 +- .../bits-ui/src/lib/bits/collapsible/types.ts | 94 ++--- .../src/lib/bits/utilities/presence.svelte | 42 ++ packages/bits-ui/src/lib/internal/attrs.ts | 25 +- .../bits-ui/src/lib/internal/box.svelte.ts | 115 +++++ packages/bits-ui/src/lib/internal/context.ts | 3 +- packages/bits-ui/src/lib/internal/events.ts | 16 +- packages/bits-ui/src/lib/internal/index.ts | 3 + packages/bits-ui/src/lib/internal/is.ts | 4 + packages/bits-ui/src/lib/internal/style.ts | 19 +- packages/bits-ui/src/lib/internal/types.ts | 13 +- .../src/lib/internal/use-presence.svelte.ts | 117 ++++++ .../lib/internal/use-state-machine.svelte.ts | 49 +++ packages/bits-ui/src/lib/shared/css.d.ts | 9 + packages/bits-ui/src/lib/shared/index.ts | 3 + .../bits-ui/src/tests/avatar/Avatar.spec.ts | 2 +- packages/bits-ui/vite.config.ts | 2 +- pnpm-lock.yaml | 281 +++++++------ sites/docs/package.json | 3 +- .../components/demos/accordion-demo.svelte | 15 +- .../lib/components/demos/avatar-demo.svelte | 2 +- .../lib/components/demos/checkbox-demo.svelte | 22 +- .../components/demos/collapsible-demo.svelte | 6 +- sites/docs/svelte.config.js | 14 +- sites/docs/tailwind.config.js | 22 +- 56 files changed, 1981 insertions(+), 1155 deletions(-) create mode 100644 packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts delete mode 100644 packages/bits-ui/src/lib/bits/accordion/state.svelte.ts create mode 100644 packages/bits-ui/src/lib/bits/avatar/avatar.svelte.ts delete mode 100644 packages/bits-ui/src/lib/bits/avatar/state.svelte.ts create mode 100644 packages/bits-ui/src/lib/bits/checkbox/checkbox.svelte.ts delete mode 100644 packages/bits-ui/src/lib/bits/checkbox/components/checkbox-indicator.svelte delete mode 100644 packages/bits-ui/src/lib/bits/checkbox/ctx.ts create mode 100644 packages/bits-ui/src/lib/bits/collapsible/collapsible.svelte.ts delete mode 100644 packages/bits-ui/src/lib/bits/collapsible/ctx.ts create mode 100644 packages/bits-ui/src/lib/bits/utilities/presence.svelte create mode 100644 packages/bits-ui/src/lib/internal/box.svelte.ts create mode 100644 packages/bits-ui/src/lib/internal/use-presence.svelte.ts create mode 100644 packages/bits-ui/src/lib/internal/use-state-machine.svelte.ts create mode 100644 packages/bits-ui/src/lib/shared/css.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d278a066..ec0efcf5a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { // Enable the ESlint flat config support - "eslint.experimental.useFlatConfig": true, + "eslint.useFlatConfig": true, // Auto fix "editor.codeActionsOnSave": { diff --git a/package.json b/package.json index 78bf9cb39..b169faf96 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.2.2", "prettier-plugin-tailwindcss": "0.5.13", - "svelte": "5.0.0-next.100", + "svelte": "5.0.0-next.104", "svelte-eslint-parser": "^0.34.1", "wrangler": "^3.44.0" }, diff --git a/packages/bits-ui/other/setupTest.ts b/packages/bits-ui/other/setupTest.ts index 1ea8f809a..b94c85a06 100644 --- a/packages/bits-ui/other/setupTest.ts +++ b/packages/bits-ui/other/setupTest.ts @@ -1,3 +1,5 @@ +import "@testing-library/svelte/vitest"; +import "@testing-library/jest-dom/vitest"; import * as matchers from "@testing-library/jest-dom/matchers"; import { expect, vi } from "vitest"; import type { Navigation, Page } from "@sveltejs/kit"; diff --git a/packages/bits-ui/package.json b/packages/bits-ui/package.json index aaabfa1b6..a70eac69d 100644 --- a/packages/bits-ui/package.json +++ b/packages/bits-ui/package.json @@ -13,7 +13,7 @@ "package": "svelte-kit sync && svelte-package && publint", "check": "svelte-check --tsconfig ./tsconfig.json", "test": "vitest", - "watch": "svelte-kit sync && svelte-package --watch" + "watch": "svelte-package --watch" }, "exports": { ".": { @@ -31,23 +31,24 @@ "@sveltejs/kit": "^2.5.0", "@sveltejs/package": "^2.2.7", "@sveltejs/vite-plugin-svelte": "^3.1.0", - "@testing-library/dom": "^9.3.4", - "@testing-library/jest-dom": "^6.4.1", - "@testing-library/svelte": "^4.1.0", + "@testing-library/dom": "^10.0.0", + "@testing-library/jest-dom": "^6.4.2", + "@testing-library/svelte": "^4.2.2", "@testing-library/user-event": "^14.5.2", "@types/jest-axe": "^3.5.9", "@types/node": "^20.12.2", "@types/testing-library__jest-dom": "^5.14.9", + "csstype": "^3.1.3", "jest-axe": "^8.0.0", "jsdom": "^24.0.0", "publint": "^0.2.7", "resize-observer-polyfill": "^1.5.1", - "svelte": "5.0.0-next.100", + "svelte": "5.0.0-next.104", "svelte-check": "^3.6.9", "tslib": "^2.6.2", "typescript": "^5.3.3", "vite": "^5.2.8", - "vitest": "^1.2.2" + "vitest": "^1.5.0" }, "svelte": "./dist/index.js", "types": "./dist/index.d.ts", @@ -56,7 +57,8 @@ "@internationalized/date": "^3.5.1", "@melt-ui/svelte": "0.76.2", "esm-env": "^1.0.0", - "nanoid": "^5.0.5" + "nanoid": "^5.0.5", + "style-object-to-css-string": "^1.1.3" }, "peerDependencies": { "svelte": "^5.0.0" diff --git a/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts b/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts new file mode 100644 index 000000000..b6885d227 --- /dev/null +++ b/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts @@ -0,0 +1,394 @@ +import { getContext, onMount, setContext, tick, untrack } from "svelte"; +import { + type Box, + type BoxedValues, + type EventCallback, + type ReadonlyBox, + type ReadonlyBoxedValues, + boxedState, + composeHandlers, + getAriaDisabled, + getAriaExpanded, + getDataDisabled, + getDataOpenClosed, + kbd, + readonlyBox, + styleToString, + verifyContextDeps, +} from "$lib/internal/index.js"; +import type { StyleProperties } from "$lib/shared/index.js"; + +/** + * BASE + */ +type AccordionBaseStateProps = ReadonlyBoxedValues<{ + id: string; + disabled: boolean; +}>; + +interface AccordionRootAttrs { + id: string; + "data-accordion-root": string; +} + +class AccordionBaseState { + id = undefined as unknown as ReadonlyBox; + disabled: ReadonlyBox; + #attrs: AccordionRootAttrs = $derived({ + id: this.id.value, + "data-accordion-root": "", + } as const); + + constructor(props: AccordionBaseStateProps) { + this.id = props.id; + this.disabled = props.disabled; + } + + get props() { + return this.#attrs; + } +} + +/** + * SINGLE + */ + +type AccordionSingleStateProps = AccordionBaseStateProps & BoxedValues<{ value: string }>; + +export class AccordionSingleState extends AccordionBaseState { + #value: Box; + isMulti = false as const; + + constructor(props: AccordionSingleStateProps) { + super(props); + this.#value = props.value; + } + + includesItem(item: string) { + return this.#value.value === item; + } + + toggleItem(item: string) { + this.#value.value = this.includesItem(item) ? "" : item; + } +} + +/** + * MULTIPLE + */ +interface AccordionMultiStateProps extends AccordionBaseStateProps { + value: Box; +} + +export class AccordionMultiState extends AccordionBaseState { + #value: Box; + isMulti = true as const; + + constructor(props: AccordionMultiStateProps) { + super(props); + this.#value = props.value; + } + + includesItem(item: string) { + return this.#value.value.includes(item); + } + + toggleItem(item: string) { + if (this.includesItem(item)) { + this.#value.value = this.#value.value.filter((v) => v !== item); + } else { + this.#value.value.push(item); + } + } +} + +/** + * ITEM + */ + +type AccordionItemStateProps = ReadonlyBoxedValues<{ + value: string; + disabled: boolean; +}> & { + rootState: AccordionState; +}; + +export class AccordionItemState { + #value: ReadonlyBox; + disabled = undefined as unknown as ReadonlyBox; + root: AccordionState = undefined as unknown as AccordionState; + isSelected = $derived(this.root.includesItem(this.value)); + isDisabled = $derived(this.disabled.value || this.root.disabled.value); + #attrs = $derived({ + "data-accordion-item": "", + "data-state": getDataOpenClosed(this.isSelected), + "data-disabled": getDataDisabled(this.isDisabled), + } as const); + + constructor(props: AccordionItemStateProps) { + this.#value = props.value; + this.disabled = props.disabled; + this.root = props.rootState; + } + + get value() { + return this.#value.value; + } + + updateValue() { + this.root.toggleItem(this.value); + } + + get props() { + return this.#attrs; + } + + createTrigger(props: AccordionTriggerStateProps) { + return new AccordionTriggerState(props, this); + } + + createContent(props: AccordionContentStateProps) { + return new AccordionContentState(props, this); + } +} + +/** + * TRIGGER + */ + +type AccordionTriggerStateProps = ReadonlyBoxedValues<{ + onclick: EventCallback; + onkeydown: EventCallback; + disabled: boolean; + id: string; +}>; + +class AccordionTriggerState { + disabled = undefined as unknown as ReadonlyBox; + id = undefined as unknown as ReadonlyBox; + root = undefined as unknown as AccordionState; + itemState = undefined as unknown as AccordionItemState; + onclickProp = boxedState(readonlyBox(() => () => {})); + onkeydownProp = boxedState( + readonlyBox(() => () => {}) + ); + + // Disabled if the trigger itself, the item it belongs to, or the root is disabled + isDisabled = $derived( + this.disabled.value || this.itemState.disabled.value || this.root.disabled.value + ); + #attrs: Record = $derived({ + id: this.id.value, + disabled: this.isDisabled, + "aria-expanded": getAriaExpanded(this.itemState.isSelected), + "aria-disabled": getAriaDisabled(this.isDisabled), + "data-disabled": getDataDisabled(this.isDisabled), + "data-value": this.itemState.value, + "data-state": getDataOpenClosed(this.itemState.isSelected), + "data-accordion-trigger": "", + } as const); + + constructor(props: AccordionTriggerStateProps, itemState: AccordionItemState) { + this.disabled = props.disabled; + this.itemState = itemState; + this.root = itemState.root; + this.onclickProp.value = props.onclick; + this.onkeydownProp.value = props.onkeydown; + this.id = props.id; + } + + onclick = composeHandlers(this.onclickProp, () => { + if (this.isDisabled) return; + this.itemState.updateValue(); + }); + + onkeydown = composeHandlers(this.onkeydownProp, (e: KeyboardEvent) => { + const handledKeys = [kbd.ARROW_DOWN, kbd.ARROW_UP, kbd.HOME, kbd.END, kbd.SPACE, kbd.ENTER]; + if (this.isDisabled || !handledKeys.includes(e.key)) return; + + e.preventDefault(); + + if (e.key === kbd.SPACE || e.key === kbd.ENTER) { + this.itemState.updateValue(); + return; + } + + if (!this.root.id.value || !this.id.value) return; + + const rootEl = document.getElementById(this.root.id.value); + if (!rootEl) return; + const itemEl = document.getElementById(this.id.value); + if (!itemEl) return; + + const items = Array.from(rootEl.querySelectorAll("[data-accordion-trigger]")); + if (!items.length) return; + + const candidateItems = items.filter((item) => !item.dataset.disabled); + if (!candidateItems.length) return; + + const currentIndex = candidateItems.indexOf(itemEl); + + const keyToIndex = { + [kbd.ARROW_DOWN]: (currentIndex + 1) % candidateItems.length, + [kbd.ARROW_UP]: (currentIndex - 1 + candidateItems.length) % candidateItems.length, + [kbd.HOME]: 0, + [kbd.END]: candidateItems.length - 1, + }; + + candidateItems[keyToIndex[e.key]!]?.focus(); + }); + + get props() { + return { + ...this.#attrs, + onclick: this.onclick, + onkeydown: this.onkeydown, + }; + } +} + +/** + * CONTENT + */ + +type AccordionContentStateProps = BoxedValues<{ + presentEl: HTMLElement | undefined; +}> & + ReadonlyBoxedValues<{ + forceMount: boolean; + }>; + +class AccordionContentState { + item = undefined as unknown as AccordionItemState; + originalStyles = boxedState<{ transitionDuration: string; animationName: string } | undefined>( + undefined + ); + isMountAnimationPrevented = $state(false); + width = boxedState(0); + height = boxedState(0); + presentEl: Box = boxedState(undefined); + forceMount = undefined as unknown as ReadonlyBox; + present = $derived(this.item.isSelected); + #attrs: Record = $derived({ + "data-state": getDataOpenClosed(this.item.isSelected), + "data-disabled": getDataDisabled(this.item.isDisabled), + "data-value": this.item.value, + "data-accordion-content": "", + } as const); + + style: StyleProperties = $derived({ + "--bits-accordion-content-height": `${this.height.value}px`, + "--bits-accordion-content-width": `${this.width.value}px`, + }); + + constructor(props: AccordionContentStateProps, item: AccordionItemState) { + this.item = item; + this.forceMount = props.forceMount; + this.isMountAnimationPrevented = this.item.isSelected; + this.presentEl = props.presentEl; + + $effect.pre(() => { + const rAF = requestAnimationFrame(() => { + this.isMountAnimationPrevented = false; + }); + + return () => { + cancelAnimationFrame(rAF); + }; + }); + + $effect(() => { + // eslint-disable-next-line no-unused-expressions + this.item.isSelected; + const node = untrack(() => this.presentEl.value); + if (!node) return; + + tick().then(() => { + // get the dimensions of the element + this.originalStyles.value = this.originalStyles.value || { + transitionDuration: node.style.transitionDuration, + animationName: node.style.animationName, + }; + + // block any animations/transitions so the element renders at full dimensions + node.style.transitionDuration = "0s"; + node.style.animationName = "none"; + + const rect = node.getBoundingClientRect(); + this.height.value = rect.height; + this.width.value = rect.width; + + // unblock any animations/transitions that were originally set if not the initial render + if (!untrack(() => this.isMountAnimationPrevented)) { + const { animationName, transitionDuration } = this.originalStyles.value; + node.style.transitionDuration = transitionDuration; + node.style.animationName = animationName; + } + }); + }); + } + + get props() { + return this.#attrs; + } +} + +/** + * CONTEXT METHODS + */ + +export const ACCORDION_ROOT_KEY = "Accordion.Root"; +export const ACCORDION_ITEM_KEY = "Accordion.Item"; + +type AccordionState = AccordionSingleState | AccordionMultiState; + +type InitAccordionProps = { + type: "single" | "multiple"; + value: Box | Box; + id: ReadonlyBox; + disabled: ReadonlyBox; +}; + +export function setAccordionRootState(props: InitAccordionProps) { + if (props.type === "single") { + const { value, type, ...rest } = props; + return setContext( + ACCORDION_ROOT_KEY, + new AccordionSingleState({ ...rest, value: value as Box }) + ); + } else { + const { value, type, ...rest } = props; + return setContext( + ACCORDION_ROOT_KEY, + new AccordionMultiState({ ...rest, value: value as Box }) + ); + } +} + +export function getAccordionRootState(): AccordionState { + return getContext(ACCORDION_ROOT_KEY); +} + +export function setAccordionItemState(props: Omit) { + verifyContextDeps(ACCORDION_ROOT_KEY); + const rootState = getAccordionRootState(); + const itemState = new AccordionItemState({ ...props, rootState }); + setContext(ACCORDION_ITEM_KEY, itemState); + return itemState; +} + +export function getAccordionItemState(): AccordionItemState { + return getContext(ACCORDION_ITEM_KEY); +} + +export function getAccordionTriggerState(props: AccordionTriggerStateProps): AccordionTriggerState { + verifyContextDeps(ACCORDION_ITEM_KEY); + const itemState = getAccordionItemState(); + return itemState.createTrigger(props); +} + +export function getAccordionContentState(props: AccordionContentStateProps): AccordionContentState { + verifyContextDeps(ACCORDION_ITEM_KEY); + const itemState = getAccordionItemState(); + return itemState.createContent(props); +} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte index 9e095b7b3..7defac2fb 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte @@ -1,30 +1,45 @@ - - - -{#if asChild && content.item.isSelected} - {@render child?.(mergedProps)} -{:else} - -{/if} + + {#snippet presence({ node, present })} + {@const mergedProps = { + ...restProps, + ...content.props, + style: styleToString({ + ...styleProp, + ...content.style, + }), + }} + {#if asChild} + {@render child?.({ props: mergedProps })} + {:else} + + {/if} + {/snippet} + diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte index 56c6a11ce..a1db438e0 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-header.svelte @@ -1,5 +1,6 @@ {#if asChild} - {@render child?.(mergedProps)} + {@render child?.({ props: mergedProps })} {:else}
{@render children?.()} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte index b30075674..f96ae2a0c 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-item.svelte @@ -1,38 +1,37 @@ {#if asChild} - {@render child?.(mergedProps)} + {@render child?.({ props: mergedProps })} {:else}
{@render children?.()} diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte index 7de657eca..6c9e8f80a 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-trigger.svelte @@ -1,48 +1,44 @@ {#if asChild} - {@render child?.(mergedProps)} + {@render child?.({ props: mergedProps })} {:else}