@skeletonlabs/skeleton-svelte 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,21 @@
1
1
  <script lang="ts" module>
2
2
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
4
- import { splitProps, type Props } from '@zag-js/tree-view';
4
+ import { splitProps, type Props, type TreeNode } from '@zag-js/tree-view';
5
5
 
6
- export interface TreeViewRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
6
+ export interface TreeViewRootProps<T extends TreeNode = TreeNode>
7
+ extends Omit<Props<T>, 'id'>,
8
+ PropsWithElement<'div'>,
9
+ HTMLAttributes<'div', 'id' | 'dir'> {}
7
10
  </script>
8
11
 
9
- <script lang="ts">
12
+ <script lang="ts" generics="T extends TreeNode = TreeNode">
10
13
  import { useTreeView } from '../modules/provider.svelte';
11
14
  import { RootContext } from '../modules/root-context.js';
12
15
  import { classesTreeView } from '@skeletonlabs/skeleton-common';
13
16
  import { mergeProps } from '@zag-js/svelte';
14
17
 
15
- const props: TreeViewRootProps = $props();
18
+ const props: TreeViewRootProps<T> = $props();
16
19
 
17
20
  const [treeViewProps, componentProps] = $derived(splitProps(props));
18
21
  const { element, children, ...rest } = $derived(componentProps);
@@ -1,9 +1,30 @@
1
1
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
3
- import { type Props } from '@zag-js/tree-view';
4
- export interface TreeViewRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
3
+ import { type Props, type TreeNode } from '@zag-js/tree-view';
4
+ export interface TreeViewRootProps<T extends TreeNode = TreeNode> extends Omit<Props<T>, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
5
5
  }
6
- declare const Root: import("svelte").Component<TreeViewRootProps, {}, "">;
7
- type Root = ReturnType<typeof Root>;
6
+ declare function $$render<T extends TreeNode = TreeNode>(): {
7
+ props: TreeViewRootProps<T>;
8
+ exports: {};
9
+ bindings: "";
10
+ slots: {};
11
+ events: {};
12
+ };
13
+ declare class __sveltets_Render<T extends TreeNode = TreeNode> {
14
+ props(): ReturnType<typeof $$render<T>>['props'];
15
+ events(): ReturnType<typeof $$render<T>>['events'];
16
+ slots(): ReturnType<typeof $$render<T>>['slots'];
17
+ bindings(): "";
18
+ exports(): {};
19
+ }
20
+ interface $$IsomorphicComponent {
21
+ new <T extends TreeNode = TreeNode>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
22
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
23
+ } & ReturnType<__sveltets_Render<T>['exports']>;
24
+ <T extends TreeNode = TreeNode>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
25
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
26
+ }
27
+ declare const Root: $$IsomorphicComponent;
28
+ type Root<T extends TreeNode = TreeNode> = InstanceType<typeof Root<T>>;
8
29
  export default Root;
9
30
  //# sourceMappingURL=root.svelte.d.ts.map
@@ -1,6 +1,6 @@
1
1
  export { TreeView } from './modules/anatomy.js';
2
2
  export { useTreeView } from './modules/provider.svelte.js';
3
- export { createTreeViewCollection } from './modules/create-tree-view-collection.js';
3
+ export { collection as createTreeViewCollection } from '@zag-js/tree-view';
4
4
  export type { TreeViewRootProps } from './anatomy/root.svelte';
5
5
  export type { TreeViewRootProviderProps } from './anatomy/root-provider.svelte';
6
6
  export type { TreeViewRootContextProps } from './anatomy/root-context.svelte';
@@ -1,3 +1,3 @@
1
1
  export { TreeView } from './modules/anatomy.js';
2
2
  export { useTreeView } from './modules/provider.svelte.js';
