Skip to content

Commit

Permalink
chore: update deps (#138)
Browse files Browse the repository at this point in the history
* Push

* Remove nx

* Fix stuff

* Fix somemore
  • Loading branch information
PuruVJ authored Dec 18, 2023
1 parent 6965d57 commit 54ea4f2
Show file tree
Hide file tree
Showing 44 changed files with 3,985 additions and 4,811 deletions.
7 changes: 0 additions & 7 deletions config/index.d.ts

This file was deleted.

12 changes: 0 additions & 12 deletions config/package.json

This file was deleted.

14 changes: 10 additions & 4 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import prefetch from '@astrojs/prefetch';
import svelte from '@astrojs/svelte';
import serviceWorker from 'astrojs-service-worker';
import { rehypeHeadingIds } from '@astrojs/markdown-remark';
Expand Down Expand Up @@ -32,7 +31,7 @@ const AnchorLinkIcon = h(
fillRule: 'evenodd',
fill: 'currentcolor',
d: 'M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z',
})
}),
);

// https://astro.build/config
Expand All @@ -42,7 +41,6 @@ export default defineConfig({
svelte({ preprocess: sequential([autoPreprocess(), fastDimension()]) }),
mdx(),
sitemap(),
prefetch(),
serviceWorker(),
// critters(),
AutoImport({
Expand All @@ -64,8 +62,16 @@ export default defineConfig({
}),
],

prefetch: true,

markdown: {
extendDefaultPlugins: true,
shikiConfig: {
experimentalThemes: {
light: 'github-light',
dark: 'github-dark',
},
},
// @ts-ignore
remarkPlugins: [container],
rehypePlugins: [
Expand All @@ -86,7 +92,7 @@ export default defineConfig({
{
ariaHidden: 'true',
},
AnchorLinkIcon
AnchorLinkIcon,
),
],
} as Options,
Expand Down
67 changes: 32 additions & 35 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,48 @@
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@fontsource/jetbrains-mono": "^4.5.12",
"@fontsource/plus-jakarta-sans": "^4.5.11",
"@fontsource/jetbrains-mono": "^5.0.18",
"@fontsource/plus-jakarta-sans": "^5.0.18",
"@neodrag/svelte": "workspace:*",
"astro-seo": "^0.7.1",
"open-props": "^1.5.3",
"astro-seo": "^0.8.0",
"open-props": "^1.6.16",
"popmotion": "^11.0.5",
"slugify": "^1.6.5",
"svelte-body": "^1.3.6",
"svelte-copy": "^1.3.0",
"svelte-inview": "^3.0.2",
"svelte-local-storage-store": "^0.4.0",
"slugify": "^1.6.6",
"svelte-body": "^1.4.0",
"svelte-copy": "^1.4.1",
"svelte-inview": "^4.0.1",
"svelte-local-storage-store": "^0.6.4",
"throttle-debounce": "^5.0.0"
},
"devDependencies": {
"@astrojs/mdx": "^0.17.0",
"@astrojs/prefetch": "^0.1.2",
"@astrojs/sitemap": "^1.0.1",
"@astrojs/svelte": "^2.0.2",
"@iconify/json": "^2.2.25",
"@types/throttle-debounce": "^5.0.0",
"astro": "^2.0.14",
"astrojs-service-worker": "^0.0.9",
"autoprefixer": "^10.4.13",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.2.0",
"postcss": "^8.4.21",
"postcss-jit-props": "^1.0.11",
"prettier": "^2.8.4",
"prettier-plugin-astro": "^0.8.0",
"rehype-autolink-headings": "^6.1.1",
"@astrojs/mdx": "^2.0.1",
"@astrojs/sitemap": "^3.0.3",
"@astrojs/svelte": "^5.0.1",
"@iconify/json": "^2.2.159",
"@types/throttle-debounce": "^5.0.2",
"astro": "^4.0.6",
"astrojs-service-worker": "^2.0.0",
"autoprefixer": "^10.4.16",
"hast-util-to-string": "^3.0.0",
"hastscript": "^8.0.0",
"postcss": "^8.4.32",
"postcss-jit-props": "^1.0.14",
"prettier": "^3.1.1",
"prettier-plugin-astro": "^0.12.2",
"rehype-autolink-headings": "^7.1.0",
"remark-custom-container": "^1.2.0",
"rollup": "^3.17.2",
"sass": "^1.58.3",
"svelte": "^3.55.1",
"svelte-fast-dimension": "^0.0.3",
"svelte-sequential-preprocessor": "^0.0.7",
"typescript": "^4.9.5",
"unplugin-auto-import": "^0.14.3",
"unplugin-icons": "^0.15.3",
"vite": "^4.1.3"
"sass": "^1.69.5",
"svelte": "^4.2.8",
"svelte-fast-dimension": "^1.1.0",
"svelte-sequential-preprocessor": "^2.0.1",
"typescript": "^5.3.3",
"unplugin-auto-import": "^0.17.2",
"unplugin-icons": "^0.18.1",
"vite": "^5.0.10"
}
}
7 changes: 4 additions & 3 deletions docs/src/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const Code: typeof import('$components/options/OptionsCode.astro')['default']
const Example: typeof import('$components/options/OptionsExample.astro')['default']
const Examples: typeof import('$components/options/OptionsExamples.svelte')['default']
const Code: typeof import('$components/options/OptionsCode')['default']
const Example: typeof import('$components/options/OptionsExample')['default']
const Examples: typeof import('$components/options/OptionsExamples')['default']
}
12 changes: 6 additions & 6 deletions docs/src/components/PawCursor.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { get, Writable, writable } from 'svelte/store';
import { get, type Writable, writable } from 'svelte/store';
// @ts-ignore
import PawIcon from '~icons/mdi/paw';
Expand Down Expand Up @@ -27,7 +27,7 @@
function querySelectorAllLive<T extends HTMLElement = HTMLElement>(
element: HTMLElement,
selector: string
selector: string,
): Writable<T[]> {
// Initialize results with current nodes.
const result = writable(Array.from<T>(element.querySelectorAll(selector)));
Expand Down Expand Up @@ -57,8 +57,8 @@
globalThis.document && !isTouchDevice
? querySelectorAllLive(
document.body,
'[data-paw-cursor="true"], [data-paw-cursor="false"]'
)
'[data-paw-cursor="true"], [data-paw-cursor="false"]',
)
: writable([]);
$: {
Expand All @@ -85,7 +85,7 @@
initialCursor && (el.style.cursor = initialCursor);
}
},
{ capture: true, passive: true }
{ capture: true, passive: true },
);
el.addEventListener(
'mouseout',
Expand All @@ -95,7 +95,7 @@
cursorColor = undefined;
},
{ passive: true }
{ passive: true },
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/docs/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
pathname.endsWith(path) ? 'page' : 'false';
const framework = /\/docs\/(svelte|react|solid|vanilla|vue)/gi.exec(
pathname
pathname,
)?.[1];
</script>

