@ankhorage/zora 2.6.0 → 2.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 77fa4f9: Register `Progress` as a direct manifest-capable ZORA component with serializable metadata props and blueprint defaults.
8
+
3
9
  ## 2.6.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # ZORA
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v2.5.5](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v2.6.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
9
9
 
@@ -1,9 +1,44 @@
1
1
  export declare const progressMeta: {
2
2
  readonly name: "Progress";
3
3
  readonly category: "component";
4
- readonly directManifestNode: false;
4
+ readonly directManifestNode: true;
5
5
  readonly allowedChildren: readonly [];
6
- readonly note: "Feedback component; not represented as a manifest node in v1.";
7
- readonly props: {};
6
+ readonly blueprint: {
7
+ readonly label: "Progress";
8
+ readonly defaultProps: {
9
+ readonly value: 50;
10
+ readonly max: 100;
11
+ readonly color: "primary";
12
+ readonly size: "m";
13
+ };
14
+ };
15
+ readonly props: {
16
+ readonly value: {
17
+ readonly type: "number";
18
+ readonly category: "State";
19
+ readonly label: "Value";
20
+ readonly default: 50;
21
+ };
22
+ readonly max: {
23
+ readonly type: "number";
24
+ readonly category: "State";
25
+ readonly label: "Max";
26
+ readonly default: 100;
27
+ };
28
+ readonly color: {
29
+ readonly type: "enum";
30
+ readonly category: "Style";
31
+ readonly label: "Color";
32
+ readonly enum: readonly ["primary", "secondary", "tertiary", "quaternary", "neutral", "success", "warning", "error", "info", "danger"];
33
+ readonly default: "primary";
34
+ };
35
+ readonly size: {
36
+ readonly type: "enum";
37
+ readonly category: "Style";
38
+ readonly label: "Size";
39
+ readonly enum: readonly ["s", "m", "l"];
40
+ readonly default: "m";
41
+ };
42
+ };
8
43
  };
9
44
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/progress/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;CAOa,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/progress/meta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Ca,CAAC"}
@@ -1,9 +1,45 @@
1
+ import { ZORA_COLORS } from '../../internal/colorModel';
1
2
  export const progressMeta = {
2
3
  name: 'Progress',
3
4
  category: 'component',
4
- directManifestNode: false,
5
+ directManifestNode: true,
5
6
  allowedChildren: [],
6
- note: 'Feedback component; not represented as a manifest node in v1.',
7
- props: {},
7
+ blueprint: {
8
+ label: 'Progress',
9
+ defaultProps: {
10
+ value: 50,
11
+ max: 100,
12
+ color: 'primary',
13
+ size: 'm',
14
+ },
15
+ },
16
+ props: {
17
+ value: {
18
+ type: 'number',
19
+ category: 'State',
20
+ label: 'Value',
21
+ default: 50,
22
+ },
23
+ max: {
24
+ type: 'number',
25
+ category: 'State',
26
+ label: 'Max',
27
+ default: 100,
28
+ },
29
+ color: {
30
+ type: 'enum',
31
+ category: 'Style',
32
+ label: 'Color',
33
+ enum: [...ZORA_COLORS],
34
+ default: 'primary',
35
+ },
36
+ size: {
37
+ type: 'enum',
38
+ category: 'Style',
39
+ label: 'Size',
40
+ enum: ['s', 'm', 'l'],
41
+ default: 'm',
42
+ },
43
+ },
8
44
  };
9
45
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/progress/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,+DAA+D;IACrE,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const progressMeta = {\n name: 'Progress',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Feedback component; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/progress/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,UAAU;QACjB,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,GAAG;SACV;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,EAAE;SACZ;QACD,GAAG,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,GAAG;SACb;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC;YACtB,OAAO,EAAE,SAAS;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;YACrB,OAAO,EAAE,GAAG;SACb;KACF;CACmC,CAAC","sourcesContent":["import { ZORA_COLORS } from '../../internal/colorModel';\nimport type { ZoraComponentMeta } from '../../metadata';\n\nexport const progressMeta = {\n name: 'Progress',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Progress',\n defaultProps: {\n value: 50,\n max: 100,\n color: 'primary',\n size: 'm',\n },\n },\n props: {\n value: {\n type: 'number',\n category: 'State',\n label: 'Value',\n default: 50,\n },\n max: {\n type: 'number',\n category: 'State',\n label: 'Max',\n default: 100,\n },\n color: {\n type: 'enum',\n category: 'Style',\n label: 'Color',\n enum: [...ZORA_COLORS],\n default: 'primary',\n },\n size: {\n type: 'enum',\n category: 'Style',\n label: 'Size',\n enum: ['s', 'm', 'l'],\n default: 'm',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "2.6.0",
4
+ "version": "2.6.1",
5
5
  "description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
6
6
  "homepage": "https://github.com/ankhorage/zora#readme",
7
7
  "bugs": {
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@ankhorage/color-theory": "^0.0.7",
51
- "@ankhorage/contracts": "^1.13.0",
51
+ "@ankhorage/contracts": "^1.15.0",
52
52
  "@ankhorage/surface": "^2.0.2"
53
53
  },
54
54
  "files": [
@@ -1,10 +1,46 @@
1
+ import { ZORA_COLORS } from '../../internal/colorModel';
1
2
  import type { ZoraComponentMeta } from '../../metadata';
2
3
 
3
4
  export const progressMeta = {
4
5
  name: 'Progress',
5
6
  category: 'component',
6
- directManifestNode: false,
7
+ directManifestNode: true,
7
8
  allowedChildren: [],
8
- note: 'Feedback component; not represented as a manifest node in v1.',
9
- props: {},
9
+ blueprint: {
10
+ label: 'Progress',
11
+ defaultProps: {
12
+ value: 50,
13
+ max: 100,
14
+ color: 'primary',
15
+ size: 'm',
16
+ },
17
+ },
18
+ props: {
19
+ value: {
20
+ type: 'number',
21
+ category: 'State',
22
+ label: 'Value',
23
+ default: 50,
24
+ },
25
+ max: {
26
+ type: 'number',
27
+ category: 'State',
28
+ label: 'Max',
29
+ default: 100,
30
+ },
31
+ color: {
32
+ type: 'enum',
33
+ category: 'Style',
34
+ label: 'Color',
35
+ enum: [...ZORA_COLORS],
36
+ default: 'primary',
37
+ },
38
+ size: {
39
+ type: 'enum',
40
+ category: 'Style',
41
+ label: 'Size',
42
+ enum: ['s', 'm', 'l'],
43
+ default: 'm',
44
+ },
45
+ },
10
46
  } as const satisfies ZoraComponentMeta;
@@ -177,6 +177,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
177
177
  'Heading',
178
178
  'Divider',
179
179
  'ChatListItem',
180
+ 'Progress',
180
181
  ]);
181
182
 
182
183
  const expectedContainerNodes = new Set([
@@ -217,6 +218,17 @@ describe('ZORA_COMPONENT_META invariants', () => {
217
218
  }
218
219
  });
219
220
 
221
+ test('Progress is a direct manifest leaf with serializable defaults', () => {
222
+ expect(ZORA_COMPONENT_META.Progress.directManifestNode).toBe(true);
223
+ expect(ZORA_COMPONENT_META.Progress.allowedChildren).toEqual([]);
224
+ expect(ZORA_COMPONENT_META.Progress.blueprint?.defaultProps).toEqual({
225
+ value: 50,
226
+ max: 100,
227
+ color: 'primary',
228
+ size: 'm',
229
+ });
230
+ });
231
+
220
232
  test('non-direct manifest nodes include an explicit note', () => {
221
233
  for (const [key, meta] of Object.entries(ZORA_COMPONENT_META)) {
222
234
  if (meta.directManifestNode) continue;