@cratis/scene.primereact 4.2.0 → 4.2.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 (87) hide show
  1. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +18 -17
  3. package/dist/esm/for_columnDefinitions/when_deriving_columns.d.ts +0 -2
  4. package/dist/esm/for_columnDefinitions/when_deriving_columns.d.ts.map +0 -1
  5. package/dist/esm/for_columnDefinitions/when_deriving_columns.js +0 -64
  6. package/dist/esm/for_columnDefinitions/when_deriving_columns.js.map +0 -1
  7. package/dist/esm/for_menuItems/when_converting_entries.d.ts +0 -2
  8. package/dist/esm/for_menuItems/when_converting_entries.d.ts.map +0 -1
  9. package/dist/esm/for_menuItems/when_converting_entries.js +0 -31
  10. package/dist/esm/for_menuItems/when_converting_entries.js.map +0 -1
  11. package/dist/esm/for_primeReactPackage/when_inspecting_the_manifest.d.ts +0 -2
  12. package/dist/esm/for_primeReactPackage/when_inspecting_the_manifest.d.ts.map +0 -1
  13. package/dist/esm/for_primeReactPackage/when_inspecting_the_manifest.js +0 -31
  14. package/dist/esm/for_primeReactPackage/when_inspecting_the_manifest.js.map +0 -1
  15. package/dist/esm/for_primeReactPackage/when_inspecting_the_registry.d.ts +0 -2
  16. package/dist/esm/for_primeReactPackage/when_inspecting_the_registry.d.ts.map +0 -1
  17. package/dist/esm/for_primeReactPackage/when_inspecting_the_registry.js +0 -25
  18. package/dist/esm/for_primeReactPackage/when_inspecting_the_registry.js.map +0 -1
  19. package/dist/esm/for_primeReactPackage/when_rendering_every_declared_component.d.ts +0 -2
  20. package/dist/esm/for_primeReactPackage/when_rendering_every_declared_component.d.ts.map +0 -1
  21. package/dist/esm/for_primeReactPackage/when_rendering_every_declared_component.js +0 -65
  22. package/dist/esm/for_primeReactPackage/when_rendering_every_declared_component.js.map +0 -1
  23. package/dist/esm/for_primeReactPackage/when_resolving_a_name_core_also_declares.d.ts +0 -2
  24. package/dist/esm/for_primeReactPackage/when_resolving_a_name_core_also_declares.d.ts.map +0 -1
  25. package/dist/esm/for_primeReactPackage/when_resolving_a_name_core_also_declares.js +0 -34
  26. package/dist/esm/for_primeReactPackage/when_resolving_a_name_core_also_declares.js.map +0 -1
  27. package/dist/esm/for_primeReactPackage/when_validating_the_bundle.d.ts +0 -2
  28. package/dist/esm/for_primeReactPackage/when_validating_the_bundle.d.ts.map +0 -1
  29. package/dist/esm/for_primeReactPackage/when_validating_the_bundle.js +0 -12
  30. package/dist/esm/for_primeReactPackage/when_validating_the_bundle.js.map +0 -1
  31. package/dist/esm/for_primeReactThemePreset/when_resolving_a_preset.d.ts +0 -2
  32. package/dist/esm/for_primeReactThemePreset/when_resolving_a_preset.d.ts.map +0 -1
  33. package/dist/esm/for_primeReactThemePreset/when_resolving_a_preset.js +0 -30
  34. package/dist/esm/for_primeReactThemePreset/when_resolving_a_preset.js.map +0 -1
  35. package/dist/esm/for_primeReactThemes/when_checking_attribution.d.ts +0 -2
  36. package/dist/esm/for_primeReactThemes/when_checking_attribution.d.ts.map +0 -1
  37. package/dist/esm/for_primeReactThemes/when_checking_attribution.js +0 -27
  38. package/dist/esm/for_primeReactThemes/when_checking_attribution.js.map +0 -1
  39. package/dist/esm/for_primeReactThemes/when_checking_compatibility.d.ts +0 -2
  40. package/dist/esm/for_primeReactThemes/when_checking_compatibility.d.ts.map +0 -1
  41. package/dist/esm/for_primeReactThemes/when_checking_compatibility.js +0 -18
  42. package/dist/esm/for_primeReactThemes/when_checking_compatibility.js.map +0 -1
  43. package/dist/esm/for_primeReactThemes/when_checking_the_token_vocabulary.d.ts +0 -2
  44. package/dist/esm/for_primeReactThemes/when_checking_the_token_vocabulary.d.ts.map +0 -1
  45. package/dist/esm/for_primeReactThemes/when_checking_the_token_vocabulary.js +0 -48
  46. package/dist/esm/for_primeReactThemes/when_checking_the_token_vocabulary.js.map +0 -1
  47. package/dist/esm/for_properties/when_reading_a_boolean_property.d.ts +0 -2
  48. package/dist/esm/for_properties/when_reading_a_boolean_property.d.ts.map +0 -1
  49. package/dist/esm/for_properties/when_reading_a_boolean_property.js +0 -26
  50. package/dist/esm/for_properties/when_reading_a_boolean_property.js.map +0 -1
  51. package/dist/esm/for_properties/when_reading_a_number_property.d.ts +0 -2
  52. package/dist/esm/for_properties/when_reading_a_number_property.d.ts.map +0 -1
  53. package/dist/esm/for_properties/when_reading_a_number_property.js +0 -29
  54. package/dist/esm/for_properties/when_reading_a_number_property.js.map +0 -1
  55. package/dist/esm/for_properties/when_reading_a_string_property.d.ts +0 -2
  56. package/dist/esm/for_properties/when_reading_a_string_property.d.ts.map +0 -1
  57. package/dist/esm/for_properties/when_reading_a_string_property.js +0 -23
  58. package/dist/esm/for_properties/when_reading_a_string_property.js.map +0 -1
  59. package/dist/esm/for_properties/when_reading_an_array_property.d.ts +0 -2
  60. package/dist/esm/for_properties/when_reading_an_array_property.d.ts.map +0 -1
  61. package/dist/esm/for_properties/when_reading_an_array_property.js +0 -32
  62. package/dist/esm/for_properties/when_reading_an_array_property.js.map +0 -1
  63. package/dist/esm/for_properties/when_reading_options.d.ts +0 -2
  64. package/dist/esm/for_properties/when_reading_options.d.ts.map +0 -1
  65. package/dist/esm/for_properties/when_reading_options.js +0 -37
  66. package/dist/esm/for_properties/when_reading_options.js.map +0 -1
  67. package/dist/esm/for_treeNodes/when_converting_entries.d.ts +0 -2
  68. package/dist/esm/for_treeNodes/when_converting_entries.d.ts.map +0 -1
  69. package/dist/esm/for_treeNodes/when_converting_entries.js +0 -33
  70. package/dist/esm/for_treeNodes/when_converting_entries.js.map +0 -1
  71. package/for_columnDefinitions/when_deriving_columns.ts +0 -80
  72. package/for_menuItems/when_converting_entries.ts +0 -40
  73. package/for_primeReactPackage/when_inspecting_the_manifest.ts +0 -41
  74. package/for_primeReactPackage/when_inspecting_the_registry.ts +0 -33
  75. package/for_primeReactPackage/when_rendering_every_declared_component.tsx +0 -111
  76. package/for_primeReactPackage/when_resolving_a_name_core_also_declares.ts +0 -45
  77. package/for_primeReactPackage/when_validating_the_bundle.ts +0 -17
  78. package/for_primeReactThemePreset/when_resolving_a_preset.ts +0 -49
  79. package/for_primeReactThemes/when_checking_attribution.ts +0 -46
  80. package/for_primeReactThemes/when_checking_compatibility.ts +0 -26
  81. package/for_primeReactThemes/when_checking_the_token_vocabulary.ts +0 -70
  82. package/for_properties/when_reading_a_boolean_property.ts +0 -35
  83. package/for_properties/when_reading_a_number_property.ts +0 -39
  84. package/for_properties/when_reading_a_string_property.ts +0 -31
  85. package/for_properties/when_reading_an_array_property.ts +0 -41
  86. package/for_properties/when_reading_options.ts +0 -50
  87. package/for_treeNodes/when_converting_entries.ts +0 -43
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/scene.primereact",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "The PrimeReact component package: maps Scene's abstract component names onto real PrimeReact components, and PrimeReact's free themes onto Scene themes.",
5
5
  "keywords": [
6
6
  "cratis",
@@ -25,7 +25,8 @@
25
25
  "dist",
26
26
  "**/*.ts",
27
27
  "**/*.tsx",
28
- "**/*.css"
28
+ "**/*.css",
29
+ "!**/for_*/**"
29
30
  ],
