@donotdev/core 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/functions/index.js +19 -19
- package/i18n/locales/eager/dndev_ar.json +2 -1
- package/i18n/locales/eager/dndev_da.json +2 -1
- package/i18n/locales/eager/dndev_de.json +2 -1
- package/i18n/locales/eager/dndev_en.json +2 -1
- package/i18n/locales/eager/dndev_es.json +2 -1
- package/i18n/locales/eager/dndev_fr.json +2 -1
- package/i18n/locales/eager/dndev_it.json +2 -1
- package/i18n/locales/eager/dndev_ja.json +2 -1
- package/i18n/locales/eager/dndev_ko.json +2 -1
- package/i18n/locales/eager/dndev_nl.json +2 -1
- package/i18n/locales/eager/dndev_pl.json +2 -1
- package/i18n/locales/eager/dndev_pt.json +2 -1
- package/i18n/locales/eager/dndev_zh.json +2 -1
- package/i18n/locales/lazy/auth_ar.json +25 -2
- package/i18n/locales/lazy/auth_da.json +28 -2
- package/i18n/locales/lazy/auth_de.json +25 -2
- package/i18n/locales/lazy/auth_en.json +25 -2
- package/i18n/locales/lazy/auth_es.json +25 -2
- package/i18n/locales/lazy/auth_fr.json +25 -2
- package/i18n/locales/lazy/auth_it.json +25 -2
- package/i18n/locales/lazy/auth_ja.json +25 -2
- package/i18n/locales/lazy/auth_ko.json +25 -2
- package/i18n/locales/lazy/auth_nl.json +28 -2
- package/i18n/locales/lazy/auth_pl.json +25 -2
- package/i18n/locales/lazy/auth_pt.json +25 -2
- package/i18n/locales/lazy/auth_zh.json +25 -2
- package/i18n/locales/lazy/crud_ar.json +3 -1
- package/i18n/locales/lazy/crud_da.json +3 -1
- package/i18n/locales/lazy/crud_de.json +3 -1
- package/i18n/locales/lazy/crud_en.json +3 -1
- package/i18n/locales/lazy/crud_es.json +3 -1
- package/i18n/locales/lazy/crud_fr.json +3 -1
- package/i18n/locales/lazy/crud_it.json +3 -1
- package/i18n/locales/lazy/crud_ja.json +3 -1
- package/i18n/locales/lazy/crud_ko.json +3 -1
- package/i18n/locales/lazy/crud_nl.json +3 -1
- package/i18n/locales/lazy/crud_pl.json +3 -1
- package/i18n/locales/lazy/crud_pt.json +3 -1
- package/i18n/locales/lazy/crud_zh.json +3 -1
- package/index.d.ts +455 -49
- package/index.js +5 -5
- package/next/index.d.ts +80 -10
- package/next/index.js +259 -216
- package/next/runtime.js +2 -2
- package/package.json +2 -2
- package/server.d.ts +323 -24
- package/shared.js +2 -2
- package/symbol-index.json +1 -1
- package/vite/index.d.ts +65 -1
- package/vite/index.js +113 -107
package/vite/index.d.ts
CHANGED
|
@@ -447,7 +447,7 @@ interface SEOConfig {
|
|
|
447
447
|
speculationRules?: boolean;
|
|
448
448
|
/** Emit hreflang alternate links when i18n has 2+ languages (default: true). No-op for monolingual apps. Set to false to disable. */
|
|
449
449
|
hreflang?: boolean;
|
|
450
|
-
/** Auto-generate BreadcrumbList JSON-LD
|
|
450
|
+
/** Auto-generate BreadcrumbList JSON-LD: the site, the page's ancestors (`routeAncestors`: URL prefixes that are pages, PageMeta `parent`) and the page, by page title (default: true). Set to false to disable. */
|
|
451
451
|
breadcrumbSchema?: boolean;
|
|
452
452
|
/** Auto-generate WebSite JSON-LD with SearchAction for sitelinks search box (default: true). Set to false to disable. */
|
|
453
453
|
websiteSchema?: boolean;
|
|
@@ -518,6 +518,45 @@ interface HeadersConfig {
|
|
|
518
518
|
cache?: readonly CacheOverride[];
|
|
519
519
|
}
|
|
520
520
|
|
|
521
|
+
/**
|
|
522
|
+
* One woff2 file of an app-owned font family ({@link LocalFontConfig}).
|
|
523
|
+
*
|
|
524
|
+
* @since 0.3.3
|
|
525
|
+
*/
|
|
526
|
+
interface LocalFontFace {
|
|
527
|
+
/** woff2 path relative to the app root, e.g. `'src/assets/fonts/brand.woff2'` */
|
|
528
|
+
file: string;
|
|
529
|
+
/** A weight (`400`) or a variable font's range (`'300 600'`) */
|
|
530
|
+
weight: number | `${number} ${number}`;
|
|
531
|
+
/** Default `'normal'` */
|
|
532
|
+
style?: 'normal' | 'italic';
|
|
533
|
+
/**
|
|
534
|
+
* The face's `unicode-range` (`'U+AC00-D7A3'`): the browser downloads the file only for
|
|
535
|
+
* characters in it. Omitted: the family's core file, preloaded for the first paint.
|
|
536
|
+
*/
|
|
537
|
+
unicodeRange?: string;
|
|
538
|
+
/**
|
|
539
|
+
* Subset the face covers, matched against the page language
|
|
540
|
+
* (`LOCALE_TO_FONT_SUBSETS`, e.g. `'latin-ext'` for `pl`): a face with a `unicodeRange`
|
|
541
|
+
* is preloaded on the pages whose language needs this subset.
|
|
542
|
+
*/
|
|
543
|
+
subset?: string;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* An app-owned font family: its woff2 files, for a family no fontsource package
|
|
548
|
+
* provides (a custom subset, a licensed brand font). The family is named in the theme
|
|
549
|
+
* tokens like any other (`--font-sans: Pretendard, 'Pretendard Fallback', sans-serif;`).
|
|
550
|
+
*
|
|
551
|
+
* @since 0.3.3
|
|
552
|
+
*/
|
|
553
|
+
interface LocalFontConfig {
|
|
554
|
+
/** Picks the system font of the size-matched fallback face: Arial, or Times New Roman for `serif` */
|
|
555
|
+
category: 'sans-serif' | 'serif';
|
|
556
|
+
/** The family's files */
|
|
557
|
+
faces: readonly LocalFontFace[];
|
|
558
|
+
}
|
|
559
|
+
|
|
521
560
|
/**
|
|
522
561
|
* Favicon and PWA configuration
|
|
523
562
|
*
|
|
@@ -763,6 +802,31 @@ interface AppConfig {
|
|
|
763
802
|
* @since 0.3.1
|
|
764
803
|
*/
|
|
765
804
|
headers?: HeadersConfig;
|
|
805
|
+
/**
|
|
806
|
+
* The app's own font files, per family as the theme tokens name it (`src/themes.css`),
|
|
807
|
+
* for families no package provides. Every other family is resolved by name:
|
|
808
|
+
* `@fontsource-variable/<slug>`, then `@fontsource/<slug>` in the app's dependencies,
|
|
809
|
+
* then the families `@donotdev/ui` bundles (Inter, Playfair Display, Space Grotesk,
|
|
810
|
+
* Roboto, Press Start 2P). The framework ships every family the theme renders text in
|
|
811
|
+
* (Next and Vite alike): font preloads and inline `@font-face` in the server HTML,
|
|
812
|
+
* `font-display: optional`, size-matched `'<Family> Fallback'` face, content-hashed
|
|
813
|
+
* files under `/fonts/` cached immutable. Read at build; the app writes no
|
|
814
|
+
* `@font-face`, imports no `@fontsource` CSS and uses no `next/font` (each fails the
|
|
815
|
+
* build).
|
|
816
|
+
*
|
|
817
|
+
* @example
|
|
818
|
+
* ```typescript
|
|
819
|
+
* fonts: {
|
|
820
|
+
* Pretendard: {
|
|
821
|
+
* category: 'sans-serif',
|
|
822
|
+
* faces: [{ file: 'src/assets/fonts/pretendard.woff2', weight: '300 700' }],
|
|
823
|
+
* },
|
|
824
|
+
* }
|
|
825
|
+
* ```
|
|
826
|
+
*
|
|
827
|
+
* @since 0.3.3
|
|
828
|
+
*/
|
|
829
|
+
fonts?: Readonly<Record<string, LocalFontConfig>>;
|
|
766
830
|
}
|
|
767
831
|
|
|
768
832
|
// packages/core/config/index.d.ts
|