@donotdev/ui 0.3.2 → 0.3.4
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 +2 -3
- package/dist/crud/components/EntityCardList.d.ts +4 -1
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +1 -1
- package/dist/crud/components/useRecordBreadcrumb.d.ts +3 -1
- package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
- package/dist/crud/components/useRecordBreadcrumb.js +1 -1
- package/dist/dndev.css +205 -865
- package/dist/index.js +1 -1
- package/dist/internal/devtools/components/LayoutReset.js +1 -1
- package/dist/internal/layout/components/AutoMetaTags.d.ts +3 -0
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +1 -1
- package/dist/internal/layout/components/FaviconHead.d.ts +18 -14
- package/dist/internal/layout/components/FaviconHead.d.ts.map +1 -1
- package/dist/internal/layout/components/FaviconHead.js +1 -1
- package/dist/internal/layout/components/FontHead.d.ts +30 -0
- package/dist/internal/layout/components/FontHead.d.ts.map +1 -0
- package/dist/internal/layout/components/FontHead.js +1 -0
- package/dist/internal/layout/components/headTagElement.d.ts +16 -0
- package/dist/internal/layout/components/headTagElement.d.ts.map +1 -0
- package/dist/internal/layout/components/headTagElement.js +1 -0
- package/dist/internal/layout/components/prerenderedHead.d.ts +15 -0
- package/dist/internal/layout/components/prerenderedHead.d.ts.map +1 -0
- package/dist/internal/layout/components/prerenderedHead.js +1 -0
- package/dist/internal/layout/components/trailingSlash.d.ts +13 -0
- package/dist/internal/layout/components/trailingSlash.d.ts.map +1 -0
- package/dist/internal/layout/components/trailingSlash.js +1 -0
- package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevMergedBar.js +1 -1
- package/dist/next.d.ts +2 -1
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/ViteAppProviders.d.ts +11 -9
- package/dist/providers/ViteAppProviders.d.ts.map +1 -1
- package/dist/providers/ViteAppProviders.js +1 -1
- package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
- package/dist/routing/DnDevNavigationMenu.js +1 -1
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/useRoutePath.next.d.ts +5 -3
- package/dist/routing/hooks/useRoutePath.next.d.ts.map +1 -1
- package/dist/routing/hooks/useRoutePath.next.js +1 -1
- package/dist/routing/useRouteDiscovery.d.ts +3 -0
- package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
- package/dist/styles/index.css +202 -59
- package/dist/symbol-index.json +1 -1
- package/dist/utils/assetResolver.d.ts +19 -19
- package/dist/utils/assetResolver.d.ts.map +1 -1
- package/dist/utils/assetResolver.js +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +1 -1
- package/guidelines/ROUTING.md +1 -0
- package/guidelines/SEO.md +160 -145
- package/package.json +9 -10
- package/dist/dndev-next.css +0 -13702
- package/dist/files/inter-cyrillic-300-normal.woff +0 -0
- package/dist/files/inter-cyrillic-300-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-400-normal.woff +0 -0
- package/dist/files/inter-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-600-normal.woff +0 -0
- package/dist/files/inter-cyrillic-600-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-700-normal.woff +0 -0
- package/dist/files/inter-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-300-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-600-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-cyrillic-ext-700-normal.woff +0 -0
- package/dist/files/inter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-greek-300-normal.woff +0 -0
- package/dist/files/inter-greek-300-normal.woff2 +0 -0
- package/dist/files/inter-greek-400-normal.woff +0 -0
- package/dist/files/inter-greek-400-normal.woff2 +0 -0
- package/dist/files/inter-greek-600-normal.woff +0 -0
- package/dist/files/inter-greek-600-normal.woff2 +0 -0
- package/dist/files/inter-greek-700-normal.woff +0 -0
- package/dist/files/inter-greek-700-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-300-normal.woff +0 -0
- package/dist/files/inter-greek-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-400-normal.woff +0 -0
- package/dist/files/inter-greek-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-600-normal.woff +0 -0
- package/dist/files/inter-greek-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-greek-ext-700-normal.woff +0 -0
- package/dist/files/inter-greek-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-latin-300-normal.woff +0 -0
- package/dist/files/inter-latin-300-normal.woff2 +0 -0
- package/dist/files/inter-latin-400-normal.woff +0 -0
- package/dist/files/inter-latin-400-normal.woff2 +0 -0
- package/dist/files/inter-latin-600-normal.woff +0 -0
- package/dist/files/inter-latin-600-normal.woff2 +0 -0
- package/dist/files/inter-latin-700-normal.woff +0 -0
- package/dist/files/inter-latin-700-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-300-normal.woff +0 -0
- package/dist/files/inter-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-400-normal.woff +0 -0
- package/dist/files/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-600-normal.woff +0 -0
- package/dist/files/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/inter-latin-ext-700-normal.woff +0 -0
- package/dist/files/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-300-normal.woff +0 -0
- package/dist/files/inter-vietnamese-300-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-400-normal.woff +0 -0
- package/dist/files/inter-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-600-normal.woff +0 -0
- package/dist/files/inter-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/inter-vietnamese-700-normal.woff +0 -0
- package/dist/files/inter-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-400-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-500-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-600-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-cyrillic-700-normal.woff +0 -0
- package/dist/files/playfair-display-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-400-normal.woff +0 -0
- package/dist/files/playfair-display-latin-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-500-normal.woff +0 -0
- package/dist/files/playfair-display-latin-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-600-normal.woff +0 -0
- package/dist/files/playfair-display-latin-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-700-normal.woff +0 -0
- package/dist/files/playfair-display-latin-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-400-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-500-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-600-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-latin-ext-700-normal.woff +0 -0
- package/dist/files/playfair-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-400-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-500-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-500-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-600-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/playfair-display-vietnamese-700-normal.woff +0 -0
- package/dist/files/playfair-display-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/press-start-2p-cyrillic-400-normal.woff +0 -0
- package/dist/files/press-start-2p-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-greek-400-normal.woff +0 -0
- package/dist/files/press-start-2p-greek-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-latin-400-normal.woff +0 -0
- package/dist/files/press-start-2p-latin-400-normal.woff2 +0 -0
- package/dist/files/press-start-2p-latin-ext-400-normal.woff +0 -0
- package/dist/files/press-start-2p-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-700-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff +0 -0
- package/dist/files/roboto-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-400-normal.woff +0 -0
- package/dist/files/roboto-greek-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-700-normal.woff +0 -0
- package/dist/files/roboto-greek-700-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff +0 -0
- package/dist/files/roboto-greek-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-400-normal.woff +0 -0
- package/dist/files/roboto-latin-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-700-normal.woff +0 -0
- package/dist/files/roboto-latin-700-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff +0 -0
- package/dist/files/roboto-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/roboto-math-400-normal.woff +0 -0
- package/dist/files/roboto-math-400-normal.woff2 +0 -0
- package/dist/files/roboto-math-700-normal.woff +0 -0
- package/dist/files/roboto-math-700-normal.woff2 +0 -0
- package/dist/files/roboto-symbols-400-normal.woff +0 -0
- package/dist/files/roboto-symbols-400-normal.woff2 +0 -0
- package/dist/files/roboto-symbols-700-normal.woff +0 -0
- package/dist/files/roboto-symbols-700-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff +0 -0
- package/dist/files/roboto-vietnamese-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-300-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-400-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-500-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-600-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-700-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-300-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-400-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-500-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-600-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-latin-ext-700-normal.woff +0 -0
- package/dist/files/space-grotesk-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-300-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-300-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-400-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-400-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-500-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-500-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-600-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-600-normal.woff2 +0 -0
- package/dist/files/space-grotesk-vietnamese-700-normal.woff +0 -0
- package/dist/files/space-grotesk-vietnamese-700-normal.woff2 +0 -0
- package/dist/internal/layout/components/FontPreloadLinks.d.ts +0 -19
- package/dist/internal/layout/components/FontPreloadLinks.d.ts.map +0 -1
- package/dist/internal/layout/components/FontPreloadLinks.js +0 -1
- package/dist/internal/layout/components/i18nSeoMeta.d.ts +0 -54
- package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +0 -1
- package/dist/internal/layout/components/i18nSeoMeta.js +0 -1
- package/dist/utils/useSeo.d.ts +0 -129
- package/dist/utils/useSeo.d.ts.map +0 -1
- package/dist/utils/useSeo.js +0 -1
package/dist/utils/useSeo.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Dynamic SEO Component
|
|
3
|
-
* @description Isomorphic component for setting SEO metadata at runtime.
|
|
4
|
-
* Works with both static pages and dynamic data (after fetch).
|
|
5
|
-
* Uses react-helmet-async internally - works in SSR/prerender.
|
|
6
|
-
*
|
|
7
|
-
* Priority (highest to lowest):
|
|
8
|
-
* 1. <Seo /> component - runtime, always wins
|
|
9
|
-
* 2. i18n meta.fullTitle - translated
|
|
10
|
-
* 3. seo.fullTitle (PageMeta) - static fallback
|
|
11
|
-
* 4. seo.title / i18n title - "title | siteName"
|
|
12
|
-
* 5. siteName only
|
|
13
|
-
*
|
|
14
|
-
* @example Basic usage
|
|
15
|
-
* ```tsx
|
|
16
|
-
* const { data: apartment } = useApartment(id);
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <>
|
|
20
|
-
* {apartment && (
|
|
21
|
-
* <Seo
|
|
22
|
-
* fullTitle={`${apartment.reference} - €${apartment.rent} | 아이수수`}
|
|
23
|
-
* description={apartment.description}
|
|
24
|
-
* image={apartment.photos[0]}
|
|
25
|
-
* />
|
|
26
|
-
* )}
|
|
27
|
-
* <ApartmentDetails data={apartment} />
|
|
28
|
-
* </>
|
|
29
|
-
* );
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* @version 0.1.0
|
|
33
|
-
* @since 0.2.0
|
|
34
|
-
* @author AMBROISE PARK Consulting
|
|
35
|
-
*/
|
|
36
|
-
import type { ReactElement } from 'react';
|
|
37
|
-
import type { AnyEntity, EntitySeoRecord, SeoMeta } from '@donotdev/core';
|
|
38
|
-
/**
|
|
39
|
-
* Dynamic SEO props
|
|
40
|
-
* Extends SeoMeta with runtime-specific fields
|
|
41
|
-
*/
|
|
42
|
-
export interface SeoProps extends SeoMeta {
|
|
43
|
-
/**
|
|
44
|
-
* Canonical URL override
|
|
45
|
-
* @description If not set, uses current URL
|
|
46
|
-
*/
|
|
47
|
-
canonicalUrl?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Article publish date (ISO 8601)
|
|
50
|
-
* @description For article pages, sets article:published_time
|
|
51
|
-
*/
|
|
52
|
-
publishDate?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Article modified date (ISO 8601)
|
|
55
|
-
* @description For article pages, sets article:modified_time
|
|
56
|
-
*/
|
|
57
|
-
modifiedDate?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Entity of the record this page renders. With `data`, title, description, image
|
|
60
|
-
* and (for `type="product"`) Product JSON-LD are derived from the entity's fields
|
|
61
|
-
* (see deriveEntitySeo). Explicit props win over derived values.
|
|
62
|
-
*/
|
|
63
|
-
entity?: AnyEntity;
|
|
64
|
-
/** The record (e.g. from useCrudDoc). Ignored without `entity`; null renders site defaults. */
|
|
65
|
-
data?: EntitySeoRecord | null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Dynamic SEO component
|
|
69
|
-
*
|
|
70
|
-
* @description Sets SEO metadata at runtime. Render after data is loaded.
|
|
71
|
-
* Overrides any static PageMeta SEO settings.
|
|
72
|
-
* Works in SSR/prerender - meta tags will be in initial HTML.
|
|
73
|
-
*
|
|
74
|
-
* @example Static title override
|
|
75
|
-
* ```tsx
|
|
76
|
-
* <Seo fullTitle="About Us | MyApp" />
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example Dynamic product page
|
|
80
|
-
* ```tsx
|
|
81
|
-
* const { data: product } = useProduct(id);
|
|
82
|
-
* if (!product) return <Loading />;
|
|
83
|
-
*
|
|
84
|
-
* return (
|
|
85
|
-
* <>
|
|
86
|
-
* <Seo
|
|
87
|
-
* title={product.name}
|
|
88
|
-
* description={product.description}
|
|
89
|
-
* image={product.image}
|
|
90
|
-
* type="product"
|
|
91
|
-
* />
|
|
92
|
-
* <ProductDetails product={product} />
|
|
93
|
-
* </>
|
|
94
|
-
* );
|
|
95
|
-
* ```
|
|
96
|
-
*
|
|
97
|
-
* @example Article with dates
|
|
98
|
-
* ```tsx
|
|
99
|
-
* <Seo
|
|
100
|
-
* title={article.title}
|
|
101
|
-
* description={article.excerpt}
|
|
102
|
-
* type="article"
|
|
103
|
-
* publishDate={article.createdAt}
|
|
104
|
-
* modifiedDate={article.updatedAt}
|
|
105
|
-
* />
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
export declare function Seo({ title, fullTitle, description, image, type, keywords, noindex, canonicalUrl, publishDate, modifiedDate, entity, data, }: SeoProps): ReactElement | null;
|
|
109
|
-
/**
|
|
110
|
-
* Hook version for those who prefer hooks
|
|
111
|
-
* Returns the Seo component with props bound
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* ```tsx
|
|
115
|
-
* const SeoTags = useSeo({
|
|
116
|
-
* title: apartment.reference,
|
|
117
|
-
* description: apartment.description,
|
|
118
|
-
* });
|
|
119
|
-
*
|
|
120
|
-
* return (
|
|
121
|
-
* <>
|
|
122
|
-
* <SeoTags />
|
|
123
|
-
* <Content />
|
|
124
|
-
* </>
|
|
125
|
-
* );
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
export declare function useSeo(props: SeoProps | null): () => ReactElement | null;
|
|
129
|
-
//# sourceMappingURL=useSeo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSeo.d.ts","sourceRoot":"","sources":["../../src/utils/useSeo.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAS1C,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM1E;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,OAAO;IACvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,+FAA+F;IAC/F,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAC/B;AAOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,GAAG,CAAC,EAClB,KAAK,EACL,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAgB,EAChB,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,MAAM,EACN,IAAI,GACL,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI,CA+IhC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,YAAY,GAAG,IAAI,CAKxE"}
|
package/dist/utils/useSeo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{buildProductJsonLd as x,deriveEntitySeo as L,getPlatformEnvVar as J,useAppConfig as z,useTranslation as H}from"@donotdev/core";import{useLocalizedPath as I,useRoutePath as M}from"@donotdev/ui/routing/hooks";import{HeadTags as N}from"../internal/layout/components/HeadTags.js";import{jsx as e,jsxs as j}from"react/jsx-runtime";function E(n,r){return n.startsWith("/")&&r?`${r}${n}`:n}function U({title:n,fullTitle:r,description:w,image:P,type:l="website",keywords:a,noindex:R,canonicalUrl:p,publishDate:y,modifiedDate:f,entity:m,data:h}){let k=z("name")||"",v=M(),_=I(),d=J("APP_URL")||"",{t:A,language:$}=H(m?[m.namespace,"crud"]:void 0),o=m&&h?L(m,h,{t:A,locale:$}):null,u=n??o?.title,s=w??o?.description,S=P??o?.image,i=S?E(S,d):void 0,T=p??`${d}${_(v)}`,g=r||(u?`${u} | ${k}`:k),b=l==="product"?x({title:u??void 0,description:s??void 0,image:i,images:i?[i,...(o?.images??[]).map(c=>E(c,d)).filter(c=>c!==i)]:[],price:o?.price,availability:o?.availability},T):null,t=[];if(s&&t.push(e("meta",{name:"description",content:s},"description"),e("meta",{property:"og:description",content:s},"og:description"),e("meta",{name:"twitter:description",content:s},"twitter:description")),i&&t.push(e("meta",{property:"og:image",content:i},"og:image"),e("meta",{name:"twitter:image",content:i},"twitter:image"),e("meta",{name:"twitter:card",content:"summary_large_image"},"twitter:card")),l&&t.push(e("meta",{property:"og:type",content:l},"og:type")),a&&a.length>0){let c=Array.isArray(a)?a.join(", "):a;t.push(e("meta",{name:"keywords",content:c},"keywords"))}return R&&t.push(e("meta",{name:"robots",content:"noindex, nofollow"},"robots")),l==="article"&&(y&&t.push(e("meta",{property:"article:published_time",content:y},"article:published_time")),f&&t.push(e("meta",{property:"article:modified_time",content:f},"article:modified_time"))),t.push(e("meta",{property:"og:title",content:g},"og:title"),e("meta",{name:"twitter:title",content:g},"twitter:title")),j(N,{children:[e("title",{children:g}),p&&e("link",{rel:"canonical",href:p}),t,b&&e("script",{type:"application/ld+json",children:JSON.stringify(b)})]})}function V(n){return n===null?()=>null:()=>e(U,{...n})}export{U as Seo,V as useSeo};
|