30
31
  "main": "dist/cjs/index.js",
31
32
  "module": "dist/esm/index.js",
@@ -52,26 +53,26 @@
52
53
  "build-storybook": "storybook build"
53
54
  },
54
55
  "dependencies": {
55
- "@cratis/scene.engine": "4.2.0",
56
- "@cratis/scene.model": "4.2.0",
57
- "@cratis/scene.react": "4.2.0",
56
+ "@cratis/scene.engine": "4.2.1",
57
+ "@cratis/scene.model": "4.2.1",
58
+ "@cratis/scene.react": "4.2.1",
58
59
  "@primeuix/themes": "^3.0.1"
59
60
  },
60
61
  "devDependencies": {
61
- "@cratis/scene.engine": "4.2.0",
62
- "@cratis/scene.model": "4.2.0",
63
- "@cratis/scene.react": "4.2.0",
64
- "@primereact/core": "11.1.0",
65
- "@primereact/headless": "11.1.0",
66
- "@primereact/types": "11.1.0",
67
- "@storybook/addon-links": "^10.6.0",
68
- "@storybook/react": "^10.6.0",
69
- "@storybook/react-vite": "^10.6.0",
70
- "primeicons": "8.0.1",
71
- "primereact": "11.1.0",
62
+ "@cratis/scene.engine": "4.2.1",
63
+ "@cratis/scene.model": "4.2.1",
64
+ "@cratis/scene.react": "4.2.1",
65
+ "@primereact/core": "11.2.0",
66
+ "@primereact/headless": "11.2.0",
67
+ "@primereact/types": "11.2.0",
68
+ "@storybook/addon-links": "^10.6.1",
69
+ "@storybook/react": "^10.6.1",
70
+ "@storybook/react-vite": "^10.6.1",
71
+ "primeicons": "8.0.2",
72
+ "primereact": "11.2.0",
72
73
  "react": "^19.3.0",
73
74
  "react-dom": "^19.3.0",
74
- "storybook": "^10.6.0"
75
+ "storybook": "^10.6.1"
75
76
  },
