@monospaced/set-core 0.0.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 (103) hide show
  1. package/README.md +37 -0
  2. package/dist/components/alert/alert.d.ts +59 -0
  3. package/dist/components/alert/alert.d.ts.map +1 -0
  4. package/dist/components/avatar/avatar.d.ts +44 -0
  5. package/dist/components/avatar/avatar.d.ts.map +1 -0
  6. package/dist/components/avatar/get-initials.d.ts +18 -0
  7. package/dist/components/avatar/get-initials.d.ts.map +1 -0
  8. package/dist/components/badge/badge.d.ts +33 -0
  9. package/dist/components/badge/badge.d.ts.map +1 -0
  10. package/dist/components/banner/banner.d.ts +55 -0
  11. package/dist/components/banner/banner.d.ts.map +1 -0
  12. package/dist/components/blockquote/blockquote.d.ts +37 -0
  13. package/dist/components/blockquote/blockquote.d.ts.map +1 -0
  14. package/dist/components/box/box.d.ts +43 -0
  15. package/dist/components/box/box.d.ts.map +1 -0
  16. package/dist/components/button/button.d.ts +94 -0
  17. package/dist/components/button/button.d.ts.map +1 -0
  18. package/dist/components/card/card.d.ts +42 -0
  19. package/dist/components/card/card.d.ts.map +1 -0
  20. package/dist/components/checkbox/checkbox.d.ts +42 -0
  21. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  22. package/dist/components/container/container.d.ts +31 -0
  23. package/dist/components/container/container.d.ts.map +1 -0
  24. package/dist/components/details/details.d.ts +35 -0
  25. package/dist/components/details/details.d.ts.map +1 -0
  26. package/dist/components/divider/divider.d.ts +29 -0
  27. package/dist/components/divider/divider.d.ts.map +1 -0
  28. package/dist/components/expander/expander.d.ts +35 -0
  29. package/dist/components/expander/expander.d.ts.map +1 -0
  30. package/dist/components/fieldset/fieldset.d.ts +36 -0
  31. package/dist/components/fieldset/fieldset.d.ts.map +1 -0
  32. package/dist/components/figure/figure.d.ts +32 -0
  33. package/dist/components/figure/figure.d.ts.map +1 -0
  34. package/dist/components/grid/grid.d.ts +80 -0
  35. package/dist/components/grid/grid.d.ts.map +1 -0
  36. package/dist/components/heading/heading.d.ts +35 -0
  37. package/dist/components/heading/heading.d.ts.map +1 -0
  38. package/dist/components/icon/icon.d.ts +42 -0
  39. package/dist/components/icon/icon.d.ts.map +1 -0
  40. package/dist/components/icon/icons.generated.d.ts +7 -0
  41. package/dist/components/icon/icons.generated.d.ts.map +1 -0
  42. package/dist/components/image/image.d.ts +82 -0
  43. package/dist/components/image/image.d.ts.map +1 -0
  44. package/dist/components/inline/inline.d.ts +39 -0
  45. package/dist/components/inline/inline.d.ts.map +1 -0
  46. package/dist/components/input/input.d.ts +53 -0
  47. package/dist/components/input/input.d.ts.map +1 -0
  48. package/dist/components/link/link.d.ts +74 -0
  49. package/dist/components/link/link.d.ts.map +1 -0
  50. package/dist/components/logo/logo.d.ts +34 -0
  51. package/dist/components/logo/logo.d.ts.map +1 -0
  52. package/dist/components/menu/menu.d.ts +64 -0
  53. package/dist/components/menu/menu.d.ts.map +1 -0
  54. package/dist/components/nav/nav.d.ts +60 -0
  55. package/dist/components/nav/nav.d.ts.map +1 -0
  56. package/dist/components/page/page.d.ts +47 -0
  57. package/dist/components/page/page.d.ts.map +1 -0
  58. package/dist/components/panel/panel.d.ts +31 -0
  59. package/dist/components/panel/panel.d.ts.map +1 -0
  60. package/dist/components/pattern/pattern.d.ts +34 -0
  61. package/dist/components/pattern/pattern.d.ts.map +1 -0
  62. package/dist/components/poster/poster.d.ts +69 -0
  63. package/dist/components/poster/poster.d.ts.map +1 -0
  64. package/dist/components/prose/prose.d.ts +35 -0
  65. package/dist/components/prose/prose.d.ts.map +1 -0
  66. package/dist/components/radios/radios.d.ts +58 -0
  67. package/dist/components/radios/radios.d.ts.map +1 -0
  68. package/dist/components/range/range.d.ts +55 -0
  69. package/dist/components/range/range.d.ts.map +1 -0
  70. package/dist/components/root/root.d.ts +45 -0
  71. package/dist/components/root/root.d.ts.map +1 -0
  72. package/dist/components/sidebar/sidebar.d.ts +56 -0
  73. package/dist/components/sidebar/sidebar.d.ts.map +1 -0
  74. package/dist/components/spinner/spinner.d.ts +31 -0
  75. package/dist/components/spinner/spinner.d.ts.map +1 -0
  76. package/dist/components/stack/stack.d.ts +36 -0
  77. package/dist/components/stack/stack.d.ts.map +1 -0
  78. package/dist/components/surface/surface.d.ts +31 -0
  79. package/dist/components/surface/surface.d.ts.map +1 -0
  80. package/dist/components/switch/switch.d.ts +38 -0
  81. package/dist/components/switch/switch.d.ts.map +1 -0
  82. package/dist/components/text/text.d.ts +43 -0
  83. package/dist/components/text/text.d.ts.map +1 -0
  84. package/dist/components/textarea/textarea.d.ts +53 -0
  85. package/dist/components/textarea/textarea.d.ts.map +1 -0
  86. package/dist/core.css +1 -0
  87. package/dist/helpers/node.d.ts +22 -0
  88. package/dist/helpers/node.d.ts.map +1 -0
  89. package/dist/helpers/string.d.ts +12 -0
  90. package/dist/helpers/string.d.ts.map +1 -0
  91. package/dist/index.cjs +2 -0
  92. package/dist/index.cjs.map +1 -0
  93. package/dist/index.d.ts +52 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +33977 -0
  96. package/dist/index.js.map +1 -0
  97. package/dist/spec.d.ts +178 -0
  98. package/dist/spec.d.ts.map +1 -0
  99. package/dist/test/spec.d.ts +14 -0
  100. package/dist/test/spec.d.ts.map +1 -0
  101. package/dist/types.d.ts +6 -0
  102. package/dist/types.d.ts.map +1 -0
  103. package/package.json +50 -0
