@kurone-kito/web-toybox-solid 0.1.0-alpha.1 → 0.1.0-alpha.11
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/components/atoms/meta/LinkList.d.ts +12 -0
- package/dist/components/atoms/meta/LinkList.d.ts.map +1 -1
- package/dist/components/atoms/meta/MetaList.d.ts +12 -0
- package/dist/components/atoms/meta/MetaList.d.ts.map +1 -1
- package/dist/components/atoms/meta/Ogp.d.ts +15 -0
- package/dist/components/atoms/meta/Ogp.d.ts.map +1 -1
- package/dist/components/atoms/meta/Title.d.ts +4 -0
- package/dist/components/atoms/meta/Title.d.ts.map +1 -1
- package/dist/components/atoms/meta/XCard.d.ts +11 -1
- package/dist/components/atoms/meta/XCard.d.ts.map +1 -1
- package/dist/components/molecules/Head.d.ts +19 -0
- package/dist/components/molecules/Head.d.ts.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +39 -9
- package/dist/index.mjs.map +1 -1
- package/dist/modules/createTick.d.mts +16 -0
- package/dist/modules/createTick.d.mts.map +1 -0
- package/dist/types/AccessorObject.d.mts +24 -0
- package/dist/types/AccessorObject.d.mts.map +1 -0
- package/docs/README.md +39 -0
- package/docs/functions/createTick.md +24 -0
- package/docs/globals.md +34 -0
- package/docs/interfaces/CreateTickParams.md +37 -0
- package/docs/interfaces/HeadProps.md +275 -0
- package/docs/interfaces/LinkListProps.md +69 -0
- package/docs/interfaces/MetaListProps.md +59 -0
- package/docs/interfaces/OgpProps.md +93 -0
- package/docs/interfaces/TitleProps.md +29 -0
- package/docs/interfaces/XCardProps.md +49 -0
- package/docs/type-aliases/AccessorObject.md +38 -0
- package/docs/type-aliases/Robots.md +9 -0
- package/docs/variables/Head.md +40 -0
- package/docs/variables/LinkList.md +33 -0
- package/docs/variables/MetaList.md +31 -0
- package/docs/variables/MetaProvider.md +9 -0
- package/docs/variables/Ogp.md +36 -0
- package/docs/variables/Title.md +25 -0
- package/docs/variables/XCard.md +31 -0
- package/package.json +19 -18
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
|
|
@@ -20,6 +20,18 @@ export interface LinkListProps {
|
|
|
20
20
|
* The link list component.
|
|
21
21
|
* @param props The component properties.
|
|
22
22
|
* @returns The component.
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <LinkList
|
|
26
|
+
* authorUrl="https://example.com/author"
|
|
27
|
+
* faviconType="image/png"
|
|
28
|
+
* faviconUrl="https://example.com/favicon.png"
|
|
29
|
+
* licenseUrl="https://example.com/license"
|
|
30
|
+
* next="https://example.com/next"
|
|
31
|
+
* preloadImages={['https://example.com/image1.png', 'https://example.com/image2.png']}
|
|
32
|
+
* prev="https://example.com/prev"
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
23
35
|
*/
|
|
24
36
|
export declare const LinkList: Component<LinkListProps>;
|
|
25
37
|
//# sourceMappingURL=LinkList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/LinkList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,oCAAoC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,uBAAuB;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,uBAAuB;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,6BAA6B;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAEvD,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED
|
|
1
|
+
{"version":3,"file":"LinkList.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/LinkList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,oCAAoC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,uBAAuB;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,uBAAuB;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,6BAA6B;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAEvD,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,CAAC,aAAa,CAsB7C,CAAC"}
|
|
@@ -11,11 +11,23 @@ export interface MetaListProps {
|
|
|
11
11
|
readonly description?: string | undefined;
|
|
12
12
|
/** The keywords of the meta tag. */
|
|
13
13
|
readonly keywords?: string | undefined;
|
|
14
|
+
readonly robots?: readonly Robots[] | undefined;
|
|
14
15
|
}
|
|
16
|
+
export type Robots = 'all' | 'follow' | 'index' | 'indexifembedded' | `max-image-preview: ${'large' | 'none' | 'standard'}` | `max-snippet: ${number}` | `max-video-preview: ${number}` | 'noarchive' | 'nofollow' | 'noimageindex' | 'noindex' | 'none' | 'nosnippet' | 'notranslate' | `unavailable_after: ${string}`;
|
|
15
17
|
/**
|
|
16
18
|
* The meta list component.
|
|
17
19
|
* @param props The component properties.
|
|
18
20
|
* @returns The component.
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <MetaList
|
|
24
|
+
* author="John Doe"
|
|
25
|
+
* colorDark="#000000"
|
|
26
|
+
* colorLight="#FFFFFF"
|
|
27
|
+
* description="This is a sample description."
|
|
28
|
+
* keywords="sample, meta, tags"
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
19
31
|
*/
|
|
20
32
|
export declare const MetaList: Component<MetaListProps>;
|
|
21
33
|
//# sourceMappingURL=MetaList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetaList.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/MetaList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,mDAAmD;IACnD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,uCAAuC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MetaList.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/MetaList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,mDAAmD;IACnD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC,uCAAuC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,MAAM,MAAM,GACd,KAAK,GACL,QAAQ,GACR,OAAO,GACP,iBAAiB,GACjB,sBAAsB,OAAO,GAAG,MAAM,GAAG,UAAU,EAAE,GACrD,gBAAgB,MAAM,EAAE,GACxB,sBAAsB,MAAM,EAAE,GAC9B,WAAW,GACX,UAAU,GACV,cAAc,GACd,SAAS,GACT,MAAM,GACN,WAAW,GACX,aAAa,GACb,sBAAsB,MAAM,EAAE,CAAC;AAEnC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,CAAC,aAAa,CA8C7C,CAAC"}
|
|
@@ -26,6 +26,21 @@ export interface OgpProps {
|
|
|
26
26
|
* The OGP component.
|
|
27
27
|
* @param props The component properties.
|
|
28
28
|
* @returns The component.
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Ogp
|
|
32
|
+
* description="This is a sample page."
|
|
33
|
+
* images={['https://example.com/image1.png', 'https://example.com/image2.png']}
|
|
34
|
+
* imageAlt="Sample Image"
|
|
35
|
+
* imageHeight={630}
|
|
36
|
+
* imageType="image/png"
|
|
37
|
+
* imageWidth={1200}
|
|
38
|
+
* language="en_US"
|
|
39
|
+
* siteName="Example Site"
|
|
40
|
+
* title="Sample Page"
|
|
41
|
+
* url="https://example.com/sample-page"
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
29
44
|
*/
|
|
30
45
|
export declare const Ogp: Component<OgpProps>;
|
|
31
46
|
//# sourceMappingURL=Ogp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ogp.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/Ogp.tsx"],"names":[],"mappings":"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AS,CAAC;IAEvC,gCAAgC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAEnD,mCAAmC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,+BAA+B;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAElD,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAEhD,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvC,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,2BAA2B;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,GAAG,EAAE,SAAS,CAAC,QAAQ,CAwCnC,CAAC"}
|
|
@@ -10,6 +10,10 @@ export interface TitleProps {
|
|
|
10
10
|
* The title component.
|
|
11
11
|
* @param props The component properties.
|
|
12
12
|
* @returns The component.
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <Title siteName="Example Site" title="Sample Page" />
|
|
16
|
+
* ```
|
|
13
17
|
*/
|
|
14
18
|
export declare const Title: Component<TitleProps>;
|
|
15
19
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/Title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,UAAU;IACzB,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/Title.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,UAAU;IACzB,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,UAAU,CAMvC,CAAC"}
|
|
@@ -13,9 +13,19 @@ export interface XCardProps {
|
|
|
13
13
|
readonly title?: string | undefined;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* The
|
|
16
|
+
* The 𝕏 card component.
|
|
17
17
|
* @param props The component properties.
|
|
18
18
|
* @returns The component.
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <XCard
|
|
22
|
+
* author="Jane Doe"
|
|
23
|
+
* description="This is a sample description."
|
|
24
|
+
* image="https://example.com/image.png"
|
|
25
|
+
* siteName="Example Site"
|
|
26
|
+
* title="Sample Page"
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
19
29
|
*/
|
|
20
30
|
export declare const XCard: Component<XCardProps>;
|
|
21
31
|
//# sourceMappingURL=XCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XCard.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/XCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,4BAA4B;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED
|
|
1
|
+
{"version":3,"file":"XCard.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/meta/XCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,0CAA0C;AAC1C,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,4BAA4B;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1C,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,UAAU,CAyBvC,CAAC"}
|
|
@@ -12,6 +12,25 @@ export interface HeadProps extends LinkListProps, MetaListProps, OgpProps, Title
|
|
|
12
12
|
* The head metadata component.
|
|
13
13
|
* @param props The properties.
|
|
14
14
|
* @returns The component.
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Head
|
|
18
|
+
* author="John Doe"
|
|
19
|
+
* colorDark="#000000"
|
|
20
|
+
* colorLight="#FFFFFF"
|
|
21
|
+
* description="This is a sample description."
|
|
22
|
+
* images={['https://example.com/image.png']}
|
|
23
|
+
* links={[
|
|
24
|
+
* { rel: 'icon', href: '/favicon.ico' },
|
|
25
|
+
* { rel: 'stylesheet', href: 'https://example.com/styles.css' },
|
|
26
|
+
* ]}
|
|
27
|
+
* keywords="sample, meta, tags"
|
|
28
|
+
* siteName="Example Site"
|
|
29
|
+
* title="Sample Page"
|
|
30
|
+
* type="website"
|
|
31
|
+
* url="https://example.com/page"
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
15
34
|
*/
|
|
16
35
|
export declare const Head: Component<HeadProps>;
|
|
17
36
|
//# sourceMappingURL=Head.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/Head.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,0CAA0C;AAC1C,MAAM,WAAW,SACf,SAAQ,aAAa,EACnB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC;CAAG;AAElC
|
|
1
|
+
{"version":3,"file":"Head.d.ts","sourceRoot":"","sources":["../../../src/components/molecules/Head.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,0CAA0C;AAC1C,MAAM,WAAW,SACf,SAAQ,aAAa,EACnB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC;CAAG;AAElC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,EAAE,SAAS,CAAC,SAAS,CAarC,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { MetaProvider } from '@solidjs/meta';
|
|
1
2
|
export type { LinkListProps } from './components/atoms/meta/LinkList.js';
|
|
2
3
|
export { LinkList } from './components/atoms/meta/LinkList.js';
|
|
3
|
-
export type { MetaListProps } from './components/atoms/meta/MetaList.js';
|
|
4
|
+
export type { MetaListProps, Robots, } from './components/atoms/meta/MetaList.js';
|
|
4
5
|
export { MetaList } from './components/atoms/meta/MetaList.js';
|
|
5
6
|
export type { OgpProps } from './components/atoms/meta/Ogp.js';
|
|
6
7
|
export { Ogp } from './components/atoms/meta/Ogp.js';
|
|
@@ -10,4 +11,7 @@ export type { XCardProps } from './components/atoms/meta/XCard.js';
|
|
|
10
11
|
export { XCard } from './components/atoms/meta/XCard.js';
|
|
11
12
|
export type { HeadProps } from './components/molecules/Head.js';
|
|
12
13
|
export { Head } from './components/molecules/Head.js';
|
|
14
|
+
export type { CreateTickParams } from './modules/createTick.mjs';
|
|
15
|
+
export { createTick } from './modules/createTick.mjs';
|
|
16
|
+
export type { AccessorObject } from './types/AccessorObject.mjs';
|
|
13
17
|
//# sourceMappingURL=index.d.mts.map
|
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,
|
|
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,EACV,aAAa,EACb,MAAM,GACP,MAAM,qCAAqC,CAAC;AAC7C,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;AAEtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createComponent, mergeProps } from "solid-js/web";
|
|
2
1
|
import { Link, Meta, Title as Title$1 } from "@solidjs/meta";
|
|
3
|
-
import {
|
|
2
|
+
import { MetaProvider } from "@solidjs/meta";
|
|
3
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
4
|
+
import { Show, Switch, Match, Index, splitProps, onMount, onCleanup } from "solid-js";
|
|
4
5
|
const LinkList = (props) => [createComponent(Show, {
|
|
5
6
|
get when() {
|
|
6
7
|
return props.authorUrl;
|
|
@@ -15,7 +16,7 @@ const LinkList = (props) => [createComponent(Show, {
|
|
|
15
16
|
get children() {
|
|
16
17
|
return [createComponent(Match, {
|
|
17
18
|
get when() {
|
|
18
|
-
return props.faviconType && props.faviconUrl;
|
|
19
|
+
return memo(() => !!props.faviconType)() && props.faviconUrl;
|
|
19
20
|
},
|
|
20
21
|
get children() {
|
|
21
22
|
return createComponent(Link, {
|
|
@@ -30,7 +31,7 @@ const LinkList = (props) => [createComponent(Show, {
|
|
|
30
31
|
}
|
|
31
32
|
}), createComponent(Match, {
|
|
32
33
|
get when() {
|
|
33
|
-
return
|
|
34
|
+
return memo(() => !!!props.faviconType)() && props.faviconUrl;
|
|
34
35
|
},
|
|
35
36
|
get children() {
|
|
36
37
|
return createComponent(Link, {
|
|
@@ -101,7 +102,7 @@ const MetaList = (props) => [createComponent(Show, {
|
|
|
101
102
|
get children() {
|
|
102
103
|
return [createComponent(Match, {
|
|
103
104
|
get when() {
|
|
104
|
-
return props.colorDark && props.colorLight;
|
|
105
|
+
return memo(() => !!props.colorDark)() && props.colorLight;
|
|
105
106
|
},
|
|
106
107
|
get children() {
|
|
107
108
|
return createComponent(Meta, {
|
|
@@ -111,7 +112,7 @@ const MetaList = (props) => [createComponent(Show, {
|
|
|
111
112
|
}
|
|
112
113
|
}), createComponent(Match, {
|
|
113
114
|
get when() {
|
|
114
|
-
return props.colorDark && !props.colorLight;
|
|
115
|
+
return memo(() => !!props.colorDark)() && !props.colorLight;
|
|
115
116
|
},
|
|
116
117
|
get children() {
|
|
117
118
|
return createComponent(Meta, {
|
|
@@ -121,7 +122,7 @@ const MetaList = (props) => [createComponent(Show, {
|
|
|
121
122
|
}
|
|
122
123
|
}), createComponent(Match, {
|
|
123
124
|
get when() {
|
|
124
|
-
return
|
|
125
|
+
return memo(() => !!!props.colorDark)() && props.colorLight;
|
|
125
126
|
},
|
|
126
127
|
get children() {
|
|
127
128
|
return createComponent(Meta, {
|
|
@@ -161,6 +162,18 @@ const MetaList = (props) => [createComponent(Show, {
|
|
|
161
162
|
}), createComponent(Meta, {
|
|
162
163
|
name: "referer",
|
|
163
164
|
content: "strict-origin-when-cross-origin"
|
|
165
|
+
}), createComponent(Show, {
|
|
166
|
+
get when() {
|
|
167
|
+
return props.robots?.length;
|
|
168
|
+
},
|
|
169
|
+
get children() {
|
|
170
|
+
return createComponent(Meta, {
|
|
171
|
+
name: "robots",
|
|
172
|
+
get content() {
|
|
173
|
+
return props.robots?.join(", ");
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}
|
|
164
177
|
}), createComponent(Show, {
|
|
165
178
|
get when() {
|
|
166
179
|
return props.colorLight;
|
|
@@ -331,7 +344,7 @@ const Title = (props) => createComponent(Title$1, {
|
|
|
331
344
|
return props.title;
|
|
332
345
|
},
|
|
333
346
|
get children() {
|
|
334
|
-
return [props.title, " :: ", props.siteName];
|
|
347
|
+
return [memo(() => props.title), " :: ", memo(() => props.siteName)];
|
|
335
348
|
}
|
|
336
349
|
});
|
|
337
350
|
}
|
|
@@ -428,12 +441,29 @@ const Head = (props) => {
|
|
|
428
441
|
}, rest))
|
|
429
442
|
}), createComponent(LinkList, rest)];
|
|
430
443
|
};
|
|
444
|
+
const createTick = (params) => {
|
|
445
|
+
const { callback, immediate, interval } = params;
|
|
446
|
+
let id;
|
|
447
|
+
onMount(() => {
|
|
448
|
+
if (immediate) {
|
|
449
|
+
callback();
|
|
450
|
+
}
|
|
451
|
+
id = setInterval(() => callback(), interval);
|
|
452
|
+
});
|
|
453
|
+
onCleanup(() => {
|
|
454
|
+
if (id !== void 0) {
|
|
455
|
+
clearInterval(id);
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
};
|
|
431
459
|
export {
|
|
432
460
|
Head,
|
|
433
461
|
LinkList,
|
|
434
462
|
MetaList,
|
|
463
|
+
MetaProvider,
|
|
435
464
|
Ogp,
|
|
436
465
|
Title,
|
|
437
|
-
XCard
|
|
466
|
+
XCard,
|
|
467
|
+
createTick
|
|
438
468
|
};
|
|
439
469
|
//# sourceMappingURL=index.mjs.map
|
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 */\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 */\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 */\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 */\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 X card component.\n * @param props The component properties.\n * @returns The component.\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 */\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","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":";;;AAiCO,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,IAAE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}
|
|
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","../src/modules/createTick.mts"],"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 readonly robots?: readonly Robots[] | undefined;\n}\n\nexport type Robots =\n | 'all'\n | 'follow'\n | 'index'\n | 'indexifembedded'\n | `max-image-preview: ${'large' | 'none' | 'standard'}`\n | `max-snippet: ${number}`\n | `max-video-preview: ${number}`\n | 'noarchive'\n | 'nofollow'\n | 'noimageindex'\n | 'noindex'\n | 'none'\n | 'nosnippet'\n | 'notranslate'\n | `unavailable_after: ${string}`;\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.robots?.length}>\n <Meta name=\"robots\" content={props.robots?.join(', ')} />\n </Show>\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","import { onCleanup, onMount } from 'solid-js';\n\n/** Type definition for the parameters of createTick function. */\nexport interface CreateTickParams {\n /** The callback function to be called at each tick. */\n readonly callback: () => void;\n\n /** Whether to call the callback immediately upon creation. */\n readonly immediate?: boolean | undefined;\n\n /** The interval in milliseconds between each tick. */\n readonly interval: number;\n}\n\n/**\n * Creates a ticking mechanism that calls the provided callback at\n * specified intervals.\n * @param params The parameters for creating the tick.\n */\nexport const createTick = (params: CreateTickParams): void => {\n const { callback, immediate, interval } = params;\n let id: ReturnType<typeof setInterval> | undefined;\n onMount(() => {\n if (immediate) {\n callback();\n }\n id = setInterval(() => callback(), interval);\n });\n onCleanup(() => {\n if (id !== undefined) {\n clearInterval(id);\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","robots","length","join","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;A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,GAAArD,gBACjBoC,KAAGmB,WAAA;AAAA,IAAA,IAACjB,SAAM;AAAA,aAAEc,MAAMd;AAAAA,IAAM;AAAA,EAAA,GAAMe,IAAI,CAAA,GAAArD,gBAClCC,MAAI;AAAA,IAAA,IAAC4C,WAAQ;AAAA,aAAA7C,gBAAGkD,OAAUG,IAAI;AAAA,IAAA;AAAA,IAAA,IAAMnD,OAAI;AAAA,aAAEkD,MAAMd,SAAS,CAAC;AAAA,IAAC;AAAA,IAAAlC,UACxDkC,CAAAA,WAAMtC,gBAAMkD,OAAKK,WAAA;AAAA,MAAA,IAACnC,QAAK;AAAA,eAAEkB,OAAAA;AAAAA,MAAQ;AAAA,IAAA,GAAMe,IAAI,CAAA;AAAA,EAAA,CAAI,GAAArD,gBAElDF,UAAauD,IAAI,CAAA;AAGxB;ACxCO,MAAM,aAAa,CAAC,WAAmC;AAC5D,QAAM,EAAE,UAAU,WAAW,SAAA,IAAa;AAC1C,MAAI;AACJ,UAAQ,MAAM;AACZ,QAAI,WAAW;AACb,eAAA;AAAA,IACF;AACA,SAAK,YAAY,MAAM,SAAA,GAAY,QAAQ;AAAA,EAC7C,CAAC;AACD,YAAU,MAAM;AACd,QAAI,OAAO,QAAW;AACpB,oBAAc,EAAE;AAAA,IAClB;AAAA,EACF,CAAC;AACH;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Type definition for the parameters of createTick function. */
|
|
2
|
+
export interface CreateTickParams {
|
|
3
|
+
/** The callback function to be called at each tick. */
|
|
4
|
+
readonly callback: () => void;
|
|
5
|
+
/** Whether to call the callback immediately upon creation. */
|
|
6
|
+
readonly immediate?: boolean | undefined;
|
|
7
|
+
/** The interval in milliseconds between each tick. */
|
|
8
|
+
readonly interval: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a ticking mechanism that calls the provided callback at
|
|
12
|
+
* specified intervals.
|
|
13
|
+
* @param params The parameters for creating the tick.
|
|
14
|
+
*/
|
|
15
|
+
export declare const createTick: (params: CreateTickParams) => void;
|
|
16
|
+
//# sourceMappingURL=createTick.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTick.d.mts","sourceRoot":"","sources":["../../src/modules/createTick.mts"],"names":[],"mappings":"AAEA,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAE9B,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAEzC,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,gBAAgB,KAAG,IAcrD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Accessor, Setter } from 'solid-js';
|
|
2
|
+
import { Simplify } from 'type-fest';
|
|
3
|
+
/**
|
|
4
|
+
* Type definition for an object with accessor and setter properties.
|
|
5
|
+
* @template T The type of the accessor and setter values.
|
|
6
|
+
* @template K The keys of the object.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* type UserAccessorObject = AccessorObject<User, 'name' | 'age'>;
|
|
10
|
+
*
|
|
11
|
+
* const user: UserAccessorObject = {
|
|
12
|
+
* name: () => 'Alice',
|
|
13
|
+
* setName: (newName) => { ... },
|
|
14
|
+
* age: () => 42,
|
|
15
|
+
* setAge: (newAge) => { ... },
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export type AccessorObject<T, K extends string> = Simplify<{
|
|
20
|
+
readonly [P in K]: Accessor<T>;
|
|
21
|
+
} & {
|
|
22
|
+
readonly [P in K as `set${Capitalize<P>}`]: Setter<T>;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=AccessorObject.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessorObject.d.mts","sourceRoot":"","sources":["../../src/types/AccessorObject.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,QAAQ,CACxD;IACE,QAAQ,EAAE,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;CAC/B,GAAG;IACF,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;CACtD,CACF,CAAC"}
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
**@kurone-kito/web-toybox-solid**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# ⚙️ Web ToyBox (Solid)
|
|
6
|
+
|
|
7
|
+
Common components for Solid.js web applications.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
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
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## LICENSE
|
|
38
|
+
|
|
39
|
+
MIT
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[**@kurone-kito/web-toybox-solid**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@kurone-kito/web-toybox-solid](../globals.md) / createTick
|
|
6
|
+
|
|
7
|
+
# Function: createTick()
|
|
8
|
+
|
|
9
|
+
> **createTick**(`params`): `void`
|
|
10
|
+
|
|
11
|
+
Creates a ticking mechanism that calls the provided callback at
|
|
12
|
+
specified intervals.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
### params
|
|
17
|
+
|
|
18
|
+
[`CreateTickParams`](../interfaces/CreateTickParams.md)
|
|
19
|
+
|
|
20
|
+
The parameters for creating the tick.
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`void`
|
package/docs/globals.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[**@kurone-kito/web-toybox-solid**](README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# @kurone-kito/web-toybox-solid
|
|
6
|
+
|
|
7
|
+
## Interfaces
|
|
8
|
+
|
|
9
|
+
- [CreateTickParams](interfaces/CreateTickParams.md)
|
|
10
|
+
- [HeadProps](interfaces/HeadProps.md)
|
|
11
|
+
- [LinkListProps](interfaces/LinkListProps.md)
|
|
12
|
+
- [MetaListProps](interfaces/MetaListProps.md)
|
|
13
|
+
- [OgpProps](interfaces/OgpProps.md)
|
|
14
|
+
- [TitleProps](interfaces/TitleProps.md)
|
|
15
|
+
- [XCardProps](interfaces/XCardProps.md)
|
|
16
|
+
|
|
17
|
+
## Type Aliases
|
|
18
|
+
|
|
19
|
+
- [AccessorObject](type-aliases/AccessorObject.md)
|
|
20
|
+
- [Robots](type-aliases/Robots.md)
|
|
21
|
+
|
|
22
|
+
## Variables
|
|
23
|
+
|
|
24
|
+
- [Head](variables/Head.md)
|
|
25
|
+
- [LinkList](variables/LinkList.md)
|
|
26
|
+
- [MetaList](variables/MetaList.md)
|
|
27
|
+
- [MetaProvider](variables/MetaProvider.md)
|
|
28
|
+
- [Ogp](variables/Ogp.md)
|
|
29
|
+
- [Title](variables/Title.md)
|
|
30
|
+
- [XCard](variables/XCard.md)
|
|
31
|
+
|
|
32
|
+
## Functions
|
|
33
|
+
|
|
34
|
+
- [createTick](functions/createTick.md)
|