open-grid 1.3.1 → 1.5.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 (67) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.ja.md +462 -0
  3. package/README.md +70 -19
  4. package/README.zh.md +455 -0
  5. package/dist/{OpenGrid-B7m7ei7f.cjs → OpenGrid-CT9bV6On.cjs} +7 -7
  6. package/dist/OpenGrid-CT9bV6On.cjs.map +1 -0
  7. package/dist/{OpenGrid-CeUdO_fM.js → OpenGrid-DACnZdEy.js} +7 -7
  8. package/dist/OpenGrid-DACnZdEy.js.map +1 -0
  9. package/dist/Registry-CPJYOqCn.js +74 -0
  10. package/dist/Registry-CPJYOqCn.js.map +1 -0
  11. package/dist/Registry-D74ZmdDz.cjs +71 -0
  12. package/dist/Registry-D74ZmdDz.cjs.map +1 -0
  13. package/dist/{index-JjfWY3Bt.cjs → index-Brfso4Ry.cjs} +92 -160
  14. package/dist/index-Brfso4Ry.cjs.map +1 -0
  15. package/dist/index-CeJ-0-80.cjs.map +1 -0
  16. package/dist/index-DnarQ4eR.js.map +1 -0
  17. package/dist/index-al9Mbv3E.js +481 -0
  18. package/dist/index-al9Mbv3E.js.map +1 -0
  19. package/dist/open-grid-base.css +98 -35
  20. package/dist/open-grid-header.cjs +188 -0
  21. package/dist/open-grid-header.cjs.map +1 -0
  22. package/dist/open-grid-header.css +386 -0
  23. package/dist/open-grid-header.js +197 -0
  24. package/dist/open-grid-header.js.map +1 -0
  25. package/dist/open-grid-react.cjs +1 -1
  26. package/dist/open-grid-react.cjs.map +1 -0
  27. package/dist/open-grid-react.js +1 -1
  28. package/dist/open-grid-react.js.map +1 -0
  29. package/dist/open-grid-themes.css +774 -1
  30. package/dist/open-grid-typography.cjs +97 -0
  31. package/dist/open-grid-typography.cjs.map +1 -0
  32. package/dist/open-grid-typography.css +181 -0
  33. package/dist/open-grid-typography.js +105 -0
  34. package/dist/open-grid-typography.js.map +1 -0
  35. package/dist/open-grid-vue.cjs +1 -1
  36. package/dist/open-grid-vue.cjs.map +1 -0
  37. package/dist/open-grid-vue.js +1 -1
  38. package/dist/open-grid-vue.js.map +1 -0
  39. package/dist/open-grid.cjs +31 -31
  40. package/dist/open-grid.cjs.map +1 -0
  41. package/dist/open-grid.js +86 -82
  42. package/dist/open-grid.js.map +1 -0
  43. package/dist/types/core/FilterSelect.d.ts +269 -33
  44. package/dist/types/core/GridShuttle.d.ts +160 -24
  45. package/dist/types/core/IconRegistry.d.ts +241 -33
  46. package/dist/types/core/OpenGrid.d.ts +2589 -327
  47. package/dist/types/core/OrgChart.d.ts +249 -32
  48. package/dist/types/core/SkinRegistry.d.ts +295 -60
  49. package/dist/types/core/XmlConverter.d.ts +388 -47
  50. package/dist/types/core/appearance/AppearanceAxis.d.ts +1 -1
  51. package/dist/types/core/appearance/HeaderRegistry.d.ts +236 -0
  52. package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +1 -1
  53. package/dist/types/core/appearance/TypographyRegistry.d.ts +122 -0
  54. package/dist/types/core/appearance/index.d.ts +1 -0
  55. package/dist/types/core/chart/types.d.ts +1008 -126
  56. package/dist/types/core/extension/Registry.d.ts +389 -51
  57. package/dist/types/core/extension/reserved.d.ts +34 -5
  58. package/dist/types/core/i18n/LocaleRegistry.d.ts +271 -54
  59. package/dist/types/core/i18n/types.d.ts +636 -85
  60. package/dist/types/core/types.d.ts +3576 -426
  61. package/dist/types/header/index.d.ts +144 -0
  62. package/dist/types/index.d.ts +226 -17
  63. package/dist/types/typography/index.d.ts +128 -0
  64. package/dist/xlsx.min-BQ1o3sB6.cjs.map +1 -0
  65. package/dist/xlsx.min-Bbz2ZypC.js.map +1 -0
  66. package/package.json +126 -112
  67. package/dist/index-DrCPRuYi.js +0 -548
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const DEFAULT_AXIS_VALUE = "default", EMPTY_RESOLUTION = Object.freeze({ tokens: Object.freeze({}) });
4
+ function assertNamespace(o, e, t) {
5
+ for (const n of Object.keys(t)) if (!e.has(n)) throw new Error(`[AppearanceAxis:${o}] 토큰 "${n}" 은 ${o} 축 이름공간이 아닙니다. 각 축은 자기 이름공간 토큰만 소유합니다(축 오염 금지 — 이름-분리 물리 직교, 불변식 1).`);
6
+ }
7
+ class TokenAxis {
8
+ constructor(e) {
9
+ this._values = /* @__PURE__ */ new Map(), this.id = e.id, this.namespace = e.namespace, this._attrName = e.attrName, this._requiresRelayout = e.requiresRelayout ?? false;
10
+ }
11
+ registerBuiltin(e, t) {
12
+ assertNamespace(this.id, this.namespace, t), this._values.set(e, this._guardrails(e, t).delta);
13
+ }
14
+ _guardrails(e, t) {
15
+ return { delta: t, warnings: [] };
16
+ }
17
+ define(e, t) {
18
+ assertNamespace(this.id, this.namespace, t);
19
+ const n = this._guardrails(e, t);
20
+ this._values.set(e, n.delta);
21
+ for (const a of n.warnings) typeof console < "u" && console.warn(`[AppearanceAxis:${this.id}] "${e}": ${a}`);
22
+ return n;
23
+ }
24
+ has(e) {
25
+ return this._values.has(e);
26
+ }
27
+ resolve(e) {
28
+ if (e === DEFAULT_AXIS_VALUE) return EMPTY_RESOLUTION;
29
+ const t = this._values.get(e);
30
+ if (t === void 0) return EMPTY_RESOLUTION;
31
+ const n = { tokens: t, attr: { name: this._attrName, value: e } };
32
+ return this._requiresRelayout && (n.requiresRelayout = true), n;
33
+ }
34
+ list() {
35
+ return [...this._values.keys()];
36
+ }
37
+ }
38
+ const TYPOGRAPHY_TOKENS = /* @__PURE__ */ new Set(["--og-font-family", "--og-font-weight", "--og-letter-spacing", "--og-header-font-family", "--og-header-font-weight", "--og-header-letter-spacing", "--og-font-variant-numeric", "--og-num-font-family", "--og-prose-line-height"]), TYPOGRAPHY_ATTR = "data-og-typography", FAMILY_TOKENS = ["--og-font-family", "--og-header-font-family", "--og-num-font-family"], TRACKING_TOKENS = ["--og-letter-spacing", "--og-header-letter-spacing"], WEBFONT_RE = /url\s*\(|@font-face/i, CJK_FONT_RE = /(hangul|gothic|myeongjo|batang|dotum|gulim|malgun|pretendard|nanum|d2coding|noto\s*sans\s*(kr|jp|sc|tc|cjk)|source\s*han|apple\s*sd|hiragino|yu\s*gothic|meiryo|ms\s*(p?)(gothic|mincho)|yahei|pingfang|jhenghei|simsun|songti|cjk)|[가-힣぀-ヿ一-鿿]/i;
39
+ function guessOwnerAxis(o) {
40
+ return o === "--og-font-size" || o === "--og-line-height" || o.startsWith("--og-density-") ? "밀도(data-og-density) — 행높이·글자크기는 밀도가 소유합니다(§9.1 밀도-타이포 동조 계약)" : o.startsWith("--og-texture-") ? "질감(data-og-texture)" : /^--og-(radius|border|elevation|focus|cell-padding|divider|scrollbar|icon|transition|container-radius|row-accent)/.test(o) ? "형태(data-og-skin)" : "색(data-og-theme) 또는 미등록 토큰";
41
+ }
42
+ function assertTypographyOnly(o, e) {
43
+ for (const t of Object.keys(e)) if (!TYPOGRAPHY_TOKENS.has(t)) throw new Error(`[TypographyRegistry] 타이포 "${o}" 의 토큰 "${t}" 은 타이포 축 이름공간이 아닙니다. 이 토큰은 ${guessOwnerAxis(t)} 소유입니다. 타이포(서체) 델타는 서체·웨이트·자간·숫자 변형만 담을 수 있습니다(축 오염 금지, 불변식 1).`);
44
+ }
45
+ class TypographyRegistry extends TokenAxis {
46
+ constructor() {
47
+ super({ id: "typography", attrName: TYPOGRAPHY_ATTR, namespace: TYPOGRAPHY_TOKENS });
48
+ }
49
+ registerBuiltin(e, t) {
50
+ assertTypographyOnly(e, t), super.registerBuiltin(e, t);
51
+ }
52
+ define(e, t) {
53
+ return assertTypographyOnly(e, t), super.define(e, t);
54
+ }
55
+ _guardrails(e, t) {
56
+ const n = { ...t }, a = [];
57
+ for (const r of FAMILY_TOKENS) {
58
+ const i = n[r];
59
+ if (i != null && WEBFONT_RE.test(String(i))) throw new Error(`[TypographyRegistry] 타이포 "${e}" 토큰 "${r}" 에 웹폰트 선언(url()/@font-face)이 있습니다. 타이포 축은 시스템에 이미 있는 서체를 고르는 일만 소유하며 폰트를 내려받지 않습니다(제로 의존성·무다운로드 보증). 서체 이름만 스택으로 나열하세요.`);
60
+ }
61
+ const s = FAMILY_TOKENS.map((r) => n[r] ?? "").join(",");
62
+ if (CJK_FONT_RE.test(s)) for (const r of TRACKING_TOKENS) {
63
+ const i = n[r];
64
+ if (i == null) continue;
65
+ const c = parseFloat(String(i));
66
+ !Number.isNaN(c) && c < 0 && (n[r] = "normal", a.push(`${r} ${i} → normal (음수 자간은 한글 음절을 뭉갠다 — 서체 스택에 CJK 폴백이 있습니다, SPEC §2.4)`));
67
+ }
68
+ return { delta: n, warnings: a };
69
+ }
70
+ }
71
+ const TYPOGRAPHY_UI = { "--og-font-family": 'Inter, "Inter Variable", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Nanum Gothic", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Microsoft YaHei", "PingFang SC", sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.014em", "--og-font-variant-numeric": "tabular-nums" }, TYPOGRAPHY_LEDGER = { "--og-font-family": '"IBM Plex Sans", "Source Sans 3", "Source Sans Pro", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif', "--og-num-font-family": '"IBM Plex Mono", "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "700", "--og-header-letter-spacing": "0.02em", "--og-font-variant-numeric": "tabular-nums slashed-zero" }, TYPOGRAPHY_TERMINAL = { "--og-font-family": '"JetBrains Mono", "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "DejaVu Sans Mono", D2Coding, "D2Coding ligature", "Nanum Gothic Coding", "Noto Sans Mono CJK KR", "Noto Sans Mono CJK JP", monospace', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.01em", "--og-font-variant-numeric": "tabular-nums slashed-zero" }, TYPOGRAPHY_DENSE_SCAN = { "--og-font-family": 'Inter, "Inter Variable", "Segoe UI Variable Small", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif', "--og-font-weight": "430", "--og-letter-spacing": "0.01em", "--og-header-font-weight": "640", "--og-header-letter-spacing": "0.028em", "--og-font-variant-numeric": "tabular-nums" }, TYPOGRAPHY_HUMANIST = { "--og-font-family": 'Verdana, Tahoma, "DejaVu Sans", "Bitstream Vera Sans", "Lucida Grande", "Segoe UI", system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Nanum Gothic", sans-serif', "--og-header-font-family": '"Segoe UI", system-ui, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.02em", "--og-font-variant-numeric": "tabular-nums", "--og-prose-line-height": "1.55" }, TYPOGRAPHY_HANGUL_FIRST = { "--og-font-family": 'Pretendard, "Pretendard Variable", "Pretendard JP", "Apple SD Gothic Neo", "Noto Sans KR", "Source Han Sans KR", "Malgun Gothic", "맑은 고딕", "Nanum Gothic", Dotum, 돋움, system-ui, sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0", "--og-font-variant-numeric": "tabular-nums" }, TYPOGRAPHY_CJK_DOC = { "--og-font-family": '"Noto Sans CJK KR", "Noto Sans KR", "Source Han Sans KR", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0", "--og-font-variant-numeric": "tabular-nums" }, BUILTIN_TYPOGRAPHIES = [["ui", TYPOGRAPHY_UI], ["ledger", TYPOGRAPHY_LEDGER], ["terminal", TYPOGRAPHY_TERMINAL], ["dense-scan", TYPOGRAPHY_DENSE_SCAN], ["humanist", TYPOGRAPHY_HUMANIST], ["hangul-first", TYPOGRAPHY_HANGUL_FIRST], ["cjk-doc", TYPOGRAPHY_CJK_DOC]], typographyRegistry = new TypographyRegistry();
72
+ for (const [o, e] of BUILTIN_TYPOGRAPHIES) typographyRegistry.registerBuiltin(o, e);
73
+ const TYPOGRAPHY_PRESETS = Object.freeze(Object.fromEntries(BUILTIN_TYPOGRAPHIES.map(([o, e]) => [o, e])));
74
+ function isElementTarget(o) {
75
+ const e = o;
76
+ return !!e && typeof e == "object" && typeof e.setAttribute == "function" && typeof e.removeAttribute == "function" && e.style != null;
77
+ }
78
+ function applyTypography(o, e) {
79
+ const t = typographyRegistry.resolve(e), n = [];
80
+ if (e !== "default" && !typographyRegistry.has(e) && n.push(`타이포 프리셋 "${e}" 는 등록되어 있지 않습니다 — default(축 해제)로 처리했습니다. 등록된 id: ${typographyRegistry.list().join(", ")} (사용자 정의는 defineTypography()).`), isElementTarget(o)) {
81
+ for (const s of TYPOGRAPHY_TOKENS) o.style.removeProperty(s);
82
+ return t.attr ? o.setAttribute(t.attr.name, t.attr.value) : o.removeAttribute(TYPOGRAPHY_ATTR), { mode: "element", warnings: n };
83
+ }
84
+ const a = o;
85
+ if (!a || typeof a.setThemeVar != "function") throw new Error("[typography] applyTypography(target, id): target 은 그리드 컨테이너 요소(HTMLElement) 또는 setThemeVar() 를 가진 그리드 인스턴스여야 합니다.");
86
+ for (const s of TYPOGRAPHY_TOKENS) a.setThemeVar(s, "");
87
+ for (const [s, g] of Object.entries(t.tokens)) a.setThemeVar(s, g);
88
+ return t.attr && n.push(`그리드 인스턴스 경로는 CSS 변수만 주입합니다 — ${TYPOGRAPHY_ATTR} 속성은 붙지 않습니다. OpenGrid 가 컨테이너 요소를 돌려주는 공개 접근자를 제공하지 않기 때문입니다. 그래서 밀도 복합 셀렉터(광학 크기)와 cjk-doc 의 :lang() 한자 분기는 적용되지 않습니다. 완전 적용하려면 컨테이너 요소(.og-container)를 직접 넘기세요.`), { mode: "grid-vars", warnings: n };
89
+ }
90
+ function defineTypography(o, e) {
91
+ return typographyRegistry.define(o, e);
92
+ }
93
+ function listTypography() {
94
+ return typographyRegistry.list();
95
+ }
96
+ exports.TYPOGRAPHY_ATTR = TYPOGRAPHY_ATTR, exports.TYPOGRAPHY_PRESETS = TYPOGRAPHY_PRESETS, exports.TYPOGRAPHY_TOKENS = TYPOGRAPHY_TOKENS, exports.TypographyRegistry = TypographyRegistry, exports.applyTypography = applyTypography, exports.assertTypographyOnly = assertTypographyOnly, exports.defineTypography = defineTypography, exports.listTypography = listTypography, exports.typographyRegistry = typographyRegistry;
97
+ //# sourceMappingURL=open-grid-typography.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-grid-typography.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,181 @@
1
+ /* ============================================================
2
+ OPEN_GRID — 타이포그래피(TYPE 축) 정의 [제5축]
3
+ 사용법: <div data-og-typography="ui"> 또는 플러그인 applyTypography(grid, 'ui')
4
+ ------------------------------------------------------------
5
+ 색⊥형태⊥밀도⊥타이포 직교성: 이 파일은 **서체(TYPE) 토큰만** 담는다 — 색(hex/rgb/hsl) 0.
6
+ themes.css 는 COLOR 전용, skins.css 는 FORM 전용, 이 파일은 TYPE 전용이다.
7
+ 네 축은 disjoint name set 이라 어떤 조합도 서로를 흔들지 않는다.
8
+
9
+ 소유 토큰(9): --og-font-family / --og-font-weight / --og-letter-spacing /
10
+ --og-header-font-family / --og-header-font-weight / --og-header-letter-spacing /
11
+ --og-font-variant-numeric / --og-num-font-family / --og-prose-line-height
12
+ ⚠ --og-font-size 와 --og-line-height 는 **밀도 축 소유**다. 이 파일은 절대 쓰지 않는다
13
+ ("밀도-타이포 동조" 계약 — 글자 크기와 행 높이는 한 축이 함께 쥐어야 어긋나지 않는다).
14
+ 광학 크기 보정이 필요할 때는 밀도 축을 **읽기만** 한다(복합 셀렉터, dense-scan 참고).
15
+
16
+ ⛔ 웹폰트를 내려받지 않는다. @font-face 선언 0, CDN 0, url() 0.
17
+ 시스템에 이미 있는 서체만 기회적으로 잡아 쓰고, 없으면 우아하게 내려앉는다.
18
+ 제로 의존성 라이브러리의 약속을 타이포 축이 깨지 않는다 — 이 파일을 로드해도
19
+ 네트워크 요청은 한 건도 늘지 않는다.
20
+
21
+ ⚠ DEFAULT(축 미지정 / data-og-typography="default")는 **오늘과 byte-identical**:
22
+ 이 파일은 named 프리셋에만 토큰을 선언하고 default 는 선언하지 않는다 →
23
+ 토큰 미정의 → base.css 의 var() 폴백(오늘 값과 동일)이 그대로 적용된다.
24
+
25
+ ⚠ 이 파일만으로는 아무 일도 일어나지 않는다. 실제 소비는 base.css 가 한다
26
+ (.og-container 의 font-weight/letter-spacing/font-variant-numeric,
27
+ .og-header-cell 의 font-family, .og-cell-number 의 font-family).
28
+ base.css 가 host isolation 때문에 그 속성들을 하드코딩하고 있었으므로,
29
+ "기본값이 오늘 값과 같은 var()" 로 바꿔 격리는 지키고 축은 살렸다.
30
+
31
+ 셀렉터 주의: OpenGrid 는 data-og-typography 를 .og-container 자기 자신에 붙인다.
32
+ 따라서 커스텀 프로퍼티는 **속성 셀렉터 [data-og-typography="X"]**(컴파운드 아님)로
33
+ 선언해 컨테이너 자신과 분리 UI(컨텍스트 메뉴 등) 모두에 토큰이 걸리게 한다.
34
+ ============================================================ */
35
+
36
+ /* ── ① default — 시스템 기본. 빈 델타. ──
37
+ 플러그인을 로드했지만 고르지 않은 상태. 속성 자체를 붙이지 않는 것이 계약이므로
38
+ 여기에 선언을 두지 않는다. 기존 base.css 스택이 그대로 유효 = 하위호환 보증. */
39
+
40
+ /* ── ② ui — UI 그로테스크 (권장 기본) ── */
41
+ [data-og-typography="ui"] {
42
+ --og-font-family:
43
+ Inter, "Inter Variable", "Inter var",
44
+ -apple-system, BlinkMacSystemFont,
45
+ "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial,
46
+ Pretendard, "Pretendard Variable",
47
+ "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕",
48
+ "Noto Sans KR", "Nanum Gothic",
49
+ "Hiragino Sans", "Yu Gothic UI", Meiryo,
50
+ "Microsoft YaHei", "PingFang SC",
51
+ sans-serif;
52
+ --og-font-weight: 400;
53
+ --og-letter-spacing: normal;
54
+ --og-header-font-weight: 600;
55
+ --og-header-letter-spacing: 0.014em; /* 0.025em → 한글 헤더가 벌어지던 결함 교정 */
56
+ --og-font-variant-numeric: tabular-nums;
57
+ }
58
+
59
+ /* ── ③ ledger — 회계 원장 ── */
60
+ [data-og-typography="ledger"] {
61
+ --og-font-family:
62
+ "IBM Plex Sans", "Source Sans 3", "Source Sans Pro",
63
+ Inter, "Segoe UI Variable Text", "Segoe UI", system-ui,
64
+ Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕",
65
+ "Noto Sans KR", sans-serif;
66
+ --og-num-font-family:
67
+ "IBM Plex Mono", "SF Mono", "Cascadia Mono", "Roboto Mono",
68
+ Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
69
+ --og-font-weight: 400;
70
+ --og-letter-spacing: normal;
71
+ --og-header-font-weight: 700;
72
+ --og-header-letter-spacing: 0.02em;
73
+ --og-font-variant-numeric: tabular-nums slashed-zero; /* 0↔O, 0↔8 오독 차단 */
74
+ }
75
+
76
+ /* ── ④ terminal — 터미널 / 코드 ── */
77
+ [data-og-typography="terminal"] {
78
+ --og-font-family:
79
+ "JetBrains Mono", "Cascadia Code", "Cascadia Mono", "SF Mono",
80
+ Menlo, Monaco, Consolas, "Liberation Mono", "DejaVu Sans Mono",
81
+ D2Coding, "D2Coding ligature", "Nanum Gothic Coding",
82
+ "Noto Sans Mono CJK KR", "Noto Sans Mono CJK JP",
83
+ monospace;
84
+ --og-font-weight: 400;
85
+ --og-letter-spacing: normal; /* 음수 금지 — D2Coding 한글 음절이 겹친다 */
86
+ --og-header-font-weight: 600;
87
+ --og-header-letter-spacing: 0.01em;
88
+ --og-font-variant-numeric: tabular-nums slashed-zero;
89
+ }
90
+
91
+ /* ── ⑤ dense-scan — 고밀도 스캔 (compact 밀도의 짝) ── */
92
+ [data-og-typography="dense-scan"] {
93
+ --og-font-family:
94
+ Inter, "Inter Variable",
95
+ "Segoe UI Variable Small", "Segoe UI", system-ui,
96
+ -apple-system, BlinkMacSystemFont, Roboto,
97
+ Pretendard, "Pretendard Variable",
98
+ "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR",
99
+ sans-serif;
100
+ --og-font-weight: 430;
101
+ --og-letter-spacing: 0.01em;
102
+ --og-header-font-weight: 640;
103
+ --og-header-letter-spacing: 0.028em;
104
+ --og-font-variant-numeric: tabular-nums;
105
+ }
106
+ /* 광학 크기 — 밀도 축을 **읽기만** 한다(소유하지 않는다). 작을수록 벌리고 굵힌다. */
107
+ [data-og-typography="dense-scan"][data-og-density="compact"],
108
+ [data-og-typography="dense-scan"][data-og-density="compact-touch"] {
109
+ --og-font-weight: 460;
110
+ --og-letter-spacing: 0.014em;
111
+ --og-header-letter-spacing: 0.034em;
112
+ }
113
+ [data-og-typography="dense-scan"][data-og-density="spacious"],
114
+ [data-og-typography="dense-scan"][data-og-density="gallery"] {
115
+ --og-font-weight: 400;
116
+ --og-letter-spacing: 0.002em;
117
+ --og-header-letter-spacing: 0.018em;
118
+ }
119
+
120
+ /* ── ⑥ humanist — 휴머니스트 (장시간·저시력) ── */
121
+ [data-og-typography="humanist"] {
122
+ --og-font-family:
123
+ Verdana, Tahoma, "DejaVu Sans", "Bitstream Vera Sans",
124
+ "Lucida Grande", "Segoe UI", system-ui,
125
+ "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕",
126
+ "Noto Sans KR", "Nanum Gothic", sans-serif;
127
+ /* 8종 중 유일하게 헤더 서체를 따로 쓴다 — "헤더는 데이터가 아니다"를 서체로 선언 */
128
+ --og-header-font-family:
129
+ "Segoe UI", system-ui, -apple-system,
130
+ "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
131
+ --og-font-weight: 400;
132
+ --og-letter-spacing: normal;
133
+ --og-header-font-weight: 600;
134
+ --og-header-letter-spacing: 0.02em;
135
+ --og-font-variant-numeric: tabular-nums;
136
+ --og-prose-line-height: 1.55;
137
+ }
138
+
139
+ /* ── ⑦ hangul-first — 한글 우선 ── */
140
+ [data-og-typography="hangul-first"] {
141
+ --og-font-family:
142
+ Pretendard, "Pretendard Variable", "Pretendard JP",
143
+ "Apple SD Gothic Neo",
144
+ "Noto Sans KR", "Source Han Sans KR",
145
+ "Malgun Gothic", "맑은 고딕", "Nanum Gothic", Dotum, 돋움,
146
+ system-ui, sans-serif;
147
+ --og-font-weight: 400;
148
+ --og-letter-spacing: normal; /* 고정 — 음수 자간은 한글을 뭉갠다 */
149
+ --og-header-font-weight: 600;
150
+ --og-header-letter-spacing: 0; /* 국문 헤더에 트래킹을 주지 않는다 */
151
+ --og-font-variant-numeric: tabular-nums;
152
+ }
153
+
154
+ /* ── ⑧ cjk-doc — CJK 문서 (한·일·중) ── */
155
+ [data-og-typography="cjk-doc"] {
156
+ --og-font-family:
157
+ "Noto Sans CJK KR", "Noto Sans KR", "Source Han Sans KR",
158
+ Pretendard, "Apple SD Gothic Neo", "Malgun Gothic",
159
+ "Hiragino Sans", "Yu Gothic UI", Meiryo,
160
+ "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", "PingFang TC",
161
+ system-ui, sans-serif;
162
+ --og-font-weight: 400;
163
+ --og-letter-spacing: normal;
164
+ --og-header-font-weight: 600;
165
+ --og-header-letter-spacing: 0;
166
+ --og-font-variant-numeric: tabular-nums;
167
+ }
168
+ /* 한자 통합(Han unification) — 直·骨·類 는 ko/ja/zh 에서 자형이 다르다.
169
+ 언어 태그가 있을 때만 갈라 그린다. lang 이 없으면 한국어 자형으로 통일된다(예측 가능한 실패). */
170
+ [data-og-typography="cjk-doc"] .og-cell:lang(ja),
171
+ [data-og-typography="cjk-doc"] .og-header-cell:lang(ja) {
172
+ font-family: "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif;
173
+ }
174
+ [data-og-typography="cjk-doc"] .og-cell:lang(zh-Hans),
175
+ [data-og-typography="cjk-doc"] .og-header-cell:lang(zh-Hans) {
176
+ font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
177
+ }
178
+ [data-og-typography="cjk-doc"] .og-cell:lang(zh-Hant),
179
+ [data-og-typography="cjk-doc"] .og-header-cell:lang(zh-Hant) {
180
+ font-family: "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
181
+ }
@@ -0,0 +1,105 @@
1
+ const T = "default", m = Object.freeze({ tokens: Object.freeze({}) });
2
+ function p(o, e, t) {
3
+ for (const n of Object.keys(t)) if (!e.has(n)) throw new Error(`[AppearanceAxis:${o}] 토큰 "${n}" 은 ${o} 축 이름공간이 아닙니다. 각 축은 자기 이름공간 토큰만 소유합니다(축 오염 금지 — 이름-분리 물리 직교, 불변식 1).`);
4
+ }
5
+ class P {
6
+ constructor(e) {
7
+ this._values = /* @__PURE__ */ new Map(), this.id = e.id, this.namespace = e.namespace, this._attrName = e.attrName, this._requiresRelayout = e.requiresRelayout ?? false;
8
+ }
9
+ registerBuiltin(e, t) {
10
+ p(this.id, this.namespace, t), this._values.set(e, this._guardrails(e, t).delta);
11
+ }
12
+ _guardrails(e, t) {
13
+ return { delta: t, warnings: [] };
14
+ }
15
+ define(e, t) {
16
+ p(this.id, this.namespace, t);
17
+ const n = this._guardrails(e, t);
18
+ this._values.set(e, n.delta);
19
+ for (const a of n.warnings) typeof console < "u" && console.warn(`[AppearanceAxis:${this.id}] "${e}": ${a}`);
20
+ return n;
21
+ }
22
+ has(e) {
23
+ return this._values.has(e);
24
+ }
25
+ resolve(e) {
26
+ if (e === T) return m;
27
+ const t = this._values.get(e);
28
+ if (t === void 0) return m;
29
+ const n = { tokens: t, attr: { name: this._attrName, value: e } };
30
+ return this._requiresRelayout && (n.requiresRelayout = true), n;
31
+ }
32
+ list() {
33
+ return [...this._values.keys()];
34
+ }
35
+ }
36
+ const c = /* @__PURE__ */ new Set(["--og-font-family", "--og-font-weight", "--og-letter-spacing", "--og-header-font-family", "--og-header-font-weight", "--og-header-letter-spacing", "--og-font-variant-numeric", "--og-num-font-family", "--og-prose-line-height"]), l = "data-og-typography", d = ["--og-font-family", "--og-header-font-family", "--og-num-font-family"], N = ["--og-letter-spacing", "--og-header-letter-spacing"], R = /url\s*\(|@font-face/i, A = /(hangul|gothic|myeongjo|batang|dotum|gulim|malgun|pretendard|nanum|d2coding|noto\s*sans\s*(kr|jp|sc|tc|cjk)|source\s*han|apple\s*sd|hiragino|yu\s*gothic|meiryo|ms\s*(p?)(gothic|mincho)|yahei|pingfang|jhenghei|simsun|songti|cjk)|[가-힣぀-ヿ一-鿿]/i;
37
+ function w(o) {
38
+ return o === "--og-font-size" || o === "--og-line-height" || o.startsWith("--og-density-") ? "밀도(data-og-density) — 행높이·글자크기는 밀도가 소유합니다(§9.1 밀도-타이포 동조 계약)" : o.startsWith("--og-texture-") ? "질감(data-og-texture)" : /^--og-(radius|border|elevation|focus|cell-padding|divider|scrollbar|icon|transition|container-radius|row-accent)/.test(o) ? "형태(data-og-skin)" : "색(data-og-theme) 또는 미등록 토큰";
39
+ }
40
+ function u(o, e) {
41
+ for (const t of Object.keys(e)) if (!c.has(t)) throw new Error(`[TypographyRegistry] 타이포 "${o}" 의 토큰 "${t}" 은 타이포 축 이름공간이 아닙니다. 이 토큰은 ${w(t)} 소유입니다. 타이포(서체) 델타는 서체·웨이트·자간·숫자 변형만 담을 수 있습니다(축 오염 금지, 불변식 1).`);
42
+ }
43
+ class y extends P {
44
+ constructor() {
45
+ super({ id: "typography", attrName: l, namespace: c });
46
+ }
47
+ registerBuiltin(e, t) {
48
+ u(e, t), super.registerBuiltin(e, t);
49
+ }
50
+ define(e, t) {
51
+ return u(e, t), super.define(e, t);
52
+ }
53
+ _guardrails(e, t) {
54
+ const n = { ...t }, a = [];
55
+ for (const r of d) {
56
+ const g = n[r];
57
+ if (g != null && R.test(String(g))) throw new Error(`[TypographyRegistry] 타이포 "${e}" 토큰 "${r}" 에 웹폰트 선언(url()/@font-face)이 있습니다. 타이포 축은 시스템에 이미 있는 서체를 고르는 일만 소유하며 폰트를 내려받지 않습니다(제로 의존성·무다운로드 보증). 서체 이름만 스택으로 나열하세요.`);
58
+ }
59
+ const s = d.map((r) => n[r] ?? "").join(",");
60
+ if (A.test(s)) for (const r of N) {
61
+ const g = n[r];
62
+ if (g == null) continue;
63
+ const h = parseFloat(String(g));
64
+ !Number.isNaN(h) && h < 0 && (n[r] = "normal", a.push(`${r} ${g} → normal (음수 자간은 한글 음절을 뭉갠다 — 서체 스택에 CJK 폴백이 있습니다, SPEC §2.4)`));
65
+ }
66
+ return { delta: n, warnings: a };
67
+ }
68
+ }
69
+ const M = { "--og-font-family": 'Inter, "Inter Variable", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Nanum Gothic", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Microsoft YaHei", "PingFang SC", sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.014em", "--og-font-variant-numeric": "tabular-nums" }, _ = { "--og-font-family": '"IBM Plex Sans", "Source Sans 3", "Source Sans Pro", Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif', "--og-num-font-family": '"IBM Plex Mono", "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "700", "--og-header-letter-spacing": "0.02em", "--og-font-variant-numeric": "tabular-nums slashed-zero" }, b = { "--og-font-family": '"JetBrains Mono", "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "DejaVu Sans Mono", D2Coding, "D2Coding ligature", "Nanum Gothic Coding", "Noto Sans Mono CJK KR", "Noto Sans Mono CJK JP", monospace', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.01em", "--og-font-variant-numeric": "tabular-nums slashed-zero" }, G = { "--og-font-family": 'Inter, "Inter Variable", "Segoe UI Variable Small", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif', "--og-font-weight": "430", "--og-letter-spacing": "0.01em", "--og-header-font-weight": "640", "--og-header-letter-spacing": "0.028em", "--og-font-variant-numeric": "tabular-nums" }, O = { "--og-font-family": 'Verdana, Tahoma, "DejaVu Sans", "Bitstream Vera Sans", "Lucida Grande", "Segoe UI", system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Nanum Gothic", sans-serif', "--og-header-font-family": '"Segoe UI", system-ui, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0.02em", "--og-font-variant-numeric": "tabular-nums", "--og-prose-line-height": "1.55" }, Y = { "--og-font-family": 'Pretendard, "Pretendard Variable", "Pretendard JP", "Apple SD Gothic Neo", "Noto Sans KR", "Source Han Sans KR", "Malgun Gothic", "맑은 고딕", "Nanum Gothic", Dotum, 돋움, system-ui, sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0", "--og-font-variant-numeric": "tabular-nums" }, v = { "--og-font-family": '"Noto Sans CJK KR", "Noto Sans KR", "Source Han Sans KR", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif', "--og-font-weight": "400", "--og-letter-spacing": "normal", "--og-header-font-weight": "600", "--og-header-letter-spacing": "0", "--og-font-variant-numeric": "tabular-nums" }, S = [["ui", M], ["ledger", _], ["terminal", b], ["dense-scan", G], ["humanist", O], ["hangul-first", Y], ["cjk-doc", v]], i = new y();
70
+ for (const [o, e] of S) i.registerBuiltin(o, e);
71
+ const E = Object.freeze(Object.fromEntries(S.map(([o, e]) => [o, e])));
72
+ function I(o) {
73
+ const e = o;
74
+ return !!e && typeof e == "object" && typeof e.setAttribute == "function" && typeof e.removeAttribute == "function" && e.style != null;
75
+ }
76
+ function C(o, e) {
77
+ const t = i.resolve(e), n = [];
78
+ if (e !== "default" && !i.has(e) && n.push(`타이포 프리셋 "${e}" 는 등록되어 있지 않습니다 — default(축 해제)로 처리했습니다. 등록된 id: ${i.list().join(", ")} (사용자 정의는 defineTypography()).`), I(o)) {
79
+ for (const s of c) o.style.removeProperty(s);
80
+ return t.attr ? o.setAttribute(t.attr.name, t.attr.value) : o.removeAttribute(l), { mode: "element", warnings: n };
81
+ }
82
+ const a = o;
83
+ if (!a || typeof a.setThemeVar != "function") throw new Error("[typography] applyTypography(target, id): target 은 그리드 컨테이너 요소(HTMLElement) 또는 setThemeVar() 를 가진 그리드 인스턴스여야 합니다.");
84
+ for (const s of c) a.setThemeVar(s, "");
85
+ for (const [s, f] of Object.entries(t.tokens)) a.setThemeVar(s, f);
86
+ return t.attr && n.push(`그리드 인스턴스 경로는 CSS 변수만 주입합니다 — ${l} 속성은 붙지 않습니다. OpenGrid 가 컨테이너 요소를 돌려주는 공개 접근자를 제공하지 않기 때문입니다. 그래서 밀도 복합 셀렉터(광학 크기)와 cjk-doc 의 :lang() 한자 분기는 적용되지 않습니다. 완전 적용하려면 컨테이너 요소(.og-container)를 직접 넘기세요.`), { mode: "grid-vars", warnings: n };
87
+ }
88
+ function H(o, e) {
89
+ return i.define(o, e);
90
+ }
91
+ function K() {
92
+ return i.list();
93
+ }
94
+ export {
95
+ l as TYPOGRAPHY_ATTR,
96
+ E as TYPOGRAPHY_PRESETS,
97
+ c as TYPOGRAPHY_TOKENS,
98
+ y as TypographyRegistry,
99
+ C as applyTypography,
100
+ u as assertTypographyOnly,
101
+ H as defineTypography,
102
+ K as listTypography,
103
+ i as typographyRegistry
104
+ };
105
+ //# sourceMappingURL=open-grid-typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-grid-typography.js","sources":["../src/core/appearance/AppearanceAxis.ts"],"sourcesContent":["// ============================================================\n// DD-11 §2.1 IAppearanceAxis — 동형 외관 축 SPI(5축 공통 계약) + 델타축 기반구현\n// / DD-11 §2.1 IAppearanceAxis — the isomorphic appearance-axis SPI + a token-delta base impl.\n// ------------------------------------------------------------\n// 설계 근거(Why, §2.1·불변식 1~3):\n// 외관을 \"특수 케이스 5개\" 가 아니라 **하나의 인터페이스를 만족하는 5개 등록소**(theme·skin·\n// density·texture·icon)로 통일한다. 각 축은 **자기 이름공간 토큰만** 낸다(축 오염 금지 = 물리\n// 직교). default id 는 **빈 델타**(byte-identical) 이며, 신설 축(density·texture)은 default 시\n// `attr` 를 생략한다 — default 에 `data-og-density=\"default\"` 같은 새 속성이 붙으면 그 자체로\n// DOM diff 라 골든이 깨진다(REQ-TX-827, §R.1).\n//\n// `define/has/resolve/list` 는 DD-10 `IRegistry<V,K>`(REQ-T4-801)의 얇은 어댑터다(재구현 아님):\n// define≈register(축 오염·정직성 검증을 등록 게이트로), has≈has, resolve≈get(미등록→빈 델타 =\n// never-throw 폴백, IconRegistry 와 동일 계약), list≈keys. 축 고유의 이름공간 검증·relayout\n// 플래그만 얹은 특화 뷰다. 헤드리스·순수(DOM 미참조).\n// ============================================================\n\n/** 외관 축 식별자. 이름공간(prefix)이 물리 직교의 열쇠. / Appearance axis id; the token prefix is the key to physical orthogonality. */\nexport type AxisId = 'theme' | 'skin' | 'density' | 'texture' | 'icon' | 'typography' | 'header';\n\n/** 한 축의 CSS 변수 델타(자기 이름공간만). / A CSS-var delta for one axis (own namespace only). */\nexport type TokenDelta = Readonly<Record<string, string>>;\n\n/** 컨테이너에 붙일 data-* 속성. / A data-* attribute to place on the container. */\nexport interface AxisAttr {\n readonly name: string;\n readonly value: string;\n}\n\n/**\n * 한 축의 선택 결과 = 토큰 델타 + 컨테이너 속성 + relayout 플래그.\n * / One axis's selection = token delta + container attribute + relayout flag.\n */\nexport interface AxisResolution {\n /** 이 축이 발행하는 CSS 변수 델타(자기 이름공간만). default → 빈 객체. / CSS var delta (own namespace only); empty for default. */\n readonly tokens: TokenDelta;\n /** 컨테이너 data-* 속성. default/신설 축이면 생략(byte-identical). / Container data-* attr; omitted for default/new-axis. */\n readonly attr?: AxisAttr;\n /** 이 선택이 재계산을 요구하는가(밀도 = 행높이 relayout). / Does this selection require recompute (density → row-height relayout)? */\n readonly requiresRelayout?: boolean;\n}\n\n/** 축 정의 결과 — 등록된(가드레일 반영) 델타 + 경고. / Axis-definition result — registered (clamped) delta + warnings. */\nexport interface AxisDefineResult {\n readonly delta: TokenDelta;\n readonly warnings: string[];\n}\n\n/**\n * IAppearanceAxis — 한 외관 축의 등록·검증·해소를 소유하는 동형 SPI(§2.1).\n * 불변식: resolve(id)는 **자기 이름공간 토큰만** 낸다(축 오염 금지). default id 는 빈 델타(byte-identical).\n * / IAppearanceAxis — the isomorphic SPI owning one axis's registration/validation/resolution.\n */\nexport interface IAppearanceAxis {\n readonly id: AxisId;\n /** 이 축이 소유하는 토큰 이름공간(검증용). / Token namespace this axis owns (for validation). */\n readonly namespace: ReadonlySet<string>;\n /** 값 등록(사용자 확장). 축 오염·정직성 위반 시 throw 또는 클램프+경고. / Register a value; throws on axis-pollution, clamps+warns on honesty violations. */\n define(id: string, delta: TokenDelta): AxisDefineResult;\n /** 등록 여부. / Whether registered. */\n has(id: string): boolean;\n /** 축값 → 해소(토큰·속성·relayout 플래그). 미등록/default → 빈 델타. / Value id → resolution; unknown/default → empty delta. */\n resolve(valueId: string): AxisResolution;\n /** 등록된 값 id 목록(카탈로그·인스펙터용). / Registered value ids (for catalog/inspector). */\n list(): string[];\n}\n\n/** 축값이 default 인가(빈-델타·attr 생략 경로). / Is a value id the default (empty-delta / attr-omitted path)? */\nexport const DEFAULT_AXIS_VALUE = 'default';\n\n/** 빈 해소(default/미등록) — attr·relayout 없음. / Empty resolution (default/unknown) — no attr, no relayout. */\nexport const EMPTY_RESOLUTION: AxisResolution = Object.freeze({ tokens: Object.freeze({}) });\n\n/** TokenAxis 구성. / TokenAxis configuration. */\nexport interface TokenAxisConfig {\n readonly id: AxisId;\n /** 컨테이너 data-* 속성명(예: 'data-og-density'). / Container data-* attribute name. */\n readonly attrName: string;\n /** 이 축이 소유하는 토큰 이름공간(자기 prefix 집합). / The token namespace (own prefix set). */\n readonly namespace: ReadonlySet<string>;\n /** named 값이 relayout 을 요구하는가(density=true). 기본 false. / Do named values require relayout (density=true)? Default false. */\n readonly requiresRelayout?: boolean;\n}\n\n/**\n * 이름공간 검증 — 델타의 모든 토큰이 이 축 소유인지(축 오염 거부). throw on violation.\n * / Namespace validation — every token must be owned by this axis (rejects axis-pollution).\n *\n * @param axisId - 축 id / Axis id\n * @param namespace - 소유 토큰 집합 / Owned token set\n * @param delta - 검사할 델타 / Delta to validate\n * @throws 이름공간 밖 토큰이 있으면 Error / Throws if a token is outside the namespace\n */\nexport function assertNamespace(axisId: AxisId, namespace: ReadonlySet<string>, delta: TokenDelta): void {\n for (const key of Object.keys(delta)) {\n if (!namespace.has(key)) {\n throw new Error(\n `[AppearanceAxis:${axisId}] 토큰 \"${key}\" 은 ${axisId} 축 이름공간이 아닙니다. ` +\n `각 축은 자기 이름공간 토큰만 소유합니다(축 오염 금지 — 이름-분리 물리 직교, 불변식 1).`,\n );\n }\n }\n}\n\n/**\n * TokenAxis — 델타-등록형 축(density·texture)의 재사용 기반 구현.\n * define 은 이름공간 검증 + (서브클래스) 가드레일 후 등록. resolve 는 default/미등록 → 빈 델타(+attr 생략),\n * named → 델타 + `{name:attrName, value:id}` (+ requiresRelayout).\n * / TokenAxis — reusable base for delta-registered axes (density·texture). Headless, pure.\n *\n * @example\n * const ax = new TokenAxis({ id: 'density', attrName: 'data-og-density', namespace: DENSITY_TOKENS, requiresRelayout: true });\n * ax.resolve('default'); // { tokens:{} } — byte-identical\n */\nexport class TokenAxis implements IAppearanceAxis {\n readonly id: AxisId;\n readonly namespace: ReadonlySet<string>;\n protected readonly _attrName: string;\n protected readonly _requiresRelayout: boolean;\n protected readonly _values = new Map<string, TokenDelta>();\n\n constructor(cfg: TokenAxisConfig) {\n this.id = cfg.id;\n this.namespace = cfg.namespace;\n this._attrName = cfg.attrName;\n this._requiresRelayout = cfg.requiresRelayout ?? false;\n }\n\n /** 내장 값 등록(가드레일만, 경고는 삼킴 — CSS 는 정적 번들 소유). / Register a built-in value (guardrails only). */\n registerBuiltin(id: string, delta: TokenDelta): void {\n assertNamespace(this.id, this.namespace, delta);\n this._values.set(id, this._guardrails(id, delta).delta);\n }\n\n /** 서브클래스 가드레일 훅(기본 no-op). / Subclass guardrail hook (default no-op). */\n protected _guardrails(_id: string, delta: TokenDelta): AxisDefineResult {\n return { delta, warnings: [] };\n }\n\n define(id: string, delta: TokenDelta): AxisDefineResult {\n assertNamespace(this.id, this.namespace, delta);\n const result = this._guardrails(id, delta);\n this._values.set(id, result.delta);\n for (const w of result.warnings) {\n if (typeof console !== 'undefined') console.warn(`[AppearanceAxis:${this.id}] \"${id}\": ${w}`);\n }\n return result;\n }\n\n has(id: string): boolean {\n return this._values.has(id);\n }\n\n resolve(valueId: string): AxisResolution {\n if (valueId === DEFAULT_AXIS_VALUE) return EMPTY_RESOLUTION;\n const delta = this._values.get(valueId);\n if (delta === undefined) return EMPTY_RESOLUTION; // never-throw 폴백(미등록 = default 취급)\n const res: { tokens: TokenDelta; attr: AxisAttr; requiresRelayout?: boolean } = {\n tokens: delta,\n attr: { name: this._attrName, value: valueId },\n };\n if (this._requiresRelayout) res.requiresRelayout = true;\n return res;\n }\n\n list(): string[] {\n return [...this._values.keys()];\n }\n}\n"],"names":[],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-B7m7ei7f.cjs"), _sfc_main = vue.defineComponent({ __name: "OpenGrid", props: { data: { default: () => [] }, columns: {}, height: { default: 400 }, width: { default: "100%" }, editable: { type: Boolean, default: false }, sortable: { type: Boolean, default: true }, filterable: { type: Boolean, default: true }, rowNumber: { type: Boolean, default: false }, checkColumn: { type: Boolean, default: false }, stateColumn: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, frozenColumns: { default: 0 }, theme: { default: "default" }, options: {} }, emits: ["update:data", "ready", "cell-click", "row-click", "edit-end", "sort-change", "filter-change", "row-check"], setup(n, { expose: u, emit: r }) {
3
+ const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-CT9bV6On.cjs"), _sfc_main = vue.defineComponent({ __name: "OpenGrid", props: { data: { default: () => [] }, columns: {}, height: { default: 400 }, width: { default: "100%" }, editable: { type: Boolean, default: false }, sortable: { type: Boolean, default: true }, filterable: { type: Boolean, default: true }, rowNumber: { type: Boolean, default: false }, checkColumn: { type: Boolean, default: false }, stateColumn: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, frozenColumns: { default: 0 }, theme: { default: "default" }, options: {} }, emits: ["update:data", "ready", "cell-click", "row-click", "edit-end", "sort-change", "filter-change", "row-check"], setup(n, { expose: u, emit: r }) {
4
4
  const e = n, o = r, c = vue.ref(), a = vue.shallowRef(null);
5
5
  let i = null;
6
6
  const s = vue.computed(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height, width: typeof e.width == "number" ? `${e.width}px` : e.width }));
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-grid-vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as f, ref as p, shallowRef as m, computed as h, onMounted as g, watch as d, onUnmounted as y, openBlock as b, createElementBlock as v, normalizeStyle as C } from "vue";
2
- import { O as k } from "./OpenGrid-CeUdO_fM.js";
2
+ import { O as k } from "./OpenGrid-DACnZdEy.js";
3
3
  const w = f({ __name: "OpenGrid", props: { data: { default: () => [] }, columns: {}, height: { default: 400 }, width: { default: "100%" }, editable: { type: Boolean, default: false }, sortable: { type: Boolean, default: true }, filterable: { type: Boolean, default: true }, rowNumber: { type: Boolean, default: false }, checkColumn: { type: Boolean, default: false }, stateColumn: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, frozenColumns: { default: 0 }, theme: { default: "default" }, options: {} }, emits: ["update:data", "ready", "cell-click", "row-click", "edit-end", "sort-change", "filter-change", "row-check"], setup(n, { expose: u, emit: r }) {
4
4
  const e = n, o = r, c = p(), a = m(null);
5
5
  let i = null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-grid-vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const OpenGrid = require("./OpenGrid-B7m7ei7f.cjs");
3
+ const OpenGrid = require("./OpenGrid-CT9bV6On.cjs"), Registry = require("./Registry-D74ZmdDz.cjs");
4
4
  class GridShuttle {
5
5
  constructor(t, e, n, o = {}) {
6
6
  this._left = t, this._right = e;
@@ -73,16 +73,16 @@ class OrgChart {
73
73
  const _ = (h) => {
74
74
  const g = h._depth * (e + n), r = h._expanded ? h.children : [];
75
75
  if (!r.length) {
76
- const f = a;
77
- return a += t + o, s.set(h._treeId, { x: f, y: g }), { minX: f, maxX: f };
76
+ const u = a;
77
+ return a += t + o, s.set(h._treeId, { x: u, y: g }), { minX: u, maxX: u };
78
78
  }
79
- let i = 1 / 0, u = -1 / 0;
80
- for (const f of r) {
81
- const { minX: c, maxX: m } = _(f);
82
- c < i && (i = c), m > u && (u = m);
79
+ let i = 1 / 0, f = -1 / 0;
80
+ for (const u of r) {
81
+ const { minX: c, maxX: m } = _(u);
82
+ c < i && (i = c), m > f && (f = m);
83
83
  }
84
- const l = i + (u - i + t) / 2 - t / 2;
85
- return s.set(h._treeId, { x: l, y: g }), { minX: i, maxX: u };
84
+ const l = i + (f - i + t) / 2 - t / 2;
85
+ return s.set(h._treeId, { x: l, y: g }), { minX: i, maxX: f };
86
86
  };
87
87
  for (const h of this._roots) _(h);
88
88
  let p = 0, d = 0;
@@ -103,8 +103,8 @@ class OrgChart {
103
103
  const h = (r) => {
104
104
  for (const i of r) {
105
105
  if (!i._expanded || !i.children.length) continue;
106
- const u = s.get(i._treeId), l = u.x + t / 2, f = u.y + e, c = f + n / 2, m = i.children;
107
- if (this._line(d, l, f, l, c), m.length > 1) {
106
+ const f = s.get(i._treeId), l = f.x + t / 2, u = f.y + e, c = u + n / 2, m = i.children;
107
+ if (this._line(d, l, u, l, c), m.length > 1) {
108
108
  const x = s.get(m[0]._treeId), y = s.get(m[m.length - 1]._treeId);
109
109
  this._line(d, x.x + t / 2, c, y.x + t / 2, c);
110
110
  }
@@ -118,12 +118,12 @@ class OrgChart {
118
118
  h(this._roots), p.appendChild(d);
119
119
  const g = (r) => {
120
120
  for (const i of r) {
121
- const u = s.get(i._treeId);
122
- if (!u) continue;
121
+ const f = s.get(i._treeId);
122
+ if (!f) continue;
123
123
  const l = document.createElement("div");
124
- l.className = "og-orgchart-node", i._hasChildren && l.classList.add("og-orgchart-node--branch"), i._expanded && l.classList.add("og-orgchart-node--expanded"), this._selectedId === i._treeId && l.classList.add("og-orgchart-node--selected"), l.style.cssText = `left:${u.x}px;top:${u.y}px;width:${t}px;height:${e}px;`;
125
- const f = document.createElement("div");
126
- f.className = "og-orgchart-node-content";
124
+ l.className = "og-orgchart-node", i._hasChildren && l.classList.add("og-orgchart-node--branch"), i._expanded && l.classList.add("og-orgchart-node--expanded"), this._selectedId === i._treeId && l.classList.add("og-orgchart-node--selected"), l.style.cssText = `left:${f.x}px;top:${f.y}px;width:${t}px;height:${e}px;`;
125
+ const u = document.createElement("div");
126
+ u.className = "og-orgchart-node-content";
127
127
  for (const c of o) {
128
128
  const m = i.data[c.field], x = document.createElement("div");
129
129
  if (x.className = "og-orgchart-col" + (c.className ? " " + c.className : ""), c.style) {
@@ -134,9 +134,9 @@ class OrgChart {
134
134
  const y = c.renderer(m, i.data);
135
135
  typeof y == "string" ? x.innerHTML = y : x.appendChild(y);
136
136
  } else x.textContent = m ?? "";
137
- f.appendChild(x);
137
+ u.appendChild(x);
138
138
  }
139
- if (l.appendChild(f), i._hasChildren) {
139
+ if (l.appendChild(u), i._hasChildren) {
140
140
  const c = document.createElement("button");
141
141
  c.type = "button", c.className = "og-orgchart-toggle", c.setAttribute("aria-expanded", i._expanded ? "true" : "false"), c.setAttribute("aria-label", OpenGrid.t(i._expanded ? "tree.collapse" : "tree.expand"));
142
142
  const m = document.createElement("i");
@@ -162,16 +162,16 @@ class XmlConverter {
162
162
  d || (d = ((_c = (_b = e.rootTag ? a.querySelector(e.rootTag) : p) == null ? void 0 : _b.children[0]) == null ? void 0 : _c.tagName) ?? "row");
163
163
  const h = a.getElementsByTagName(d), g = [];
164
164
  for (let r = 0; r < h.length; r++) {
165
- const i = h[r], u = {};
165
+ const i = h[r], f = {};
166
166
  for (const l of Array.from(i.attributes)) {
167
- const f = n[l.name] ?? l.name;
168
- u[f] = o ? l.value.trim() : l.value;
167
+ const u = n[l.name] ?? l.name;
168
+ f[u] = o ? l.value.trim() : l.value;
169
169
  }
170
170
  for (const l of Array.from(i.children)) {
171
- const f = n[l.tagName] ?? l.tagName, c = l.textContent ?? "";
172
- u[f] = o ? c.trim() : c;
171
+ const u = n[l.tagName] ?? l.tagName, c = l.textContent ?? "";
172
+ f[u] = o ? c.trim() : c;
173
173
  }
174
- g.push(u);
174
+ g.push(f);
175
175
  }
176
176
  return g;
177
177
  }
@@ -179,17 +179,17 @@ class XmlConverter {
179
179
  const { rootTag: n = "rows", rowTag: o = "row", mode: s = "element", fieldMap: a = {}, declaration: _ = true, indent: p = 2, nullAs: d = "", excludeFields: h = [] } = e, g = " ".repeat(p), r = [];
180
180
  _ && r.push('<?xml version="1.0" encoding="UTF-8"?>'), r.push(`<${n}>`);
181
181
  for (const i of t) {
182
- const u = Object.entries(i).filter(([l]) => !h.includes(l));
182
+ const f = Object.entries(i).filter(([l]) => !h.includes(l));
183
183
  if (s === "attribute") {
184
- const l = u.map(([f, c]) => {
185
- const m = a[f] ?? f, x = c == null ? d : String(c);
184
+ const l = f.map(([u, c]) => {
185
+ const m = a[u] ?? u, x = c == null ? d : String(c);
186
186
  return `${m}="${this._escAttr(x)}"`;
187
187
  }).join(" ");
188
188
  r.push(`${g}<${o}${l ? " " + l : ""} />`);
189
189
  } else {
190
190
  r.push(`${g}<${o}>`);
191
- for (const [l, f] of u) {
192
- const c = a[l] ?? l, m = f == null ? d : String(f);
191
+ for (const [l, u] of f) {
192
+ const c = a[l] ?? l, m = u == null ? d : String(u);
193
193
  r.push(`${g}${g}<${c}>${this._escText(m)}</${c}>`);
194
194
  }
195
195
  r.push(`${g}</${o}>`);
@@ -215,7 +215,7 @@ class XmlConverter {
215
215
  const h = d.getElementsByTagName("ITEM"), g = h.length > 0 ? Array.from(h) : [d];
216
216
  for (const r of g) {
217
217
  const i = {};
218
- for (const u of Array.from(r.children)) i[u.tagName] = ((_c = u.textContent) == null ? void 0 : _c.trim()) ?? "";
218
+ for (const f of Array.from(r.children)) i[f.tagName] = ((_c = f.textContent) == null ? void 0 : _c.trim()) ?? "";
219
219
  o.items.push(i);
220
220
  }
221
221
  break;
@@ -269,5 +269,5 @@ class XmlConverter {
269
269
  return this._escText(t).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
270
270
  }
271
271
  }
272
- exports.DEFAULT_ICON_ROLES = OpenGrid.DEFAULT_ICON_ROLES, exports.IconRegistry = OpenGrid.IconRegistry, exports.LocaleRegistry = OpenGrid.LocaleRegistry, exports.OpenGrid = OpenGrid.OpenGrid, exports.SkinRegistry = OpenGrid.SkinRegistry, exports.iconRegistry = OpenGrid.iconRegistry, exports.localeRegistry = OpenGrid.localeRegistry, exports.renderIcon = OpenGrid.renderIcon, exports.skinRegistry = OpenGrid.skinRegistry, exports.t = OpenGrid.t, exports.GridShuttle = GridShuttle, exports.OrgChart = OrgChart, exports.XmlConverter = XmlConverter, exports.createGridShuttle = createGridShuttle;
272
+ exports.DEFAULT_ICON_ROLES = OpenGrid.DEFAULT_ICON_ROLES, exports.IconRegistry = OpenGrid.IconRegistry, exports.LocaleRegistry = OpenGrid.LocaleRegistry, exports.OpenGrid = OpenGrid.OpenGrid, exports.SkinRegistry = OpenGrid.SkinRegistry, exports.iconRegistry = OpenGrid.iconRegistry, exports.localeRegistry = OpenGrid.localeRegistry, exports.renderIcon = OpenGrid.renderIcon, exports.skinRegistry = OpenGrid.skinRegistry, exports.t = OpenGrid.t, exports.RESERVED_PREFIXES = Registry.RESERVED_PREFIXES, exports.TypedRegistry = Registry.TypedRegistry, exports.isReserved = Registry.isReserved, exports.GridShuttle = GridShuttle, exports.OrgChart = OrgChart, exports.XmlConverter = XmlConverter, exports.createGridShuttle = createGridShuttle;
273
273
  //# sourceMappingURL=open-grid.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-grid.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}