package/dist/spec.d.ts ADDED
@@ -0,0 +1,178 @@
1
+ /** Where a rule applies. */
2
+ export type SetSpecTarget = {
3
+ readonly on: "host";
4
+ } | {
5
+ readonly on: "descendant";
6
+ readonly selector: string;
7
+ };
8
+ /** Condition under which a rule fires. */
9
+ export type SetSpecCondition = {
10
+ readonly kind: "always";
11
+ } | {
12
+ readonly kind: "when-provided";
13
+ readonly prop: string;
14
+ } | {
15
+ readonly kind: "when-non-empty";
16
+ readonly prop: string;
17
+ } | {
18
+ readonly kind: "when-truthy";
19
+ readonly prop: string;
20
+ } | {
21
+ readonly kind: "when-equals";
22
+ readonly prop: string;
23
+ readonly to: string | number | boolean;
24
+ } | {
25
+ readonly kind: "when-in";
26
+ readonly prop: string;
27
+ readonly values: ReadonlyArray<string | number | boolean>;
28
+ } | {
29
+ readonly kind: "when-not-in";
30
+ readonly prop: string;
31
+ readonly values: ReadonlyArray<string | number | boolean>;
32
+ } | {
33
+ readonly kind: "all";
34
+ readonly of: ReadonlyArray<SetSpecCondition>;
35
+ } | {
36
+ readonly kind: "any";
37
+ readonly of: ReadonlyArray<SetSpecCondition>;
38
+ } | {
39
+ readonly kind: "not";
40
+ readonly of: SetSpecCondition;
41
+ };
42
+ /** Value expression for an emitted attribute. Omit to mean presence-only. */
43
+ export type SetSpecValue = {
44
+ readonly kind: "literal";
45
+ readonly text: string;
46
+ } | {
47
+ readonly kind: "prop";
48
+ readonly prop: string;
49
+ } | {
50
+ readonly kind: "template";
51
+ readonly pattern: string;
52
+ };
53
+ /** Single attribute-emission rule on the host or a structural descendant. */
54
+ export interface SetSpecAttributeRule {
55
+ readonly target: SetSpecTarget;
56
+ readonly attribute: string;
57
+ readonly condition: SetSpecCondition;
58
+ readonly value?: SetSpecValue;
59
+ }
60
+ /** Machine-readable type of a prop. */
61
+ export type SetSpecPropType = {
62
+ readonly kind: "string";
63
+ } | {
64
+ readonly kind: "text";
65
+ } | {
66
+ readonly kind: "html";
67
+ } | {
68
+ readonly kind: "boolean";
69
+ } | {
70
+ readonly kind: "number";
71
+ readonly min?: number;
72
+ readonly max?: number;
73
+ readonly integer?: boolean;
74
+ } | {
75
+ readonly kind: "enum";
76
+ readonly values: ReadonlyArray<string | number>;
77
+ } | {
78
+ readonly kind: "array";
79
+ readonly itemShape: Readonly<Record<string, SetComponentSpecProp>>;
80
+ } | {
81
+ readonly kind: "iconName";
82
+ } | {
83
+ readonly kind: "union";
84
+ readonly variants: ReadonlyArray<SetSpecPropType>;
85
+ };
86
+ export interface SetComponentSpecProp {
87
+ readonly description: string;
88
+ readonly type: SetSpecPropType;
89
+ readonly required?: boolean;
90
+ readonly requiredWhen?: string;
91
+ readonly ignoredWhen?: string;
92
+ readonly default?: unknown;
93
+ }
94
+ export interface SetComponentSpecEvent {
95
+ readonly description: string;
96
+ readonly bubbles?: boolean;
97
+ readonly cancelable?: boolean;
98
+ readonly detail?: string;
99
+ }
100
+ /**
101
+ * Host element identity. A plain string names a fixed element; the object form
102
+ * switches the element tag by the value of a discriminant prop (e.g. `button`
103
+ * renders as `<button>` or `<a>` depending on `mode`).
104
+ */
105
+ export type SetSpecElement = string | {
106
+ readonly kind: "switch";
107
+ readonly prop: string;
108
+ readonly cases: Readonly<Record<string, string>>;
109
+ };
110
+ /** Host element identity. `class` is the always-emit host class, if any. */
111
+ export interface SetSpecOutput {
112
+ readonly element: SetSpecElement;
113
+ readonly class?: string;
114
+ }
115
+ /**
116
+ * How the component accepts content.
117
+ *
118
+ * - `none`: component emits no user-supplied content.
119
+ * - `text`: single slot of escaped plain text, named by `prop`.
120
+ * - `html`: single slot of trusted HTML string, named by `prop`.
121
+ * - `structured`: typed record array, named by `prop`; item shape lives on
122
+ * that prop's `SetSpecPropType` (`kind: "array"`).
123
+ * - `slots`: multiple named content props. Each slot names its prop and kind.
124
+ */
125
+ export type SetSpecContent = {
126
+ readonly kind: "none";
127
+ } | {
128
+ readonly kind: "text";
129
+ readonly prop: string;
130
+ } | {
131
+ readonly kind: "html";
132
+ readonly prop: string;
133
+ } | {
134
+ readonly kind: "structured";
135
+ readonly prop: string;
136
+ } | {
137
+ readonly kind: "slots";
138
+ readonly slots: ReadonlyArray<{
139
+ readonly prop: string;
140
+ readonly kind: "text" | "html";
141
+ }>;
142
+ };
143
+ export interface SetComponentSpec {
144
+ readonly name: string;
145
+ readonly description: string;
146
+ readonly output: SetSpecOutput;
147
+ readonly content: SetSpecContent;
148
+ readonly props: Readonly<Record<string, SetComponentSpecProp>>;
149
+ readonly events: Readonly<Record<string, SetComponentSpecEvent>>;
150
+ readonly rules: {
151
+ readonly attributes: ReadonlyArray<SetSpecAttributeRule>;
152
+ };
153
+ }
154
+ type PropBag = Readonly<Record<string, unknown>>;
155
+ export declare const evaluateSpecCondition: (condition: SetSpecCondition, props: PropBag, spec: SetComponentSpec) => boolean;
156
+ /**
157
+ * Resolved expected attribute output.
158
+ * - `"present"`: attribute is emitted without a value (boolean attribute)
159
+ * - string: attribute is emitted with that exact value
160
+ */
161
+ export type ResolvedSpecValue = {
162
+ readonly kind: "present";
163
+ } | {
164
+ readonly kind: "value";
165
+ readonly text: string;
166
+ };
167
+ export declare const resolveSpecValue: (value: SetSpecValue | undefined, props: PropBag, spec: SetComponentSpec) => ResolvedSpecValue;
168
+ /** Collect every prop name referenced by a condition subtree. */
169
+ export declare const collectConditionProps: (condition: SetSpecCondition) => ReadonlyArray<string>;
170
+ /** Collect every prop name referenced by a value expression. */
171
+ export declare const collectValueProps: (value: SetSpecValue | undefined) => ReadonlyArray<string>;
172
+ type StoryArgType = Record<string, unknown>;
173
+ export declare const specToArgTypes: (spec: SetComponentSpec) => Record<string, StoryArgType>;
174
+ export declare const specToComponentDescription: (spec: SetComponentSpec) => string | undefined;
175
+ export declare const specToPropsTable: (spec: SetComponentSpec) => string;
176
+ export declare const specToEventsTable: (spec: SetComponentSpec) => string | undefined;
177
+ export {};
178
+ //# sourceMappingURL=spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAUA,4BAA4B;AAC5B,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,0CAA0C;AAC1C,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAA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AAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,eAAO,MAAM,gBAAgB,GAC3B,OAAO,YAAY,GAAG,SAAS,EAC/B,OAAO,OAAO,EACd,MAAM,gBAAgB,KACrB,iBAmBF,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,GAChC,WAAW,gBAAgB,KAC1B,aAAa,CAAC,MAAM,CAmBtB,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,GAC5B,OAAO,YAAY,GAAG,SAAS,KAC9B,aAAa,CAAC,MAAM,CAYtB,CAAC;AAQF,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAmF5C,eAAO,MAAM,cAAc,GACzB,MAAM,gBAAgB,KACrB,MAAM,CAAC,MAAM,EAAE,YAAY,CAwC7B,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,MAAM,gBAAgB,KACrB,MAAM,GAAG,SAA6B,CAAC;AAK1C,eAAO,MAAM,gBAAgB,GAAI,MAAM,gBAAgB,KAAG,MAiBzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,gBAAgB,KACrB,MAAM,GAAG,SAcX,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type SetComponentSpec } from "../spec";
2
+ export interface SpecConsistencyConfig<Props> {
3
+ readonly spec: SetComponentSpec;
4
+ readonly renderer: (props: Props) => string;
5
+ readonly baseProps: Props;
6
+ /**
7
+ * Extra props to merge when probing a specific prop, to satisfy cross-prop
8
+ * constraints declared in the SPEC (for example a `requiredWhen` partner).
9
+ * Keyed by the prop being probed.
10
+ */
11
+ readonly propOverrides?: Readonly<Record<string, Partial<Props>>>;
12
+ }
13
+ export declare function describeSpecConsistency<Props extends object>(config: SpecConsistencyConfig<Props>): void;
14
+ //# sourceMappingURL=spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../../src/test/spec.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,gBAAgB,EAItB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,qBAAqB,CAAC,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CACnE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,SAAS,MAAM,EAC1D,MAAM,EAAE,qBAAqB,CAAC,KAAK,CAAC,GACnC,IAAI,CAiDN"}
@@ -0,0 +1,6 @@
1
+ export type SetAlign = "start" | "center" | "end";
2
+ export type SetInlineSize = "full" | "fit";
3
+ export type SetStatusTone = "info" | "success" | "warning" | "error";
4
+ export type SetControlSize = "sm" | "md";
5
+ export type SetHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,KAAK,CAAC;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAAC;AACzC,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@monospaced/set-core",
3
+ "version": "0.0.0",
4
+ "description": "SSR-first component library for Set. Native HTML output via custom elements, with a co-located CSS contract.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/monospaced/set.git",
8
+ "directory": "packages/core"
9
+ },
10
+ "type": "module",
11
+ "style": "./dist/core.css",
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
+ },
22
+ "./styles.css": "./dist/core.css"
23
+ },
24
+ "dependencies": {
25
+ "tdesign-icons-svg": "^0.4.5"
26
+ },
27
+ "devDependencies": {
28
+ "@testing-library/dom": "^10.4.1",
29
+ "@testing-library/user-event": "^14.6.1",
30
+ "@types/node": "^25.8.0",
31
+ "autoprefixer": "^10.5.0",
32
+ "jsdom": "^29.1.1",
33
+ "postcss": "^8.5.14",
34
+ "prettier": "^3.8.3",
35
+ "typescript": "^5.9.3",
36
+ "vite": "^7.3.2",
37
+ "vitest": "^4.1.6",
38
+ "@monospaced/set-config": "0.0.0",
39
+ "@monospaced/set-system": "0.0.0",
40
+ "@monospaced/set-markdown": "0.0.0"
41
+ },
42
+ "scripts": {
43
+ "build": "vite build && pnpm run build:types",
44
+ "build:types": "tsc -p tsconfig.build.json",
45
+ "icons:generate": "node scripts/generate-icons.mjs",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest",
48
+ "typecheck": "tsc --noEmit"
49
+ }
50
+ }