76
77
  "peerDependencies": {
77
78
  "@primereact/core": "^11.0.0",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_deriving_columns.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_deriving_columns.d.ts","sourceRoot":"","sources":["../../../for_columnDefinitions/when_deriving_columns.ts"],"names":[],"mappings":""}
@@ -1,64 +0,0 @@
1
- import { HorizontalAlignment, VerticalAlignment, Visibility } from '@cratis/scene.model';
2
- import { columnDefinitions } from '../data';
3
- function table(properties, slots = {}) {
4
- return {
5
- id: 'table',
6
- name: 'table',
7
- properties,
8
- slots,
9
- componentName: 'PrimeReact:table',
10
- visibility: Visibility.Visible,
11
- isEnabled: true,
12
- opacity: 1,
13
- size: {},
14
- zIndex: 0,
15
- minimumSize: {},
16
- maximumSize: {},
17
- margin: { left: 0, top: 0, right: 0, bottom: 0 },
18
- horizontalAlignment: HorizontalAlignment.Stretch,
19
- verticalAlignment: VerticalAlignment.Stretch,
20
- };
21
- }
22
- const rows = [{ name: 'Ada', role: 'Engineer' }];
23
- describe('when deriving columns', () => {
24
- describe('and the table has nested column children', () => {
25
- const element = table({ columns: ['ignored'] }, { columns: [{ id: 'c1', properties: { field: 'name', header: 'Name', sortable: true } }] });
26
- it('should use them in preference to anything else, because they are the most explicit statement', () => {
27
- columnDefinitions(element, rows).should.deep.equal([{ field: 'name', header: 'Name', sortable: true }]);
28
- });
29
- });
30
- describe('and a nested column child gives no header', () => {
31
- const element = table({}, { columns: [{ id: 'c1', properties: { field: 'name' } }] });
32
- it('should label it with the field rather than leaving it blank', () => {
33
- columnDefinitions(element, rows).should.deep.equal([{ field: 'name', header: 'name', sortable: false }]);
34
- });
35
- });
36
- describe('and the table configures its columns as records', () => {
37
- const element = table({ columns: [{ field: 'role', header: 'Role' }] });
38
- it('should use them', () => {
39
- columnDefinitions(element, rows).should.deep.equal([{ field: 'role', header: 'Role', sortable: false }]);
40
- });
41
- });
42
- describe('and the table configures its columns as bare field names', () => {
43
- const element = table({ columns: ['role'] });
44
- it('should use each name as both field and header', () => {
45
- columnDefinitions(element, rows).should.deep.equal([{ field: 'role', header: 'role', sortable: false }]);
46
- });
47
- });
48
- describe('and the table configures no columns at all', () => {
49
- const element = table({});
50
- it('should infer them from the first row, so a table with data renders it', () => {
51
- columnDefinitions(element, rows).should.deep.equal([
52
- { field: 'name', header: 'name', sortable: false },
53
- { field: 'role', header: 'role', sortable: false },
54
- ]);
55
- });
56
- });
57
- describe('and the table has neither columns nor rows', () => {
58
- const element = table({});
59
- it('should derive no columns rather than throwing', () => {
60
- columnDefinitions(element, []).should.deep.equal([]);
61
- });
62
- });
63
- });
64
- //# sourceMappingURL=when_deriving_columns.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_deriving_columns.js","sourceRoot":"","sources":["../../../for_columnDefinitions/when_deriving_columns.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,SAAS,KAAK,CAAC,UAAmC,EAAE,KAAK,GAA+B,EAAE;IACt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AK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7G,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;QAE1B,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;YAC7E,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC/C,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAClD,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;aACrD,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC;QAE1B,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACrD,iBAAiB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_converting_entries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_converting_entries.d.ts","sourceRoot":"","sources":["../../../for_menuItems/when_converting_entries.ts"],"names":[],"mappings":""}
@@ -1,31 +0,0 @@
1
- import { toMenuItems } from '../menuItems';
2
- describe('when converting entries', () => {
3
- describe('and an entry is a bare string', () => {
4
- it('should use it as the label', () => {
5
- toMenuItems(['File']).should.deep.equal([{ label: 'File' }]);
6
- });
7
- });
8
- describe('and an entry carries submenus', () => {
9
- const items = toMenuItems([{ label: 'File', icon: 'pi pi-file', items: [{ label: 'Open', items: ['Recent'] }] }]);
10
- it('should keep the label and icon', () => {
11
- items[0].label.should.equal('File');
12
- items[0].icon.should.equal('pi pi-file');
13
- });
14
- it('should follow the nesting to any depth, because a menubar and a tiered menu differ only in depth', () => {
15
- const submenu = items[0].items;
16
- const nested = submenu[0].items;
17
- nested[0].label.should.equal('Recent');
18
- });
19
- });
20
- describe('and an entry is a separator', () => {
21
- it('should keep it even though it has no label', () => {
22
- toMenuItems([{ separator: true }]).should.deep.equal([{ separator: true }]);
23
- });
24
- });
25
- describe('and an entry has no usable label', () => {
26
- it('should drop it rather than render a blank command', () => {
27
- toMenuItems([{ icon: 'pi pi-file' }, 7, ['nested'], { label: 'File' }]).should.deep.equal([{ label: 'File' }]);
28
- });
29
- });
30
- });
31
- //# sourceMappingURL=when_converting_entries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_converting_entries.js","sourceRoot":"","sources":["../../../for_menuItems/when_converting_entries.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;QAC3C,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;YAClC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;QAC3C,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YA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,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACnH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_inspecting_the_manifest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_inspecting_the_manifest.d.ts","sourceRoot":"","sources":["../../../for_primeReactPackage/when_inspecting_the_manifest.ts"],"names":[],"mappings":""}
@@ -1,31 +0,0 @@
1
- import { PackageKind } from '@cratis/scene.model';
2
- import { primeReactPackageManifest } from '../primeReactPackage';
3
- describe('when inspecting the manifest', () => {
4
- it('should be named the way a ui profile lists it', () => {
5
- primeReactPackageManifest.name.should.equal('PrimeReact');
6
- });
7
- it('should be a component library', () => {
8
- primeReactPackageManifest.kind.should.equal(PackageKind.ComponentLibrary);
9
- });
10
- it('should depend on Tailwind, because the wrappers lay themselves out with it', () => {
11
- primeReactPackageManifest.dependencies.should.deep.equal([{ name: 'Tailwind' }]);
12
- });
13
- it('should name the module a host imports it from', () => {
14
- primeReactPackageManifest.module.should.equal('@cratis/scene.primereact');
15
- });
16
- it('should provide no layouts, which belong to a blueprint package', () => {
17
- primeReactPackageManifest.layouts.should.deep.equal([]);
18
- });
19
- it('should provide no screen templates, which belong to a blueprint package', () => {
20
- primeReactPackageManifest.screenTemplates.should.deep.equal([]);
21
- });
22
- it('should provide no dialog templates, which belong to a blueprint package', () => {
23
- primeReactPackageManifest.dialogTemplates.should.deep.equal([]);
24
- });
25
- it('should declare the names Screenplay screen directives compile to', () => {
26
- for (const name of ['table', 'column', 'title', 'field', 'section', 'summary', 'action']) {
27
- primeReactPackageManifest.components.should.contain(name);
28
- }
29
- });
30
- });
31
- //# sourceMappingURL=when_inspecting_the_manifest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_inspecting_the_manifest.js","sourceRoot":"","sources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AC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QACxE,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC;YACvF,yBAAyB,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_inspecting_the_registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_inspecting_the_registry.d.ts","sourceRoot":"","sources":["../../../for_primeReactPackage/when_inspecting_the_registry.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { componentRegistryKey } from '@cratis/scene.react';
2
- import { primeReactComponents } from '../primeReactComponents';
3
- import { primeReactPackageManifest } from '../primeReactPackage';
4
- describe('when inspecting the registry', () => {
5
- const keys = Object.keys(primeReactComponents);
6
- it('should register an implementation for every declared component name', () => {
7
- const missing = primeReactPackageManifest.components.filter((name) => primeReactComponents[componentRegistryKey('PrimeReact', name)] === undefined);
8
- missing.should.deep.equal([]);
9
- });
10
- it('should declare every registered component name', () => {
11
- const declared = new Set(primeReactPackageManifest.components);
12
- const undeclared = keys.filter((key) => !declared.has(key.slice('PrimeReact:'.length)));
13
- undeclared.should.deep.equal([]);
14
- });
15
- it('should qualify every registry key with the package name', () => {
16
- keys.filter((key) => !key.startsWith('PrimeReact:')).should.deep.equal([]);
17
- });
18
- it('should declare every component name exactly once', () => {
19
- primeReactPackageManifest.components.should.have.lengthOf(new Set(primeReactPackageManifest.components).size);
20
- });
21
- it('should name every component in lowerCamelCase', () => {
22
- primeReactPackageManifest.components.filter((name) => !/^[a-z][a-zA-Z]*$/.test(name)).should.deep.equal([]);
23
- });
24
- });
25
- //# sourceMappingURL=when_inspecting_the_registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_inspecting_the_registry.js","sourceRoot":"","sources":["../../../for_primeReactPackage/when_inspecting_the_registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAE/C,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,yBAAyB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;QACpJ,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACxF,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QAC/D,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QACxD,yBAAyB,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACrD,yBAAyB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChH,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_rendering_every_declared_component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_rendering_every_declared_component.d.ts","sourceRoot":"","sources":["../../../for_primeReactPackage/when_rendering_every_declared_component.tsx"],"names":[],"mappings":""}
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render } from '@testing-library/react';
3
- import { PrimeReactProvider } from '@primereact/core';
4
- import { SceneElementView } from '@cratis/scene.react';
5
- import { primeReactComponents } from '../primeReactComponents';
6
- import { primeReactPackageManifest } from '../primeReactPackage';
7
- import { sceneComponent } from '../storyElements';
8
- describe('when rendering every declared component', () => {
9
- let unresolved;
10
- let threw;
11
- beforeEach(() => {
12
- const observerStub = class {
13
- observe() {
14
- return undefined;
15
- }
16
- unobserve() {
17
- return undefined;
18
- }
19
- disconnect() {
20
- return undefined;
21
- }
22
- };
23
- if (window.ResizeObserver === undefined) {
24
- window.ResizeObserver = observerStub;
25
- globalThis.ResizeObserver = window.ResizeObserver;
26
- }
27
- if (window.IntersectionObserver === undefined) {
28
- window.IntersectionObserver = observerStub;
29
- globalThis.IntersectionObserver = window.IntersectionObserver;
30
- }
31
- if (window.matchMedia === undefined) {
32
- window.matchMedia = (query) => ({
33
- matches: false,
34
- media: query,
35
- onchange: undefined,
36
- addListener: () => undefined,
37
- removeListener: () => undefined,
38
- addEventListener: () => undefined,
39
- removeEventListener: () => undefined,
40
- dispatchEvent: () => false,
41
- });
42
- }
43
- unresolved = [];
44
- threw = [];
45
- for (const name of primeReactPackageManifest.components) {
46
- const element = sceneComponent(`element-${name}`, name, { text: name, label: name, value: name });
47
- try {
48
- const { container, unmount } = render(_jsx(PrimeReactProvider, { children: _jsx(SceneElementView, { element: element, registry: primeReactComponents, resolveBinding: () => undefined }) }));
49
- if (container.querySelector('[data-scene-unresolved-component]') !== null)
50
- unresolved.push(name);
51
- unmount();
52
- }
53
- catch (error) {
54
- threw.push(`${name}: ${error.message.split('\n')[0]}`);
55
- }
56
- }
57
- });
58
- it('should resolve every declared name to a real component', () => {
59
- unresolved.should.deep.equal([]);
60
- });
61
- it('should render every declared component with nothing configured, rather than throwing', () => {
62
- threw.should.deep.equal([]);
63
- });
64
- });
65
- //# sourceMappingURL=when_rendering_every_declared_component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_rendering_every_declared_component.js","sourceRoot":"","sources":["../../../for_primeReactPackage/when_rendering_every_declared_component.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBA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_resolving_a_name_core_also_declares.d.ts","sourceRoot":"","sources":["../../../for_primeReactPackage/when_resolving_a_name_core_also_declares.ts"],"names":[],"mappings":""}
@@ -1,34 +0,0 @@
1
- import { resolveComponentName } from '@cratis/scene.engine';
2
- import { corePackageManifest } from '@cratis/scene.react';
3
- import { primeReactPackageManifest } from '../primeReactPackage';
4
- describe('when resolving a name core also declares', () => {
5
- const profile = { name: 'web', targetPlatform: 'web', packages: ['core', 'PrimeReact'] };
6
- const catalog = {
7
- core: corePackageManifest.components,
8
- PrimeReact: primeReactPackageManifest.components,
9
- };
10
- for (const name of ['text', 'button', 'card']) {
11
- describe(`and the name is '${name}'`, () => {
12
- const resolution = resolveComponentName(name, profile, catalog);
13
- it('should resolve it', () => {
14
- (resolution !== undefined).should.be.true;
15
- });
16
- it('should resolve to PrimeReact', () => {
17
- resolution.package.should.equal('PrimeReact');
18
- });
19
- it('should record that core was shadowed', () => {
20
- resolution.shadows.should.deep.equal(['core']);
21
- });
22
- });
23
- }
24
- describe('and the name is only declared by PrimeReact', () => {
25
- const resolution = resolveComponentName('dataTable', profile, catalog);
26
- it('should resolve to PrimeReact', () => {
27
- resolution.package.should.equal('PrimeReact');
28
- });
29
- it('should shadow nothing', () => {
30
- resolution.shadows.should.deep.equal([]);
31
- });
32
- });
33
- });
34
- //# sourceMappingURL=when_resolving_a_name_core_also_declares.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_resolving_a_name_core_also_declares.js","sourceRoot":"","sources":["../../../for_primeReactPackage/when_resolving_a_name_core_also_declares.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACtD,MAAM,OAAO,GAAc,EAAE,IAAI,EAAE,KAAK,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AC7B,UAAW,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_validating_the_bundle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_validating_the_bundle.d.ts","sourceRoot":"","sources":["../../../for_primeReactPackage/when_validating_the_bundle.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { validatePackageBundle } from '@cratis/scene.react';
2
- import { primeReactPackage } from '../primeReactPackage';
3
- describe('when validating the bundle', () => {
4
- let problems;
5
- beforeEach(() => {
6
- problems = validatePackageBundle(primeReactPackage);
7
- });
8
- it('should report no problems', () => {
9
- problems.should.deep.equal([]);
10
- });
11
- });
12
- //# sourceMappingURL=when_validating_the_bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_validating_the_bundle.js","sourceRoot":"","sources":["../../../for_primeReactPackage/when_validating_the_bundle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC,GAAG,EAAE;QACZ,QAAQ,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACjC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_resolving_a_preset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_resolving_a_preset.d.ts","sourceRoot":"","sources":["../../../for_primeReactThemePreset/when_resolving_a_preset.ts"],"names":[],"mappings":""}
@@ -1,30 +0,0 @@
1
- import { primeReactThemeNames, primeReactThemePreset } from '../theme';
2
- describe('when resolving a preset', () => {
3
- describe('and the theme is one this package ships', () => {
4
- it('should resolve a preset for every theme in the catalog', () => {
5
- primeReactThemeNames.filter((name) => primeReactThemePreset(name) === undefined).should.deep.equal([]);
6
- });
7
- it('should bind the theme accent onto the preset primary scale', () => {
8
- const preset = primeReactThemePreset('lara-light-blue');
9
- preset.semantic.primary['500'].should.equal('#3b82f6');
10
- });
11
- it('should bind a different accent for a differently tinted theme of the same family', () => {
12
- const preset = primeReactThemePreset('lara-light-teal');
13
- preset.semantic.primary['500'].should.equal('#14b8a6');
14
- });
15
- it('should not tint one theme with another theme of the same family', () => {
16
- primeReactThemePreset('lara-light-purple');
17
- const blue = primeReactThemePreset('lara-light-blue');
18
- blue.semantic.primary['500'].should.equal('#3b82f6');
19
- });
20
- it('should return the same preset instance for the same theme, so a re-render is not a theme change', () => {
21
- primeReactThemePreset('aura-dark-indigo').should.equal(primeReactThemePreset('aura-dark-indigo'));
22
- });
23
- });
24
- describe('and the theme is unknown', () => {
25
- it('should resolve nothing rather than a default that would silently theme a screen wrongly', () => {
26
- (primeReactThemePreset('lara-light-chartreuse') === undefined).should.be.true;
27
- });
28
- });
29
- });
30
- //# sourceMappingURL=when_resolving_a_preset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_resolving_a_preset.js","sourceRoot":"","sources":["../../../for_primeReactThemePreset/when_resolving_a_preset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEvE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACrD,EAAE,CAAC,wDAAwD,EAAE,GA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,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;QAClF,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_checking_attribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_checking_attribution.d.ts","sourceRoot":"","sources":["../../../for_primeReactThemes/when_checking_attribution.ts"],"names":[],"mappings":""}
@@ -1,27 +0,0 @@
1
- import { primeReactThemeLicense, primeReactThemeLicenseUrl, primeReactThemes } from '../theme';
2
- describe('when checking attribution', () => {
3
- it('should credit an author on every theme', () => {
4
- primeReactThemes.filter((theme) => theme.author === undefined || theme.author === '').should.deep.equal([]);
5
- });
6
- it('should link to the author on every theme', () => {
7
- primeReactThemes.filter((theme) => theme.authorUrl === undefined || theme.authorUrl === '').should.deep.equal([]);
8
- });
9
- it('should state a license on every theme', () => {
10
- primeReactThemes.filter((theme) => theme.license === undefined || theme.license === '').should.deep.equal([]);
11
- });
12
- it('should credit PrimeTek, whose presets every one of them is built on', () => {
13
- primeReactThemes.filter((theme) => theme.author !== 'PrimeTek').should.deep.equal([]);
14
- });
15
- it('should state the commercial license PrimeReact 11 actually ships under, not the MIT of v10', () => {
16
- primeReactThemeLicense.should.equal('PrimeUI Community / Commercial');
17
- primeReactThemes.filter((theme) => theme.license !== primeReactThemeLicense).should.deep.equal([]);
18
- });
19
- it('should link to the terms on every theme, not just name them', () => {
20
- primeReactThemeLicenseUrl.should.equal('https://primeui.dev/licenses/community');
21
- primeReactThemes.filter((theme) => theme.licenseUrl !== primeReactThemeLicenseUrl).should.deep.equal([]);
22
- });
23
- it('should describe every theme for a picker', () => {
24
- primeReactThemes.filter((theme) => theme.description === undefined || theme.description === '').should.deep.equal([]);
25
- });
26
- });
27
- //# sourceMappingURL=when_checking_attribution.js.map
@@ -1 +0,0 @@
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CAAC;IAQH,EAAE,CAAC,4FAA4F,EAAE,GAAG,EAAE;QAClG,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACtE,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,sBAAsB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC,CAAC,CAAC;IAMH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACnE,yBAAyB,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QACjF,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,yBAAyB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7G,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_checking_compatibility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_checking_compatibility.d.ts","sourceRoot":"","sources":["../../../for_primeReactThemes/when_checking_compatibility.ts"],"names":[],"mappings":""}
@@ -1,18 +0,0 @@
1
- import { incompatiblePackages } from '@cratis/scene.engine';
2
- import { primeReactThemes } from '../theme';
3
- describe('when checking compatibility', () => {
4
- const profile = { name: 'web', targetPlatform: 'web', packages: ['core', 'PrimeReact', 'Tailwind'] };
5
- it('should declare every theme compatible with PrimeReact', () => {
6
- primeReactThemes.filter((theme) => !theme.compatibleWith.includes('PrimeReact')).should.deep.equal([]);
7
- });
8
- it('should declare every theme compatible with Tailwind', () => {
9
- primeReactThemes.filter((theme) => !theme.compatibleWith.includes('Tailwind')).should.deep.equal([]);
10
- });
11
- it('should declare every theme compatible with core, which gets no implicit exemption', () => {
12
- primeReactThemes.filter((theme) => !theme.compatibleWith.includes('core')).should.deep.equal([]);
13
- });
14
- it('should report no incompatibility for a profile listing all three', () => {
15
- primeReactThemes.flatMap((theme) => incompatiblePackages(theme, profile)).should.deep.equal([]);
16
- });
17
- });
18
- //# sourceMappingURL=when_checking_compatibility.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_checking_compatibility.js","sourceRoot":"","sources":["../../../for_primeReactThemes/when_checking_compatibility.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACzC,MAAM,OAAO,GAAc,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC;IAEhH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC7D,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC3D,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mFAAmF,EAAE,GAAG,EAAE;QACzF,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrG,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QACxE,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=when_checking_the_token_vocabulary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"when_checking_the_token_vocabulary.d.ts","sourceRoot":"","sources":["../../../for_primeReactThemes/when_checking_the_token_vocabulary.ts"],"names":[],"mappings":""}
@@ -1,48 +0,0 @@
1
- import { primeReactThemes } from '../theme';
2
- describe('when checking the token vocabulary', () => {
3
- const vocabulary = [
4
- 'primary.color',
5
- 'primary.contrastColor',
6
- 'surface.background',
7
- 'surface.card',
8
- 'surface.border',
9
- 'surface.hover',
10
- 'surface.overlay',
11
- 'text.color',
12
- 'text.mutedColor',
13
- 'highlight.background',
14
- 'highlight.color',
15
- 'content.borderRadius',
16
- 'focus.ring',
17
- ];
18
- it('should give every theme the whole vocabulary', () => {
19
- const incomplete = primeReactThemes
20
- .filter((theme) => vocabulary.some((token) => theme.tokens?.[token] === undefined))
21
- .map((theme) => theme.name);
22
- incomplete.should.deep.equal([]);
23
- });
24
- it('should give every theme nothing but the vocabulary, so packages can agree on it', () => {
25
- const extra = primeReactThemes.flatMap((theme) => Object.keys(theme.tokens ?? {}).filter((token) => !vocabulary.includes(token)));
26
- extra.should.deep.equal([]);
27
- });
28
- it('should say whether every theme is dark', () => {
29
- primeReactThemes.filter((theme) => theme.isDark === undefined).should.deep.equal([]);
30
- });
31
- it('should ship both light and dark themes', () => {
32
- primeReactThemes.some((theme) => theme.isDark === true).should.be.true;
33
- primeReactThemes.some((theme) => theme.isDark === false).should.be.true;
34
- });
35
- it('should have resolved every token to a literal value rather than leaving a preset reference behind', () => {
36
- const unresolved = primeReactThemes.flatMap((theme) => Object.entries(theme.tokens ?? {})
37
- .filter(([, value]) => value.includes('{') || value.includes('light-dark('))
38
- .map(([token]) => `${theme.name}: ${token}`));
39
- unresolved.should.deep.equal([]);
40
- });
41
- it('should mirror the accent the preset binds for a light theme', () => {
42
- primeReactThemes.find((theme) => theme.name === 'lara-light-blue').tokens['primary.color'].should.equal('#3b82f6');
43
- });
44
- it('should take the accent from the lighter end of the ramp for a dark theme', () => {
45
- primeReactThemes.find((theme) => theme.name === 'lara-dark-blue').tokens['primary.color'].should.equal('#60a5fa');
46
- });
47
- });
48
- //# sourceMappingURL=when_checking_the_token_vocabulary.js.map