@devslab/site-kit 0.30.0 → 0.32.0
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.ko.md +52 -1
- package/README.md +52 -1
- package/dist/flag-bodies.js +30 -0
- package/dist/flag-bodies.js.map +1 -1
- package/dist/react/chrome.d.ts +66 -0
- package/dist/react/chrome.d.ts.map +1 -0
- package/dist/react/chunks/flag-bodies.js +114 -0
- package/dist/react/chunks/flag-bodies.js.map +1 -0
- package/dist/react/consent.d.ts +15 -0
- package/dist/react/consent.d.ts.map +1 -0
- package/dist/react/flag-bodies.d.ts +21 -0
- package/dist/react/flag-bodies.d.ts.map +1 -0
- package/dist/react/flag-bodies.js +6 -0
- package/dist/react/flag-bodies.js.map +1 -0
- package/dist/react/flag-bodies.server.d.ts +4 -0
- package/dist/react/flag-bodies.server.d.ts.map +1 -0
- package/dist/react/flag-bodies.server.js +7 -0
- package/dist/react/flag-bodies.server.js.map +1 -0
- package/dist/react/index.d.ts +29 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +825 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/layouts.d.ts +51 -0
- package/dist/react/layouts.d.ts.map +1 -0
- package/dist/react/locale-menu.d.ts +24 -0
- package/dist/react/locale-menu.d.ts.map +1 -0
- package/dist/react/locale-state.d.ts +10 -0
- package/dist/react/locale-state.d.ts.map +1 -0
- package/dist/react/oss-product-mark.d.ts +9 -0
- package/dist/react/oss-product-mark.d.ts.map +1 -0
- package/dist/react/primitives.d.ts +18 -0
- package/dist/react/primitives.d.ts.map +1 -0
- package/dist/react/sections.d.ts +63 -0
- package/dist/react/sections.d.ts.map +1 -0
- package/dist/react/types.d.ts +82 -0
- package/dist/react/types.d.ts.map +1 -0
- package/dist/solid.js +9 -1
- package/dist/solid.js.map +1 -1
- package/dist/solid.server.js +38 -1
- package/dist/solid.server.js.map +1 -1
- package/flags/kh.svg +61 -0
- package/flags/la.svg +12 -0
- package/flags/mm.svg +12 -0
- package/flags/mn.svg +14 -0
- package/flags/my.svg +26 -0
- package/flags/ph.svg +6 -0
- package/package.json +38 -10
- package/src/core/flag-bodies.mjs +6 -0
- package/src/core/flag-countries.mjs +1 -1
- package/src/core/locales.d.mts +10 -0
- package/src/core/locales.mjs +18 -0
- package/styles.css +4 -0
package/src/core/locales.mjs
CHANGED
|
@@ -139,3 +139,21 @@ function acceptedLocales(header, canonicalLocale) {
|
|
|
139
139
|
export const FAMILY_LOCALES = defineLocaleRegistry();
|
|
140
140
|
|
|
141
141
|
export const { canonicalLocale, localeAttributes, resolveLocale } = FAMILY_LOCALES;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Every language's href as plain data: `{ ko: "/ko", en: "/en", … }`.
|
|
145
|
+
*
|
|
146
|
+
* For a React Server Component that renders the `@devslab/site-kit/react`
|
|
147
|
+
* chrome. A function cannot cross from a Server Component to a Client
|
|
148
|
+
* Component, so the locale state goes over as `{ locale, hrefs }` instead of
|
|
149
|
+
* `{ locale, hrefForLocale }`. It lives here, in the framework-free entry, and
|
|
150
|
+
* not in `./react`: everything exported from a "use client" module is a client
|
|
151
|
+
* reference on the server, which a Server Component can render but not call.
|
|
152
|
+
*
|
|
153
|
+
* @param {{ LOCALES: ReadonlyArray<{ code: string }> }} registry
|
|
154
|
+
* @param {(locale: string) => string} hrefForLocale
|
|
155
|
+
* @returns {Record<string, string>}
|
|
156
|
+
*/
|
|
157
|
+
export function localeHrefs(registry, hrefForLocale) {
|
|
158
|
+
return Object.fromEntries(registry.LOCALES.map((entry) => [entry.code, hrefForLocale(entry.code)]));
|
|
159
|
+
}
|
package/styles.css
CHANGED
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
anywhere, so its min-content is a single letter. */
|
|
29
29
|
.site-header__inner { min-block-size: var(--site-header-block-size, 64px); inline-size: min(100% - var(--dds-space-32), 1120px); margin-inline: auto; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: var(--dds-space-16); }
|
|
30
30
|
.site-brand { justify-self: start; color: var(--dds-color-text-primary); font-weight: 700; text-decoration: none; }
|
|
31
|
+
/* Opt-in: a mark and a wordmark side by side inside the brand link (a logo plus "쿠루" / "クル").
|
|
32
|
+
The brand link itself stays inline, so the logos products already ship keep their geometry;
|
|
33
|
+
wrap the pair in this and they share one centre line instead of the text's baseline. */
|
|
34
|
+
.site-brand__lockup { display: inline-flex; align-items: center; gap: var(--dds-space-8); }
|
|
31
35
|
.site-nav { grid-column: 2; justify-self: center; min-inline-size: 0; }
|
|
32
36
|
.site-nav__list, .site-footer__links { display: flex; flex-wrap: wrap; gap: var(--dds-space-16); padding: 0; margin: 0; list-style: none; }
|
|
33
37
|
.site-nav__list a, .site-footer__links a { color: var(--dds-color-text-secondary); text-decoration: none; }
|