Skip to content

Commit

Permalink
Migrate to @layerstack/* packages (#489)
Browse files Browse the repository at this point in the history
* Begin migration to `@layerstack/*` packages

* Replace docs with links to `@layerstack/*`

* Finish most migration to `@layerstack/*` packages

* Add changeset

* Add LayerChart link to nav menu

* Use tailwind plugin, head snippet, and daisy/skeleton themes from `@layerstack/tailwind`

* Use ThemeColors from `@layerstack/tailwind`

* Remove redundant typeGuards and typeHelpers (use `@layerstack/utils`)

* Add placeholder test file (since all existing tests have moved to `@layerstack/*` packages) to fix CI

* breaking: Replace tailwind plugin `svelte-ux/plugins/tailwind.cjs` with `@layerstack/tailwind/plugin`

* Add changeset

* Update @layerstack dependencies

* fix: Cleanup a few improper merge conflict resolutions with import statements

* Update layerstack dependencies

* fix(ThemeSwitch): Merge cls imports after rebasing with main branch

* Update layerstack packages to latest
  • Loading branch information
techniq authored Jan 19, 2025
1 parent dfa8bb7 commit 797b145
Show file tree
Hide file tree
Showing 301 changed files with 483 additions and 14,689 deletions.
6 changes: 6 additions & 0 deletions .changeset/mighty-hornets-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-svelte-ux': minor
'svelte-ux': minor
---

Migrate to @layerstack/\* packages
6 changes: 6 additions & 0 deletions .changeset/perfect-cats-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-svelte-ux': minor
'svelte-ux': minor
---

breaking: Replace tailwind plugin `svelte-ux/plugins/tailwind.cjs` with `@layerstack/tailwind/plugin`
8 changes: 6 additions & 2 deletions packages/svelte-ux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
"dependencies": {
"@floating-ui/dom": "^1.6.13",
"@fortawesome/fontawesome-common-types": "^6.7.2",
"@layerstack/svelte-actions": "^0.0.11",
"@layerstack/svelte-stores": "^0.0.9",
"@layerstack/svelte-table": "^0.0.12",
"@layerstack/tailwind": "^0.0.11",
"@layerstack/utils": "^0.0.7",
"@mdi/js": "^7.4.47",
"clsx": "^2.1.1",
"culori": "^4.0.1",
Expand Down Expand Up @@ -84,8 +89,7 @@
"types": "./dist/utils/*.d.ts",
"svelte": "./dist/utils/*.js"
},
"./plugins/*": "./dist/plugins/*",
"./styles/*": "./dist/styles/*"
"./plugins/*": "./dist/plugins/*"
},
"files": [
"dist"
Expand Down
26 changes: 26 additions & 0 deletions packages/svelte-ux/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,29 @@ declare namespace App {
// interface PageState {}
// interface Platform {}
}

// TODO: Can this be referenced from `@layerstack/svelte-actions` types.d.ts without breaking other things?
// https://github.com/sveltejs/language-tools/blob/master/docs/preprocessors/typescript.md
declare namespace svelteHTML {
interface HTMLAttributes<T> {
// use:intersection
'on:intersecting'?: (event: CustomEvent<IntersectionObserverEntry>) => void;

// use:mutate
'on:mutate'?: (event: CustomEvent<MutationRecord[]>) => void;

// use:movable
'on:movestart'?: (event: CustomEvent<{ x: number; y: number }>) => void;
'on:move'?: (event: CustomEvent<{ x: number; y: number; dx: number; dy: number }>) => void;
'on:moveend'?: (event: CustomEvent<{ x: number; y: number }>) => void;

// use:popover
'on:clickOutside'?: (event: CustomEvent) => void;

// use:overflow
'on:overflow'?: (event: CustomEvent<{ overflowX: number; overflowY: number }>) => void;

// use:longpress
'on:longpress'?: (event: CustomEvent) => void;
}
}
2 changes: 1 addition & 1 deletion packages/svelte-ux/src/docs/Blockquote.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { mdiInformation } from '@mdi/js';
import Icon from '../lib/components/Icon.svelte';
import { cls } from '$lib/utils/styles.js';
import { cls } from '@layerstack/tailwind';
</script>

<div
Expand Down
99 changes: 0 additions & 99 deletions packages/svelte-ux/src/lib/actions/_domTracker.ts

This file was deleted.

131 changes: 0 additions & 131 deletions packages/svelte-ux/src/lib/actions/dataBackground.ts

This file was deleted.

44 changes: 0 additions & 44 deletions packages/svelte-ux/src/lib/actions/focus.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/svelte-ux/src/lib/actions/index.ts

This file was deleted.

Loading

0 comments on commit 797b145

Please sign in to comment.