Expand Down Expand Up @@ -64,7 +64,7 @@
<ThemeSwitcher />
</div>

<!-- <span class="copyright"
<span class="copyright"
>&copy; 2021-{new Date().getUTCFullYear()}
<a
href="https://twitter.com/puruvjdev"
Expand All @@ -74,7 +74,7 @@
>
Puru Vijay</a
>
</span> -->
</span>
</div>

<style lang="scss">
Expand Down
11 changes: 6 additions & 5 deletions docs/src/components/examples/KitchenSinkDemo.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { draggable, DragOptions } from '@neodrag/svelte';
import { draggable, type DragOptions } from '@neodrag/svelte';
import { browser } from 'src/helpers/utils';
//@ts-ignore
import squircle from 'src/worklet/squircle?url';
Expand Down Expand Up @@ -60,7 +60,7 @@
if (zIndices[index] > zIndices.length) {
zIndices = zIndices.map((z) =>
z >= lowestZIndex ? z - lowestZIndex : z
z >= lowestZIndex ? z - lowestZIndex : z,
);
}
}
Expand Down Expand Up @@ -92,7 +92,7 @@
x: 0,
y: 0,
},
{ easing: expoOut, duration: 1200 }
{ easing: expoOut, duration: 1200 },
);
if (browser)
Expand Down Expand Up @@ -343,7 +343,7 @@
dragHandlers.onDrag?.(data);
returnToPositionTransitionVal.set(
{ x: data.offsetX, y: data.offsetY },
{ duration: 0 }
{ duration: 0 },
);
},
onDragEnd: (data) => {
Expand Down Expand Up @@ -412,7 +412,8 @@
background-color: var(--app-color-light);
box-shadow: 0px 12.5px 10px rgba(0, 0, 0, 0.035),
box-shadow:
0px 12.5px 10px rgba(0, 0, 0, 0.035),
0px 100px 80px rgba(0, 0, 0, 0.07);
border-radius: 0.5rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { portal } from '$actions/portal';
import { DragEventData, draggable } from '@neodrag/svelte';
import { draggable, type DragEventData } from '@neodrag/svelte';
import type { Framework } from 'src/helpers/constants';
import { createEventDispatcher, onDestroy } from 'svelte';
import { expoOut } from 'svelte/easing';
Expand Down Expand Up @@ -38,7 +38,7 @@
let draggablePosition = tweened(
{ x: 0, y: 0 },
{ easing: expoOut, duration: 1200 }
{ easing: expoOut, duration: 1200 },
);
$: {
Expand Down Expand Up @@ -99,7 +99,7 @@
},
destroy: () => {
window.removeEventListener('resize', () =>
updateLinePosition(node, rootEl)
updateLinePosition(node, rootEl),
);
},
};
Expand Down Expand Up @@ -137,7 +137,7 @@
dispatch('drag', data);
draggablePosition.set(
{ x: data.offsetX, y: data.offsetY },
{ duration: 0 }
{ duration: 0 },
);
},
onDragEnd: (data) => {
Expand Down
10 changes: 10 additions & 0 deletions docs/src/css/themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,13 @@ body.dark {
);
--app-color-brand-vanilla-navbar: #4f491e;
}

