@kurone-kito/web-toybox-solid 0.1.0-alpha.2 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -6
- package/dist/index.d.mts +1 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/docs/README.md +27 -6
- package/docs/globals.md +1 -0
- package/docs/variables/MetaProvider.md +9 -0
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
# ⚙️ Web ToyBox
|
|
1
|
+
# ⚙️ Web ToyBox (Solid)
|
|
2
2
|
|
|
3
|
-
Common
|
|
3
|
+
Common components for Solid.js web applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @kurone-kito/web-toybox-solid @solidjs/meta solid-js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic usage
|
|
12
|
+
|
|
13
|
+
Use the bundled `MetaProvider` to ensure the same `@solidjs/meta` instance
|
|
14
|
+
is shared with the head components.
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { MetaProvider, Head } from '@kurone-kito/web-toybox-solid';
|
|
18
|
+
|
|
19
|
+
export const App = () => (
|
|
20
|
+
<MetaProvider>
|
|
21
|
+
<Head
|
|
22
|
+
siteName="Example Site"
|
|
23
|
+
title="Sample Page"
|
|
24
|
+
description="This is a sample description."
|
|
25
|
+
images={["https://example.com/image.png"]}
|
|
26
|
+
author="John Doe"
|
|
27
|
+
/>
|
|
28
|
+
{/* ...the rest of your app... */}
|
|
29
|
+
</MetaProvider>
|
|
30
|
+
);
|
|
10
31
|
```
|
|
11
32
|
|
|
12
33
|
## LICENSE
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
2
1
|
import { Link, Meta, Title as Title$1 } from "@solidjs/meta";
|
|
2
|
+
import { MetaProvider } from "@solidjs/meta";
|
|
3
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
3
4
|
import { Show, Switch, Match, Index, splitProps } from "solid-js";
|
|
4
5
|
const LinkList = (props) => [createComponent(Show, {
|
|
5
6
|
get when() {
|
|
@@ -432,6 +433,7 @@ export {
|
|
|
432
433
|
Head,
|
|
433
434
|
LinkList,
|
|
434
435
|
MetaList,
|
|
436
|
+
MetaProvider,
|
|
435
437
|
Ogp,
|
|
436
438
|
Title,
|
|
437
439
|
XCard
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/components/atoms/meta/LinkList.tsx","../src/components/atoms/meta/MetaList.tsx","../src/components/atoms/meta/Ogp.tsx","../src/components/atoms/meta/Title.tsx","../src/components/atoms/meta/XCard.tsx","../src/components/molecules/Head.tsx"],"sourcesContent":["import { Link } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Index, Match, Show, Switch } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface LinkListProps {\n /** The author URL. */\n readonly authorUrl?: string | undefined;\n\n /** The mime type of the favicon. */\n readonly faviconType?: string | undefined;\n\n /** The favicon URL. */\n readonly faviconUrl?: string | undefined;\n\n /** The license URL. */\n readonly licenseUrl?: string | undefined;\n\n /** The images to preload. */\n readonly preloadImages?: readonly string[] | undefined;\n\n /** The next page URL. */\n readonly next?: string | undefined;\n\n /** The previous page URL. */\n readonly prev?: string | undefined;\n}\n\n/**\n * The link list component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <LinkList\n * authorUrl=\"https://example.com/author\"\n * faviconType=\"image/png\"\n * faviconUrl=\"https://example.com/favicon.png\"\n * licenseUrl=\"https://example.com/license\"\n * next=\"https://example.com/next\"\n * preloadImages={['https://example.com/image1.png', 'https://example.com/image2.png']}\n * prev=\"https://example.com/prev\"\n * />\n * ```\n */\nexport const LinkList: Component<LinkListProps> = (props) => (\n <>\n <Show when={props.authorUrl}>\n {(href) => <Link href={href()} rel=\"author\" />}\n </Show>\n <Switch>\n <Match when={props.faviconType && props.faviconUrl}>\n <Link href={props.faviconUrl} rel=\"icon\" type={props.faviconType} />\n </Match>\n <Match when={!props.faviconType && props.faviconUrl}>\n <Link href={props.faviconUrl} rel=\"icon\" />\n </Match>\n </Switch>\n <Show when={props.licenseUrl}>\n {(href) => <Link href={href()} hreflang=\"en\" rel=\"license\" />}\n </Show>\n <Show when={props.next}>{(href) => <Link href={href()} rel=\"next\" />}</Show>\n <Index each={props.preloadImages}>\n {(image) => <Link as=\"image\" href={image()} rel=\"preload\" />}\n </Index>\n <Show when={props.prev}>{(href) => <Link href={href()} rel=\"prev\" />}</Show>\n </>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Match, Show, Switch } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface MetaListProps {\n /** The author of the meta tag. */\n readonly author?: string | undefined;\n\n /** The color of the meta tag on the dark mode. */\n readonly colorDark?: string | undefined;\n\n /** The color of the meta tag on the light mode. */\n readonly colorLight?: string | undefined;\n\n /** The description of the meta tag. */\n readonly description?: string | undefined;\n\n /** The keywords of the meta tag. */\n readonly keywords?: string | undefined;\n}\n\n/**\n * The meta list component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <MetaList\n * author=\"John Doe\"\n * colorDark=\"#000000\"\n * colorLight=\"#FFFFFF\"\n * description=\"This is a sample description.\"\n * keywords=\"sample, meta, tags\"\n * />\n * ```\n */\nexport const MetaList: Component<MetaListProps> = (props) => (\n <>\n <Show when={props.author}>\n <Meta name=\"author\" content={props.author} />\n </Show>\n <Switch>\n <Match when={props.colorDark && props.colorLight}>\n <Meta name=\"color-scheme\" content=\"light dark\" />\n </Match>\n <Match when={props.colorDark && !props.colorLight}>\n <Meta name=\"color-scheme\" content=\"dark\" />\n </Match>\n <Match when={!props.colorDark && props.colorLight}>\n <Meta name=\"color-scheme\" content=\"light\" />\n </Match>\n </Switch>\n <Show when={props.description}>\n <Meta name=\"description\" content={props.description} />\n </Show>\n <Meta name=\"generator\" content=\"SolidStart\" />\n <Show when={props.keywords}>\n <Meta name=\"keywords\" content={props.keywords} />\n </Show>\n <Meta name=\"referer\" content=\"strict-origin-when-cross-origin\" />\n <Show when={props.colorLight}>\n <Meta\n name=\"theme-color\"\n media=\"(prefers-color-scheme: light)\"\n content={props.colorLight}\n />\n </Show>\n <Show when={props.colorDark}>\n <Meta\n name=\"theme-color\"\n media=\"(prefers-color-scheme: dark)\"\n content={props.colorDark}\n />\n </Show>\n <Meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, viewport-fit=cover\"\n />\n </>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Index, Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface OgpProps {\n /** The description of the page. */\n readonly description?: string | undefined;\n\n /** The alt text of the images. */\n readonly imageAlt?: string | undefined;\n\n /** The height of the images. */\n readonly imageHeight?: number | string | undefined;\n\n /** The mime type of the images. */\n readonly imageType?: string | undefined;\n\n /** The width of the images. */\n readonly imageWidth?: number | string | undefined;\n\n /** The image URLs of the page. */\n readonly images?: readonly string[] | undefined;\n\n /** The language of the page. */\n readonly language?: string | undefined;\n\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n\n /** The URL of the page. */\n readonly url?: string | undefined;\n}\n\n/**\n * The OGP component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Ogp\n * description=\"This is a sample page.\"\n * images={['https://example.com/image1.png', 'https://example.com/image2.png']}\n * imageAlt=\"Sample Image\"\n * imageHeight={630}\n * imageType=\"image/png\"\n * imageWidth={1200}\n * language=\"en_US\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * url=\"https://example.com/sample-page\"\n * />\n * ```\n */\nexport const Ogp: Component<OgpProps> = (props) => (\n <>\n <Show when={props.description}>\n <Meta property=\"og:description\" content={props.description} />\n </Show>\n <Index each={props.images}>\n {(image) => <Meta property=\"og:image\" content={image()} />}\n </Index>\n <Show when={props.imageAlt}>\n <Meta property=\"og:image:alt\" content={props.imageAlt} />\n </Show>\n <Show when={props.imageHeight}>\n <Meta property=\"og:image:height\" content={`${props.imageHeight}`} />\n </Show>\n <Show when={props.imageType}>\n <Meta property=\"og:image:type\" content={props.imageType} />\n </Show>\n <Show when={props.imageWidth}>\n <Meta property=\"og:image:width\" content={`${props.imageWidth}`} />\n </Show>\n <Show when={props.language}>\n <Meta property=\"og:locale\" content={props.language} />\n </Show>\n <Show when={props.siteName}>\n <Meta property=\"og:site_name\" content={props.siteName} />\n </Show>\n <Show\n fallback={<Meta property=\"og:title\" content={props.siteName} />}\n when={props.title}\n >\n <Meta\n property=\"og:title\"\n content={`${props.title} | ${props.siteName}`}\n />\n </Show>\n <Meta property=\"og:type\" content=\"website\" />\n <Show when={props.url}>\n <Meta property=\"og:url\" content={props.url} />\n </Show>\n </>\n);\n","import { Title as SolidTitle } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface TitleProps {\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n}\n\n/**\n * The title component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Title siteName=\"Example Site\" title=\"Sample Page\" />\n * ```\n */\nexport const Title: Component<TitleProps> = (props) => (\n <SolidTitle>\n <Show fallback={props.siteName} when={props.title}>\n {props.title} :: {props.siteName}\n </Show>\n </SolidTitle>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface XCardProps {\n /** The author of the meta tag. */\n readonly author?: string | undefined;\n\n /** The card description. */\n readonly description?: string | undefined;\n\n /** The card image URL. */\n readonly image?: string | undefined;\n\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n}\n\n/**\n * The 𝕏 card component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <XCard\n * author=\"Jane Doe\"\n * description=\"This is a sample description.\"\n * image=\"https://example.com/image.png\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * />\n * ```\n */\nexport const XCard: Component<XCardProps> = (props) => (\n <>\n <Meta name=\"twitter:card\" content=\"summary_large_image\" />\n <Show when={props.author}>\n <Meta name=\"twitter:creator\" content={props.author} />\n </Show>\n <Show when={props.description}>\n <Meta name=\"twitter:description\" content={props.description} />\n </Show>\n <Show when={props.image}>\n <Meta name=\"twitter:image\" content={props.image} />\n </Show>\n <Show when={props.author}>\n <Meta name=\"twitter:author\" content={props.author} />\n </Show>\n <Show\n fallback={<Meta name=\"twitter:title\" content={props.siteName} />}\n when={props.title}\n >\n <Meta\n name=\"twitter:title\"\n content={`${props.title} | ${props.siteName}`}\n />\n </Show>\n </>\n);\n","import type { Component } from 'solid-js';\nimport { Show, splitProps } from 'solid-js';\nimport type { Except } from 'type-fest';\nimport type { LinkListProps } from '../atoms/meta/LinkList.js';\nimport { LinkList } from '../atoms/meta/LinkList.js';\nimport type { MetaListProps } from '../atoms/meta/MetaList.js';\nimport { MetaList } from '../atoms/meta/MetaList.js';\nimport type { OgpProps } from '../atoms/meta/Ogp.js';\nimport { Ogp } from '../atoms/meta/Ogp.js';\nimport type { TitleProps } from '../atoms/meta/Title.js';\nimport { Title } from '../atoms/meta/Title.js';\nimport type { XCardProps } from '../atoms/meta/XCard.js';\nimport { XCard } from '../atoms/meta/XCard.js';\n\n/** Type definition for the properties. */\nexport interface HeadProps\n extends LinkListProps,\n MetaListProps,\n OgpProps,\n TitleProps,\n Except<XCardProps, 'image'> {}\n\n/**\n * The head metadata component.\n * @param props The properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Head\n * author=\"John Doe\"\n * colorDark=\"#000000\"\n * colorLight=\"#FFFFFF\"\n * description=\"This is a sample description.\"\n * images={['https://example.com/image.png']}\n * links={[\n * { rel: 'icon', href: '/favicon.ico' },\n * { rel: 'stylesheet', href: 'https://example.com/styles.css' },\n * ]}\n * keywords=\"sample, meta, tags\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * type=\"website\"\n * url=\"https://example.com/page\"\n * />\n * ```\n */\nexport const Head: Component<HeadProps> = (props) => {\n const [local, rest] = splitProps(props, ['images']);\n return (\n <>\n <Title {...rest} />\n <MetaList {...rest} />\n <Ogp images={local.images} {...rest} />\n <Show fallback={<XCard {...rest} />} when={local.images?.[0]}>\n {(images) => <XCard image={images()} {...rest} />}\n </Show>\n <LinkList {...rest} />\n </>\n );\n};\n"],"names":["LinkList","props","_$createComponent","Show","when","authorUrl","children","href","Link","rel","Switch","Match","_$memo","faviconType","faviconUrl","type","licenseUrl","hreflang","next","Index","each","preloadImages","image","as","prev","MetaList","author","Meta","name","content","colorDark","colorLight","description","keywords","media","Ogp","property","images","imageAlt","imageHeight","imageType","imageWidth","language","siteName","fallback","title","url","Title","SolidTitle","XCard","Head","local","rest","splitProps","_$mergeProps"],"mappings":";;;AA6CO,MAAMA,WAAsCC,CAAAA,UAAK,CAAAC,gBAEnDC,MAAI;AAAA,EAAA,IAACC,OAAI;AAAA,WAAEH,MAAMI;AAAAA,EAAS;AAAA,EAAAC,UACvBC,CAAAA,SAAIL,gBAAMM,MAAI;AAAA,I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AAKK,WAAA;AAAA,MAAA,IAAChC,QAAK;AAAA,eAAEe,OAAAA;AAAAA,MAAQ;AAAA,IAAA,GAAMe,IAAI,CAAA;AAAA,EAAA,CAAI,GAAAlD,gBAElDF,UAAaoD,IAAI,CAAA;AAGxB;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/components/atoms/meta/LinkList.tsx","../src/components/atoms/meta/MetaList.tsx","../src/components/atoms/meta/Ogp.tsx","../src/components/atoms/meta/Title.tsx","../src/components/atoms/meta/XCard.tsx","../src/components/molecules/Head.tsx"],"sourcesContent":["import { Link } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Index, Match, Show, Switch } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface LinkListProps {\n /** The author URL. */\n readonly authorUrl?: string | undefined;\n\n /** The mime type of the favicon. */\n readonly faviconType?: string | undefined;\n\n /** The favicon URL. */\n readonly faviconUrl?: string | undefined;\n\n /** The license URL. */\n readonly licenseUrl?: string | undefined;\n\n /** The images to preload. */\n readonly preloadImages?: readonly string[] | undefined;\n\n /** The next page URL. */\n readonly next?: string | undefined;\n\n /** The previous page URL. */\n readonly prev?: string | undefined;\n}\n\n/**\n * The link list component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <LinkList\n * authorUrl=\"https://example.com/author\"\n * faviconType=\"image/png\"\n * faviconUrl=\"https://example.com/favicon.png\"\n * licenseUrl=\"https://example.com/license\"\n * next=\"https://example.com/next\"\n * preloadImages={['https://example.com/image1.png', 'https://example.com/image2.png']}\n * prev=\"https://example.com/prev\"\n * />\n * ```\n */\nexport const LinkList: Component<LinkListProps> = (props) => (\n <>\n <Show when={props.authorUrl}>\n {(href) => <Link href={href()} rel=\"author\" />}\n </Show>\n <Switch>\n <Match when={props.faviconType && props.faviconUrl}>\n <Link href={props.faviconUrl} rel=\"icon\" type={props.faviconType} />\n </Match>\n <Match when={!props.faviconType && props.faviconUrl}>\n <Link href={props.faviconUrl} rel=\"icon\" />\n </Match>\n </Switch>\n <Show when={props.licenseUrl}>\n {(href) => <Link href={href()} hreflang=\"en\" rel=\"license\" />}\n </Show>\n <Show when={props.next}>{(href) => <Link href={href()} rel=\"next\" />}</Show>\n <Index each={props.preloadImages}>\n {(image) => <Link as=\"image\" href={image()} rel=\"preload\" />}\n </Index>\n <Show when={props.prev}>{(href) => <Link href={href()} rel=\"prev\" />}</Show>\n </>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Match, Show, Switch } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface MetaListProps {\n /** The author of the meta tag. */\n readonly author?: string | undefined;\n\n /** The color of the meta tag on the dark mode. */\n readonly colorDark?: string | undefined;\n\n /** The color of the meta tag on the light mode. */\n readonly colorLight?: string | undefined;\n\n /** The description of the meta tag. */\n readonly description?: string | undefined;\n\n /** The keywords of the meta tag. */\n readonly keywords?: string | undefined;\n}\n\n/**\n * The meta list component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <MetaList\n * author=\"John Doe\"\n * colorDark=\"#000000\"\n * colorLight=\"#FFFFFF\"\n * description=\"This is a sample description.\"\n * keywords=\"sample, meta, tags\"\n * />\n * ```\n */\nexport const MetaList: Component<MetaListProps> = (props) => (\n <>\n <Show when={props.author}>\n <Meta name=\"author\" content={props.author} />\n </Show>\n <Switch>\n <Match when={props.colorDark && props.colorLight}>\n <Meta name=\"color-scheme\" content=\"light dark\" />\n </Match>\n <Match when={props.colorDark && !props.colorLight}>\n <Meta name=\"color-scheme\" content=\"dark\" />\n </Match>\n <Match when={!props.colorDark && props.colorLight}>\n <Meta name=\"color-scheme\" content=\"light\" />\n </Match>\n </Switch>\n <Show when={props.description}>\n <Meta name=\"description\" content={props.description} />\n </Show>\n <Meta name=\"generator\" content=\"SolidStart\" />\n <Show when={props.keywords}>\n <Meta name=\"keywords\" content={props.keywords} />\n </Show>\n <Meta name=\"referer\" content=\"strict-origin-when-cross-origin\" />\n <Show when={props.colorLight}>\n <Meta\n name=\"theme-color\"\n media=\"(prefers-color-scheme: light)\"\n content={props.colorLight}\n />\n </Show>\n <Show when={props.colorDark}>\n <Meta\n name=\"theme-color\"\n media=\"(prefers-color-scheme: dark)\"\n content={props.colorDark}\n />\n </Show>\n <Meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, viewport-fit=cover\"\n />\n </>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Index, Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface OgpProps {\n /** The description of the page. */\n readonly description?: string | undefined;\n\n /** The alt text of the images. */\n readonly imageAlt?: string | undefined;\n\n /** The height of the images. */\n readonly imageHeight?: number | string | undefined;\n\n /** The mime type of the images. */\n readonly imageType?: string | undefined;\n\n /** The width of the images. */\n readonly imageWidth?: number | string | undefined;\n\n /** The image URLs of the page. */\n readonly images?: readonly string[] | undefined;\n\n /** The language of the page. */\n readonly language?: string | undefined;\n\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n\n /** The URL of the page. */\n readonly url?: string | undefined;\n}\n\n/**\n * The OGP component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Ogp\n * description=\"This is a sample page.\"\n * images={['https://example.com/image1.png', 'https://example.com/image2.png']}\n * imageAlt=\"Sample Image\"\n * imageHeight={630}\n * imageType=\"image/png\"\n * imageWidth={1200}\n * language=\"en_US\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * url=\"https://example.com/sample-page\"\n * />\n * ```\n */\nexport const Ogp: Component<OgpProps> = (props) => (\n <>\n <Show when={props.description}>\n <Meta property=\"og:description\" content={props.description} />\n </Show>\n <Index each={props.images}>\n {(image) => <Meta property=\"og:image\" content={image()} />}\n </Index>\n <Show when={props.imageAlt}>\n <Meta property=\"og:image:alt\" content={props.imageAlt} />\n </Show>\n <Show when={props.imageHeight}>\n <Meta property=\"og:image:height\" content={`${props.imageHeight}`} />\n </Show>\n <Show when={props.imageType}>\n <Meta property=\"og:image:type\" content={props.imageType} />\n </Show>\n <Show when={props.imageWidth}>\n <Meta property=\"og:image:width\" content={`${props.imageWidth}`} />\n </Show>\n <Show when={props.language}>\n <Meta property=\"og:locale\" content={props.language} />\n </Show>\n <Show when={props.siteName}>\n <Meta property=\"og:site_name\" content={props.siteName} />\n </Show>\n <Show\n fallback={<Meta property=\"og:title\" content={props.siteName} />}\n when={props.title}\n >\n <Meta\n property=\"og:title\"\n content={`${props.title} | ${props.siteName}`}\n />\n </Show>\n <Meta property=\"og:type\" content=\"website\" />\n <Show when={props.url}>\n <Meta property=\"og:url\" content={props.url} />\n </Show>\n </>\n);\n","import { Title as SolidTitle } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface TitleProps {\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n}\n\n/**\n * The title component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Title siteName=\"Example Site\" title=\"Sample Page\" />\n * ```\n */\nexport const Title: Component<TitleProps> = (props) => (\n <SolidTitle>\n <Show fallback={props.siteName} when={props.title}>\n {props.title} :: {props.siteName}\n </Show>\n </SolidTitle>\n);\n","import { Meta } from '@solidjs/meta';\nimport type { Component } from 'solid-js';\nimport { Show } from 'solid-js';\n\n/** Type definition for the properties. */\nexport interface XCardProps {\n /** The author of the meta tag. */\n readonly author?: string | undefined;\n\n /** The card description. */\n readonly description?: string | undefined;\n\n /** The card image URL. */\n readonly image?: string | undefined;\n\n /** The site name. */\n readonly siteName: string;\n\n /** The title of the page. */\n readonly title?: string | undefined;\n}\n\n/**\n * The 𝕏 card component.\n * @param props The component properties.\n * @returns The component.\n * @example\n * ```tsx\n * <XCard\n * author=\"Jane Doe\"\n * description=\"This is a sample description.\"\n * image=\"https://example.com/image.png\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * />\n * ```\n */\nexport const XCard: Component<XCardProps> = (props) => (\n <>\n <Meta name=\"twitter:card\" content=\"summary_large_image\" />\n <Show when={props.author}>\n <Meta name=\"twitter:creator\" content={props.author} />\n </Show>\n <Show when={props.description}>\n <Meta name=\"twitter:description\" content={props.description} />\n </Show>\n <Show when={props.image}>\n <Meta name=\"twitter:image\" content={props.image} />\n </Show>\n <Show when={props.author}>\n <Meta name=\"twitter:author\" content={props.author} />\n </Show>\n <Show\n fallback={<Meta name=\"twitter:title\" content={props.siteName} />}\n when={props.title}\n >\n <Meta\n name=\"twitter:title\"\n content={`${props.title} | ${props.siteName}`}\n />\n </Show>\n </>\n);\n","import type { Component } from 'solid-js';\nimport { Show, splitProps } from 'solid-js';\nimport type { Except } from 'type-fest';\nimport type { LinkListProps } from '../atoms/meta/LinkList.js';\nimport { LinkList } from '../atoms/meta/LinkList.js';\nimport type { MetaListProps } from '../atoms/meta/MetaList.js';\nimport { MetaList } from '../atoms/meta/MetaList.js';\nimport type { OgpProps } from '../atoms/meta/Ogp.js';\nimport { Ogp } from '../atoms/meta/Ogp.js';\nimport type { TitleProps } from '../atoms/meta/Title.js';\nimport { Title } from '../atoms/meta/Title.js';\nimport type { XCardProps } from '../atoms/meta/XCard.js';\nimport { XCard } from '../atoms/meta/XCard.js';\n\n/** Type definition for the properties. */\nexport interface HeadProps\n extends LinkListProps,\n MetaListProps,\n OgpProps,\n TitleProps,\n Except<XCardProps, 'image'> {}\n\n/**\n * The head metadata component.\n * @param props The properties.\n * @returns The component.\n * @example\n * ```tsx\n * <Head\n * author=\"John Doe\"\n * colorDark=\"#000000\"\n * colorLight=\"#FFFFFF\"\n * description=\"This is a sample description.\"\n * images={['https://example.com/image.png']}\n * links={[\n * { rel: 'icon', href: '/favicon.ico' },\n * { rel: 'stylesheet', href: 'https://example.com/styles.css' },\n * ]}\n * keywords=\"sample, meta, tags\"\n * siteName=\"Example Site\"\n * title=\"Sample Page\"\n * type=\"website\"\n * url=\"https://example.com/page\"\n * />\n * ```\n */\nexport const Head: Component<HeadProps> = (props) => {\n const [local, rest] = splitProps(props, ['images']);\n return (\n <>\n <Title {...rest} />\n <MetaList {...rest} />\n <Ogp images={local.images} {...rest} />\n <Show fallback={<XCard {...rest} />} when={local.images?.[0]}>\n {(images) => <XCard image={images()} {...rest} />}\n </Show>\n <LinkList {...rest} />\n </>\n );\n};\n"],"names":["LinkList","props","_$createComponent","Show","when","authorUrl","children","href","Link","rel","Switch","Match","_$memo","faviconType","faviconUrl","type","licenseUrl","hreflang","next","Index","each","preloadImages","image","as","prev","MetaList","author","Meta","name","content","colorDark","colorLight","description","keywords","media","Ogp","property","images","imageAlt","imageHeight","imageType","imageWidth","language","siteName","fallback","title","url","Title","SolidTitle","XCard","Head","local","rest","splitProps","_$mergeProps"],"mappings":";;;;AA6CO,MAAMA,WAAsCC,CAAAA,UAAK,CAAAC,gBAEnDC,MAAI;AAAA,EAAA,IAACC,OAAI;AAAA,WAAEH,MAAMI;AAAAA,EAAS;AAAA,EAAAC,UACvBC,CAAAA,SAAIL,gBAAMM,MAAI;AAAA,IAAA,IAACD,OAAI;AAAA,aAAEA,KAAAA;AAAAA,IAAM;AAAA,IAAEE,KAAG;AAAA,EAAA,CAAA;AAAY,CAAA,GAAAP,gBAE/CQ,QAAM;AAAA,EAAA,IAAAJ,WAAA;AAAA,WAAA,CAAAJ,gBACJS,OAAK;AAAA,MAAA,IAACP,OAAI;AAAA,eAAEQ,aAAAX,MAAMY,WAAW,EAAA,KAAIZ,MAAMa;AAAAA,MAAU;AAAA,MAAA,IAAAR,WAAA;AAAA,eAAAJ,gBAC/CM,MAAI;AAAA,UAAA,IAACD,OAAI;AAAA,mBAAEN,MAAMa;AAAAA,UAAU;AAAA,UAAEL,KAAG;AAAA,UAAA,IAAQM,OAAI;AAAA,mBAAEd,MAAMY;AAAAA,UAAW;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IAAA,CAAA,GAAAX,gBAEjES,OAAK;AAAA,MAAA,IAACP,OAAI;AAAA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AA,IACJC,UAAO;AAAA,eAAE,GAAG5B,MAAM4C,KAAK,MAAM5C,MAAM0C,QAAQ;AAAA,MAAE;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA;ACZ9C,MAAMO,OAA8BjD,CAAAA,UAAU;AACnD,QAAM,CAACkD,OAAOC,IAAI,IAAIC,WAAWpD,OAAO,CAAC,QAAQ,CAAC;AAClD,SAAA,CAAAC,gBAEK6C,OAAUK,IAAI,GAAAlD,gBACduB,UAAa2B,IAAI,GAAAlD,gBACjBiC,KAAGmB,WAAA;AAAA,IAAA,IAACjB,SAAM;AAAA,aAAEc,MAAMd;AAAAA,IAAM;AAAA,EAAA,GAAMe,IAAI,CAAA,GAAAlD,gBAClCC,MAAI;AAAA,IAAA,IAACyC,WAAQ;AAAA,aAAA1C,gBAAG+C,OAAUG,IAAI;AAAA,IAAA;AAAA,IAAA,IAAMhD,OAAI;AAAA,aAAE+C,MAAMd,SAAS,CAAC;AAAA,IAAC;AAAA,IAAA/B,UACxD+B,CAAAA,WAAMnC,gBAAM+C,OAAKK,WAAA;AAAA,MAAA,IAAChC,QAAK;AAAA,eAAEe,OAAAA;AAAAA,MAAQ;AAAA,IAAA,GAAMe,IAAI,CAAA;AAAA,EAAA,CAAI,GAAAlD,gBAElDF,UAAaoD,IAAI,CAAA;AAGxB;"}
|
package/docs/README.md
CHANGED
|
@@ -2,15 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
|
-
# ⚙️ Web ToyBox
|
|
5
|
+
# ⚙️ Web ToyBox (Solid)
|
|
6
6
|
|
|
7
|
-
Common
|
|
7
|
+
Common components for Solid.js web applications.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Installation
|
|
10
10
|
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @kurone-kito/web-toybox-solid @solidjs/meta solid-js
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Basic usage
|
|
16
|
+
|
|
17
|
+
Use the bundled `MetaProvider` to ensure the same `@solidjs/meta` instance
|
|
18
|
+
is shared with the head components.
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { MetaProvider, Head } from '@kurone-kito/web-toybox-solid';
|
|
22
|
+
|
|
23
|
+
export const App = () => (
|
|
24
|
+
<MetaProvider>
|
|
25
|
+
<Head
|
|
26
|
+
siteName="Example Site"
|
|
27
|
+
title="Sample Page"
|
|
28
|
+
description="This is a sample description."
|
|
29
|
+
images={["https://example.com/image.png"]}
|
|
30
|
+
author="John Doe"
|
|
31
|
+
/>
|
|
32
|
+
{/* ...the rest of your app... */}
|
|
33
|
+
</MetaProvider>
|
|
34
|
+
);
|
|
14
35
|
```
|
|
15
36
|
|
|
16
37
|
## LICENSE
|
package/docs/globals.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurone-kito/web-toybox-solid",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"description": "Common functions and component library for Solid.js web applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -26,25 +26,25 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"type-fest": "^5.0.1",
|
|
29
|
-
"@kurone-kito/web-toybox": "^0.1.0-alpha.
|
|
29
|
+
"@kurone-kito/web-toybox": "^0.1.0-alpha.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@kurone-kito/typescript-config": "^0.
|
|
33
|
-
"@kurone-kito/vite-lib-config": "^0.
|
|
32
|
+
"@kurone-kito/typescript-config": "^0.22.0-alpha.4",
|
|
33
|
+
"@kurone-kito/vite-lib-config": "^0.22.0-alpha.4",
|
|
34
34
|
"@solidjs/meta": "^0.29.4",
|
|
35
35
|
"@solidjs/testing-library": "^0.8.10",
|
|
36
36
|
"@testing-library/jest-dom": "^6.9.1",
|
|
37
|
-
"@vitest/coverage-v8": "^
|
|
37
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
38
38
|
"cpy-cli": "^6.0.0",
|
|
39
|
-
"jsdom": "^27.
|
|
40
|
-
"rimraf": "^6.
|
|
41
|
-
"solid-js": "^1.9.
|
|
42
|
-
"typedoc": "^0.28.
|
|
39
|
+
"jsdom": "^27.3.0",
|
|
40
|
+
"rimraf": "^6.1.2",
|
|
41
|
+
"solid-js": "^1.9.10",
|
|
42
|
+
"typedoc": "^0.28.15",
|
|
43
43
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
44
44
|
"typescript": "~5.9.3",
|
|
45
|
-
"vite": "^7.
|
|
46
|
-
"vite-plugin-solid": "^2.11.
|
|
47
|
-
"vitest": "^
|
|
45
|
+
"vite": "^7.2.7",
|
|
46
|
+
"vite-plugin-solid": "^2.11.10",
|
|
47
|
+
"vitest": "^4.0.15"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@solidjs/meta": ">=0.29.x",
|