diff --git a/packages/documentation/.gitkeep b/packages/docs/.gitkeep similarity index 100% rename from packages/documentation/.gitkeep rename to packages/docs/.gitkeep diff --git a/packages/documentation/package.json b/packages/docs/package.json similarity index 100% rename from packages/documentation/package.json rename to packages/docs/package.json diff --git a/packages/documentation/postcss.config.js b/packages/docs/postcss.config.js similarity index 100% rename from packages/documentation/postcss.config.js rename to packages/docs/postcss.config.js diff --git a/packages/documentation/src/app.css b/packages/docs/src/app.css similarity index 100% rename from packages/documentation/src/app.css rename to packages/docs/src/app.css diff --git a/packages/documentation/src/app.d.ts b/packages/docs/src/app.d.ts similarity index 100% rename from packages/documentation/src/app.d.ts rename to packages/docs/src/app.d.ts diff --git a/packages/documentation/src/app.html b/packages/docs/src/app.html similarity index 100% rename from packages/documentation/src/app.html rename to packages/docs/src/app.html diff --git a/packages/documentation/src/lib/index.ts b/packages/docs/src/lib/index.ts similarity index 100% rename from packages/documentation/src/lib/index.ts rename to packages/docs/src/lib/index.ts diff --git a/packages/documentation/src/routes/+layout.svelte b/packages/docs/src/routes/+layout.svelte similarity index 100% rename from packages/documentation/src/routes/+layout.svelte rename to packages/docs/src/routes/+layout.svelte diff --git a/packages/documentation/src/routes/+page.svelte b/packages/docs/src/routes/+page.svelte similarity index 100% rename from packages/documentation/src/routes/+page.svelte rename to packages/docs/src/routes/+page.svelte diff --git a/packages/documentation/static/favicon.png b/packages/docs/static/favicon.png similarity index 100% rename from packages/documentation/static/favicon.png rename to packages/docs/static/favicon.png diff --git a/packages/documentation/svelte.config.js b/packages/docs/svelte.config.js similarity index 100% rename from packages/documentation/svelte.config.js rename to packages/docs/svelte.config.js diff --git a/packages/documentation/tailwind.config.ts b/packages/docs/tailwind.config.ts similarity index 100% rename from packages/documentation/tailwind.config.ts rename to packages/docs/tailwind.config.ts diff --git a/packages/documentation/tsconfig.json b/packages/docs/tsconfig.json similarity index 100% rename from packages/documentation/tsconfig.json rename to packages/docs/tsconfig.json diff --git a/packages/documentation/vite.config.ts b/packages/docs/vite.config.ts similarity index 100% rename from packages/documentation/vite.config.ts rename to packages/docs/vite.config.ts diff --git a/packages/floating-ui-svelte/package.json b/packages/floating-ui-svelte/package.json index 3994dbab..c50a725b 100644 --- a/packages/floating-ui-svelte/package.json +++ b/packages/floating-ui-svelte/package.json @@ -2,13 +2,13 @@ "name": "@skeletonlabs/floating-ui-svelte", "version": "0.3.2", "scripts": { - "build": "svelte-package", - "build:watch": "svelte-package --watch", + "build": "svelte-package --input ./src", + "build:watch": "pnpm build --watch", "test": "vitest run", - "test:watch": "vitest run --watch" + "test:watch": "pnpm test --watch" }, - "files": ["dist", "!dist/**/*.test.*", "!dist/**/*.spec.*"], - "sideEffects": ["**/*.css"], + "files": ["dist"], + "sideEffects": false, "svelte": "./dist/index.js", "types": "./dist/index.d.ts", "type": "module", diff --git a/packages/floating-ui-svelte/src/lib/components/floating-arrow.svelte b/packages/floating-ui-svelte/src/components/floating-arrow.svelte similarity index 100% rename from packages/floating-ui-svelte/src/lib/components/floating-arrow.svelte rename to packages/floating-ui-svelte/src/components/floating-arrow.svelte diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-click.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-click.svelte.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/hooks/use-click.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-click.svelte.ts diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-dismiss.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-dismiss.svelte.ts similarity index 99% rename from packages/floating-ui-svelte/src/lib/hooks/use-dismiss.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-dismiss.svelte.ts index e73efe3b..65649633 100644 --- a/packages/floating-ui-svelte/src/lib/hooks/use-dismiss.svelte.ts +++ b/packages/floating-ui-svelte/src/hooks/use-dismiss.svelte.ts @@ -12,7 +12,7 @@ import { getTarget, isEventTargetWithin, isRootElement, -} from "../internal//dom.js"; +} from "../internal/dom.js"; import type { FloatingContext } from "./useFloating.svelte.js"; const bubbleHandlerKeys = { diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-floating.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-floating.svelte.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/hooks/use-floating.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-floating.svelte.ts diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-focus.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-focus.svelte.ts similarity index 96% rename from packages/floating-ui-svelte/src/lib/hooks/use-focus.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-focus.svelte.ts index 052bffc5..15a0c373 100644 --- a/packages/floating-ui-svelte/src/lib/hooks/use-focus.svelte.ts +++ b/packages/floating-ui-svelte/src/hooks/use-focus.svelte.ts @@ -6,9 +6,9 @@ import { getDocument, getTarget, isVirtualPointerEvent, -} from "../internal//dom.js"; -import { isMac, isSafari } from "../internal//environment.js"; -import { isTypeableElement } from "../internal//is-typable-element.js"; +} from "../internal/dom.js"; +import { isMac, isSafari } from "../internal/environment.js"; +import { isTypeableElement } from "../internal/is-typable-element.js"; import type { OpenChangeReason } from "../internal/types.js"; import type { FloatingContext } from "./use-floating.svelte.js"; diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-hover.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-hover.svelte.ts similarity index 99% rename from packages/floating-ui-svelte/src/lib/hooks/use-hover.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-hover.svelte.ts index 1c8936f6..30bc0541 100644 --- a/packages/floating-ui-svelte/src/lib/hooks/use-hover.svelte.ts +++ b/packages/floating-ui-svelte/src/hooks/use-hover.svelte.ts @@ -4,8 +4,8 @@ import { createAttribute, getDocument, isMouseLikePointerType, -} from "../internal//dom.js"; -import { noop } from "../internal//noop.js"; +} from "../internal/dom.js"; +import { noop } from "../internal/noop.js"; import type { OpenChangeReason } from "../internal/types.js"; import type { FloatingContext } from "./useFloating.svelte.js"; import type { ElementProps } from "./useInteractions.svelte.js"; diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-id.ts b/packages/floating-ui-svelte/src/hooks/use-id.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/hooks/use-id.ts rename to packages/floating-ui-svelte/src/hooks/use-id.ts diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-interactions.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-interactions.svelte.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/hooks/use-interactions.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-interactions.svelte.ts diff --git a/packages/floating-ui-svelte/src/lib/hooks/use-role.svelte.ts b/packages/floating-ui-svelte/src/hooks/use-role.svelte.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/hooks/use-role.svelte.ts rename to packages/floating-ui-svelte/src/hooks/use-role.svelte.ts diff --git a/packages/floating-ui-svelte/src/lib/index.ts b/packages/floating-ui-svelte/src/index.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/index.ts rename to packages/floating-ui-svelte/src/index.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/create-pub-sub.ts b/packages/floating-ui-svelte/src/internal/create-pub-sub.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/create-pub-sub.ts rename to packages/floating-ui-svelte/src/internal/create-pub-sub.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/dom.ts b/packages/floating-ui-svelte/src/internal/dom.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/dom.ts rename to packages/floating-ui-svelte/src/internal/dom.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/dpr.ts b/packages/floating-ui-svelte/src/internal/dpr.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/dpr.ts rename to packages/floating-ui-svelte/src/internal/dpr.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/environment.ts b/packages/floating-ui-svelte/src/internal/environment.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/environment.ts rename to packages/floating-ui-svelte/src/internal/environment.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/is-typable-element.ts b/packages/floating-ui-svelte/src/internal/is-typable-element.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/is-typable-element.ts rename to packages/floating-ui-svelte/src/internal/is-typable-element.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/noop.ts b/packages/floating-ui-svelte/src/internal/noop.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/noop.ts rename to packages/floating-ui-svelte/src/internal/noop.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/style-object-to-string.ts b/packages/floating-ui-svelte/src/internal/style-object-to-string.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/style-object-to-string.ts rename to packages/floating-ui-svelte/src/internal/style-object-to-string.ts diff --git a/packages/floating-ui-svelte/src/lib/internal/types.ts b/packages/floating-ui-svelte/src/internal/types.ts similarity index 100% rename from packages/floating-ui-svelte/src/lib/internal/types.ts rename to packages/floating-ui-svelte/src/internal/types.ts diff --git a/packages/floating-ui-svelte/test/components/floating-arrow.ts b/packages/floating-ui-svelte/test/components/floating-arrow.ts index 72852996..053b210c 100644 --- a/packages/floating-ui-svelte/test/components/floating-arrow.ts +++ b/packages/floating-ui-svelte/test/components/floating-arrow.ts @@ -1,7 +1,7 @@ import { render, screen } from "@testing-library/svelte"; import { describe, expect, it } from "vitest"; -import FloatingArrow from "../../src/lib/components/floating-arrow.svelte"; -import { useFloating } from "../../src/lib/hooks/use-floating.svelte.js"; +import FloatingArrow from "../../src/components/floating-arrow.svelte"; +import { useFloating } from "../../src/hooks/use-floating.svelte.js"; import { withRunes } from "../internal/with-runes.svelte.js"; describe("FloatingArrow", () => { diff --git a/packages/floating-ui-svelte/test/hooks/use-floating.svelte.ts b/packages/floating-ui-svelte/test/hooks/use-floating.svelte.ts index c64d7cd1..ed9ff0c7 100644 --- a/packages/floating-ui-svelte/test/hooks/use-floating.svelte.ts +++ b/packages/floating-ui-svelte/test/hooks/use-floating.svelte.ts @@ -9,8 +9,8 @@ import { describe, expect, expectTypeOf, it, vi } from "vitest"; import { type FloatingContext, useFloating, -} from "../../src/lib/hooks/use-floating.svelte.js"; -import { useId } from "../../src/lib/hooks/use-id.js"; +} from "../../src/hooks/use-floating.svelte.js"; +import { useId } from "../../src/hooks/use-id.js"; import { withRunes } from "../internal/with-runes.svelte.js"; function createElements(): { reference: HTMLElement; floating: HTMLElement } { diff --git a/packages/floating-ui-svelte/test/hooks/use-id.ts b/packages/floating-ui-svelte/test/hooks/use-id.ts index 3ff2deb2..0b0413e5 100644 --- a/packages/floating-ui-svelte/test/hooks/use-id.ts +++ b/packages/floating-ui-svelte/test/hooks/use-id.ts @@ -1,5 +1,5 @@ import { describe, expect, expectTypeOf, test } from "vitest"; -import { useId } from "../../src/lib/hooks/use-id.js"; +import { useId } from "../../src/hooks/use-id.js"; describe("useId", () => { test("returns an id", () => { diff --git a/packages/floating-ui-svelte/test/hooks/use-interactions.svelte.ts b/packages/floating-ui-svelte/test/hooks/use-interactions.svelte.ts index 40a75007..2c1fb701 100644 --- a/packages/floating-ui-svelte/test/hooks/use-interactions.svelte.ts +++ b/packages/floating-ui-svelte/test/hooks/use-interactions.svelte.ts @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest"; import { type ElementProps, useInteractions, -} from "../../src/lib/hooks/use-interactions.svelte.js"; +} from "../../src/hooks/use-interactions.svelte.js"; import { withRunes } from "../internal/with-runes.svelte"; describe("useInteractions", () => { diff --git a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-click.svelte b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-click.svelte index 3a099c76..7174f591 100644 --- a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-click.svelte +++ b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-click.svelte @@ -3,10 +3,10 @@ import { autoUpdate } from "@floating-ui/dom"; import { type UseClickOptions, useClick, -} from "../../../src/lib/hooks/use-click.svelte.js"; -import { useFloating } from "../../../src/lib/hooks/use-floating.svelte.js"; -import { useHover } from "../../../src/lib/hooks/use-hover.svelte.js"; -import { useInteractions } from "../../../src/lib/hooks/use-interactions.svelte.js"; +} from "../../../src/hooks/use-click.svelte.js"; +import { useFloating } from "../../../src/hooks/use-floating.svelte.js"; +import { useHover } from "../../../src/hooks/use-hover.svelte.js"; +import { useInteractions } from "../../../src/hooks/use-interactions.svelte.js"; interface Props extends UseClickOptions { open?: boolean; diff --git a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-dismiss.svelte b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-dismiss.svelte index 78cb22fe..a03f3759 100644 --- a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-dismiss.svelte +++ b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-dismiss.svelte @@ -3,9 +3,9 @@ import { autoUpdate } from "@floating-ui/dom"; import { type UseDismissOptions, useDismiss, -} from "../../../src/lib/hooks/use-dismiss.svelte"; -import { useFloating } from "../../../src/lib/hooks/use-floating.svelte"; -import { useInteractions } from "../../../src/lib/hooks/use-interactions.svelte"; +} from "../../../src/hooks/use-dismiss.svelte"; +import { useFloating } from "../../../src/hooks/use-floating.svelte"; +import { useInteractions } from "../../../src/hooks/use-interactions.svelte"; interface Props extends UseDismissOptions { open?: boolean; diff --git a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-focus.svelte b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-focus.svelte index 21b89ea7..0a531e0c 100644 --- a/packages/floating-ui-svelte/test/hooks/wrapper-components/use-focus.svelte +++ b/packages/floating-ui-svelte/test/hooks/wrapper-components/use-focus.svelte @@ -1,11 +1,11 @@