@devslab/site-kit 0.12.0 → 0.12.2
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 +4 -0
- package/README.md +4 -0
- package/dist/layouts.d.ts +1 -1
- package/dist/layouts.d.ts.map +1 -1
- package/dist/locale-menu.d.ts.map +1 -1
- package/dist/solid.js +25 -24
- package/dist/solid.js.map +1 -1
- package/dist/solid.server.js +12 -3
- package/dist/solid.server.js.map +1 -1
- package/package.json +2 -2
package/README.ko.md
CHANGED
|
@@ -17,6 +17,10 @@ claim leaf가 검증된 사실 레지스트리를 참조하도록 강제한다.
|
|
|
17
17
|
기존 environment-only 출력은 유지되며, 선택적 `policies`로 검색 인덱싱,
|
|
18
18
|
인용 crawler, 모델 학습 crawler를 각각 제어할 수 있다.
|
|
19
19
|
|
|
20
|
+
## 하이드레이션
|
|
21
|
+
|
|
22
|
+
`MarketingShell`은 아무것도 렌더하기 전에 `header`·`footer`를 한 번(메모) 읽는다. `header={{ … }}`는 게터로 컴파일되므로 셸이 prop마다 다시 읽으면 리터럴 안에서 즉시 만들어진 JSX(`actions` 앵커, 로고)가 읽을 때마다 다시 만들어져 하이드레이션 키를 소모하고 — 서버와 브라우저의 횟수가 다르다 — 클라이언트는 헤더를 템플릿에서 다시 만든다. 셸 밖에서 `SiteHeader`·`SiteFooter`를 직접 마운트하는 제품은 같은 방식으로 자기 props를 한 번만 읽어야 한다. 국기 스프라이트는 이유가 무엇이든 클라이언트에 빈 채로 도착하면 본문을 로드한다.
|
|
23
|
+
|
|
20
24
|
## 브랜드 아이콘
|
|
21
25
|
|
|
22
26
|
모든 제품의 아이콘 파일은 `@devslab/linq-brand`(`dist/<product>/`)에서 온다. `brandIconLinks()`는 그중 어떤 파일을 페이지 head가 어떤 순서로 링크하는지 정하는 유일한 자리다.
|
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@ still references the verified-fact registry. `buildRobots` keeps its legacy
|
|
|
17
17
|
environment-only output, while an optional `policies` object can independently
|
|
18
18
|
control search indexing, citation crawlers, and model-training crawlers.
|
|
19
19
|
|
|
20
|
+
## Hydration
|
|
21
|
+
|
|
22
|
+
`MarketingShell` reads `header` and `footer` once (a memo) before it renders anything. `header={{ … }}` compiles to a getter; if the shell re-read it per prop, any JSX built eagerly inside the literal (an `actions` anchor, a logo) would be built again on each read and consume hydration keys — a different number of times on the server than in the browser — and the client would rebuild the header from templates. A product that mounts `SiteHeader` or `SiteFooter` directly, outside the shell, has to read its own props once the same way. The flag sprite loads its bodies whenever it reaches the client empty, whatever the reason.
|
|
23
|
+
|
|
20
24
|
## Brand icons
|
|
21
25
|
|
|
22
26
|
Every product's icon files come from `@devslab/linq-brand` (`dist/<product>/`); `brandIconLinks()` is the one place that says which of them a page head links, and in what order:
|
package/dist/layouts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ButtonTone } from "@devslab/dds-solid";
|
|
2
|
-
import type
|
|
2
|
+
import { type JSX } from "solid-js";
|
|
3
3
|
import { type SiteFooterProps, type SiteHeaderProps } from "./chrome";
|
|
4
4
|
import type { SiteMessages } from "./types";
|
|
5
5
|
export interface MarketingShellProps {
|
package/dist/layouts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layouts.d.ts","sourceRoot":"","sources":["../src/solid/layouts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"layouts.d.ts","sourceRoot":"","sources":["../src/solid/layouts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAA0B,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAC9F,OAAO,KA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;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE;AAC3H,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAElD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-menu.d.ts","sourceRoot":"","sources":["../src/solid/locale-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"locale-menu.d.ts","sourceRoot":"","sources":["../src/solid/locale-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAEzD,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG3F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CACnC;AAiKD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAEhD"}
|
package/dist/solid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { className as e, createComponent as t, delegateEvents as n, effect as r, getNextElement as i, getNextMarker as a, insert as o, memo as s, mergeProps as c, runHydrationEvents as l, setAttribute as u, setProperty as d, spread as f, template as p, use as m } from "solid-js/web";
|
|
2
|
-
import { For as h, Show as g,
|
|
2
|
+
import { For as h, Show as g, createMemo as _, createSignal as v, createUniqueId as y, onMount as b } from "solid-js";
|
|
3
3
|
import { Button as x, Field as S, Icon as C, IconButton as w } from "@devslab/dds-solid";
|
|
4
4
|
//#region src/core/locales.mjs
|
|
5
5
|
var T = Object.freeze([
|
|
@@ -235,7 +235,7 @@ function U(e) {
|
|
|
235
235
|
})() : (() => {
|
|
236
236
|
var t = i(L);
|
|
237
237
|
return m((t) => {
|
|
238
|
-
|
|
238
|
+
t.childElementCount > 0 || ne().then((n) => {
|
|
239
239
|
t.innerHTML = H(e.countries, n, e.uid);
|
|
240
240
|
});
|
|
241
241
|
}, t), t;
|
|
@@ -280,26 +280,26 @@ function G(e) {
|
|
|
280
280
|
})();
|
|
281
281
|
}
|
|
282
282
|
function K(e) {
|
|
283
|
-
let n, s, c =
|
|
283
|
+
let n, s, c = y(), d = () => B(e), f = () => [...new Set(d().LOCALES.map((e) => I(e.code, d())))], p = () => d().LOCALES.find((t) => t.code === e.state.locale), g = () => {
|
|
284
284
|
n && (n.open = !1);
|
|
285
285
|
}, _ = (e) => {
|
|
286
286
|
e.key !== "Escape" || !n?.open || (e.preventDefault(), g(), s?.focus());
|
|
287
|
-
},
|
|
287
|
+
}, v = () => {
|
|
288
288
|
let t = p()?.nativeName;
|
|
289
289
|
return t ? `${e.messages.localeLabel}: ${t}` : e.messages.localeLabel;
|
|
290
290
|
};
|
|
291
291
|
return (() => {
|
|
292
|
-
var p = i(ie),
|
|
292
|
+
var p = i(ie), y = p.firstChild, b = y.firstChild, [x, S] = a(b.nextSibling), C = x.nextSibling, [w, T] = a(C.nextSibling), E = y.nextSibling;
|
|
293
293
|
p.$$keydown = _;
|
|
294
294
|
var D = n;
|
|
295
295
|
typeof D == "function" ? m(D, p) : n = p;
|
|
296
296
|
var O = s;
|
|
297
|
-
return typeof O == "function" ? m(O,
|
|
297
|
+
return typeof O == "function" ? m(O, y) : s = y, o(y, t(U, {
|
|
298
298
|
get countries() {
|
|
299
299
|
return f();
|
|
300
300
|
},
|
|
301
301
|
uid: c
|
|
302
|
-
}), x, S), o(
|
|
302
|
+
}), x, S), o(y, t(W, {
|
|
303
303
|
get locale() {
|
|
304
304
|
return e.state.locale;
|
|
305
305
|
},
|
|
@@ -337,8 +337,8 @@ function K(e) {
|
|
|
337
337
|
}), l(), s;
|
|
338
338
|
})()
|
|
339
339
|
})), r((t) => {
|
|
340
|
-
var n =
|
|
341
|
-
return n !== t.e && u(
|
|
340
|
+
var n = v(), r = e.messages.localeLabel;
|
|
341
|
+
return n !== t.e && u(y, "aria-label", t.e = n), r !== t.t && u(y, "title", t.t = r), t;
|
|
342
342
|
}, {
|
|
343
343
|
e: void 0,
|
|
344
344
|
t: void 0
|
|
@@ -357,13 +357,13 @@ function Y(e) {
|
|
|
357
357
|
"system",
|
|
358
358
|
"light",
|
|
359
359
|
"dark"
|
|
360
|
-
], [r, i] =
|
|
360
|
+
], [r, i] = v(e.defaultValue ?? "system"), [a, o] = v("light"), s = () => a() === "dark" ? "light" : "dark", c = () => s() === "dark" ? e.messages.themeDark : e.messages.themeLight, l = (e) => {
|
|
361
361
|
let t = e === "system" ? matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
|
|
362
362
|
o(t), document.documentElement.dataset.theme = t, document.documentElement.dataset.themePreference = e;
|
|
363
363
|
}, u = (t) => {
|
|
364
364
|
e.value === void 0 && i(t), e.onValueChange?.(t), l(t), localStorage.setItem(e.storageKey ?? "site-theme", t);
|
|
365
365
|
};
|
|
366
|
-
return
|
|
366
|
+
return b(() => {
|
|
367
367
|
let t = localStorage.getItem(e.storageKey ?? "site-theme");
|
|
368
368
|
e.value === void 0 && t && n.includes(t) && i(t), l(e.value ?? t ?? r());
|
|
369
369
|
}), t(w, {
|
|
@@ -391,7 +391,7 @@ function Y(e) {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
function X(e) {
|
|
394
|
-
let [n, l] =
|
|
394
|
+
let [n, l] = v(!1);
|
|
395
395
|
return (() => {
|
|
396
396
|
var d = i(se), f = d.firstChild, p = f.nextSibling, m = p.firstChild, g = m.firstChild, [_, v] = a(g.nextSibling), y = _.nextSibling, [b, S] = a(y.nextSibling), C = m.nextSibling, [w, T] = a(C.nextSibling), E = w.nextSibling, D = E.firstChild, O = E.nextSibling, k = O.firstChild, [A, j] = a(k.nextSibling), ee = A.nextSibling, [M, N] = a(ee.nextSibling), P = M.nextSibling, [F, I] = a(P.nextSibling);
|
|
397
397
|
return o(f, () => e.messages.skipToContent), o(m, () => e.brand.logo, _, v), o(m, () => e.brand.name, b, S), o(p, t(x, {
|
|
@@ -543,10 +543,10 @@ n(["keydown", "click"]);
|
|
|
543
543
|
//#region src/solid/layouts.tsx
|
|
544
544
|
var he = /*#__PURE__*/ p("<div class=site-shell><!$><!/><main id=main-content tabindex=-1></main><!$><!/>"), ge = /*#__PURE__*/ p("<article class=site-legal><header><h1></h1><p><!$><!/>: <time></time></p></header><!$><!/>"), _e = /*#__PURE__*/ p("<section><strong></strong><!$><!/><!$><!/>"), ve = /*#__PURE__*/ p("<div>"), ye = /*#__PURE__*/ p("<main class=\"site-main site-centered-layout\"><h1></h1><p></p><!$><!/><a class=\"dds-btn dds-btn--primary\">"), be = /*#__PURE__*/ p("<main class=\"site-main site-centered-layout\"><h1></h1><p></p><!$><!/><!$><!/><!$><!/>"), xe = /*#__PURE__*/ p("<code>");
|
|
545
545
|
function Se(n) {
|
|
546
|
-
let s = () => n.mainWidth === "bleed" ? "site-main site-main--bleed" : "site-main";
|
|
546
|
+
let s = () => n.mainWidth === "bleed" ? "site-main site-main--bleed" : "site-main", l = _(() => n.header), u = _(() => n.footer);
|
|
547
547
|
return (() => {
|
|
548
|
-
var
|
|
549
|
-
return o(
|
|
548
|
+
var d = i(he), f = d.firstChild, [p, m] = a(f.nextSibling), h = p.nextSibling, g = h.nextSibling, [_, v] = a(g.nextSibling);
|
|
549
|
+
return o(d, t(X, c(l)), p, m), o(h, () => n.children), o(d, t(Z, c(u)), _, v), r(() => e(h, s())), d;
|
|
550
550
|
})();
|
|
551
551
|
}
|
|
552
552
|
function Ce(e) {
|
|
@@ -556,15 +556,16 @@ function Ce(e) {
|
|
|
556
556
|
})();
|
|
557
557
|
}
|
|
558
558
|
function we(n) {
|
|
559
|
+
let c = _(() => n.children);
|
|
559
560
|
return (() => {
|
|
560
|
-
var
|
|
561
|
-
return o(
|
|
562
|
-
var e = s(() => !!
|
|
561
|
+
var l = i(_e), d = l.firstChild, f = d.nextSibling, [p, m] = a(f.nextSibling), h = p.nextSibling, [g, _] = a(h.nextSibling);
|
|
562
|
+
return o(d, () => n.title), o(l, (() => {
|
|
563
|
+
var e = s(() => !!c());
|
|
563
564
|
return () => e() && (() => {
|
|
564
565
|
var e = i(ve);
|
|
565
|
-
return o(e,
|
|
566
|
+
return o(e, c), e;
|
|
566
567
|
})();
|
|
567
|
-
})(),
|
|
568
|
+
})(), p, m), o(l, (() => {
|
|
568
569
|
var e = s(() => !!n.action);
|
|
569
570
|
return () => e() && t(x, {
|
|
570
571
|
get tone() {
|
|
@@ -577,14 +578,14 @@ function we(n) {
|
|
|
577
578
|
return n.action.label;
|
|
578
579
|
}
|
|
579
580
|
});
|
|
580
|
-
})(),
|
|
581
|
+
})(), g, _), r((t) => {
|
|
581
582
|
var r = `site-status site-status--${n.tone}`, i = n.tone === "danger" ? "alert" : "status", a = n.tone === "danger" ? "assertive" : "polite";
|
|
582
|
-
return r !== t.e && e(
|
|
583
|
+
return r !== t.e && e(l, t.e = r), i !== t.t && u(l, "role", t.t = i), a !== t.a && u(l, "aria-live", t.a = a), t;
|
|
583
584
|
}, {
|
|
584
585
|
e: void 0,
|
|
585
586
|
t: void 0,
|
|
586
587
|
a: void 0
|
|
587
|
-
}),
|
|
588
|
+
}), l;
|
|
588
589
|
})();
|
|
589
590
|
}
|
|
590
591
|
function Te(e) {
|
|
@@ -617,7 +618,7 @@ function Ee(e) {
|
|
|
617
618
|
//#region src/solid/request-access.tsx
|
|
618
619
|
var De = /*#__PURE__*/ p("<form><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><div aria-live=polite aria-atomic=true>"), Q = /*#__PURE__*/ p("<input>"), Oe = /*#__PURE__*/ p("<textarea>");
|
|
619
620
|
function ke(n) {
|
|
620
|
-
let [u, d] =
|
|
621
|
+
let [u, d] = v("idle"), p = async (e) => {
|
|
621
622
|
if (e.preventDefault(), u() !== "submitting") {
|
|
622
623
|
d("submitting");
|
|
623
624
|
try {
|