3
- export { createTreeViewCollection } from './modules/create-tree-view-collection.js';
3
+ export { collection as createTreeViewCollection } from '@zag-js/tree-view';
@@ -1,15 +1,28 @@
1
- export declare const TreeView: import("svelte").Component<import("../anatomy/root.svelte").TreeViewRootProps, {}, ""> & {
2
- Provider: import("svelte").Component<import("../anatomy/root-provider.svelte").TreeViewRootProviderProps, {}, "">;
3
- Context: import("svelte").Component<import("../anatomy/root-context.svelte").TreeViewRootContextProps, {}, "">;
4
- Tree: import("svelte").Component<import("../anatomy/tree.svelte").TreeViewTreeProps, {}, "">;
5
- Label: import("svelte").Component<import("../anatomy/label.svelte").TreeViewLabelProps, {}, "">;
6
- NodeProvider: import("svelte").Component<import("../anatomy/node-provider.svelte").TreeViewNodeProviderProps, {}, "">;
7
- Branch: import("svelte").Component<import("../anatomy/branch.svelte").TreeViewBranchProps, {}, "">;
8
- BranchControl: import("svelte").Component<import("../anatomy/branch-control.svelte").TreeViewBranchControlProps, {}, "">;
9
- BranchText: import("svelte").Component<import("../anatomy/branch-text.svelte").TreeViewBranchTextProps, {}, "">;
10
- BranchIndicator: import("svelte").Component<import("../anatomy/branch-indicator.svelte").TreeViewBranchIndicatorProps, {}, "">;
11
- BranchContent: import("svelte").Component<import("../anatomy/branch-content.svelte").TreeViewBranchContentProps, {}, "">;
12
- BranchIndentGuide: import("svelte").Component<import("../anatomy/branch-indent-guide.svelte").TreeViewBranchIndentGuideProps, {}, "">;
13
- Item: import("svelte").Component<import("../anatomy/item.svelte").TreeViewItemProps, {}, "">;
1
+ import BranchContent from '../anatomy/branch-content.svelte';
2
+ import BranchControl from '../anatomy/branch-control.svelte';
3
+ import BranchIndentGuide from '../anatomy/branch-indent-guide.svelte';
4
+ import BranchIndicator from '../anatomy/branch-indicator.svelte';
5
+ import BranchText from '../anatomy/branch-text.svelte';
6
+ import Branch from '../anatomy/branch.svelte';
7
+ import Item from '../anatomy/item.svelte';
8
+ import Label from '../anatomy/label.svelte';
9
+ import NodeProvider from '../anatomy/node-provider.svelte';
10
+ import RootContext from '../anatomy/root-context.svelte';
11
+ import RootProvider from '../anatomy/root-provider.svelte';
12
+ import Root from '../anatomy/root.svelte';
13
+ import Tree from '../anatomy/tree.svelte';
14
+ export declare const TreeView: typeof Root & {
15
+ Provider: typeof RootProvider;
16
+ Context: typeof RootContext;
17
+ Tree: typeof Tree;
18
+ Label: typeof Label;
19
+ NodeProvider: typeof NodeProvider;
20
+ Branch: typeof Branch;
21
+ BranchControl: typeof BranchControl;
22
+ BranchText: typeof BranchText;
23
+ BranchIndicator: typeof BranchIndicator;
24
+ BranchContent: typeof BranchContent;
25
+ BranchIndentGuide: typeof BranchIndentGuide;
26
+ Item: typeof Item;
14
27
  };
15
28
  //# sourceMappingURL=anatomy.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton-svelte",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "The Svelte package for Skeleton.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "@zag-js/toggle-group": "1.26.4",
47
47
  "@zag-js/tooltip": "1.26.4",
48
48
  "@zag-js/tree-view": "1.26.4",
49
- "@skeletonlabs/skeleton-common": "4.2.1"
49
+ "@skeletonlabs/skeleton-common": "4.2.2"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "svelte": "^5.29.0"
@@ -63,7 +63,7 @@
63
63
  "typescript": "5.9.3",
64
64
  "vite": "7.1.10",
65
65
  "vitest": "3.2.4",
66
- "@skeletonlabs/skeleton": "4.2.1"
66
+ "@skeletonlabs/skeleton": "4.2.2"
67
67
  },
68
68
  "license": "MIT",
69
69
  "type": "module",
@@ -1,3 +0,0 @@
1
- import { collection } from '@zag-js/tree-view';
2
- export declare function createTreeViewCollection<T>(...args: Parameters<typeof collection<T>>): import("@zag-js/collection", { with: { "resolution-mode": "require" } }).TreeCollection<T>;
3
- //# sourceMappingURL=create-tree-view-collection.d.ts.map
@@ -1,4 +0,0 @@
1
- import { collection } from '@zag-js/tree-view';
2
- export function createTreeViewCollection(...args) {
3
- return collection(...args);
4
- }