open-grid 1.2.1 → 1.3.1

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 (258) hide show
  1. package/CHANGELOG.md +388 -365
  2. package/dist/{OpenGrid-0r_543Kj.cjs → OpenGrid-B7m7ei7f.cjs} +1222 -1029
  3. package/dist/{OpenGrid-HmhGVC2V.js → OpenGrid-CeUdO_fM.js} +1613 -1418
  4. package/dist/index-CeJ-0-80.cjs +260 -0
  5. package/dist/index-DnarQ4eR.js +266 -0
  6. package/dist/index-DrCPRuYi.js +548 -0
  7. package/dist/index-JjfWY3Bt.cjs +520 -0
  8. package/dist/open-grid-base.css +12 -1
  9. package/dist/open-grid-react.cjs +1 -1
  10. package/dist/open-grid-react.js +1 -1
  11. package/dist/open-grid-vue.cjs +7 -7
  12. package/dist/open-grid-vue.js +2 -2
  13. package/dist/open-grid.cjs +1 -1
  14. package/dist/open-grid.js +2 -2
  15. package/dist/types/bench/perf.d.ts +14 -8
  16. package/dist/types/core/AppearanceResolver.d.ts +98 -11
  17. package/dist/types/core/CFRenderBridge.d.ts +13 -0
  18. package/dist/types/core/CellTypeRegistry.d.ts +24 -0
  19. package/dist/types/core/ColumnLayout.d.ts +100 -2
  20. package/dist/types/core/CrossGridMapper.d.ts +43 -5
  21. package/dist/types/core/DataLayer.d.ts +210 -15
  22. package/dist/types/core/DragVisuals.d.ts +33 -4
  23. package/dist/types/core/EventEmitter.d.ts +54 -0
  24. package/dist/types/core/FilterSelect.d.ts +26 -5
  25. package/dist/types/core/FormulaEngine.d.ts +15 -4
  26. package/dist/types/core/GridRenderer.d.ts +143 -10
  27. package/dist/types/core/GridShuttle.d.ts +26 -10
  28. package/dist/types/core/GroupEngine.d.ts +68 -10
  29. package/dist/types/core/IconRegistry.d.ts +31 -13
  30. package/dist/types/core/MathUtils.d.ts +58 -5
  31. package/dist/types/core/MergeEngine.d.ts +45 -10
  32. package/dist/types/core/OGDecimal.d.ts +144 -13
  33. package/dist/types/core/OpenGrid.d.ts +401 -122
  34. package/dist/types/core/OrgChart.d.ts +32 -11
  35. package/dist/types/core/PivotEngine.d.ts +37 -0
  36. package/dist/types/core/RowDragDrop.d.ts +52 -6
  37. package/dist/types/core/SkinRegistry.d.ts +86 -19
  38. package/dist/types/core/TreeEngine.d.ts +60 -6
  39. package/dist/types/core/VirtualScroll.d.ts +64 -0
  40. package/dist/types/core/XmlConverter.d.ts +40 -0
  41. package/dist/types/core/a11y/AccessibilityAdapter.d.ts +103 -0
  42. package/dist/types/core/a11y/AriaIntent.d.ts +34 -0
  43. package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +64 -0
  44. package/dist/types/core/a11y/LiveRegionController.d.ts +89 -0
  45. package/dist/types/core/a11y/OverlayStack.d.ts +36 -0
  46. package/dist/types/core/a11y/VisualEquivRegistry.d.ts +37 -0
  47. package/dist/types/core/a11y/index.d.ts +13 -0
  48. package/dist/types/core/a11y/ports.d.ts +24 -0
  49. package/dist/types/core/appearance/Appearance.d.ts +68 -0
  50. package/dist/types/core/appearance/AppearanceAxis.d.ts +94 -0
  51. package/dist/types/core/appearance/AppearanceComposer.d.ts +45 -0
  52. package/dist/types/core/appearance/AppearanceProvider.d.ts +50 -0
  53. package/dist/types/core/appearance/AppearanceView.d.ts +51 -0
  54. package/dist/types/core/appearance/DensityRegistry.d.ts +36 -0
  55. package/dist/types/core/appearance/ResolvedAppearanceSnapshot.d.ts +84 -0
  56. package/dist/types/core/appearance/TextureRegistry.d.ts +32 -0
  57. package/dist/types/core/appearance/ThemeMetaRegistry.d.ts +67 -0
  58. package/dist/types/core/appearance/axisAdapters.d.ts +37 -0
  59. package/dist/types/core/appearance/defaults.d.ts +10 -0
  60. package/dist/types/core/appearance/index.d.ts +20 -0
  61. package/dist/types/core/appearance/tokenCatalog.d.ts +30 -0
  62. package/dist/types/core/cf/CFEngine.d.ts +56 -0
  63. package/dist/types/core/cf/CFEvaluator.d.ts +24 -0
  64. package/dist/types/core/cf/CFRule.d.ts +127 -0
  65. package/dist/types/core/cf/ColorScale.d.ts +49 -0
  66. package/dist/types/core/cf/InkResolver.d.ts +33 -0
  67. package/dist/types/core/cf/appearance.d.ts +20 -0
  68. package/dist/types/core/cf/encoders.d.ts +61 -0
  69. package/dist/types/core/cf/eval-types.d.ts +93 -0
  70. package/dist/types/core/cf/index.d.ts +21 -0
  71. package/dist/types/core/cf/lineage.d.ts +32 -0
  72. package/dist/types/core/cf/predicates.d.ts +27 -0
  73. package/dist/types/core/cf/serialize.d.ts +46 -0
  74. package/dist/types/core/chart/CanvasAdapter.d.ts +50 -1
  75. package/dist/types/core/chart/DataExtractor.d.ts +53 -12
  76. package/dist/types/core/chart/a11y.d.ts +22 -0
  77. package/dist/types/core/chart/chart-type-registry.d.ts +53 -0
  78. package/dist/types/core/chart/downsample-report.d.ts +36 -0
  79. package/dist/types/core/chart/downsample.d.ts +26 -1
  80. package/dist/types/core/chart/engine/ChartEngineRegistry.d.ts +52 -0
  81. package/dist/types/core/chart/geometry.d.ts +96 -0
  82. package/dist/types/core/chart/hittest.d.ts +21 -3
  83. package/dist/types/core/chart/palette.d.ts +96 -12
  84. package/dist/types/core/chart/parity.d.ts +12 -0
  85. package/dist/types/core/chart/provenance.d.ts +47 -0
  86. package/dist/types/core/chart/scales.d.ts +28 -1
  87. package/dist/types/core/chart/scene.d.ts +102 -0
  88. package/dist/types/core/chart/server.d.ts +36 -0
  89. package/dist/types/core/chart/surfaces/CanvasSurface.d.ts +48 -0
  90. package/dist/types/core/chart/surfaces/ServerRasterSurface.d.ts +26 -0
  91. package/dist/types/core/chart/surfaces/SvgSurface.d.ts +24 -0
  92. package/dist/types/core/chart/surfaces/pattern-overlay.d.ts +24 -0
  93. package/dist/types/core/chart/types.d.ts +102 -21
  94. package/dist/types/core/command/CommandBus.d.ts +51 -0
  95. package/dist/types/core/command/CommandRegistry.d.ts +43 -0
  96. package/dist/types/core/command/CommandStack.d.ts +38 -0
  97. package/dist/types/core/command/ICommand.d.ts +110 -0
  98. package/dist/types/core/command/commands/CellWriteCommand.d.ts +32 -0
  99. package/dist/types/core/command/commands/CompositeCommand.d.ts +17 -0
  100. package/dist/types/core/command/commands/RowCommands.d.ts +39 -0
  101. package/dist/types/core/command/index.d.ts +9 -0
  102. package/dist/types/core/command/support.d.ts +51 -0
  103. package/dist/types/core/coordinate/ColumnMetrics.d.ts +30 -0
  104. package/dist/types/core/coordinate/CoordinateKernel.d.ts +88 -0
  105. package/dist/types/core/coordinate/FrozenPanes.d.ts +29 -0
  106. package/dist/types/core/coordinate/MergeSourceAdapter.d.ts +18 -0
  107. package/dist/types/core/coordinate/NodeBudget.d.ts +33 -0
  108. package/dist/types/core/coordinate/ResizeGovernor.d.ts +50 -0
  109. package/dist/types/core/coordinate/RowMetrics.d.ts +37 -0
  110. package/dist/types/core/coordinate/ViewPermutation.d.ts +23 -0
  111. package/dist/types/core/coordinate/index.d.ts +10 -0
  112. package/dist/types/core/coordinate/ports.d.ts +45 -0
  113. package/dist/types/core/coordinate/types.d.ts +76 -0
  114. package/dist/types/core/detail/DetailGlyph.d.ts +42 -7
  115. package/dist/types/core/detail/DetailSplice.d.ts +42 -11
  116. package/dist/types/core/detail/DetailState.d.ts +80 -11
  117. package/dist/types/core/detail/SubgridCache.d.ts +72 -10
  118. package/dist/types/core/detail/index.d.ts +8 -0
  119. package/dist/types/core/domain/AggregateResult.d.ts +54 -0
  120. package/dist/types/core/domain/CellAddress.d.ts +61 -0
  121. package/dist/types/core/domain/CellValueAccess.d.ts +29 -0
  122. package/dist/types/core/domain/Delta.d.ts +37 -0
  123. package/dist/types/core/domain/DomainValue.d.ts +80 -0
  124. package/dist/types/core/domain/Missing.d.ts +65 -0
  125. package/dist/types/core/domain/Money.d.ts +42 -0
  126. package/dist/types/core/domain/NormalizationBasis.d.ts +47 -0
  127. package/dist/types/core/domain/Plain.d.ts +45 -0
  128. package/dist/types/core/domain/Quantity.d.ts +32 -0
  129. package/dist/types/core/domain/Ratios.d.ts +100 -0
  130. package/dist/types/core/domain/ThresholdSet.d.ts +46 -0
  131. package/dist/types/core/domain/ValueType.d.ts +71 -0
  132. package/dist/types/core/domain/rounding.d.ts +25 -0
  133. package/dist/types/core/domain/strategies.d.ts +38 -0
  134. package/dist/types/core/editors/DateEditor.d.ts +18 -0
  135. package/dist/types/core/editors/SelectEditor.d.ts +29 -0
  136. package/dist/types/core/export/ChannelRegistry.d.ts +18 -0
  137. package/dist/types/core/export/ExportManifest.d.ts +13 -0
  138. package/dist/types/core/export/GridArtifactSource.d.ts +62 -0
  139. package/dist/types/core/export/Provenance.d.ts +34 -0
  140. package/dist/types/core/export/StreamPump.d.ts +28 -0
  141. package/dist/types/core/export/channels/CsvChannel.d.ts +20 -0
  142. package/dist/types/core/export/channels/JsonChannel.d.ts +18 -0
  143. package/dist/types/core/export/channels/XlsxChannel.d.ts +53 -0
  144. package/dist/types/core/export/channels/XmlChannel.d.ts +21 -0
  145. package/dist/types/core/export/channels/capabilities.d.ts +13 -0
  146. package/dist/types/core/export/index.d.ts +24 -0
  147. package/dist/types/core/export/print/OutputChannelAdapter.d.ts +61 -0
  148. package/dist/types/core/export/print/Paginator.d.ts +48 -0
  149. package/dist/types/core/export/print/PrintRenderTarget.d.ts +36 -0
  150. package/dist/types/core/export/sinks.d.ts +40 -0
  151. package/dist/types/core/export/types.d.ts +211 -0
  152. package/dist/types/core/extension/DeprecationManager.d.ts +42 -0
  153. package/dist/types/core/extension/IExtension.d.ts +90 -0
  154. package/dist/types/core/extension/Registry.d.ts +142 -0
  155. package/dist/types/core/extension/SlotRegistry.d.ts +46 -0
  156. package/dist/types/core/extension/adapters.d.ts +44 -0
  157. package/dist/types/core/extension/conformance.d.ts +47 -0
  158. package/dist/types/core/extension/index.d.ts +16 -0
  159. package/dist/types/core/extension/registries.d.ts +31 -0
  160. package/dist/types/core/extension/reserved.d.ts +10 -0
  161. package/dist/types/core/format/DisplayFormatter.d.ts +47 -0
  162. package/dist/types/core/format/FormatCache.d.ts +20 -0
  163. package/dist/types/core/format/FormatterRegistry.d.ts +22 -0
  164. package/dist/types/core/format/grammar/AstRenderer.d.ts +10 -0
  165. package/dist/types/core/format/grammar/FormatCompiler.d.ts +16 -0
  166. package/dist/types/core/format/index.d.ts +55 -0
  167. package/dist/types/core/format/pipeline/DomainTypeResolver.d.ts +8 -0
  168. package/dist/types/core/format/pipeline/LocaleFormat.d.ts +11 -0
  169. package/dist/types/core/format/pipeline/ValueInterpreter.d.ts +8 -0
  170. package/dist/types/core/format/policy/MaskPolicy.d.ts +8 -0
  171. package/dist/types/core/format/policy/NegativePolicy.d.ts +12 -0
  172. package/dist/types/core/format/policy/NullPolicy.d.ts +10 -0
  173. package/dist/types/core/format/policy/TruncatePolicy.d.ts +11 -0
  174. package/dist/types/core/format/types.d.ts +292 -0
  175. package/dist/types/core/formula/CalcCacheStore.d.ts +89 -0
  176. package/dist/types/core/formula/CalcProvenance.d.ts +44 -0
  177. package/dist/types/core/formula/CalcService.d.ts +137 -0
  178. package/dist/types/core/formula/CyclePathReporter.d.ts +28 -0
  179. package/dist/types/core/formula/FormulaEvaluator.d.ts +35 -1
  180. package/dist/types/core/formula/FormulaGraph.d.ts +84 -7
  181. package/dist/types/core/formula/FormulaParser.d.ts +9 -0
  182. package/dist/types/core/formula/FormulaStore.d.ts +63 -1
  183. package/dist/types/core/formula/FunctionRegistry.d.ts +138 -0
  184. package/dist/types/core/formula/Generation.d.ts +86 -0
  185. package/dist/types/core/formula/RecalcCoordinator.d.ts +151 -9
  186. package/dist/types/core/formula/ReferenceRewriter.d.ts +81 -0
  187. package/dist/types/core/formula/functions/essential.d.ts +3 -0
  188. package/dist/types/core/formula/functions/extended/index.d.ts +10 -0
  189. package/dist/types/core/formula/normalizeRefs.d.ts +34 -3
  190. package/dist/types/core/formula/numericLiteral.d.ts +11 -1
  191. package/dist/types/core/formula/serializeFormula.d.ts +10 -1
  192. package/dist/types/core/host/CapabilityRegistry.d.ts +61 -0
  193. package/dist/types/core/host/GridHostDriver.d.ts +27 -0
  194. package/dist/types/core/host/GridHostPort.d.ts +37 -0
  195. package/dist/types/core/host/SliceOwnershipGuard.d.ts +27 -0
  196. package/dist/types/core/host/archCheck.d.ts +26 -0
  197. package/dist/types/core/host/index.d.ts +6 -0
  198. package/dist/types/core/host/reconcile.d.ts +22 -0
  199. package/dist/types/core/i18n/LocaleContext.d.ts +40 -0
  200. package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
  201. package/dist/types/core/i18n/types.d.ts +67 -11
  202. package/dist/types/core/icons/bootstrap-icons.d.ts +4 -2
  203. package/dist/types/core/quality/ContrastAuditor.d.ts +64 -0
  204. package/dist/types/core/quality/DeterminismKernel.d.ts +68 -0
  205. package/dist/types/core/quality/PerfBaseline.d.ts +23 -0
  206. package/dist/types/core/quality/PerfSpec.d.ts +95 -0
  207. package/dist/types/core/quality/RealBrowserGate.d.ts +69 -0
  208. package/dist/types/core/quality/RegressionJudge.d.ts +35 -0
  209. package/dist/types/core/quality/ReleaseGate.d.ts +94 -0
  210. package/dist/types/core/quality/VisualRegression.d.ts +74 -0
  211. package/dist/types/core/quality/hooks.d.ts +53 -0
  212. package/dist/types/core/quality/index.d.ts +20 -0
  213. package/dist/types/core/quality/pixelMetrics.d.ts +24 -0
  214. package/dist/types/core/range/ClipboardCodec.d.ts +46 -4
  215. package/dist/types/core/range/FillEngine.d.ts +69 -9
  216. package/dist/types/core/range/RangeModel.d.ts +100 -13
  217. package/dist/types/core/range/types.d.ts +27 -11
  218. package/dist/types/core/realtime/BackpressureScheduler.d.ts +0 -0
  219. package/dist/types/core/realtime/FreshnessClock.d.ts +34 -0
  220. package/dist/types/core/realtime/IRealtimeSource.d.ts +82 -0
  221. package/dist/types/core/realtime/LiveStateGuard.d.ts +23 -0
  222. package/dist/types/core/realtime/PollingSource.d.ts +42 -0
  223. package/dist/types/core/realtime/RealtimeController.d.ts +54 -0
  224. package/dist/types/core/realtime/RtAnnouncePolicy.d.ts +53 -0
  225. package/dist/types/core/realtime/RtApplyCommand.d.ts +29 -0
  226. package/dist/types/core/realtime/RtChartTargetTrigger.d.ts +26 -0
  227. package/dist/types/core/realtime/StreamingSource.d.ts +47 -0
  228. package/dist/types/core/realtime/backoff.d.ts +12 -0
  229. package/dist/types/core/realtime/index.d.ts +13 -0
  230. package/dist/types/core/realtime/ports.d.ts +80 -0
  231. package/dist/types/core/render/CellApplier.d.ts +18 -0
  232. package/dist/types/core/render/CellErrorBoundary.d.ts +65 -0
  233. package/dist/types/core/render/CellPipeline.d.ts +39 -0
  234. package/dist/types/core/render/CellRenderRequest.d.ts +209 -0
  235. package/dist/types/core/render/CellStageRegistry.d.ts +53 -0
  236. package/dist/types/core/render/OverlayCompositor.d.ts +38 -0
  237. package/dist/types/core/render/RenderBudget.d.ts +67 -0
  238. package/dist/types/core/render/contrast.d.ts +33 -0
  239. package/dist/types/core/render/index.d.ts +35 -0
  240. package/dist/types/core/render/stages/BackgroundStage.d.ts +14 -0
  241. package/dist/types/core/render/stages/DecoratorStage.d.ts +12 -0
  242. package/dist/types/core/render/stages/OverlayStage.d.ts +12 -0
  243. package/dist/types/core/render/stages/ValueRendererStage.d.ts +15 -0
  244. package/dist/types/core/render/stages/index.d.ts +14 -0
  245. package/dist/types/core/state/AutosaveController.d.ts +63 -0
  246. package/dist/types/core/state/IStatePersistence.d.ts +59 -0
  247. package/dist/types/core/state/MultiTabGuard.d.ts +33 -0
  248. package/dist/types/core/state/SchemaMigrator.d.ts +33 -0
  249. package/dist/types/core/state/SemVerPolicy.d.ts +39 -0
  250. package/dist/types/core/state/StateCodec.d.ts +75 -0
  251. package/dist/types/core/state/index.d.ts +6 -0
  252. package/dist/types/core/types.d.ts +511 -226
  253. package/dist/types/react/OpenGrid.d.ts +54 -0
  254. package/dist/types/react/index.d.ts +5 -0
  255. package/dist/types/realtime/index.d.ts +1 -0
  256. package/dist/types/vue/index.d.ts +5 -0
  257. package/dist/types/vue/types.d.ts +35 -0
  258. package/package.json +112 -111
