diff --git a/.gitmodules b/.gitmodules index 46c4158..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "packages/material/material-color-utilities"] - path = packages/material/material-color-utilities - url = git@github.com:deminearchiver/material-color-utilities diff --git a/app/astro.config.ts b/app/astro.config.ts index f73b2d6..4f7938e 100644 --- a/app/astro.config.ts +++ b/app/astro.config.ts @@ -19,12 +19,14 @@ import { vanillaExtractPlugin as vanillaExtract } from "@vanilla-extract/vite-pl import unpluginIcons from "unplugin-icons/vite"; import { FileSystemIconLoader } from "unplugin-icons/loaders"; import materialSymbols from "@material-symbols/unplugin-icons"; -import materialSymbolsVite from "@material/symbols/vite"; +import materialSymbolsIntegration from "@material/symbols/astro"; import { FontaineTransform as fontaine } from "fontaine"; import { imageService as unpicImageService } from "@unpic/astro/service"; +import turboConsole from "unplugin-turbo-console/astro"; + export default defineConfig({ site: "https://deminearchiver.pages.dev", // image: { @@ -35,6 +37,8 @@ export default defineConfig({ // }), // }, integrations: [ + turboConsole({}), + materialSymbolsIntegration(), expressiveCode({ plugins: [ expressiveCodeLineNumbers(), diff --git a/app/package.json b/app/package.json index 8a6545b..bb10b9a 100644 --- a/app/package.json +++ b/app/package.json @@ -46,7 +46,7 @@ "@vanilla-extract/private": "^1.0.5", "@vanilla-extract/recipes": "^0.5.3", "@vanilla-extract/sprinkles": "^1.6.2", - "astro": "^4.9.1", + "astro": "^4.9.2", "astro-expressive-code": "^0.35.3", "clsx": "^2.1.1", "dayjs": "^1.11.11", @@ -62,10 +62,11 @@ "devDependencies": { "@iconify-json/material-symbols": "^1.1.80", "@iconify-json/simple-icons": "^1.1.101", - "@types/markdown-it": "^14", - "@types/sanitize-html": "^2", + "@types/markdown-it": "^14.1.1", + "@types/sanitize-html": "^2.11.0", "@vanilla-extract/vite-plugin": "^4.0.10", "astro-meta-tags": "^0.3.0", - "unplugin-icons": "^0.19.0" + "unplugin-icons": "^0.19.0", + "unplugin-turbo-console": "^1.8.6" } } diff --git a/app/src/components/navigation/navigation-drawer.tsx b/app/src/components/navigation/navigation-drawer.tsx index dd3892d..1e041b6 100644 --- a/app/src/components/navigation/navigation-drawer.tsx +++ b/app/src/components/navigation/navigation-drawer.tsx @@ -1,6 +1,6 @@ import { createEventListener } from "@solid-primitives/event-listener"; import { mergeRefs, resolveFirst } from "@solid-primitives/refs"; -import { For, createEffect, createMemo, createSignal, splitProps, untrack, type Component, type ComponentProps, type JSX, type ParentComponent } from "solid-js"; +import { For, createEffect, createMemo, createSignal, on, splitProps, untrack, type Component, type ComponentProps, type JSX, type ParentComponent } from "solid-js"; import { createPresence } from "@solid-primitives/presence"; import { drawerContentStyle, drawerItemContentStyle, drawerItemStyle, drawerDialogStyle, drawerListStyle, passthroughStyle, drawerHeaderStyle, drawerFooterStyle } from "./navigation-drawer.css"; @@ -76,17 +76,17 @@ export const NavigationDrawer: Component = (props) => { exitDuration: 300, }); - createEffect((mounted) => { - document.body.toggleAttribute("data-dialog-open", open()); - if(isMounted() === mounted) return isMounted(); - if(isMounted()) { - dialogRef.showModal(); - } - else { - dialogRef.close(); - } - return isMounted(); - }, isMounted()); + createEffect( + on(isMounted, (mounted) => { + document.body.toggleAttribute("data-dialog-open", open()); + if(mounted) { + dialogRef.showModal(); + } + else { + dialogRef.close(); + } + }) + ); const state = createMemo(() => isEntering() ? "enter" : isExiting() ? "exit" : undefined); diff --git a/app/src/components/search/search-anchor.tsx b/app/src/components/search/search-anchor.tsx index 38f60fd..bf45c63 100644 --- a/app/src/components/search/search-anchor.tsx +++ b/app/src/components/search/search-anchor.tsx @@ -1,11 +1,13 @@ import { splitProps, type Component, type JSX } from "solid-js"; import { Splash } from "@material/solid/components/splash"; import { Focus } from "@material/solid/components/focus"; +import { Tooltip } from "@material/solid/components/tooltip"; import { searchAnchorContentStyle, searchAnchorIconStyle, searchAnchorLabelStyle, searchAnchorStyle } from "./search-anchor.css"; import SearchIcon from "~icons/material-symbols-rounded/search:outlined"; import { mergeRefs } from "@solid-primitives/refs"; import clsx from "clsx"; +import { createEventListener } from "@solid-primitives/event-listener"; export type SearchAnchorProps = Omit, "children">; export const SearchAnchor: Component = (props) => { diff --git a/app/src/components/search/search.tsx b/app/src/components/search/search.tsx index fe0e036..2cd1f74 100644 --- a/app/src/components/search/search.tsx +++ b/app/src/components/search/search.tsx @@ -1,6 +1,7 @@ import type { Component } from "solid-js"; import { SearchView } from "./search-view"; import { SearchAnchor } from "./search-anchor"; +import { Tooltip } from "@material/solid/components/tooltip"; export const Search: Component = () => { let ref!: HTMLButtonElement; @@ -8,6 +9,9 @@ export const Search: Component = () => { <> + + Press to open search + ); } diff --git a/app/src/content/blog/astro-pagefind-solidjs.mdx b/app/src/content/blog/astro-pagefind-solidjs.mdx index fcc8928..d88f272 100644 --- a/app/src/content/blog/astro-pagefind-solidjs.mdx +++ b/app/src/content/blog/astro-pagefind-solidjs.mdx @@ -1,11 +1,7 @@ --- title: Astro + Pagefind + Solid = 🤯 description: Build a search UI for your Astro site using Pagefind and SolidJS -authors: - - id: deminearchiver - name: deminearchiver - avatar: - src: ../../assets/images/avatars/deminearchiver.png +authors: [deminearchiver] createdAt: 2024-05-18 # Don't change! It's an actual creation date! --- diff --git a/app/src/content/blog/material-to-solid.mdx b/app/src/content/blog/material-to-solid.mdx index 450abcc..4243d33 100644 --- a/app/src/content/blog/material-to-solid.mdx +++ b/app/src/content/blog/material-to-solid.mdx @@ -3,12 +3,12 @@ title: Bringing Material You to SolidJS description: Recreating Material You components in SolidJS, styling with Vanilla Extract. cover: src: ../../assets/images/covers/material-to-solid.png -authors: - - id: deminearchiver - name: deminearchiver - avatar: - src: ../../assets/images/avatars/deminearchiver.png +authors: [deminearchiver] createdAt: 2024-05-25 # DO NOT CHANGE ANYMORE! Started work on the post 2024-05-25 +tags: + - materialDesign + - solidJs + - vanillaExtract --- import { Aside } from "../../components/content/aside"; diff --git a/app/src/content/blog/test.mdx b/app/src/content/blog/test.mdx index 8f7ebf1..1d3a9fa 100644 --- a/app/src/content/blog/test.mdx +++ b/app/src/content/blog/test.mdx @@ -1,11 +1,7 @@ --- hide: production title: Test Post -authors: - - id: deminearchiver - name: deminearchiver - avatar: - src: ../../assets/images/avatars/deminearchiver.png +authors: [deminearchiver] createdAt: 2024-02-01 --- diff --git a/app/src/content/blog/tooltip.mdx b/app/src/content/blog/tooltip.mdx new file mode 100644 index 0000000..ebae0e0 --- /dev/null +++ b/app/src/content/blog/tooltip.mdx @@ -0,0 +1,141 @@ +--- +hide: production +title: Tooltips using Popover API & Floating UI +description: | + In this post I'll show how to create a simple tooltip component for SolidJS using the Popover API and the FloatingUI library +authors: [deminearchiver] +createdAt: 2024-06-02 +tags: + - solidJs +--- + +As you may know, Popover API has recently [**landed in Baseline**](https://web.dev/blog/popover-api), which means it will soon come to all major browsers. + +```bash +yarn add @floating-ui/dom +yarn add @solid-primitives/refs @solid-primitives/event-listener @solid-primitives/presence +``` + +```tsx title="tooltip.tsx" +import { type Accessor, type JSX, type Component, createSignal, splitProps, createEffect, onCleanup, on } from "solid-js"; +import { createSignal, computePosition, autoUpdate, flip, shift, offset } from "@floating-ui/dom"; + +import { createEventListenerMap } from "@solid-primitives/event-listener"; +import { mergeRefs } from "@solid-primitives/refs"; +import { createPresence } from "@solid-primitives/presence"; + +import styles from "./tooltip.module.css"; + +export type TooltipProps = { + for: HTMLElement; +} & JSX.HTMLAttributes; + +type FloatingState = { + x: number; + y: number; +} + +export const Tooltip: Component = (props) => { + const [localProps, otherProps] = splitProps( + props, + ["ref", "class", "children"], + ); + + let ref!: HTMLElement; + + const [visible, setVisible] = createSignal(false); + const [hovered, setHovered] = createSignal(false); + + const { isMounted, isVisible } = createPresence( + visible, { transitionDuration: 100 }, + ); + + const [floatingState, setFloatingState] = createSignal( + { x: 0, y: 0 }, + ); + + createEffect(() => { + const anchor = localProps.for; + const cleanup = autoUpdate( + anchor, ref, + () => { + computePosition(anchor, ref, { + middleware: [ + flip(), + shift(), + offset(4), + ], + }).then(({ x, y }) => setFloatingState({ x, y })); + }, + ); + onCleanup(cleanup); + }); + + createEffect( + on(isMounted, mounted => { + if(mounted) ref.showPopover(); + else ref.hidePopover(); + }) + ); + + createEventListenerMap( + localProps.for, + { + pointerenter: async () => { + setHovered(true); + await new Promise(resolve => setTimeout(resolve, 1500)); + if(hovered()) setVisible(true); + }, + pointerleave: () => { + setHovered(false); + setVisible(false); + } + } + ); + + return ( +
+ {localProps.children} +
+ ); +} +``` + +```css title="tooltip.module.css" +.tooltip { + /* Required for Floating UI */ + position: absolute; + top: 0; + left: 0; + width: max-content; + + /* Design */ + min-height: 24px; + display: flex; + align-items: center; + justify-content: center; + padding-inline: 8px; + background-color: darkslateblue; + color: white; + border-radius: 4px; + + pointer-events: none; + + transition: opacity 100ms linear; + + /* Remove annoying user agent styles */ + margin: 0; + border: none; +} +``` + + +## Conclusion + +You can see the final result in [**Material You for SolidJS**](/showcase/material-solid). diff --git a/app/src/content/blog/website-devlog-1.mdx b/app/src/content/blog/website-devlog-1.mdx index d6467eb..87c07a4 100644 --- a/app/src/content/blog/website-devlog-1.mdx +++ b/app/src/content/blog/website-devlog-1.mdx @@ -2,11 +2,7 @@ hide: production title: "Website Devlog #1: the beginning" description: Introduction to my new "Website Devlog" series -authors: - - id: deminearchiver - name: deminearchiver - avatar: - src: ../../assets/images/avatars/deminearchiver.png +authors: [deminearchiver] createdAt: 2024-05-23 --- diff --git a/app/src/env.d.ts b/app/src/env.d.ts index bef4843..5f6f91c 100644 --- a/app/src/env.d.ts +++ b/app/src/env.d.ts @@ -2,10 +2,4 @@ /// /// -/// -declare module "@material/symbols/*" { - import type { Component, ComponentProps } from "solid-js"; - - const component: Component>; - export default component; -} +/// diff --git a/app/src/layouts/404.astro b/app/src/layouts/404.astro new file mode 100644 index 0000000..853d812 --- /dev/null +++ b/app/src/layouts/404.astro @@ -0,0 +1,3 @@ +--- + +--- diff --git a/app/src/pages/blog/index.astro b/app/src/pages/blog/index.astro index a975a16..d1a2ff6 100644 --- a/app/src/pages/blog/index.astro +++ b/app/src/pages/blog/index.astro @@ -6,13 +6,11 @@ import { getCollection } from "astro:content"; import { Image } from "astro:assets"; import ImageIcon from "~icons/material-symbols-rounded/image:outlined&opticalSize=48"; -import type { CollectionEntry } from "astro:content"; import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import { getBlogCollection } from "../../schemas/blog"; - dayjs.extend(utc); const posts = (await getBlogCollection()) @@ -53,6 +51,7 @@ const posts = (await getBlogCollection()) {date}

{post.title}

{post.description &&

{post.description}

} + {post.tags &&
    {post.tags.map(tag =>
  • {tag.name}
  • )}
}
@@ -94,7 +93,7 @@ const posts = (await getBlogCollection()) margin: 64px auto 24px auto; padding: 0 24px; } - li { + .posts > li { display: contents; } @@ -252,11 +251,12 @@ const posts = (await getBlogCollection()) display: flex; align-items: center; justify-content: flex-start; - gap: 4px; padding-inline: 8px; } .by { + margin-right: 4px; + font-family: var(--text-label-large-family); font-size: var(--text-label-large-size); font-weight: var(--text-label-large-weight); @@ -293,6 +293,10 @@ const posts = (await getBlogCollection()) transition-duration: 105ms; transition-timing-function: var(--easing-standard); + &.more { + padding-inline: 16px; + } + @media (hover: hover) { &:hover { background-color: color-mix(in srgb, transparent, var(--color-on-surface-variant) 8%); @@ -326,4 +330,34 @@ const posts = (await getBlogCollection()) height: 24px; border-radius: 50%; } + + .tags { + list-style: none; + + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-start; + gap: 8px; + } + + .tag { + display: flex; + align-items: center; + justify-content: center; + + background-color: var(--color-secondary-container); + border-radius: 8px; + height: 32px; + padding-inline: 16px; + + font-family: var(--text-label-large-family); + font-size: var(--text-label-large-size); + font-weight: var(--text-label-large-weight); + line-height: var(--text-label-large-line-height); + letter-spacing: var(--text-label-large-letter-spacing); + text-decoration: none; + font-variation-settings: "GRAD" 0; + color: var(--color-on-secondary-container); + } diff --git a/app/src/pages/index.astro b/app/src/pages/index.astro index 6e58cb3..8bf8c86 100644 --- a/app/src/pages/index.astro +++ b/app/src/pages/index.astro @@ -3,7 +3,6 @@ import Page from "../layouts/Page.astro"; import { Header } from "../components/header"; import { Hero } from "../components/hero"; import { Footer } from "../components/footer"; - --- diff --git a/app/src/pages/showcase/index.astro b/app/src/pages/showcase/index.astro index 6a506d7..780d4dc 100644 --- a/app/src/pages/showcase/index.astro +++ b/app/src/pages/showcase/index.astro @@ -1,6 +1,7 @@ --- import { Footer } from "../../components/footer"; import { Header } from "../../components/header"; +import { Search } from "../../components/search"; import { ShowcaseCard } from "../../components/showcase/card"; import Page from "../../layouts/Page.astro"; import { getShowcaseCollection } from "../../schemas/showcase"; diff --git a/app/src/schemas/blog.ts b/app/src/schemas/blog.ts index b61c983..c611fbd 100644 --- a/app/src/schemas/blog.ts +++ b/app/src/schemas/blog.ts @@ -1,32 +1,69 @@ import { defineCollection, getCollection, z, type SchemaContext } from "astro:content"; import { imageSchema } from "./utils"; -import deminearchiverAvatar from "../assets/images/avatars/deminearchiver.png"; - -const authorSchema = (context: SchemaContext) => - z.object({ - id: z.string(), - name: z.string(), - avatar: imageSchema(context).optional(), - }); - -type Author = z.infer> +type Author = { + name: string; + avatar?: { + src: Promise<{ default: ImageMetadata; }>; + alt?: string; + }; +}; const AUTHORS = { deminearchiver: { - id: "deminearchiver", - name: "deminearchiver" + name: "deminearchiver", + avatar: { + src: import("../assets/images/avatars/deminearchiver.png"), + alt: "deminearchiver", + }, }, } satisfies Record; type AuthorsKey = keyof typeof AUTHORS; const authorsKeys = Object.keys(AUTHORS) as [AuthorsKey, ...AuthorsKey[]]; +const TAGS = { + solidJs: "SolidJS", + vanillaExtract: "Vanilla Extract", + materialDesign: "Material Design", +} +type TagsKey = keyof typeof TAGS; +const tagsKeys = Object.keys(TAGS) as [TagsKey, ...TagsKey[]]; + + export const blogSchema = (context: SchemaContext) => { return z.object({ hide: z.enum(["development", "production"]).optional(), title: z.string(), description: z.string().optional(), cover: imageSchema(context).optional(), - authors: z.array(authorSchema(context)).min(1), + authors: z.array(z.enum(authorsKeys)) + .transform(async (ids, { addIssue }) => { + ids = [...new Set(ids)]; + if(ids.length === 0) addIssue({ + type: "array", + code: "too_small", + minimum: 1, + inclusive: true, + fatal: true, + }); + return Promise.all(ids.map(async id => { + const { name, avatar } = AUTHORS[id] as Author; + return { + id, + name: name, + avatar: avatar && { + src: (await avatar.src).default, + alt: avatar.alt ?? name, + }, + }; + })); + }), + tags: z.array(z.enum(tagsKeys)) + .default([]) + .transform((ids, { addIssue }) => { + return [...new Set(ids)].map( + id => ({ id, name: TAGS[id] }), + ); + }), createdAt: z.date(), editedAt: z.date().optional(), }); diff --git a/app/src/styles/material-symbols.css b/app/src/styles/material-symbols.css new file mode 100644 index 0000000..4a4c183 --- /dev/null +++ b/app/src/styles/material-symbols.css @@ -0,0 +1,20 @@ +@font-face { + font-family: 'Material Symbols Rounded Variable'; + font-style: normal; + font-display: swap; + font-weight: 100 700; + /* src: url(@fontsource-variable/material-symbols-rounded/files/material-symbols-rounded-latin-full-normal.woff2) format('woff2-variations'); */ + src: url(~material/symbols/font.woff2) format('woff2-variations'); + unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; +} + +.material-symbols-rounded { + font-family: "Material Symbols Rounded Variable"; + font-size: 24px; + color: currentColor; + font-variation-settings: + "wght" 400, + "FILL" 0, + "GRAD" 0, + "opsz" 24; +} diff --git a/packages/astro/pagefind/package.json b/packages/astro/pagefind/package.json index 716eb19..29907f7 100644 --- a/packages/astro/pagefind/package.json +++ b/packages/astro/pagefind/package.json @@ -8,7 +8,7 @@ }, "packageManager": "yarn@4.2.2", "dependencies": { - "astro": "^4.9.1", + "astro": "^4.9.2", "astro-integration-kit": "^0.13.2", "nanoid": "^5.0.7", "pagefind": "^1.1.0", @@ -17,7 +17,7 @@ "solid-js": "^1.8.17" }, "devDependencies": { - "@types/node": "^20.12.12", + "@types/node": "^20.13.0", "typescript": "^5.4.5" } } diff --git a/packages/material-symbols/package.json b/packages/material-symbols/package.json index 0559be7..818e4cc 100644 --- a/packages/material-symbols/package.json +++ b/packages/material-symbols/package.json @@ -6,7 +6,7 @@ }, "packageManager": "yarn@4.2.2", "devDependencies": { - "astro": "^4.9.1", + "astro": "^4.9.2", "typescript": "^5.4.5" }, "dependencies": { diff --git a/packages/material/astro/package.json b/packages/material/astro/package.json index 963eef7..1e0c650 100644 --- a/packages/material/astro/package.json +++ b/packages/material/astro/package.json @@ -6,7 +6,7 @@ }, "packageManager": "yarn@4.2.2", "dependencies": { - "astro": "^4.9.1" + "astro": "^4.9.2" }, "devDependencies": { "typescript": "^5.4.5" diff --git a/packages/material/material-color-utilities b/packages/material/material-color-utilities deleted file mode 160000 index a6f1583..0000000 --- a/packages/material/material-color-utilities +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a6f1583f266d5a661f67f80f18dd7205fd7a0504 diff --git a/packages/material/solid/components/button/button.css.ts b/packages/material/solid/components/button/button.css.ts index e612d1e..2fbac06 100644 --- a/packages/material/solid/components/button/button.css.ts +++ b/packages/material/solid/components/button/button.css.ts @@ -1,6 +1,7 @@ import { recipe } from "@vanilla-extract/recipes"; import { THEME } from "../../theme/contract.css"; import { splashTheme } from "../splash"; +import { style } from "@vanilla-extract/css"; export const buttonStyle = recipe({ base: { @@ -87,3 +88,14 @@ export const buttonStyle = recipe({ } } }); + +export const buttonOutlineStyle = style({ + position: "absolute", + inset: 0, + border: `1px solid ${THEME.color.outline}`, + selectors: { + [`${buttonStyle.classNames.base}:focus-visible > &`]: { + borderColor: THEME.color.primary, + }, + }, +}); diff --git a/packages/material/solid/components/button/button.tsx b/packages/material/solid/components/button/button.tsx index c72d640..156e6ed 100644 --- a/packages/material/solid/components/button/button.tsx +++ b/packages/material/solid/components/button/button.tsx @@ -1,6 +1,6 @@ import { type JSX, createMemo, createSignal, splitProps, type ParentComponent, type Signal } from "solid-js"; import { Splash } from "../splash"; -import { buttonStyle } from "./button.css"; +import { buttonOutlineStyle, buttonStyle } from "./button.css"; import clsx from "clsx/lite"; import { Dynamic } from "solid-js/web"; import { Focus } from "../focus"; @@ -63,6 +63,7 @@ export const Button: ParentComponent = (props) => { {localProps.leading} {localProps.children} {localProps.trailing} +
); } diff --git a/packages/material/solid/components/switch/switch.tsx b/packages/material/solid/components/switch/switch.tsx index 16eb8f6..bc6b374 100644 --- a/packages/material/solid/components/switch/switch.tsx +++ b/packages/material/solid/components/switch/switch.tsx @@ -35,6 +35,11 @@ export const Switch: ParentComponent = (props) => { return (
{ + const ignoreEvent = event.defaultPrevented || event.key !== "Enter"; + if (ignoreEvent || localProps.disabled) return; + inputRef.click(); + }} classList={{ [switchSelectedStyle]: props.selected, [switchUnselectedStyle]: !props.selected, diff --git a/packages/material/solid/components/tooltip/index.ts b/packages/material/solid/components/tooltip/index.ts new file mode 100644 index 0000000..7296a95 --- /dev/null +++ b/packages/material/solid/components/tooltip/index.ts @@ -0,0 +1,6 @@ +import { PlainTooltip as Plain } from "./plain-tooltip"; +import { RichTooltip as Rich } from "./rich-tooltip"; + +export const Tooltip = { Plain, Rich }; + +export type { PlainTooltipProps } from "./plain-tooltip"; diff --git a/packages/material/solid/components/tooltip/plain-tooltip.css.ts b/packages/material/solid/components/tooltip/plain-tooltip.css.ts new file mode 100644 index 0000000..1cde135 --- /dev/null +++ b/packages/material/solid/components/tooltip/plain-tooltip.css.ts @@ -0,0 +1,32 @@ +import { style } from "@vanilla-extract/css"; +import { THEME } from "../../theme/contract.css"; +import { recipe } from "@vanilla-extract/recipes"; + +export const plainTooltipStyle = style({ + border: "none", + margin: 0, + pointerEvents: "none", + + position: "absolute", + top: 0, + left: 0, + width: "max-content", + minHeight: 24, + + display: "flex", + alignItems: "center", + justifyContent: "center", + paddingInline: 8, + + backgroundColor: THEME.color.inverseSurface, + borderRadius: 4, + + fontFamily: THEME.text.body.small.family, + fontSize: THEME.text.body.small.size, + fontWeight: THEME.text.body.small.weight, + lineHeight: THEME.text.body.small.lineHeight, + letterSpacing: THEME.text.body.small.letterSpacing, + color: THEME.color.inverseOnSurface, + + transition: `opacity ${THEME.duration.short2} linear`, +}); diff --git a/packages/material/solid/components/tooltip/plain-tooltip.tsx b/packages/material/solid/components/tooltip/plain-tooltip.tsx new file mode 100644 index 0000000..5af6d28 --- /dev/null +++ b/packages/material/solid/components/tooltip/plain-tooltip.tsx @@ -0,0 +1,102 @@ +import { createEventListener, createEventListenerMap } from "@solid-primitives/event-listener"; +import { access, type MaybeAccessor } from "@solid-primitives/utils"; +import { createEffect, createSignal, on, onCleanup, splitProps, type Component, type FlowComponent, type JSX } from "solid-js"; +import { autoUpdate, computePosition, size, shift, flip, offset, autoPlacement, } from "@floating-ui/dom"; +import { mergeRefs } from "@solid-primitives/refs"; +import { createPresence } from "@solid-primitives/presence"; +import clsx from "clsx/lite"; + +import { plainTooltipStyle } from "./plain-tooltip.css"; + +const wait = (timeout: number) => new Promise(resolve => setTimeout(resolve, timeout)); + +type FloatingState = { + x: number; + y: number; +} +type TooltipState = "inactive" | "delay" | "active"; + +export type PlainTooltipProps = { + for: MaybeAccessor; +} & Omit, "style" | "role" | "popover">; + +const SUPPORTS_POPOVER = Object.prototype.hasOwnProperty.call(HTMLElement.prototype, "povover"); + +export const PlainTooltip: Component = (props) => { + const [localProps, otherProps] = splitProps( + props, + ["ref", "for", "class", "children"], + ); + + let ref!: HTMLElement; + + const [floatingState, setFloatingState] = createSignal({ x: 0, y: 0 }); + + const [visible, setVisible] = createSignal(false); + const { isMounted, isVisible } = createPresence( + visible, { transitionDuration: 100 }, + ); + const [hovered, setHovered] = createSignal(false); + + createEffect(() => { + const anchor = access(localProps.for); + const cleanup = autoUpdate( + anchor, ref, + () => { + computePosition( + anchor, ref, + { + placement: "top", + middleware: [ + flip(), + shift(), + offset(8), + ], + }, + ).then( + ({ x, y }) => setFloatingState({ x, y }) + ); + }, + ); + onCleanup(cleanup); + }); + createEffect( + on(isMounted, (mounted) => { + if(mounted) ref.showPopover(); + else ref.hidePopover(); + }), + ); + + createEventListenerMap( + props.for, + { + pointerenter: async () => { + setHovered(true); + await new Promise(resolve => setTimeout(resolve, 1500)); + if(hovered()) setVisible(true); + }, + pointerleave: () => { + setHovered(false); + setVisible(false); + }, + } + ); + + + return ( +
ref = element)} + class={clsx(plainTooltipStyle, localProps.class)} + {...otherProps} + role="tooltip" + style={{ + display: isMounted() ? undefined : "none", + left: `${floatingState().x}px`, + top: `${floatingState().y}px`, + opacity: isVisible() ? 1 : 0, + }} + popover="manual"> + {localProps.children} +
+ ); +} diff --git a/packages/material/solid/components/tooltip/rich-tooltip.tsx b/packages/material/solid/components/tooltip/rich-tooltip.tsx new file mode 100644 index 0000000..324588b --- /dev/null +++ b/packages/material/solid/components/tooltip/rich-tooltip.tsx @@ -0,0 +1,3 @@ +export const RichTooltip = () => { + +} diff --git a/packages/material/solid/package.json b/packages/material/solid/package.json index 14c6805..78e9f43 100644 --- a/packages/material/solid/package.json +++ b/packages/material/solid/package.json @@ -12,6 +12,7 @@ "./components/icon-button": "./components/icon-button/index.ts", "./components/list": "./components/list/index.ts", "./components/card": "./components/card/index.ts", + "./components/tooltip": "./components/tooltip/index.ts", "./components/empty": "./components/empty/index.ts" }, "packageManager": "yarn@4.2.2", @@ -21,14 +22,17 @@ }, "dependencies": { "@deminearchiver/utils": "workspace:*", + "@floating-ui/dom": "^1.6.5", "@material/material-color-utilities": "https://gitpkg.now.sh/material-foundation/material-color-utilities/typescript?main", "@solid-primitives/event-listener": "^2.3.3", "@solid-primitives/media": "^2.2.9", + "@solid-primitives/presence": "^0.0.6", "@solid-primitives/raf": "^2.1.16", "@solid-primitives/refs": "^1.0.8", "@solid-primitives/scroll": "^2.0.23", "@solid-primitives/utils": "^6.2.3", "@vanilla-extract/css": "^1.15.2", + "@vanilla-extract/dynamic": "^2.1.1", "@vanilla-extract/recipes": "^0.5.3", "@vanilla-extract/sprinkles": "^1.6.2", "clsx": "^2.1.1", diff --git a/packages/material/solid/theme/contract.css.ts b/packages/material/solid/theme/contract.css.ts index f9e84c1..f2e4568 100644 --- a/packages/material/solid/theme/contract.css.ts +++ b/packages/material/solid/theme/contract.css.ts @@ -17,69 +17,66 @@ export const THEME = createThemeContract({ * 50ms */ short1: "", - /** - * 50ms - */ - short2: "", /** * 100ms */ - short3: "", + short2: "", /** * 150ms */ - short4: "", + short3: "", /** * 200ms */ - medium1: "", + short4: "", /** * 250ms */ - medium2: "", + medium1: "", /** * 300ms */ - medium3: "", + medium2: "", /** * 350ms */ - medium4: "", + medium3: "", /** * 400ms */ - long1: "", + medium4: "", /** * 450ms */ - long2: "", + long1: "", /** * 500ms */ - long3: "", + long2: "", /** * 550ms */ - long4: "", + long3: "", /** * 600ms */ - extraLong1: "", + long4: "", /** * 700ms */ - extraLong2: "", + extraLong1: "", /** * 800ms */ - extraLong3: "", + extraLong2: "", /** * 900ms */ - extraLong4: "", + extraLong3: "", /** * 1000ms */ + extraLong4: "", }, text: DEFAULT_TYPOGRAPHY, }); diff --git a/packages/material/symbols/astro/MaterialSymbols.astro b/packages/material/symbols-old/astro/MaterialSymbols.astro similarity index 100% rename from packages/material/symbols/astro/MaterialSymbols.astro rename to packages/material/symbols-old/astro/MaterialSymbols.astro diff --git a/packages/material/symbols/astro/index.ts b/packages/material/symbols-old/astro/index.ts similarity index 100% rename from packages/material/symbols/astro/index.ts rename to packages/material/symbols-old/astro/index.ts diff --git a/packages/material/symbols/env.d.ts b/packages/material/symbols-old/env.d.ts similarity index 100% rename from packages/material/symbols/env.d.ts rename to packages/material/symbols-old/env.d.ts diff --git a/packages/material/symbols-old/package.json b/packages/material/symbols-old/package.json new file mode 100644 index 0000000..fe5b6ae --- /dev/null +++ b/packages/material/symbols-old/package.json @@ -0,0 +1,28 @@ +{ + "private": true, + "name": "@material/symbols-old", + "type": "module", + "exports": { + "./vite": "./vite/index.ts", + "./astro": "./astro/index.ts", + "./types": "./env.d.ts" + }, + "packageManager": "yarn@4.2.2", + "peerDependencies": { + "vite": "^5.2.0" + }, + "devDependencies": { + "@deminearchiver/configs": "workspace:*", + "@types/fontkit": "^2.0.7", + "@types/node": "^20.13.0", + "vite": "^5.2.11" + }, + "dependencies": { + "@fontsource-variable/material-symbols-rounded": "^5.0.31", + "@fontsource-variable/material-symbols-sharp": "^5.0.31", + "@rollup/pluginutils": "^5.1.0", + "astro": "^4.9.2", + "fontkit": "^2.0.2", + "pathe": "^1.1.2" + } +} diff --git a/packages/material/symbols-old/src/index.ts b/packages/material/symbols-old/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/packages/material/symbols-old/tsconfig.json b/packages/material/symbols-old/tsconfig.json new file mode 100644 index 0000000..bcbf8b5 --- /dev/null +++ b/packages/material/symbols-old/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strict" +} diff --git a/packages/material/symbols/vite/font.ts b/packages/material/symbols-old/vite/font.ts similarity index 100% rename from packages/material/symbols/vite/font.ts rename to packages/material/symbols-old/vite/font.ts diff --git a/packages/material/symbols/vite/index.ts b/packages/material/symbols-old/vite/index.ts similarity index 100% rename from packages/material/symbols/vite/index.ts rename to packages/material/symbols-old/vite/index.ts diff --git a/packages/material/symbols/package.json b/packages/material/symbols/package.json index 9703b28..390038d 100644 --- a/packages/material/symbols/package.json +++ b/packages/material/symbols/package.json @@ -3,26 +3,53 @@ "name": "@material/symbols", "type": "module", "exports": { - "./vite": "./vite/index.ts", - "./astro": "./astro/index.ts", - "./types": "./env.d.ts" + "./astro": "./src/astro.ts", + "./esbuild": "./src/esbuild.ts", + "./rollup": "./src/rollup.ts", + "./vite": "./src/vite.ts", + "./rspack": "./src/rspack.ts", + "./webpack": "./src/webpack.ts", + "./types": "./src/types.ts", + "./types/solid": "./types/solid.d.ts" }, "packageManager": "yarn@4.2.2", - "peerDependencies": { - "vite": "^5.2.0" - }, - "devDependencies": { - "@deminearchiver/configs": "workspace:*", - "@types/fontkit": "^2", - "@types/node": "^20.12.12", - "vite": "^5.2.11" - }, "dependencies": { "@fontsource-variable/material-symbols-rounded": "^5.0.31", "@fontsource-variable/material-symbols-sharp": "^5.0.31", - "@rollup/pluginutils": "^5.1.0", - "astro": "^4.9.1", - "fontkit": "^2.0.2", - "pathe": "^1.1.2" + "astro": "^4.9.2", + "unplugin": "^1.10.1" + }, + "devDependencies": { + "@types/node": "^20.13.0", + "typescript": "^5.4.5" + }, + "peerDependencies": { + "@nuxt/kit": "^3", + "@nuxt/schema": "^3", + "esbuild": "*", + "rollup": "^3", + "solid-js": "*", + "vite": ">=3", + "webpack": "^4 || ^5" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + }, + "@nuxt/schema": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "rollup": { + "optional": true + }, + "vite": { + "optional": true + }, + "webpack": { + "optional": true + } } } diff --git a/packages/material/symbols/src/astro.ts b/packages/material/symbols/src/astro.ts new file mode 100644 index 0000000..4b5e891 --- /dev/null +++ b/packages/material/symbols/src/astro.ts @@ -0,0 +1,16 @@ +import type { AstroIntegration } from "astro"; +import unplugin from "."; +import type { Options } from "./types"; + +export default (options?: Options): AstroIntegration => ({ + name: "@material/symbols", + hooks: { + "astro:config:setup": ({ config }) => { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + config.vite.plugins ||= []; + config.vite.plugins.push( + unplugin.vite(options) + ); + }, + }, +}) diff --git a/packages/material/symbols/src/core/compilers.ts b/packages/material/symbols/src/core/compilers.ts new file mode 100644 index 0000000..8b3850c --- /dev/null +++ b/packages/material/symbols/src/core/compilers.ts @@ -0,0 +1,13 @@ +export type Compiler = { + extension?: string; + generator: (name: string) => string; +}; + +export const COMPILERS = { + solid: { + extension: "tsx", + generator(name) { + return `export default (props) => ${name};`; + }, + }, +} satisfies Record; diff --git a/packages/material/symbols/src/core/loader.ts b/packages/material/symbols/src/core/loader.ts new file mode 100644 index 0000000..da5c322 --- /dev/null +++ b/packages/material/symbols/src/core/loader.ts @@ -0,0 +1,24 @@ +const ID_REGEX = /^~@material\/symbols\//; +const SINGLE_EXTENSION_REGEX = /\.\w+$/i; +const MULTI_EXTENSIONS_REGEX = /(?:\.\w+)+$/i; + +export const resolveIconPath = (id: string): string => { + return id + .replace(ID_REGEX, "") + .replace(MULTI_EXTENSIONS_REGEX, ""); +} + +export type Icon = { + variant: "rounded" | "sharp"; + name: string; +} + +export const resolveIcon = (path: string): Icon => { + const [name, variant] = path.split(":", 2); + if(variant !== "rounded" && variant !== "sharp") { + throw new Error(`Invalid variant: ${variant}`); + } + return { + name, variant, + }; +} diff --git a/packages/material/symbols/src/esbuild.ts b/packages/material/symbols/src/esbuild.ts new file mode 100644 index 0000000..9bf8552 --- /dev/null +++ b/packages/material/symbols/src/esbuild.ts @@ -0,0 +1,4 @@ +import { createEsbuildPlugin } from "unplugin"; +import { unpluginFactory } from "."; + +export default createEsbuildPlugin(unpluginFactory); diff --git a/packages/material/symbols/src/index.ts b/packages/material/symbols/src/index.ts new file mode 100644 index 0000000..a8617e6 --- /dev/null +++ b/packages/material/symbols/src/index.ts @@ -0,0 +1,65 @@ +import { createUnplugin, type UnpluginFactory } from "unplugin"; +import type { Options } from "./types"; +import { resolveIcon, resolveIconPath, type Icon } from "./core/loader"; +import { createRequire } from "module"; +import { readFile } from "fs/promises"; + + + +const ID_REGEX = /^~@material\/+symbols\/+/; +const isIconPath = (id: string): boolean => { + return ID_REGEX.test(id); +} + +const removeExtension = (id: string): string => { + return id.replace(/(?:\.\w+)+$/i, ""); +} + + +export const unpluginFactory: UnpluginFactory = options => { + const ID = "~@material/symbols/"; + + const icons = new Set(); + + const require = createRequire(import.meta.url); + return [ + { + name: "@material/symbols/icons", + enforce: "pre", + resolveId(id, importer) { + if(!isIconPath(id)) return; + console.log("RESOLVEID: icon"); + id = removeExtension(id); + return `${id}.tsx`; + }, + loadInclude(id) { + return isIconPath(id); + }, + load(id) { + const path = resolveIconPath(id); + const icon = resolveIcon(path); + return `export default (props) => ${icon.name};`; + }, + }, + { + name: "@material/symbols/font", + enforce: "pre", + resolveId(id) { + if(id !== "~material/symbols/font.woff2") return; + console.log("RESOLVEID: font"); + return { id, external: true }; + }, + loadInclude(id) { + return id === "~material/symbols/font.woff2"; + }, + async load(id) { + const path = require.resolve("@fontsource-variable/material-symbols-rounded/files/material-symbols-rounded-latin-full-normal.woff2"); + const buffer = await readFile(path, "binary"); + return buffer; + }, + } + ]; +} + +const unplugin = createUnplugin(unpluginFactory); +export default unplugin; diff --git a/packages/material/symbols/src/rollup.ts b/packages/material/symbols/src/rollup.ts new file mode 100644 index 0000000..cb21aad --- /dev/null +++ b/packages/material/symbols/src/rollup.ts @@ -0,0 +1,4 @@ +import { createRollupPlugin } from "unplugin"; +import { unpluginFactory } from "."; + +export default createRollupPlugin(unpluginFactory); diff --git a/packages/material/symbols/src/rspack.ts b/packages/material/symbols/src/rspack.ts new file mode 100644 index 0000000..85ee203 --- /dev/null +++ b/packages/material/symbols/src/rspack.ts @@ -0,0 +1,4 @@ +import { createRspackPlugin } from "unplugin"; +import { unpluginFactory } from "."; + +export default createRspackPlugin(unpluginFactory); diff --git a/packages/material/symbols/src/types.ts b/packages/material/symbols/src/types.ts new file mode 100644 index 0000000..726f8ed --- /dev/null +++ b/packages/material/symbols/src/types.ts @@ -0,0 +1,3 @@ +export interface Options { + +} diff --git a/packages/material/symbols/src/vite.ts b/packages/material/symbols/src/vite.ts new file mode 100644 index 0000000..69ebc10 --- /dev/null +++ b/packages/material/symbols/src/vite.ts @@ -0,0 +1,4 @@ +import { createVitePlugin } from "unplugin"; +import { unpluginFactory } from "."; + +export default createVitePlugin(unpluginFactory); diff --git a/packages/material/symbols/src/webpack.ts b/packages/material/symbols/src/webpack.ts new file mode 100644 index 0000000..ca73fac --- /dev/null +++ b/packages/material/symbols/src/webpack.ts @@ -0,0 +1,4 @@ +import { createWebpackPlugin } from "unplugin"; +import { unpluginFactory } from "."; + +export default createWebpackPlugin(unpluginFactory); diff --git a/packages/material/symbols/types/solid.d.ts b/packages/material/symbols/types/solid.d.ts new file mode 100644 index 0000000..88d9eda --- /dev/null +++ b/packages/material/symbols/types/solid.d.ts @@ -0,0 +1,12 @@ +declare module "~@material/symbols/*:rounded" { + import type { Component, JSX } from "solid-js"; + + const component: Component>; + export default component; +} +declare module "~@material/symbols/*:sharp" { + import type { Component, JSX } from "solid-js"; + + const component: Component>; + export default component; +} diff --git a/yarn.lock b/yarn.lock index bca11f8..b4c7fdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -461,6 +461,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/parser@npm:7.24.6" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/cbef70923078a20fe163b03f4a6482be65ed99d409a57f3091a23ce3a575ee75716c30e7ea9f40b692ac5660f34055f4cbeb66a354fad15a6cf1fca35c3496c5 + languageName: node + linkType: hard + "@babel/plugin-syntax-jsx@npm:^7.18.6, @babel/plugin-syntax-jsx@npm:^7.23.3": version: 7.24.1 resolution: "@babel/plugin-syntax-jsx@npm:7.24.1" @@ -683,8 +692,8 @@ __metadata: "@solid-primitives/scroll": "npm:^2.0.23" "@solid-primitives/storage": "npm:^3.5.0" "@solid-primitives/utils": "npm:^6.2.3" - "@types/markdown-it": "npm:^14" - "@types/sanitize-html": "npm:^2" + "@types/markdown-it": "npm:^14.1.1" + "@types/sanitize-html": "npm:^2.11.0" "@unpic/astro": "npm:^0.0.46" "@vanilla-extract/css": "npm:^1.15.2" "@vanilla-extract/dynamic": "npm:^2.1.1" @@ -692,7 +701,7 @@ __metadata: "@vanilla-extract/recipes": "npm:^0.5.3" "@vanilla-extract/sprinkles": "npm:^1.6.2" "@vanilla-extract/vite-plugin": "npm:^4.0.10" - astro: "npm:^4.9.1" + astro: "npm:^4.9.2" astro-expressive-code: "npm:^0.35.3" astro-meta-tags: "npm:^0.3.0" clsx: "npm:^2.1.1" @@ -705,6 +714,7 @@ __metadata: solid-js: "npm:^1.8.17" typescript: "npm:^5.4.5" unplugin-icons: "npm:^0.19.0" + unplugin-turbo-console: "npm:^1.8.6" wrangler: "npm:^3.57.0" languageName: unknown linkType: soft @@ -1553,6 +1563,32 @@ __metadata: languageName: node linkType: hard +"@floating-ui/core@npm:^1.0.0": + version: 1.6.2 + resolution: "@floating-ui/core@npm:1.6.2" + dependencies: + "@floating-ui/utils": "npm:^0.2.0" + checksum: 10c0/db2621dc682e7f043d6f118d087ae6a6bfdacf40b26ede561760dd53548c16e2e7c59031e013e37283801fa307b55e6de65bf3b316b96a054e4a6a7cb937c59e + languageName: node + linkType: hard + +"@floating-ui/dom@npm:^1.6.5": + version: 1.6.5 + resolution: "@floating-ui/dom@npm:1.6.5" + dependencies: + "@floating-ui/core": "npm:^1.0.0" + "@floating-ui/utils": "npm:^0.2.0" + checksum: 10c0/ebdc14806f786e60df8e7cc2c30bf9cd4d75fe734f06d755588bbdef2f60d0a0f21dffb14abdc58dea96e5577e2e366feca6d66ba962018efd1bc91a3ece4526 + languageName: node + linkType: hard + +"@floating-ui/utils@npm:^0.2.0": + version: 0.2.2 + resolution: "@floating-ui/utils@npm:0.2.2" + checksum: 10c0/b2becdcafdf395af1641348da0031ff1eaad2bc60c22e14bd3abad4acfe2c8401e03097173d89a2f646a99b75819a78ef21ebb2572cab0042a56dd654b0065cd + languageName: node + linkType: hard + "@fontsource-variable/fira-code@npm:^5.0.18": version: 5.0.18 resolution: "@fontsource-variable/fira-code@npm:5.0.18" @@ -2046,7 +2082,7 @@ __metadata: version: 0.0.0-use.local resolution: "@material-symbols/unplugin-icons@workspace:packages/material-symbols" dependencies: - astro: "npm:^4.9.1" + astro: "npm:^4.9.2" typescript: "npm:^5.4.5" zod: "npm:^3.23.8" languageName: unknown @@ -2056,7 +2092,7 @@ __metadata: version: 0.0.0-use.local resolution: "@material/astro@workspace:packages/material/astro" dependencies: - astro: "npm:^4.9.1" + astro: "npm:^4.9.2" typescript: "npm:^5.4.5" languageName: unknown linkType: soft @@ -2072,8 +2108,8 @@ __metadata: version: 0.0.0-use.local resolution: "@material/material-color-utilities@workspace:packages/material/material-color-utilities/typescript" dependencies: - "@types/jasmine": "npm:^3.10.3" - "@types/node": "npm:^18.7.17" + "@types/jasmine": "npm:^5.1.4" + "@types/node": "npm:^20.13.0" jasmine: "npm:^4.0.2" typescript: "npm:^5.4.5" wireit: "npm:^0.9.5" @@ -2086,14 +2122,17 @@ __metadata: dependencies: "@deminearchiver/configs": "workspace:*" "@deminearchiver/utils": "workspace:*" + "@floating-ui/dom": "npm:^1.6.5" "@material/material-color-utilities": "https://gitpkg.now.sh/material-foundation/material-color-utilities/typescript?main" "@solid-primitives/event-listener": "npm:^2.3.3" "@solid-primitives/media": "npm:^2.2.9" + "@solid-primitives/presence": "npm:^0.0.6" "@solid-primitives/raf": "npm:^2.1.16" "@solid-primitives/refs": "npm:^1.0.8" "@solid-primitives/scroll": "npm:^2.0.23" "@solid-primitives/utils": "npm:^6.2.3" "@vanilla-extract/css": "npm:^1.15.2" + "@vanilla-extract/dynamic": "npm:^2.1.1" "@vanilla-extract/recipes": "npm:^0.5.3" "@vanilla-extract/sprinkles": "npm:^1.6.2" clsx: "npm:^2.1.1" @@ -2103,17 +2142,17 @@ __metadata: languageName: unknown linkType: soft -"@material/symbols@workspace:packages/material/symbols": +"@material/symbols-old@workspace:packages/material/symbols-old": version: 0.0.0-use.local - resolution: "@material/symbols@workspace:packages/material/symbols" + resolution: "@material/symbols-old@workspace:packages/material/symbols-old" dependencies: "@deminearchiver/configs": "workspace:*" "@fontsource-variable/material-symbols-rounded": "npm:^5.0.31" "@fontsource-variable/material-symbols-sharp": "npm:^5.0.31" "@rollup/pluginutils": "npm:^5.1.0" - "@types/fontkit": "npm:^2" - "@types/node": "npm:^20.12.12" - astro: "npm:^4.9.1" + "@types/fontkit": "npm:^2.0.7" + "@types/node": "npm:^20.13.0" + astro: "npm:^4.9.2" fontkit: "npm:^2.0.2" pathe: "npm:^1.1.2" vite: "npm:^5.2.11" @@ -2122,6 +2161,40 @@ __metadata: languageName: unknown linkType: soft +"@material/symbols@workspace:packages/material/symbols": + version: 0.0.0-use.local + resolution: "@material/symbols@workspace:packages/material/symbols" + dependencies: + "@fontsource-variable/material-symbols-rounded": "npm:^5.0.31" + "@fontsource-variable/material-symbols-sharp": "npm:^5.0.31" + "@types/node": "npm:^20.13.0" + astro: "npm:^4.9.2" + typescript: "npm:^5.4.5" + unplugin: "npm:^1.10.1" + peerDependencies: + "@nuxt/kit": ^3 + "@nuxt/schema": ^3 + esbuild: "*" + rollup: ^3 + solid-js: "*" + vite: ">=3" + webpack: ^4 || ^5 + peerDependenciesMeta: + "@nuxt/kit": + optional: true + "@nuxt/schema": + optional: true + esbuild: + optional: true + rollup: + optional: true + vite: + optional: true + webpack: + optional: true + languageName: unknown + linkType: soft + "@mdx-js/mdx@npm:^3.0.1": version: 3.0.1 resolution: "@mdx-js/mdx@npm:3.0.1" @@ -2206,8 +2279,8 @@ __metadata: version: 0.0.0-use.local resolution: "@pagefind/astro@workspace:packages/astro/pagefind" dependencies: - "@types/node": "npm:^20.12.12" - astro: "npm:^4.9.1" + "@types/node": "npm:^20.13.0" + astro: "npm:^4.9.2" astro-integration-kit: "npm:^0.13.2" nanoid: "npm:^5.0.7" pagefind: "npm:^1.1.0" @@ -2721,7 +2794,7 @@ __metadata: languageName: node linkType: hard -"@types/fontkit@npm:^2": +"@types/fontkit@npm:^2.0.7": version: 2.0.7 resolution: "@types/fontkit@npm:2.0.7" dependencies: @@ -2746,10 +2819,10 @@ __metadata: languageName: node linkType: hard -"@types/jasmine@npm:^3.10.3": - version: 3.10.18 - resolution: "@types/jasmine@npm:3.10.18" - checksum: 10c0/09914c65b09cb90536debd21c90000b27a26b730881d45e32c5c19cd429cdcf7407cf27dad2b11a5319bbba7e7e6d756b4a6f1f3c854b691bd1f0ac4f4ea1226 +"@types/jasmine@npm:^5.1.4": + version: 5.1.4 + resolution: "@types/jasmine@npm:5.1.4" + checksum: 10c0/4b8d27182e62f5003db1f1f174a810ace704e411cbfd0bc41edbaacf307246aec1f9bd20812846700198fc881268834ffde1d5301f819b1ba7caac9662534ceb languageName: node linkType: hard @@ -2767,7 +2840,7 @@ __metadata: languageName: node linkType: hard -"@types/markdown-it@npm:^14": +"@types/markdown-it@npm:^14.1.1": version: 14.1.1 resolution: "@types/markdown-it@npm:14.1.1" dependencies: @@ -2834,7 +2907,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^20.12.12": +"@types/node@npm:*": version: 20.12.12 resolution: "@types/node@npm:20.12.12" dependencies: @@ -2859,16 +2932,16 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^18.7.17": - version: 18.19.33 - resolution: "@types/node@npm:18.19.33" +"@types/node@npm:^20.13.0": + version: 20.13.0 + resolution: "@types/node@npm:20.13.0" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/0a17cf55c4e6ec90fdb47e73fde44a613ec0f6cd02619b156b1e8fd3f81f8b3346b06ca0757024ddff304d44c8ce5b99570eac8fa2d6baa0fc12e4b2146ac7c6 + checksum: 10c0/4fb1ab41d622bbf3434da138bd0f23052e5df3bc59852ea1228cdfe185fd9d66ea71171a68a3106452c883808be7eaa7bc4cd87f534708754d49849e817aa566 languageName: node linkType: hard -"@types/sanitize-html@npm:^2, @types/sanitize-html@npm:^2.11.0": +"@types/sanitize-html@npm:^2.11.0": version: 2.11.0 resolution: "@types/sanitize-html@npm:2.11.0" dependencies: @@ -3518,6 +3591,16 @@ __metadata: languageName: node linkType: hard +"ast-kit@npm:^0.12.1": + version: 0.12.2 + resolution: "ast-kit@npm:0.12.2" + dependencies: + "@babel/parser": "npm:^7.24.6" + pathe: "npm:^1.1.2" + checksum: 10c0/b15ff1a35f6cb7e903789c030835c5f19c59f808231c9bc86d6b73e2c0bfc7b10e8733a17a6e164b446412765eac128a469164f3d40adc1a8e8f6efcd1fb52ae + languageName: node + linkType: hard + "ast-types@npm:^0.16.1": version: 0.16.1 resolution: "ast-types@npm:0.16.1" @@ -3670,9 +3753,9 @@ __metadata: languageName: node linkType: hard -"astro@npm:^4.9.1": - version: 4.9.1 - resolution: "astro@npm:4.9.1" +"astro@npm:^4.9.2": + version: 4.9.2 + resolution: "astro@npm:4.9.2" dependencies: "@astrojs/compiler": "npm:^2.8.0" "@astrojs/internal-helpers": "npm:0.4.0" @@ -3743,7 +3826,7 @@ __metadata: optional: true bin: astro: astro.js - checksum: 10c0/0a8c9cd0fb5eeb9abe0bce34b70a605b183ab2a94545ff93ee807d4b9984a4a2e663dcd4258351d1c2e2f4e3ebfdfdeae54ca1ea75a7efaea6e5117655c9d815 + checksum: 10c0/7d4d5ea0833478f46d1599b964017c2c1ce26a9b74d2ea6d638f9ab6331d61cc01dde1f4a5ed7ead173f637f82cc765eb775622538bb4a5e5654994125f7c68f languageName: node linkType: hard @@ -4280,6 +4363,13 @@ __metadata: languageName: node linkType: hard +"consola@npm:^3.2.3": + version: 3.2.3 + resolution: "consola@npm:3.2.3" + checksum: 10c0/c606220524ec88a05bb1baf557e9e0e04a0c08a9c35d7a08652d99de195c4ddcb6572040a7df57a18ff38bbc13ce9880ad032d56630cef27bef72768ef0ac078 + languageName: node + linkType: hard + "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" @@ -4287,6 +4377,13 @@ __metadata: languageName: node linkType: hard +"cookie-es@npm:^1.0.0": + version: 1.1.0 + resolution: "cookie-es@npm:1.1.0" + checksum: 10c0/27f1057b05eb42dca539a80cf45b8f9d5bacf35482690d756025447810dcd669e0cd13952a063a43e47a4e6fd7400745defedc97479a4254019f0bdb5c200341 + languageName: node + linkType: hard + "cookie@npm:^0.5.0": version: 0.5.0 resolution: "cookie@npm:0.5.0" @@ -4321,6 +4418,18 @@ __metadata: languageName: node linkType: hard +"crossws@npm:^0.2.2": + version: 0.2.4 + resolution: "crossws@npm:0.2.4" + peerDependencies: + uWebSockets.js: "*" + peerDependenciesMeta: + uWebSockets.js: + optional: true + checksum: 10c0/b950c64d36f3f11fdb8e0faf3107598660d89d77eb860e68b535fe6acba9f0f2f0507cc7250bd219a3ef2fe08718db91b591e6912b7324fcfc8fd1b8d9f78c96 + languageName: node + linkType: hard + "css-select@npm:^5.1.0": version: 5.1.0 resolution: "css-select@npm:5.1.0" @@ -4468,6 +4577,13 @@ __metadata: languageName: node linkType: hard +"defu@npm:^6.1.3, defu@npm:^6.1.4": + version: 6.1.4 + resolution: "defu@npm:6.1.4" + checksum: 10c0/2d6cc366262dc0cb8096e429368e44052fdf43ed48e53ad84cc7c9407f890301aa5fcb80d0995abaaf842b3949f154d060be4160f7a46cb2bc2f7726c81526f5 + languageName: node + linkType: hard + "deminearchiver-website@workspace:.": version: 0.0.0-use.local resolution: "deminearchiver-website@workspace:." @@ -4491,7 +4607,7 @@ __metadata: languageName: node linkType: hard -"destr@npm:^2.0.1": +"destr@npm:^2.0.1, destr@npm:^2.0.3": version: 2.0.3 resolution: "destr@npm:2.0.3" checksum: 10c0/10e7eff5149e2839a4dd29a1e9617c3c675a3b53608d78d74fc6f4abc31daa977e6de08e0eea78965527a0d5a35467ae2f9624e0a4646d54aa1162caa094473e @@ -5631,6 +5747,13 @@ __metadata: languageName: node linkType: hard +"get-port-please@npm:^3.1.2": + version: 3.1.2 + resolution: "get-port-please@npm:3.1.2" + checksum: 10c0/61237342fe035967e5ad1b67a2dee347a64de093bf1222b7cd50072568d73c48dad5cc5cd4fa44635b7cfdcd14d6c47554edb9891c2ec70ab33ecb831683e257 + languageName: node + linkType: hard + "get-source@npm:^2.0.12": version: 2.0.12 resolution: "get-source@npm:2.0.12" @@ -5791,6 +5914,24 @@ __metadata: languageName: node linkType: hard +"h3@npm:^1.11.1": + version: 1.11.1 + resolution: "h3@npm:1.11.1" + dependencies: + cookie-es: "npm:^1.0.0" + crossws: "npm:^0.2.2" + defu: "npm:^6.1.4" + destr: "npm:^2.0.3" + iron-webcrypto: "npm:^1.0.0" + ohash: "npm:^1.1.3" + radix3: "npm:^1.1.0" + ufo: "npm:^1.4.0" + uncrypto: "npm:^0.1.3" + unenv: "npm:^1.9.0" + checksum: 10c0/bd02bfae536a0facb9ddcd85bd51ad16264ea6fd331a548540a0846e426348449fcbcb10b0fa08673cd1d9c60e6ff5d8f56e7ec2e1ee43fda460d8c16866cbfa + languageName: node + linkType: hard + "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -6240,6 +6381,13 @@ __metadata: languageName: node linkType: hard +"iron-webcrypto@npm:^1.0.0": + version: 1.2.1 + resolution: "iron-webcrypto@npm:1.2.1" + checksum: 10c0/5cf27c6e2bd3ef3b4970e486235fd82491ab8229e2ed0ac23307c28d6c80d721772a86ed4e9fe2a5cabadd710c2f024b706843b40561fb83f15afee58f809f66 + languageName: node + linkType: hard + "is-alphabetical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphabetical@npm:2.0.1" @@ -6658,6 +6806,16 @@ __metadata: languageName: node linkType: hard +"launch-editor@npm:^2.6.1": + version: 2.6.1 + resolution: "launch-editor@npm:2.6.1" + dependencies: + picocolors: "npm:^1.0.0" + shell-quote: "npm:^1.8.1" + checksum: 10c0/82d0bd9a44e7a972157719e63dac1b8196db6ec7066c1ec57a495f6c3d6e734f3c4da89549e7b33eb3b0356668ad02a9e7782b6733f5ebd7a61b7c5f635a3ee9 + languageName: node + linkType: hard + "legacy-swc-helpers@npm:@swc/helpers@=0.4.14": version: 0.4.14 resolution: "@swc/helpers@npm:0.4.14" @@ -6999,7 +7157,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.10, magic-string@npm:^0.30.8": +"magic-string@npm:^0.30.10, magic-string@npm:^0.30.8, magic-string@npm:^0.30.9": version: 0.30.10 resolution: "magic-string@npm:0.30.10" dependencies: @@ -8057,7 +8215,7 @@ __metadata: languageName: node linkType: hard -"node-fetch-native@npm:^1.4.0": +"node-fetch-native@npm:^1.4.0, node-fetch-native@npm:^1.6.1": version: 1.6.4 resolution: "node-fetch-native@npm:1.6.4" checksum: 10c0/78334dc6def5d1d95cfe87b33ac76c4833592c5eb84779ad2b0c23c689f9dd5d1cfc827035ada72d6b8b218f717798968c5a99aeff0a1a8bf06657e80592f9c3 @@ -8182,6 +8340,13 @@ __metadata: languageName: node linkType: hard +"ohash@npm:^1.1.3": + version: 1.1.3 + resolution: "ohash@npm:1.1.3" + checksum: 10c0/928f5bdbd8cd73f90cf544c0533dbda8e0a42d9b8c7454ab89e64e4d11bc85f85242830b4e107426ce13dc4dd3013286f8f5e0c84abd8942a014b907d9692540 + languageName: node + linkType: hard + "once@npm:^1.3.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -8707,6 +8872,13 @@ __metadata: languageName: node linkType: hard +"radix3@npm:^1.1.0": + version: 1.1.2 + resolution: "radix3@npm:1.1.2" + checksum: 10c0/d4a295547f71af079868d2c2ed3814a9296ee026c5488212d58c106e6b4797c6eaec1259b46c9728913622f2240c9a944bfc8e2b3b5f6e4a5045338b1609f1e4 + languageName: node + linkType: hard + "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -9410,6 +9582,13 @@ __metadata: languageName: node linkType: hard +"shell-quote@npm:^1.8.1": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 10c0/8cec6fd827bad74d0a49347057d40dfea1e01f12a6123bf82c4649f3ef152fc2bc6d6176e6376bffcd205d9d0ccb4f1f9acae889384d20baff92186f01ea455a + languageName: node + linkType: hard + "shiki@npm:^1.1.2, shiki@npm:^1.1.7, shiki@npm:^1.5.0, shiki@npm:^1.5.1": version: 1.5.2 resolution: "shiki@npm:1.5.2" @@ -10046,6 +10225,13 @@ __metadata: languageName: node linkType: hard +"uncrypto@npm:^0.1.3": + version: 0.1.3 + resolution: "uncrypto@npm:0.1.3" + checksum: 10c0/74a29afefd76d5b77bedc983559ceb33f5bbc8dada84ff33755d1e3355da55a4e03a10e7ce717918c436b4dfafde1782e799ebaf2aadd775612b49f7b5b2998e + languageName: node + linkType: hard + "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -10062,6 +10248,19 @@ __metadata: languageName: node linkType: hard +"unenv@npm:^1.9.0": + version: 1.9.0 + resolution: "unenv@npm:1.9.0" + dependencies: + consola: "npm:^3.2.3" + defu: "npm:^6.1.3" + mime: "npm:^3.0.0" + node-fetch-native: "npm:^1.6.1" + pathe: "npm:^1.1.1" + checksum: 10c0/d00012badc83731c07f08d5129c702c49c0212375eb3732b27aae89ace3c67162dbaea4496965676f18fc06b0ec445d91385e283f5fd3e4540dda8b0b5424f81 + languageName: node + linkType: hard + "unherit@npm:^3.0.0": version: 3.0.1 resolution: "unherit@npm:3.0.1" @@ -10330,6 +10529,48 @@ __metadata: languageName: node linkType: hard +"unplugin-turbo-console@npm:^1.8.6": + version: 1.8.6 + resolution: "unplugin-turbo-console@npm:1.8.6" + dependencies: + "@rollup/pluginutils": "npm:^5.1.0" + ast-kit: "npm:^0.12.1" + get-port-please: "npm:^3.1.2" + h3: "npm:^1.11.1" + launch-editor: "npm:^2.6.1" + magic-string: "npm:^0.30.9" + pathe: "npm:^1.1.2" + unplugin: "npm:^1.10.1" + peerDependencies: + "@nuxt/kit": ">=3" + "@nuxt/schema": ">=3" + astro: ">=3" + esbuild: "*" + rollup: ">=3" + vite: ">=3" + vue: ">=2.7 || >=3.2.13" + webpack: ^4 || ^5 + peerDependenciesMeta: + "@nuxt/kit": + optional: true + "@nuxt/schema": + optional: true + astro: + optional: true + esbuild: + optional: true + rollup: + optional: true + vite: + optional: true + vue: + optional: true + webpack: + optional: true + checksum: 10c0/147120ae7142d6142048d1648412654d22164dc7d37f5dc210bff639d7bd9a4cc89151b7f7dbd02c4be45e82c659f02775b258f9d5428dcad136bbf91bbcd5db + languageName: node + linkType: hard + "unplugin@npm:^1.10.1, unplugin@npm:^1.8.3": version: 1.10.1 resolution: "unplugin@npm:1.10.1"