@nuxtjp/localized-site 0.0.0-stage → 0.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/LICENSE +202 -0
- package/LICENSE-ASSETS +35 -0
- package/LICENSE-PREVIOUS +21 -0
- package/NOTICE +4 -0
- package/README.ja.md +66 -0
- package/README.md +65 -2
- package/bin/nuxtjp-localized-site.mjs +7 -0
- package/dist/module.d.mts +62 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +74 -0
- package/dist/runtime/app/assets/localized-site.css +1 -0
- package/dist/runtime/app/components/LocalizedDocument.d.vue.ts +7 -0
- package/dist/runtime/app/components/LocalizedDocument.vue +23 -0
- package/dist/runtime/app/components/LocalizedDocument.vue.d.ts +7 -0
- package/dist/runtime/app/components/LocalizedLanding.d.vue.ts +3 -0
- package/dist/runtime/app/components/LocalizedLanding.vue +25 -0
- package/dist/runtime/app/components/LocalizedLanding.vue.d.ts +3 -0
- package/dist/runtime/app/components/LocalizedLanguageSwitcher.d.vue.ts +3 -0
- package/dist/runtime/app/components/LocalizedLanguageSwitcher.vue +21 -0
- package/dist/runtime/app/components/LocalizedLanguageSwitcher.vue.d.ts +3 -0
- package/dist/runtime/app/components/PublicMaintenanceNotice.d.vue.ts +3 -0
- package/dist/runtime/app/components/PublicMaintenanceNotice.vue +29 -0
- package/dist/runtime/app/components/PublicMaintenanceNotice.vue.d.ts +3 -0
- package/dist/runtime/app/composables/useLocalizedMessages.d.ts +10 -0
- package/dist/runtime/app/composables/useLocalizedMessages.js +14 -0
- package/dist/runtime/app/composables/useLocalizedSite.d.ts +9 -0
- package/dist/runtime/app/composables/useLocalizedSite.js +25 -0
- package/dist/runtime/app/layouts/localized-site.d.vue.ts +13 -0
- package/dist/runtime/app/layouts/localized-site.vue +37 -0
- package/dist/runtime/app/layouts/localized-site.vue.d.ts +13 -0
- package/dist/runtime/app/pages/LocalizedContentPage.d.vue.ts +3 -0
- package/dist/runtime/app/pages/LocalizedContentPage.vue +13 -0
- package/dist/runtime/app/pages/LocalizedContentPage.vue.d.ts +3 -0
- package/dist/runtime/app/plugins/localized-head.d.ts +2 -0
- package/dist/runtime/app/plugins/localized-head.js +7 -0
- package/dist/runtime/core/index.d.ts +8 -0
- package/dist/runtime/core/index.js +14 -0
- package/dist/runtime/core/maintenance.d.ts +25 -0
- package/dist/runtime/core/maintenance.js +51 -0
- package/dist/runtime/core/messages.d.ts +13 -0
- package/dist/runtime/core/messages.js +11 -0
- package/dist/runtime/core/path.d.ts +6 -0
- package/dist/runtime/core/path.js +43 -0
- package/dist/runtime/core/seo.d.ts +20 -0
- package/dist/runtime/core/seo.js +52 -0
- package/dist/runtime/shared/nuxt-imports.d.ts +18 -0
- package/dist/types.d.mts +3 -0
- package/examples/content/site.config.json +90 -0
- package/package.json +75 -3
- package/schemas/localized-site-v1.schema.json +139 -0
- package/schemas/public-maintenance-state-v1.schema.json +50 -0
- package/validator/content/cli.d.ts +5 -0
- package/validator/content/cli.js +31 -0
- package/validator/content/errors.d.ts +4 -0
- package/validator/content/errors.js +8 -0
- package/validator/content/index.d.ts +4 -0
- package/validator/content/index.js +3 -0
- package/validator/content/load.d.ts +2 -0
- package/validator/content/load.js +25 -0
- package/validator/content/validation/completeness.d.ts +2 -0
- package/validator/content/validation/completeness.js +21 -0
- package/validator/content/validation/locale-content.d.ts +2 -0
- package/validator/content/validation/locale-content.js +86 -0
- package/validator/content/validation/primitives.d.ts +9 -0
- package/validator/content/validation/primitives.js +48 -0
- package/validator/content/validation/site-config.d.ts +3 -0
- package/validator/content/validation/site-config.js +88 -0
- package/validator/contracts/types.d.ts +53 -0
- package/validator/contracts/types.js +3 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const SITE_CONFIG_SCHEMA = "nuxtjp://localized-site/site-config/v1";
|
|
2
|
+
export declare const SUPPORTED_LOCALES: readonly ["ja", "en"];
|
|
3
|
+
export declare const DOCUMENT_IDS: readonly ["overview", "gettingStarted", "security"];
|
|
4
|
+
export type SupportedLocale = typeof SUPPORTED_LOCALES[number];
|
|
5
|
+
export type DocumentId = typeof DOCUMENT_IDS[number];
|
|
6
|
+
export type AudienceScope = 'japan' | 'global';
|
|
7
|
+
export interface FeatureContent {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
summary: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DocumentSection {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
body: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface DocumentContent {
|
|
18
|
+
slug: string;
|
|
19
|
+
title: string;
|
|
20
|
+
summary: string;
|
|
21
|
+
sections: DocumentSection[];
|
|
22
|
+
}
|
|
23
|
+
export interface NoticeContent {
|
|
24
|
+
label: string;
|
|
25
|
+
summary: string;
|
|
26
|
+
}
|
|
27
|
+
export interface LocaleContent {
|
|
28
|
+
brand: string;
|
|
29
|
+
tagline: string;
|
|
30
|
+
summary: string;
|
|
31
|
+
features: FeatureContent[];
|
|
32
|
+
docs: Record<DocumentId, DocumentContent>;
|
|
33
|
+
privacy: NoticeContent;
|
|
34
|
+
contact: NoticeContent;
|
|
35
|
+
}
|
|
36
|
+
export interface SiteConfig {
|
|
37
|
+
schema: typeof SITE_CONFIG_SCHEMA;
|
|
38
|
+
siteId: string;
|
|
39
|
+
serviceId: string;
|
|
40
|
+
origin: string;
|
|
41
|
+
audienceScope: AudienceScope;
|
|
42
|
+
defaultLocale: SupportedLocale;
|
|
43
|
+
fallbackLocale?: SupportedLocale;
|
|
44
|
+
prefixDefaultLocale?: boolean;
|
|
45
|
+
locales: ['ja', 'en'];
|
|
46
|
+
externalActions: false;
|
|
47
|
+
content: Record<SupportedLocale, LocaleContent>;
|
|
48
|
+
}
|
|
49
|
+
export interface ResolvedSiteConfig extends Omit<SiteConfig, 'fallbackLocale' | 'prefixDefaultLocale'> {
|
|
50
|
+
fallbackLocale: SupportedLocale;
|
|
51
|
+
prefixDefaultLocale: boolean;
|
|
52
|
+
}
|
|
53
|
+
export type ContentPageId = 'landing' | DocumentId;
|