@@ -0,0 +1,520 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const OpenGrid = require("./OpenGrid-B7m7ei7f.cjs");
4
+ function isStyleRef(e) {
5
+ return !!e && typeof e.ref == "string";
6
+ }
7
+ const CF_SCHEMA_VERSION = 1;
8
+ function cfRuleEquals(e, t) {
9
+ return JSON.stringify(e) === JSON.stringify(t);
10
+ }
11
+ function staticAppearanceView(e) {
12
+ const t = (e == null ? void 0 : e.primary) ?? "#1976d2", n = (e == null ? void 0 : e.graphite) ?? "#3a3f45";
13
+ return { rampFrom: (r) => r === "primary" ? t : n };
14
+ }
15
+ function numeric(e) {
16
+ const t = [];
17
+ for (const n of e) {
18
+ const r = typeof n == "number" ? n : typeof n == "string" && n.trim() !== "" ? Number(n) : NaN;
19
+ Number.isFinite(r) && t.push(r);
20
+ }
21
+ return t;
22
+ }
23
+ function computeColumnStats(e) {
24
+ const t = numeric(e), n = t.length;
25
+ if (n === 0) return { count: 0, distinct: 0 };
26
+ const r = [...t].sort((m, g) => m - g), i = r[0], o = r[n - 1], a = t.reduce((m, g) => m + g, 0) / n, c = t.reduce((m, g) => m + (g - a) ** 2, 0) / n, l = Math.sqrt(c), f = /* @__PURE__ */ new Map();
27
+ for (const m of t) f.set(m, (f.get(m) ?? 0) + 1);
28
+ const d = f.size;
29
+ return { min: i, max: o, avg: a, stddev: l, count: n, distinct: d, rankOf: (m) => {
30
+ let g = 0;
31
+ for (const v of t) v > m && g++;
32
+ return g + 1;
33
+ }, rankAscOf: (m) => {
34
+ let g = 0;
35
+ for (const v of t) v < m && g++;
36
+ return g + 1;
37
+ }, percentileOf: (m) => {
38
+ let g = 0;
39
+ for (const v of t) v <= m && g++;
40
+ return g / n;
41
+ }, countOf: (m) => f.get(m) ?? 0 };
42
+ }
43
+ function snapshotStats(e) {
44
+ const t = {};
45
+ return e.min !== void 0 && (t.min = e.min), e.max !== void 0 && (t.max = e.max), e.avg !== void 0 && (t.avg = e.avg), e.stddev !== void 0 && (t.stddev = e.stddev), e.count !== void 0 && (t.count = e.count), e.distinct !== void 0 && (t.distinct = e.distinct), t;
46
+ }
47
+ const RESERVED_PREFIXES = ["og:", "og-"];
48
+ function isReserved(e) {
49
+ return RESERVED_PREFIXES.some((t) => e.startsWith(t));
50
+ }
51
+ function spiMajor(e) {
52
+ const t = e.lastIndexOf("@"), n = t >= 0 ? e.slice(t + 1) : e;
53
+ return n.split(".")[0] ?? n;
54
+ }
55
+ function spiCompatible(e, t) {
56
+ return spiMajor(e) === spiMajor(t);
57
+ }
58
+ function buildEntry(e, t, n, r, i) {
59
+ const o = { key: e, value: t, origin: n, priority: r.priority ?? 0, seq: i };
60
+ return r.pluginId !== void 0 && (o.pluginId = r.pluginId), r.spiVersion !== void 0 && (o.spiVersion = r.spiVersion), r.deprecated !== void 0 && (o.deprecated = r.deprecated), o;
61
+ }
62
+ class TypedRegistry {
63
+ constructor(t = {}) {
64
+ this._map = /* @__PURE__ */ new Map(), this._seq = 0, this._disposed = false, this._warned = /* @__PURE__ */ new Set(), this._cfg = t;
65
+ }
66
+ _warn(t, n) {
67
+ const r = `[OpenGrid] ${n}`, i = `${t}::${n}`;
68
+ return this._warned.has(i) || (this._warned.add(i), (this._cfg.onWarn ?? ((s) => {
69
+ typeof console < "u" && console.warn(s);
70
+ }))(r)), r;
71
+ }
72
+ register(t, n, r = {}) {
73
+ if (this._disposed) return { ok: false, action: "rejected", reason: "disposed" };
74
+ if (typeof t != "string" || t.length === 0) return { ok: false, action: "rejected", reason: "invalid-key" };
75
+ const i = r.origin ?? "user";
76
+ if (isReserved(t) && i !== "builtin") return { ok: false, action: "rejected", reason: "reserved-namespace", warning: this._warn(t, `reserved namespace: '${t}' 는 og:* 코어 예약 대역입니다(origin:'builtin' 만 점유).`) };
77
+ if (this._cfg.spi && r.spiVersion !== void 0 && !spiCompatible(this._cfg.spi.version, r.spiVersion)) return { ok: false, action: "rejected", reason: "spi-mismatch", warning: this._warn(t, `SPI major 불일치: '${t}' 선언 ${r.spiVersion}, 코어 ${this._cfg.spi.name}@${this._cfg.spi.version}.`) };
78
+ const o = this._map.get(t);
79
+ return o && !this._resolveConflict(o, r) ? { ok: false, action: "kept", reason: "protected-builtin", warning: this._warn(t, `'${t}' 는 ${o.origin === "builtin" ? "내장(built-in) 보호" : "override 미지정"} — 덮으려면 { override:true }.`) } : (this._map.set(t, buildEntry(t, n, i, r, this._seq++)), { ok: true, action: o ? "replaced" : "added" });
80
+ }
81
+ _resolveConflict(t, n) {
82
+ return t.origin === "builtin" && n.override !== true ? false : this._cfg.duplicatePolicy === "explicit-override" ? n.override === true : true;
83
+ }
84
+ get(t) {
85
+ var _a;
86
+ return (_a = this._map.get(t)) == null ? void 0 : _a.value;
87
+ }
88
+ require(t, n) {
89
+ const r = this.get(t);
90
+ if (r !== void 0) return r;
91
+ if (n !== void 0) return n;
92
+ if (this._cfg.placeholder) return this._cfg.placeholder(t);
93
+ }
94
+ has(t) {
95
+ return this._map.has(t);
96
+ }
97
+ list() {
98
+ return [...this._map.keys()];
99
+ }
100
+ entries() {
101
+ return [...this._map.values()];
102
+ }
103
+ unregister(t) {
104
+ return this._map.delete(t);
105
+ }
106
+ disposePlugin(t) {
107
+ let n = 0;
108
+ for (const [r, i] of this._map) i.pluginId === t && (this._map.delete(r), n++);
109
+ return n;
110
+ }
111
+ dispose() {
112
+ this._map.clear(), this._warned.clear(), this._disposed = true;
113
+ }
114
+ }
115
+ function num$1(e) {
116
+ return typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
117
+ }
118
+ const DAY = 864e5;
119
+ function startOfDay(e) {
120
+ const t = new Date(e);
121
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime();
122
+ }
123
+ function startOfWeek(e) {
124
+ const t = startOfDay(e), n = new Date(t).getDay();
125
+ return t - n * DAY;
126
+ }
127
+ const comparePredicate = { needs: [], test(e, t) {
128
+ const n = num$1(t.value);
129
+ if (!Number.isFinite(n)) return false;
130
+ switch (e.op) {
131
+ case ">":
132
+ return n > e.a;
133
+ case ">=":
134
+ return n >= e.a;
135
+ case "<":
136
+ return n < e.a;
137
+ case "<=":
138
+ return n <= e.a;
139
+ case "=":
140
+ return n === e.a;
141
+ case "!=":
142
+ return n !== e.a;
143
+ case "between":
144
+ return e.b !== void 0 && n >= Math.min(e.a, e.b) && n <= Math.max(e.a, e.b);
145
+ default:
146
+ return false;
147
+ }
148
+ } }, textContainsPredicate = { needs: [], test(e, t) {
149
+ const n = t.value == null ? "" : String(t.value);
150
+ return e.ci === false ? n.includes(e.text) : n.toLowerCase().includes(e.text.toLowerCase());
151
+ } }, dateOccurringPredicate = { needs: [], test(e, t, n, r) {
152
+ const i = t.value, o = i instanceof Date ? i.getTime() : typeof i == "number" ? i : Date.parse(String(i));
153
+ if (!Number.isFinite(o)) return false;
154
+ const s = r.now, a = startOfDay(s);
155
+ switch (e.rel) {
156
+ case "today":
157
+ return startOfDay(o) === a;
158
+ case "yesterday":
159
+ return startOfDay(o) === a - DAY;
160
+ case "tomorrow":
161
+ return startOfDay(o) === a + DAY;
162
+ case "thisWeek": {
163
+ const c = startOfWeek(s);
164
+ return o >= c && o < c + 7 * DAY;
165
+ }
166
+ case "lastWeek": {
167
+ const c = startOfWeek(s) - 7 * DAY;
168
+ return o >= c && o < c + 7 * DAY;
169
+ }
170
+ case "thisMonth": {
171
+ const c = new Date(s);
172
+ return new Date(o).getFullYear() === c.getFullYear() && new Date(o).getMonth() === c.getMonth();
173
+ }
174
+ case "lastMonth": {
175
+ const c = new Date(s.valueOf()), l = new Date(c.getFullYear(), c.getMonth() - 1, 1);
176
+ return new Date(o).getFullYear() === l.getFullYear() && new Date(o).getMonth() === l.getMonth();
177
+ }
178
+ case "next7d":
179
+ return o >= a && o < a + 7 * DAY;
180
+ case "last7d":
181
+ return o < a + DAY && o >= a - 6 * DAY;
182
+ default:
183
+ return false;
184
+ }
185
+ } }, topNPredicate = { needs: ["rank"], test(e, t, n) {
186
+ const r = num$1(t.value);
187
+ return Number.isFinite(r) ? e.bottom ? n.rankAscOf ? n.rankAscOf(r) <= e.n : false : n.rankOf ? n.rankOf(r) <= e.n : false : false;
188
+ } }, topNpctPredicate = { needs: ["percentile"], test(e, t, n) {
189
+ const r = num$1(t.value);
190
+ if (!Number.isFinite(r) || !n.percentileOf) return false;
191
+ const i = n.percentileOf(r);
192
+ return e.bottom ? i <= e.pct / 100 : i >= 1 - e.pct / 100;
193
+ } }, aboveAvgPredicate = { needs: ["avg"], test(e, t, n) {
194
+ const r = num$1(t.value);
195
+ return !Number.isFinite(r) || n.avg === void 0 ? false : e.below ? r < n.avg : r > n.avg;
196
+ } }, stdBandPredicate = { needs: ["avg", "stddev"], test(e, t, n) {
197
+ const r = num$1(t.value);
198
+ if (!Number.isFinite(r) || n.avg === void 0 || n.stddev === void 0) return false;
199
+ const i = Math.abs(r - n.avg), o = e.k * n.stddev;
200
+ return e.outside === false ? i <= o : i >= o;
201
+ } }, duplicatePredicate = { needs: ["cardinality"], test(e, t, n) {
202
+ const r = num$1(t.value);
203
+ if (!Number.isFinite(r) || !n.countOf) return false;
204
+ const i = n.countOf(r);
205
+ return e.unique ? i === 1 : i > 1;
206
+ } }, customFallbackPredicate = { needs: [], test() {
207
+ return false;
208
+ } }, BUILTIN_PREDICATES = Object.freeze({ compare: comparePredicate, textContains: textContainsPredicate, dateOccurring: dateOccurringPredicate, topN: topNPredicate, topNpct: topNpctPredicate, aboveAvg: aboveAvgPredicate, stdBand: stdBandPredicate, duplicate: duplicatePredicate, custom: customFallbackPredicate });
209
+ function createRuleTypeRegistry() {
210
+ const e = new TypedRegistry({ spi: { name: "CFPredicate", version: "1" } });
211
+ for (const [t, n] of Object.entries(BUILTIN_PREDICATES)) e.register(t, n, { origin: "builtin" });
212
+ return e;
213
+ }
214
+ function scopeMatches(e, t) {
215
+ const n = e.scope;
216
+ return !(n.columnId !== t.columnId || n.range && (t.rowIndex < n.range.startRow || t.rowIndex >= n.range.endRow) || n.rowState && n.rowState !== t.rowState);
217
+ }
218
+ function sortRules(e) {
219
+ return [...e].sort((t, n) => t.priority - n.priority || (t.id < n.id ? -1 : t.id > n.id ? 1 : 0));
220
+ }
221
+ function num(e) {
222
+ return typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
223
+ }
224
+ function clamp01(e) {
225
+ return e < 0 ? 0 : e > 1 ? 1 : e;
226
+ }
227
+ function computeDatum(e, t, n) {
228
+ const r = num(t), i = Number.isFinite(r), o = !i || r === 0 ? 0 : r > 0 ? 1 : -1, s = n.min ?? 0, a = n.max ?? 0;
229
+ if (e.kind === "bar") {
230
+ if (!i) return { sign: 0 };
231
+ const c = e.axis ?? "zero";
232
+ let l, f = false;
233
+ if (c === "zero") {
234
+ const d = Math.max(Math.abs(s), Math.abs(a)) || 1, u = Math.abs(r) / d;
235
+ l = clamp01(u), e.clamp && u > 1 && (f = true);
236
+ } else {
237
+ const d = a - s || 1, u = (r - s) / d;
238
+ l = clamp01(u), e.clamp && (u < 0 || u > 1) && (f = true);
239
+ }
240
+ return { ratio: l, sign: o, value: r, clamped: f };
241
+ }
242
+ if (e.kind === "scale") {
243
+ if (!i) return { sign: 0 };
244
+ const c = e.mode ?? "discrete";
245
+ let l;
246
+ if (e.diverging) {
247
+ const u = e.midpoint === "zero" ? 0 : e.midpoint === "mean" ? n.avg ?? (s + a) / 2 : typeof e.midpoint == "number" ? e.midpoint : 0;
248
+ if (r <= u) {
249
+ const p = u - s || 1;
250
+ l = 0.5 * clamp01((r - s) / p);
251
+ } else {
252
+ const p = a - u || 1;
253
+ l = 0.5 + 0.5 * clamp01((r - u) / p);
254
+ }
255
+ } else {
256
+ const u = a - s || 1;
257
+ l = clamp01((r - s) / u);
258
+ }
259
+ if (c === "continuous") return { ratio: l, sign: o, value: r };
260
+ const f = e.diverging ? Math.max(3, Math.min(5, e.bands ?? 3)) : Math.max(2, Math.min(5, e.bands ?? 3)), d = Math.min(f - 1, Math.floor(l * f));
261
+ return { ratio: l, bandIndex: d, bandCount: f, sign: o, value: r };
262
+ }
263
+ if (e.kind === "icon") {
264
+ if (!i) return { sign: 0 };
265
+ const c = e.steps ?? 3, l = a - s || 1, f = clamp01((r - s) / l);
266
+ let d = Math.min(c - 1, Math.floor(f * c));
267
+ return e.reverse && (d = c - 1 - d), { bandIndex: d, bandCount: c, ratio: f, sign: o, value: r };
268
+ }
269
+ return i ? { sign: o, value: r } : { sign: o };
270
+ }
271
+ function predicateFor(e, t) {
272
+ return e.get(t);
273
+ }
274
+ class DefaultCFEvaluator {
275
+ constructor(t) {
276
+ this.ruleTypes = t;
277
+ }
278
+ evaluate(t, n, r, i) {
279
+ const o = sortRules(t.filter((u) => scopeMatches(u, n)));
280
+ let s;
281
+ const a = [], c = [];
282
+ let l;
283
+ for (const u of o) {
284
+ const p = predicateFor(this.ruleTypes, u.when.type);
285
+ if (!p) continue;
286
+ let h = false;
287
+ try {
288
+ h = p.test(u.when, n, r, i);
289
+ } catch {
290
+ h = false;
291
+ }
292
+ if (!h) continue;
293
+ const b = computeDatum(u.encode, n.value, r), m = { ruleId: u.id, conditionType: u.when.type, threshold: thresholdOf(u), inputValue: n.value, statsUsed: snapshotStats(r), priority: u.priority, wonOver: [] }, g = { ruleId: u.id, fired: true, encode: u.encode, datum: b, ...u.style !== void 0 ? { styleRef: u.style } : {}, lineage: m };
294
+ if (u.encode.kind === "bar" || u.encode.kind === "scale" ? (s && c.push(s.ruleId), s = g) : a.push(g), u.stopIfTrue) {
295
+ l = u.id;
296
+ break;
297
+ }
298
+ }
299
+ s && c.length && (s = { ...s, lineage: { ...s.lineage, wonOver: [...c] } });
300
+ const f = s ?? a[0], d = { decorators: a };
301
+ return s && (d.background = s), f && (d.winner = f), l !== void 0 && (d.stoppedAt = l), d;
302
+ }
303
+ }
304
+ function thresholdOf(e) {
305
+ const { type: t, ...n } = e.when;
306
+ return n;
307
+ }
308
+ const NEUTRAL_MIDPOINT = "#f4f5f6";
309
+ function toHex(e) {
310
+ const t = (n) => Math.max(0, Math.min(255, Math.round(n))).toString(16).padStart(2, "0");
311
+ return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
312
+ }
313
+ function mix(e, t, n) {
314
+ const r = n < 0 ? 0 : n > 1 ? 1 : n;
315
+ return { r: e.r + (t.r - e.r) * r, g: e.g + (t.g - e.g) * r, b: e.b + (t.b - e.b) * r };
316
+ }
317
+ function rgb(e) {
318
+ return OpenGrid.parseColor(e) ?? { r: 58, g: 63, b: 69 };
319
+ }
320
+ function lightAnchorOf(e) {
321
+ return mix({ r: 255, g: 255, b: 255 }, e, 0.08);
322
+ }
323
+ function sequentialColor(e, t) {
324
+ const n = rgb(e);
325
+ return toHex(mix(lightAnchorOf(n), n, t));
326
+ }
327
+ function sequentialBands(e, t) {
328
+ const n = Math.max(2, Math.min(5, Math.floor(t))), r = [];
329
+ for (let i = 0; i < n; i++) r.push(sequentialColor(e, n === 1 ? 0 : i / (n - 1)));
330
+ return r;
331
+ }
332
+ function divergingColor(e, t, n, r = NEUTRAL_MIDPOINT) {
333
+ const i = rgb(r);
334
+ return n <= 0.5 ? toHex(mix(rgb(e), i, n / 0.5)) : toHex(mix(i, rgb(t), (n - 0.5) / 0.5));
335
+ }
336
+ function divergingBands(e, t, n, r = NEUTRAL_MIDPOINT) {
337
+ const i = Math.max(3, Math.min(5, Math.floor(n))), o = [];
338
+ for (let s = 0; s < i; s++) o.push(divergingColor(e, t, i === 1 ? 0.5 : s / (i - 1), r));
339
+ return o;
340
+ }
341
+ const AA_BODY = 4.5, BLACK = "#111111", WHITE = "#ffffff";
342
+ class DefaultInkResolver {
343
+ pickInk(t) {
344
+ const n = OpenGrid.contrastRatio(BLACK, t), r = OpenGrid.contrastRatio(WHITE, t), i = r >= n, o = i ? WHITE : BLACK, s = i ? r : n;
345
+ return s >= AA_BODY ? { color: o, ratio: s } : { color: o, outline: true, outlineColor: i ? BLACK : WHITE, ratio: s };
346
+ }
347
+ }
348
+ function passesInkGate(e) {
349
+ return Math.max(OpenGrid.contrastRatio(BLACK, e), OpenGrid.contrastRatio(WHITE, e)) >= AA_BODY;
350
+ }
351
+ const ink = new DefaultInkResolver(), MISSING_INK = "#111111";
352
+ function fmt(e) {
353
+ return e === void 0 || !Number.isFinite(e) ? "—" : Number.isInteger(e) ? String(e) : String(Math.round(e * 1e3) / 1e3);
354
+ }
355
+ function pct(e) {
356
+ return e === void 0 ? "—" : `${Math.round(e * 100)}%`;
357
+ }
358
+ class BarEncoder {
359
+ constructor() {
360
+ this.kind = "bar";
361
+ }
362
+ encode(t, n, r) {
363
+ const i = t.encode, o = t.datum;
364
+ if (o.value === void 0) return { layer: "background", inkColor: MISSING_INK, ariaSummary: "값 없음" };
365
+ const s = i.seed ?? (o.sign === -1 ? "graphite" : "primary"), a = n.rampFrom(s), l = (i.axis ?? "zero") === "zero" && o.sign === -1 ? "right" : "left", f = ink.pickInk(a), d = o.ratio ?? 0, u = o.clamped ? " (범위 초과·클램프)" : "", p = i.log ? " (log)" : "", h = `값 ${fmt(o.value)}, 막대 ${pct(d)}${o.sign === -1 ? " 음수" : ""}${u}${p}`;
366
+ return { layer: "background", fill: { color: a, from: l, ratio: d }, inkColor: f.color, ...f.outline ? { inkOutline: true } : {}, ...o.clamped ? { clamped: true } : {}, ariaSummary: h };
367
+ }
368
+ }
369
+ class ScaleEncoder {
370
+ constructor() {
371
+ this.kind = "scale";
372
+ }
373
+ encode(t, n, r) {
374
+ const i = t.encode, o = t.datum;
375
+ if (o.value === void 0) return { layer: "background", inkColor: MISSING_INK, ariaSummary: "값 없음" };
376
+ const s = i.mode ?? "discrete";
377
+ let a, c = "";
378
+ if (i.diverging) {
379
+ const d = n.rampFrom("graphite"), u = n.rampFrom("primary");
380
+ if (s === "continuous") a = divergingColor(d, u, o.ratio ?? 0.5);
381
+ else {
382
+ const p = divergingBands(d, u, o.bandCount ?? 3);
383
+ a = p[o.bandIndex ?? 0] ?? p[0], c = ` (구간 ${(o.bandIndex ?? 0) + 1}/${o.bandCount ?? p.length})`;
384
+ }
385
+ } else {
386
+ const d = i.seed ?? "graphite", u = n.rampFrom(d);
387
+ if (s === "continuous") a = sequentialColor(u, o.ratio ?? 0);
388
+ else {
389
+ const p = sequentialBands(u, o.bandCount ?? 3);
390
+ a = p[o.bandIndex ?? 0] ?? p[0], c = ` (구간 ${(o.bandIndex ?? 0) + 1}/${o.bandCount ?? p.length})`;
391
+ }
392
+ }
393
+ const l = ink.pickInk(a), f = `값 ${fmt(o.value)}, 히트맵 ${pct(o.ratio)}${c}`;
394
+ return { layer: "background", fill: { color: a, ratio: o.ratio ?? 0 }, inkColor: l.color, ...l.outline ? { inkOutline: true } : {}, ariaSummary: f };
395
+ }
396
+ }
397
+ function shapeFor(e, t) {
398
+ return t <= 1 ? "circle" : e <= 0 ? "triangleDown" : e >= t - 1 ? "triangleUp" : "circle";
399
+ }
400
+ class IconEncoder {
401
+ constructor() {
402
+ this.kind = "icon";
403
+ }
404
+ encode(t, n, r) {
405
+ const i = t.encode, o = t.datum;
406
+ if (o.value === void 0) return { layer: "decorator", inkColor: MISSING_INK, ariaSummary: "값 없음" };
407
+ const s = o.bandCount ?? i.steps ?? 3, a = o.bandIndex ?? 0, c = shapeFor(a, s), l = sequentialBands(n.rampFrom("graphite"), Math.max(2, s)), f = l[Math.min(l.length - 1, a)] ?? l[0], d = `cf-icon-${a}-of-${s}`, u = a <= 0 ? "하위" : a >= s - 1 ? "상위" : "중간", p = `값 ${fmt(o.value)}, ${u} 구간 ${a + 1}/${s} (${c})`;
408
+ return { layer: "decorator", glyph: { role: d, tint: f, shape: c }, inkColor: f, ariaSummary: p };
409
+ }
410
+ }
411
+ class SparklineEncoder {
412
+ constructor() {
413
+ this.kind = "sparkline";
414
+ }
415
+ encode(t, n, r) {
416
+ const i = t.encode, o = t.datum;
417
+ return { layer: "decorator", inkColor: "#111111", ariaSummary: `인셀 ${i.chart ?? "line"} 스파크, 값 ${fmt(o.value)}` };
418
+ }
419
+ }
420
+ function createEncoderRegistry() {
421
+ const e = new TypedRegistry({ spi: { name: "CFEncoder", version: "1" } });
422
+ return e.register("bar", new BarEncoder(), { origin: "builtin" }), e.register("scale", new ScaleEncoder(), { origin: "builtin" }), e.register("icon", new IconEncoder(), { origin: "builtin" }), e.register("sparkline", new SparklineEncoder(), { origin: "builtin" }), e;
423
+ }
424
+ function createNamedStyleRegistry() {
425
+ return new TypedRegistry({ spi: { name: "CFNamedStyle", version: "1" } });
426
+ }
427
+ function isObj(e) {
428
+ return typeof e == "object" && e !== null;
429
+ }
430
+ class DefaultCFRuleLoader {
431
+ load(t, n) {
432
+ const r = [], i = [], o = Array.isArray(t) ? t : isObj(t) && Array.isArray(t.rules) ? t.rules : [];
433
+ for (const s of o) {
434
+ if (!isObj(s)) {
435
+ i.push({ ruleId: "?", reason: "malformed", detail: "not an object" });
436
+ continue;
437
+ }
438
+ const a = typeof s.id == "string" ? s.id : "?", c = s.when, l = s.encode, f = s.scope;
439
+ if (typeof s.v == "number" && s.v > CF_SCHEMA_VERSION) {
440
+ i.push({ ruleId: a, reason: "future-version", detail: `v${s.v} > ${CF_SCHEMA_VERSION}` });
441
+ continue;
442
+ }
443
+ if (!isObj(c) || typeof c.type != "string" || !isObj(l) || typeof l.kind != "string" || !isObj(f) || typeof f.columnId != "string") {
444
+ i.push({ ruleId: a, reason: "malformed", detail: "missing when/encode/scope" });
445
+ continue;
446
+ }
447
+ if (!n.types.has(c.type)) {
448
+ i.push({ ruleId: a, reason: "unknown-condition", detail: String(c.type) });
449
+ continue;
450
+ }
451
+ if (!n.encoders.has(l.kind)) {
452
+ i.push({ ruleId: a, reason: "unknown-encoder", detail: String(l.kind) });
453
+ continue;
454
+ }
455
+ const d = s.style;
456
+ if (isStyleRef(d) && !n.styles.has(d.ref)) {
457
+ i.push({ ruleId: a, reason: "unknown-style", detail: d.ref });
458
+ continue;
459
+ }
460
+ r.push(s);
461
+ }
462
+ return { rules: r, skipped: i };
463
+ }
464
+ }
465
+ function serializeRules(e) {
466
+ return JSON.stringify({ v: CF_SCHEMA_VERSION, rules: e });
467
+ }
468
+ class CFRuleStore {
469
+ constructor(t = []) {
470
+ this.byColumn = /* @__PURE__ */ new Map(), this.all = [];
471
+ for (const n of t) this.add(n);
472
+ }
473
+ add(t) {
474
+ this.all.push(t);
475
+ const n = this.byColumn.get(t.scope.columnId) ?? [];
476
+ n.push(t), this.byColumn.set(t.scope.columnId, n);
477
+ }
478
+ rulesFor(t) {
479
+ return this.byColumn.get(t) ?? [];
480
+ }
481
+ list() {
482
+ return this.all;
483
+ }
484
+ }
485
+ class CFEngine {
486
+ constructor(t, n = createEncoderRegistry(), r = createRuleTypeRegistry(), i) {
487
+ this.rules = t, this.encoders = n, this.ruleTypes = r, this.evaluator = i ?? new DefaultCFEvaluator(r);
488
+ }
489
+ get lineage() {
490
+ return this;
491
+ }
492
+ paintFor(t, n, r, i, o) {
493
+ const s = this.evaluator.evaluate(this.rules.rulesFor(t.columnId), t, n, o), a = [];
494
+ if (s.background) {
495
+ const c = this.encoders.get(s.background.encode.kind);
496
+ c && a.push(c.encode(s.background, r, i));
497
+ }
498
+ for (const c of s.decorators) {
499
+ const l = this.encoders.get(c.encode.kind);
500
+ l && a.push(l.encode(c, r, i));
501
+ }
502
+ return a;
503
+ }
504
+ statsNeedsFor(t) {
505
+ const n = /* @__PURE__ */ new Set();
506
+ for (const r of this.rules.rulesFor(t)) {
507
+ const i = this.ruleTypes.get(r.when.type);
508
+ if (i) for (const o of i.needs) n.add(o);
509
+ }
510
+ return [...n].sort();
511
+ }
512
+ explain(t, n, r, i) {
513
+ const o = this.evaluator.evaluate(n, t, r, i), s = [];
514
+ o.background && s.push(o.background.lineage);
515
+ for (const a of o.decorators) s.push(a.lineage);
516
+ return s.sort((a, c) => a.priority - c.priority);
517
+ }
518
+ }
519
+ exports.AA_BODY = AA_BODY, exports.BUILTIN_PREDICATES = BUILTIN_PREDICATES, exports.BarEncoder = BarEncoder, exports.CFEngine = CFEngine, exports.CFRuleStore = CFRuleStore, exports.CF_SCHEMA_VERSION = CF_SCHEMA_VERSION, exports.DefaultCFEvaluator = DefaultCFEvaluator, exports.DefaultCFRuleLoader = DefaultCFRuleLoader, exports.DefaultInkResolver = DefaultInkResolver, exports.IconEncoder = IconEncoder, exports.NEUTRAL_MIDPOINT = NEUTRAL_MIDPOINT, exports.ScaleEncoder = ScaleEncoder, exports.SparklineEncoder = SparklineEncoder, exports.cfRuleEquals = cfRuleEquals, exports.computeColumnStats = computeColumnStats, exports.computeDatum = computeDatum, exports.createEncoderRegistry = createEncoderRegistry, exports.createNamedStyleRegistry = createNamedStyleRegistry, exports.createRuleTypeRegistry = createRuleTypeRegistry, exports.divergingBands = divergingBands, exports.divergingColor = divergingColor, exports.isStyleRef = isStyleRef, exports.passesInkGate = passesInkGate, exports.scopeMatches = scopeMatches, exports.sequentialBands = sequentialBands, exports.sequentialColor = sequentialColor, exports.serializeRules = serializeRules, exports.snapshotStats = snapshotStats, exports.staticAppearanceView = staticAppearanceView;
520
+ //# sourceMappingURL=index-JjfWY3Bt.cjs.map
@@ -123,6 +123,17 @@
123
123
  차단한다. 모든 후손(행·셀·헤더 <th> 포함)으로 normal이 cascade되어,
