@intlayer/design-system 9.1.0 → 9.1.1
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/dist/esm/api/useAuth/useOAuth2.mjs +1 -1
- package/dist/esm/api/useAuth/useSession.mjs +1 -1
- package/dist/esm/structured-data/buildWebsiteJsonLd.mjs +18 -3
- package/dist/esm/structured-data/buildWebsiteJsonLd.mjs.map +1 -1
- package/dist/types/structured-data/buildWebsiteJsonLd.d.ts +15 -1
- package/dist/types/structured-data/buildWebsiteJsonLd.d.ts.map +1 -1
- package/package.json +15 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { editor } from "@intlayer/config/built";
|
|
5
4
|
import { getOAuthAPI } from "@intlayer/api";
|
|
6
5
|
import { useConfiguration } from "@intlayer/editor-react";
|
|
6
|
+
import { editor } from "@intlayer/config/built";
|
|
7
7
|
import { defu } from "defu";
|
|
8
8
|
|
|
9
9
|
//#region src/api/useAuth/useOAuth2.ts
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { getAuthAPI } from "../../libs/auth.mjs";
|
|
4
4
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { editor } from "@intlayer/config/built";
|
|
6
5
|
import { useConfiguration } from "@intlayer/editor-react";
|
|
6
|
+
import { editor } from "@intlayer/config/built";
|
|
7
7
|
|
|
8
8
|
//#region src/api/useAuth/useSession.ts
|
|
9
9
|
const useSession = (sessionProp, intlayerConfiguration) => {
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
//#region src/structured-data/buildWebsiteJsonLd.ts
|
|
2
2
|
/**
|
|
3
|
+
* Fallback description for the RSS `DataFeed` node.
|
|
4
|
+
*
|
|
5
|
+
* `DataFeed` is a subtype of `Dataset`, so Search Console reports it under the
|
|
6
|
+
* Dataset rich result and rejects it when `description` is missing. Google
|
|
7
|
+
* expects a meaningful description of at least 50 characters.
|
|
8
|
+
*/
|
|
9
|
+
const DEFAULT_RSS_FEED_DESCRIPTION = "RSS feed of Intlayer publications: release notes, changelog entries, blog articles and documentation updates about internationalization (i18n) for React, Next.js, Vue, Svelte and Angular applications.";
|
|
10
|
+
/**
|
|
3
11
|
* Builds a Schema.org WebSite JSON-LD object.
|
|
4
12
|
*
|
|
5
13
|
* @param params - Website metadata.
|
|
6
14
|
* @returns A JSON-LD WebSite object ready for serialization.
|
|
7
15
|
*/
|
|
8
|
-
const buildWebsiteJsonLd = ({ url, searchUrl, locales, keywords, rssUrl }) => ({
|
|
16
|
+
const buildWebsiteJsonLd = ({ url, searchUrl, locales, keywords, rssUrl, rssName = "Intlayer RSS Feed", rssDescription = DEFAULT_RSS_FEED_DESCRIPTION }) => ({
|
|
9
17
|
"@context": "https://schema.org",
|
|
10
18
|
"@type": "WebSite",
|
|
11
19
|
url,
|
|
@@ -19,9 +27,16 @@ const buildWebsiteJsonLd = ({ url, searchUrl, locales, keywords, rssUrl }) => ({
|
|
|
19
27
|
keywords,
|
|
20
28
|
...rssUrl ? { subjectOf: {
|
|
21
29
|
"@type": "DataFeed",
|
|
22
|
-
name:
|
|
30
|
+
name: rssName,
|
|
31
|
+
description: rssDescription,
|
|
23
32
|
url: rssUrl,
|
|
24
|
-
encodingFormat: "application/rss+xml"
|
|
33
|
+
encodingFormat: "application/rss+xml",
|
|
34
|
+
inLanguage: locales,
|
|
35
|
+
creator: {
|
|
36
|
+
"@type": "Organization",
|
|
37
|
+
name: "Intlayer",
|
|
38
|
+
url
|
|
39
|
+
}
|
|
25
40
|
} } : {}
|
|
26
41
|
});
|
|
27
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWebsiteJsonLd.mjs","names":[],"sources":["../../../src/structured-data/buildWebsiteJsonLd.ts"],"sourcesContent":["/** @module buildWebsiteJsonLd */\n\nexport type BuildWebsiteJsonLdParams = {\n /** Canonical home URL of the website (e.g. \"https://intlayer.org\"). */\n url: string;\n /** URL template for the site-wide SearchAction. */\n searchUrl: string;\n /** BCP 47 locale codes the site is available in. */\n locales: string[];\n /** Site-level keywords. */\n keywords: string[];\n /** URL of the RSS feed. When provided, a `subjectOf` DataFeed node is added. */\n rssUrl?: string;\n};\n\n/**\n * Builds a Schema.org WebSite JSON-LD object.\n *\n * @param params - Website metadata.\n * @returns A JSON-LD WebSite object ready for serialization.\n */\nexport const buildWebsiteJsonLd = ({\n url,\n searchUrl,\n locales,\n keywords,\n rssUrl,\n}: BuildWebsiteJsonLdParams) => ({\n '@context': 'https://schema.org' as const,\n '@type': 'WebSite' as const,\n url,\n name: 'Intlayer',\n potentialAction: {\n '@type': 'SearchAction' as const,\n target: `${searchUrl}?search={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n },\n inLanguage: locales,\n keywords,\n ...(rssUrl\n ? {\n subjectOf: {\n '@type': 'DataFeed' as const,\n name:
|
|
1
|
+
{"version":3,"file":"buildWebsiteJsonLd.mjs","names":[],"sources":["../../../src/structured-data/buildWebsiteJsonLd.ts"],"sourcesContent":["/** @module buildWebsiteJsonLd */\n\nexport type BuildWebsiteJsonLdParams = {\n /** Canonical home URL of the website (e.g. \"https://intlayer.org\"). */\n url: string;\n /** URL template for the site-wide SearchAction. */\n searchUrl: string;\n /** BCP 47 locale codes the site is available in. */\n locales: string[];\n /** Site-level keywords. */\n keywords: string[];\n /** URL of the RSS feed. When provided, a `subjectOf` DataFeed node is added. */\n rssUrl?: string;\n /** Display name of the RSS feed node. */\n rssName?: string;\n /**\n * Description of the RSS feed node. Google validates `DataFeed` as a\n * `Dataset` subtype, which makes `description` a required field.\n */\n rssDescription?: string;\n};\n\n/**\n * Fallback description for the RSS `DataFeed` node.\n *\n * `DataFeed` is a subtype of `Dataset`, so Search Console reports it under the\n * Dataset rich result and rejects it when `description` is missing. Google\n * expects a meaningful description of at least 50 characters.\n */\nconst DEFAULT_RSS_FEED_DESCRIPTION =\n 'RSS feed of Intlayer publications: release notes, changelog entries, blog articles and documentation updates about internationalization (i18n) for React, Next.js, Vue, Svelte and Angular applications.';\n\n/**\n * Builds a Schema.org WebSite JSON-LD object.\n *\n * @param params - Website metadata.\n * @returns A JSON-LD WebSite object ready for serialization.\n */\nexport const buildWebsiteJsonLd = ({\n url,\n searchUrl,\n locales,\n keywords,\n rssUrl,\n rssName = 'Intlayer RSS Feed',\n rssDescription = DEFAULT_RSS_FEED_DESCRIPTION,\n}: BuildWebsiteJsonLdParams) => ({\n '@context': 'https://schema.org' as const,\n '@type': 'WebSite' as const,\n url,\n name: 'Intlayer',\n potentialAction: {\n '@type': 'SearchAction' as const,\n target: `${searchUrl}?search={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n },\n inLanguage: locales,\n keywords,\n ...(rssUrl\n ? {\n subjectOf: {\n '@type': 'DataFeed' as const,\n name: rssName,\n description: rssDescription,\n url: rssUrl,\n encodingFormat: 'application/rss+xml',\n inLanguage: locales,\n creator: {\n '@type': 'Organization' as const,\n name: 'Intlayer',\n url,\n },\n },\n }\n : {}),\n});\n"],"mappings":";;;;;;;;AA6BA,MAAM,+BACJ;;;;;;;AAQF,MAAa,sBAAsB,EACjC,KACA,WACA,SACA,UACA,QACA,UAAU,qBACV,iBAAiB,oCACc;CAC/B,YAAY;CACZ,SAAS;CACT;CACA,MAAM;CACN,iBAAiB;EACf,SAAS;EACT,QAAQ,GAAG,UAAU;EACrB,eAAe;CACjB;CACA,YAAY;CACZ;CACA,GAAI,SACA,EACE,WAAW;EACT,SAAS;EACT,MAAM;EACN,aAAa;EACb,KAAK;EACL,gBAAgB;EAChB,YAAY;EACZ,SAAS;GACP,SAAS;GACT,MAAM;GACN;EACF;CACF,EACF,IACA,CAAC;AACP"}
|
|
@@ -11,6 +11,13 @@ type BuildWebsiteJsonLdParams = {
|
|
|
11
11
|
keywords: string[];
|
|
12
12
|
/** URL of the RSS feed. When provided, a `subjectOf` DataFeed node is added. */
|
|
13
13
|
rssUrl?: string;
|
|
14
|
+
/** Display name of the RSS feed node. */
|
|
15
|
+
rssName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Description of the RSS feed node. Google validates `DataFeed` as a
|
|
18
|
+
* `Dataset` subtype, which makes `description` a required field.
|
|
19
|
+
*/
|
|
20
|
+
rssDescription?: string;
|
|
14
21
|
};
|
|
15
22
|
/**
|
|
16
23
|
* Builds a Schema.org WebSite JSON-LD object.
|
|
@@ -18,7 +25,7 @@ type BuildWebsiteJsonLdParams = {
|
|
|
18
25
|
* @param params - Website metadata.
|
|
19
26
|
* @returns A JSON-LD WebSite object ready for serialization.
|
|
20
27
|
*/
|
|
21
|
-
declare const buildWebsiteJsonLd: ({ url, searchUrl, locales, keywords, rssUrl }: BuildWebsiteJsonLdParams) => {
|
|
28
|
+
declare const buildWebsiteJsonLd: ({ url, searchUrl, locales, keywords, rssUrl, rssName, rssDescription }: BuildWebsiteJsonLdParams) => {
|
|
22
29
|
'@context': 'https://schema.org';
|
|
23
30
|
'@type': 'WebSite';
|
|
24
31
|
url: string;
|
|
@@ -33,8 +40,15 @@ declare const buildWebsiteJsonLd: ({ url, searchUrl, locales, keywords, rssUrl }
|
|
|
33
40
|
subjectOf?: {
|
|
34
41
|
'@type': 'DataFeed';
|
|
35
42
|
name: string;
|
|
43
|
+
description: string;
|
|
36
44
|
url: string;
|
|
37
45
|
encodingFormat: string;
|
|
46
|
+
inLanguage: string[];
|
|
47
|
+
creator: {
|
|
48
|
+
'@type': 'Organization';
|
|
49
|
+
name: string;
|
|
50
|
+
url: string;
|
|
51
|
+
};
|
|
38
52
|
};
|
|
39
53
|
};
|
|
40
54
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWebsiteJsonLd.d.ts","names":[],"sources":["../../../src/structured-data/buildWebsiteJsonLd.ts"],"mappings":";;KAEY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;
|
|
1
|
+
{"version":3,"file":"buildWebsiteJsonLd.d.ts","names":[],"sources":["../../../src/structured-data/buildWebsiteJsonLd.ts"],"mappings":";;KAEY;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA;;;;;;;;cAmBW,uBAAkB,KAAA,WAAA,SAAA,UAAA,QAAA,SAAA,kBAQ5B;EACW;EACH;;;;IAIP;IACA;IACA;;;;;IAOe;;;;;;;MAOE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
|
|
6
6
|
"keywords": [
|
|
@@ -442,13 +442,13 @@
|
|
|
442
442
|
"dependencies": {
|
|
443
443
|
"@better-auth/passkey": "1.6.25",
|
|
444
444
|
"@better-auth/sso": "1.6.25",
|
|
445
|
-
"@intlayer/api": "9.1.
|
|
446
|
-
"@intlayer/config": "9.1.
|
|
447
|
-
"@intlayer/core": "9.1.
|
|
448
|
-
"@intlayer/dictionaries-entry": "9.1.
|
|
449
|
-
"@intlayer/editor-react": "9.1.
|
|
450
|
-
"@intlayer/engine": "9.1.
|
|
451
|
-
"@intlayer/types": "9.1.
|
|
445
|
+
"@intlayer/api": "9.1.1",
|
|
446
|
+
"@intlayer/config": "9.1.1",
|
|
447
|
+
"@intlayer/core": "9.1.1",
|
|
448
|
+
"@intlayer/dictionaries-entry": "9.1.1",
|
|
449
|
+
"@intlayer/editor-react": "9.1.1",
|
|
450
|
+
"@intlayer/engine": "9.1.1",
|
|
451
|
+
"@intlayer/types": "9.1.1",
|
|
452
452
|
"@radix-ui/react-dialog": "1.1.23",
|
|
453
453
|
"@radix-ui/react-select": "2.3.7",
|
|
454
454
|
"@radix-ui/react-slot": "1.3.3",
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
"defu": "6.1.7",
|
|
482
482
|
"dompurify": "3.4.12",
|
|
483
483
|
"isomorphic-dompurify": "3.20.0",
|
|
484
|
-
"react-intlayer": "9.1.
|
|
484
|
+
"react-intlayer": "9.1.1",
|
|
485
485
|
"rollup-preserve-directives": "1.1.3",
|
|
486
486
|
"tiptap-extension-code-block-shiki": "^1.2.0",
|
|
487
487
|
"tiptap-extension-global-drag-handle": "^0.1.18",
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
"zod": "4.4.3"
|
|
491
491
|
},
|
|
492
492
|
"devDependencies": {
|
|
493
|
-
"@intlayer/backend": "9.1.
|
|
493
|
+
"@intlayer/backend": "9.1.1",
|
|
494
494
|
"@shikijs/transformers": "4.3.1",
|
|
495
495
|
"@storybook/addon-a11y": "8.6.14",
|
|
496
496
|
"@storybook/addon-essentials": "8.6.14",
|
|
@@ -520,33 +520,33 @@
|
|
|
520
520
|
"@utils/ts-config": "1.0.4",
|
|
521
521
|
"@utils/ts-config-types": "1.0.4",
|
|
522
522
|
"fast-glob": "3.3.3",
|
|
523
|
-
"intlayer": "9.1.
|
|
523
|
+
"intlayer": "9.1.1",
|
|
524
524
|
"rimraf": "6.1.3",
|
|
525
525
|
"shiki": "4.3.1",
|
|
526
526
|
"storybook": "8.6.17",
|
|
527
527
|
"tsdown": "0.22.14",
|
|
528
528
|
"typescript": "7.0.2",
|
|
529
529
|
"vite": "8.2.0",
|
|
530
|
-
"vite-intlayer": "9.1.
|
|
530
|
+
"vite-intlayer": "9.1.1",
|
|
531
531
|
"vite-plugin-dts": "5.0.3",
|
|
532
532
|
"vitest": "4.1.10"
|
|
533
533
|
},
|
|
534
534
|
"peerDependencies": {
|
|
535
535
|
"@better-fetch/fetch": "1.3.1",
|
|
536
536
|
"@hookform/resolvers": "5.5.7",
|
|
537
|
-
"@intlayer/backend": "9.1.
|
|
537
|
+
"@intlayer/backend": "9.1.1",
|
|
538
538
|
"@monaco-editor/react": "4.7.0",
|
|
539
539
|
"@shikijs/transformers": "4.3.1",
|
|
540
540
|
"@tanstack/react-query": "5.101.4",
|
|
541
541
|
"@tanstack/react-query-devtools": "5.101.4",
|
|
542
542
|
"framer-motion": "12.43.0",
|
|
543
543
|
"fuse.js": "7.5.0",
|
|
544
|
-
"intlayer": "9.1.
|
|
544
|
+
"intlayer": "9.1.1",
|
|
545
545
|
"lucide-react": "1.28.0",
|
|
546
546
|
"react": ">=16.0.0",
|
|
547
547
|
"react-dom": ">=16.0.0",
|
|
548
548
|
"react-hook-form": "7.83.0",
|
|
549
|
-
"react-intlayer": "9.1.
|
|
549
|
+
"react-intlayer": "9.1.1",
|
|
550
550
|
"shiki": "4.3.1",
|
|
551
551
|
"tailwindcss": "4.3.3"
|
|
552
552
|
},
|