@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.
Files changed (52) hide show
  1. package/README.ko.md +52 -1
  2. package/README.md +52 -1
  3. package/dist/flag-bodies.js +30 -0
  4. package/dist/flag-bodies.js.map +1 -1
  5. package/dist/react/chrome.d.ts +66 -0
  6. package/dist/react/chrome.d.ts.map +1 -0
  7. package/dist/react/chunks/flag-bodies.js +114 -0
  8. package/dist/react/chunks/flag-bodies.js.map +1 -0
  9. package/dist/react/consent.d.ts +15 -0
  10. package/dist/react/consent.d.ts.map +1 -0
  11. package/dist/react/flag-bodies.d.ts +21 -0
  12. package/dist/react/flag-bodies.d.ts.map +1 -0
  13. package/dist/react/flag-bodies.js +6 -0
  14. package/dist/react/flag-bodies.js.map +1 -0
  15. package/dist/react/flag-bodies.server.d.ts +4 -0
  16. package/dist/react/flag-bodies.server.d.ts.map +1 -0
  17. package/dist/react/flag-bodies.server.js +7 -0
  18. package/dist/react/flag-bodies.server.js.map +1 -0
  19. package/dist/react/index.d.ts +29 -0
  20. package/dist/react/index.d.ts.map +1 -0
  21. package/dist/react/index.js +825 -0
  22. package/dist/react/index.js.map +1 -0
  23. package/dist/react/layouts.d.ts +51 -0
  24. package/dist/react/layouts.d.ts.map +1 -0
  25. package/dist/react/locale-menu.d.ts +24 -0
  26. package/dist/react/locale-menu.d.ts.map +1 -0
  27. package/dist/react/locale-state.d.ts +10 -0
  28. package/dist/react/locale-state.d.ts.map +1 -0
  29. package/dist/react/oss-product-mark.d.ts +9 -0
  30. package/dist/react/oss-product-mark.d.ts.map +1 -0
  31. package/dist/react/primitives.d.ts +18 -0
  32. package/dist/react/primitives.d.ts.map +1 -0
  33. package/dist/react/sections.d.ts +63 -0
  34. package/dist/react/sections.d.ts.map +1 -0
  35. package/dist/react/types.d.ts +82 -0
  36. package/dist/react/types.d.ts.map +1 -0
  37. package/dist/solid.js +9 -1
  38. package/dist/solid.js.map +1 -1
  39. package/dist/solid.server.js +38 -1
  40. package/dist/solid.server.js.map +1 -1
  41. package/flags/kh.svg +61 -0
  42. package/flags/la.svg +12 -0
  43. package/flags/mm.svg +12 -0
  44. package/flags/mn.svg +14 -0
  45. package/flags/my.svg +26 -0
  46. package/flags/ph.svg +6 -0
  47. package/package.json +38 -10
  48. package/src/core/flag-bodies.mjs +6 -0
  49. package/src/core/flag-countries.mjs +1 -1
  50. package/src/core/locales.d.mts +10 -0
  51. package/src/core/locales.mjs +18 -0
  52. package/styles.css +4 -0
@@ -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; }