124
124
  고정 행/헤더 높이가 호스트 본문 line-height에 desync되는 것을 막는다. */
125
125
  line-height: normal;
126
+ /* host isolation(확장): 호스트 테마가 body/후손에 건 텍스트-흐름 상속 속성을 차단한다.
127
+ letter-spacing·word-spacing 이 상속되면 셀 텍스트가 "김 민 준"처럼 벌어지고(부모 div 오염),
128
+ text-transform/text-indent/font-style/font-variant 도 데이터 표시를 왜곡한다. 컨테이너에서
129
+ normal/기본으로 못박아 전 후손에 cascade — 특정 요소(헤더 letter-spacing·uppercase 등)는
130
+ 자기 규칙으로 명시 재지정하므로 영향받지 않는다. */
131
+ letter-spacing: normal;
132
+ word-spacing: normal;
133
+ text-transform: none;
134
+ text-indent: 0;
135
+ font-style: normal;
136
+ font-variant: normal;
126
137
  display: flex;
127
138
  flex-direction: column;
128
139
  overflow: hidden;
@@ -1704,7 +1715,7 @@
1704
1715
  font-size: 12px;
1705
1716
  }
1706
1717
 
1707
- .og-vue-wrapper[data-v-0a49d4fc] {
1718
+ .og-vue-wrapper[data-v-a9841021] {
1708
1719
  display: block;
1709
1720
  box-sizing: border-box;
1710
1721
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime"), React = require("react"), OpenGrid = require("./OpenGrid-0r_543Kj.cjs");
3
+ const jsxRuntime = require("react/jsx-runtime"), React = require("react"), OpenGrid = require("./OpenGrid-B7m7ei7f.cjs");
4
4
  function OpenGridReact({ data: e, columns: r, height: t = 400, width: u = "100%", editable: i = false, sortable: p = true, filterable: o = true, rowNumber: l = false, checkColumn: d = false, stateColumn: y = false, draggable: R = false, frozenColumns: x = 0, theme: s = "default", options: E, style: T, className: $, onReady: g, onDataChange: O, onCellClick: G, onRowClick: j, onEditEnd: a, onSortChange: b, onFilterChange: q, onRowDrop: S }) {
5
5
  const c = React.useRef(null), n = React.useRef(null), M = { height: typeof t == "number" ? `${t}px` : t, width: typeof u == "number" ? `${u}px` : u, display: "block", boxSizing: "border-box", ...T };
6
6
  return React.useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as W } from "react/jsx-runtime";
2
2
  import J, { useRef as u, useEffect as f } from "react";
3
- import { O as K } from "./OpenGrid-HmhGVC2V.js";
3
+ import { O as K } from "./OpenGrid-CeUdO_fM.js";
4
4
  function q({ data: r, columns: e, height: t = 400, width: c = "100%", editable: o = false, sortable: l = true, filterable: y = true, rowNumber: d = false, checkColumn: O = false, stateColumn: R = false, draggable: x = false, frozenColumns: G = 0, theme: s = "default", options: z, style: A, className: B, onReady: D, onDataChange: m, onCellClick: a, onRowClick: $, onEditEnd: b, onSortChange: j, onFilterChange: v, onRowDrop: S }) {
5
5
  const i = u(null), n = u(null), H = { height: typeof t == "number" ? `${t}px` : t, width: typeof c == "number" ? `${c}px` : c, display: "block", boxSizing: "border-box", ...A };
6
6
  return f(() => {
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-0r_543Kj.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-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 }) {
4
4
  const e = n, o = r, c = vue.ref(), a = vue.shallowRef(null);
5
- let d = null;
6
- const i = vue.computed(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height, width: typeof e.width == "number" ? `${e.width}px` : e.width }));
5
+ let i = null;
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 }));
7
7
  return vue.onMounted(() => {
8
8
  if (!c.value) return;
9
9
  const l = { columns: e.columns, height: "100%", width: "100%", editable: e.editable, sortable: e.sortable, filterable: e.filterable, rowNumber: e.rowNumber, checkColumn: e.checkColumn, stateColumn: e.stateColumn, draggable: e.draggable, frozenColumns: e.frozenColumns, theme: e.theme, ...e.options, onReady: (t) => {
10
10
  var _a;
11
11
  ((_a = e.data) == null ? void 0 : _a.length) && t.setData(e.data), o("ready", t);
12
12
  }, onCellClick: (t) => o("cell-click", t), onRowClick: (t) => o("row-click", t), onEditEnd: (t) => o("edit-end", t), onSortChange: (t) => o("sort-change", t), onFilterChange: (t) => o("filter-change", t), onDataChange: (t) => {
13
- d = t, o("update:data", t);
13
+ i = t, o("update:data", t);
14
14
  } };
15
15
  a.value = new OpenGrid$1.OpenGrid(c.value, l);
16
16
  }), vue.watch(() => e.data, (l) => {
17
- !a.value || !l || l !== d && a.value.setData(l);
17
+ !a.value || !l || l !== i && a.value.setData(l);
18
18
  }, { deep: false }), vue.watch(() => e.theme, (l) => {
19
19
  a.value && l && a.value.setTheme(l);
20
20
  }), vue.watch(() => e.columns, (l) => {
@@ -22,11 +22,11 @@ const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-0r_543Kj.cjs"), _sf
22
22
  }, { deep: false }), vue.onUnmounted(() => {
23
23
  var _a;
24
24
  (_a = a.value) == null ? void 0 : _a.destroy(), a.value = null;
25
- }), u({ grid: a }), (l, t) => (vue.openBlock(), vue.createElementBlock("div", { ref_key: "containerRef", ref: c, class: "og-vue-wrapper", style: vue.normalizeStyle(i.value) }, null, 4));
25
+ }), u({ grid: a }), (l, t) => (vue.openBlock(), vue.createElementBlock("div", { ref_key: "containerRef", ref: c, class: "og-vue-wrapper", style: vue.normalizeStyle(s.value) }, null, 4));
26
26
  } }), _export_sfc = (n, u) => {
27
27
  const r = n.__vccOpts || n;
28
28
  for (const [e, o] of u) r[e] = o;
29
29
  return r;
30
- }, OpenGrid = _export_sfc(_sfc_main, [["__scopeId", "data-v-0a49d4fc"]]);
30
+ }, OpenGrid = _export_sfc(_sfc_main, [["__scopeId", "data-v-a9841021"]]);
31
31
  exports.OpenGrid = OpenGrid;
