diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ba33760..0f7b803 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -12,7 +12,6 @@ - `@svelte-atoms/core`: A collection of core utilities and components for building Svelte applications. - `@svelte-atoms/alchimist`: The core library for building charts and visualizations built on top of `@svelte-atoms/core`. Allow developer to mix `HTML`, `SVG` and `Canvas` elements to create flexible and powerful of all worlds data visualizations. - # Git -- use short & straightforward commit messages \ No newline at end of file +- use short & straightforward commit messages diff --git a/package.json b/package.json index c94707b..140a7ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@svelte-atoms/core", - "version": "1.0.0-alpha.15", + "version": "1.0.0-alpha.16", "description": "A modular, accessible, and extensible Svelte UI component library.", "repository": { "type": "git", diff --git a/src/lib/components/atom/index.ts b/src/lib/components/atom/index.ts index 2e7e172..a63053b 100644 --- a/src/lib/components/atom/index.ts +++ b/src/lib/components/atom/index.ts @@ -1,7 +1,3 @@ -export { - default as HtmlAtom, - type HtmlAtomProps, - type Base, - type ComponentBase, - type SnippetBase -} from './html-atom.svelte'; +export { default as HtmlAtom } from './html-atom.svelte'; + +export * from './types'; diff --git a/src/lib/components/atom/types.ts b/src/lib/components/atom/types.ts index 87fb26a..6bd9d7e 100644 --- a/src/lib/components/atom/types.ts +++ b/src/lib/components/atom/types.ts @@ -1,6 +1,6 @@ import type { Component, Snippet } from 'svelte'; import { type HtmlElementTagName } from '$svelte-atoms/core/components/element'; -import type { HtmlElementProps } from '../element/types'; +import type { HtmlElementProps, ElementType } from '../element/types'; export type ComponentBase = Component; export type SnippetBase = Snippet; @@ -13,3 +13,5 @@ export type HtmlAtomProps< > = HtmlElementProps & { base?: B; }; + +export type { ElementType }; diff --git a/src/lib/components/input/input-root.svelte b/src/lib/components/input/input-root.svelte index 96ea968..7ef4545 100644 --- a/src/lib/components/input/input-root.svelte +++ b/src/lib/components/input/input-root.svelte @@ -12,7 +12,7 @@ type Element = ElementType; - const preset = getPreset('stack'); + const preset = getPreset('input.root'); let { class: klass = '', diff --git a/src/lib/components/stack/stack-root.svelte b/src/lib/components/stack/stack-root.svelte index 882bdc5..71aab08 100644 --- a/src/lib/components/stack/stack-root.svelte +++ b/src/lib/components/stack/stack-root.svelte @@ -12,7 +12,7 @@ type Element = ElementType; - const preset = getPreset('stack'); + const preset = getPreset('stack.root'); let { class: klass = '', diff --git a/src/lib/context/preset.svelte.ts b/src/lib/context/preset.svelte.ts index be78bad..c8b612c 100644 --- a/src/lib/context/preset.svelte.ts +++ b/src/lib/context/preset.svelte.ts @@ -50,9 +50,9 @@ export type ModuleName = | 'field' | 'form' | 'icon' - | 'input.placeholder' - | 'stack' + | 'input.root' | 'input.value' + | 'input.placeholder' | 'label' | 'layer.inner' | 'layer' @@ -82,8 +82,8 @@ export type ModuleName = | 'drawer.footer' | 'drawer.header' | 'drawer' + | 'stack.root' | 'stack.item' - | 'stack' | 'tabs.body' | 'tabs.header' | 'tabs'