@donotdev/core 0.3.2 → 0.3.3
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 +19 -2
- package/i18n/locales/lazy/auth_da.json +22 -2
- package/i18n/locales/lazy/auth_de.json +19 -2
- package/i18n/locales/lazy/auth_en.json +19 -2
- package/i18n/locales/lazy/auth_es.json +19 -2
- package/i18n/locales/lazy/auth_fr.json +19 -2
- package/i18n/locales/lazy/auth_it.json +19 -2
- package/i18n/locales/lazy/auth_ja.json +19 -2
- package/i18n/locales/lazy/auth_ko.json +19 -2
- package/i18n/locales/lazy/auth_nl.json +22 -2
- package/i18n/locales/lazy/auth_pl.json +19 -2
- package/i18n/locales/lazy/auth_pt.json +19 -2
- package/i18n/locales/lazy/auth_zh.json +19 -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 +158 -6
- package/index.js +3 -3
- package/next/index.d.ts +65 -1
- package/next/index.js +222 -184
- package/package.json +2 -2
- package/server.d.ts +158 -4
- package/shared.js +1 -1
- package/symbol-index.json +1 -1
- package/vite/index.d.ts +64 -0
- package/vite/index.js +180 -174
package/next/index.d.ts
CHANGED
|
@@ -520,6 +520,45 @@ interface HeadersConfig {
|
|
|
520
520
|
cache?: readonly CacheOverride[];
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
+
/**
|
|
524
|
+
* One woff2 file of an app-owned font family ({@link LocalFontConfig}).
|
|
525
|
+
*
|
|
526
|
+
* @since 0.3.3
|
|
527
|
+
*/
|
|
528
|
+
interface LocalFontFace {
|
|
529
|
+
/** woff2 path relative to the app root, e.g. `'src/assets/fonts/brand.woff2'` */
|
|
530
|
+
file: string;
|
|
531
|
+
/** A weight (`400`) or a variable font's range (`'300 600'`) */
|
|
532
|
+
weight: number | `${number} ${number}`;
|
|
533
|
+
/** Default `'normal'` */
|
|
534
|
+
style?: 'normal' | 'italic';
|
|
535
|
+
/**
|
|
536
|
+
* The face's `unicode-range` (`'U+AC00-D7A3'`): the browser downloads the file only for
|
|
537
|
+
* characters in it. Omitted: the family's core file, preloaded for the first paint.
|
|
538
|
+
*/
|
|
539
|
+
unicodeRange?: string;
|
|
540
|
+
/**
|
|
541
|
+
* Subset the face covers, matched against the page language
|
|
542
|
+
* (`LOCALE_TO_FONT_SUBSETS`, e.g. `'latin-ext'` for `pl`): a face with a `unicodeRange`
|
|
543
|
+
* is preloaded on the pages whose language needs this subset.
|
|
544
|
+
*/
|
|
545
|
+
subset?: string;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* An app-owned font family: its woff2 files, for a family no fontsource package
|
|
550
|
+
* provides (a custom subset, a licensed brand font). The family is named in the theme
|
|
551
|
+
* tokens like any other (`--font-sans: Pretendard, 'Pretendard Fallback', sans-serif;`).
|
|
552
|
+
*
|
|
553
|
+
* @since 0.3.3
|
|
554
|
+
*/
|
|
555
|
+
interface LocalFontConfig {
|
|
556
|
+
/** Picks the system font of the size-matched fallback face: Arial, or Times New Roman for `serif` */
|
|
557
|
+
category: 'sans-serif' | 'serif';
|
|
558
|
+
/** The family's files */
|
|
559
|
+
faces: readonly LocalFontFace[];
|
|
560
|
+
}
|
|
561
|
+
|
|
523
562
|
/**
|
|
524
563
|
* Favicon and PWA configuration
|
|
525
564
|
*
|
|
@@ -765,6 +804,31 @@ interface AppConfig {
|
|
|
765
804
|
* @since 0.3.1
|
|
766
805
|
*/
|
|
767
806
|
headers?: HeadersConfig;
|
|
807
|
+
/**
|
|
808
|
+
* The app's own font files, per family as the theme tokens name it (`src/themes.css`),
|
|
809
|
+
* for families no package provides. Every other family is resolved by name:
|
|
810
|
+
* `@fontsource-variable/<slug>`, then `@fontsource/<slug>` in the app's dependencies,
|
|
811
|
+
* then the families `@donotdev/ui` bundles (Inter, Playfair Display, Space Grotesk,
|
|
812
|
+
* Roboto, Press Start 2P). The framework ships every family the theme renders text in
|
|
813
|
+
* (Next and Vite alike): font preloads and inline `@font-face` in the server HTML,
|
|
814
|
+
* `font-display: optional`, size-matched `'<Family> Fallback'` face, content-hashed
|
|
815
|
+
* files under `/fonts/` cached immutable. Read at build; the app writes no
|
|
816
|
+
* `@font-face`, imports no `@fontsource` CSS and uses no `next/font` (each fails the
|
|
817
|
+
* build).
|
|
818
|
+
*
|
|
819
|
+
* @example
|
|
820
|
+
* ```typescript
|
|
821
|
+
* fonts: {
|
|
822
|
+
* Pretendard: {
|
|
823
|
+
* category: 'sans-serif',
|
|
824
|
+
* faces: [{ file: 'src/assets/fonts/pretendard.woff2', weight: '300 700' }],
|
|
825
|
+
* },
|
|
826
|
+
* }
|
|
827
|
+
* ```
|
|
828
|
+
*
|
|
829
|
+
* @since 0.3.3
|
|
830
|
+
*/
|
|
831
|
+
fonts?: Readonly<Record<string, LocalFontConfig>>;
|
|
768
832
|
}
|
|
769
833
|
|
|
770
834
|
/**
|
|
@@ -1042,7 +1106,7 @@ declare function defineNextConfig(options?: NextConfigOptions): any;
|
|
|
1042
1106
|
|
|
1043
1107
|
/**
|
|
1044
1108
|
* Create PostCSS configuration for Next.js consumer apps.
|
|
1045
|
-
*
|
|
1109
|
+
* Workspace-aware package resolution (no font goes through CSS: the font plan ships fonts as head tags).
|
|
1046
1110
|
*
|
|
1047
1111
|
* @example
|
|
1048
1112
|
* ```js
|