32
32
  //# sourceMappingURL=open-grid-vue.cjs.map
@@ -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-HmhGVC2V.js";
2
+ import { O as k } from "./OpenGrid-CeUdO_fM.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;
@@ -27,7 +27,7 @@ const w = f({ __name: "OpenGrid", props: { data: { default: () => [] }, columns:
27
27
  const r = n.__vccOpts || n;
28
28
  for (const [e, o] of u) r[e] = o;
29
29
  return r;
30
- }, B = _(w, [["__scopeId", "data-v-0a49d4fc"]]);
30
+ }, B = _(w, [["__scopeId", "data-v-a9841021"]]);
31
31
  export {
32
32
  B as OpenGrid
33
33
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const OpenGrid = require("./OpenGrid-0r_543Kj.cjs");
3
+ const OpenGrid = require("./OpenGrid-B7m7ei7f.cjs");
4
4
  class GridShuttle {
5
5
  constructor(t, e, n, o = {}) {
6
6
  this._left = t, this._right = e;
package/dist/open-grid.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b, t as C } from "./OpenGrid-HmhGVC2V.js";
2
- import { D, I, L, O, S, i, l, r, s } from "./OpenGrid-HmhGVC2V.js";
1
+ import { b, t as C } from "./OpenGrid-CeUdO_fM.js";
2
+ import { D, I, L, O, S, i, l, r, s } from "./OpenGrid-CeUdO_fM.js";
3
3
  class T {
4
4
  constructor(t, e, o, r2 = {}) {
5
5
  this._left = t, this._right = e;