body.dark .astro-code,
body.dark .astro-code span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
/* Optional, if you also want font styles */
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;
text-decoration: var(--shiki-dark-text-decoration) !important;
}
1 change: 0 additions & 1 deletion docs/src/documentation/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Code } from 'astro/components';
## Installation

{/* prettier-ignore */}
{/* TODO(2.0): Remove next */}

<Code code={`
pnpm add @neodrag/${props.framework}
Expand Down
15 changes: 7 additions & 8 deletions docs/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

declare module 'virtual:icons/*' {
export { SvelteComponentDev as default } from 'svelte/internal';
export { SvelteComponent as default } from 'svelte';
}

declare module '~icons/*' {
Expand All @@ -16,15 +15,15 @@ declare module '~icons/*' {
type ObjectKeys<Obj> = Obj extends object
? (keyof Obj)[]
: Obj extends number
? []
: Obj extends Array<any> | string
? string[]
: never;
? []
: Obj extends Array<any> | string
? string[]
: never;

interface ObjectConstructor {
keys<ObjectType>(o: ObjectType): ObjectKeys<ObjectType>;
entries<ObjType>(
o: ObjType
o: ObjType,
): [Unpacked<ObjectKeys<ObjType>>, ObjType[keyof ObjType]][];
}

Expand All @@ -44,6 +43,6 @@ interface Array<T> {
fill<T extends any>(
value: T,
start?: number | undefined,
end?: number | undefined
end?: number | undefined,
): T[];
}
4 changes: 4 additions & 0 deletions docs/src/layouts/DocsLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ const { title: frontmatterTitle } = frontmatter || {};
background-color: hsla(var(--app-color-dark-hsl), 0.1);
}

:global(pre.astro-code code) {
background-color: transparent;
}

:global(h1, h2, h3, h4, h5) {
--anchor-opacity: 1;

Expand Down
Loading

1 comment on commit 54ea4f2

@vercel
Copy link

@vercel vercel bot commented on 54ea4f2 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.