@pexip/components 19.1.0 → 19.1.3

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,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 19.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0e1a7b7]
8
+ - @pexip/utils@17.1.2
9
+ - @pexip/hooks@21.0.4
10
+
11
+ ## 19.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - aac2518: Add test ID props to NumberStepInput
16
+
17
+ - testIDDecrement
18
+ - testIDIncrement
19
+ - testIDInput
20
+
21
+ - Updated dependencies [aac2518]
22
+ - Updated dependencies [aac2518]
23
+ - @pexip/utils@17.1.1
24
+ - @pexip/signal@16.9.2
25
+ - @pexip/hooks@21.0.3
26
+
27
+ ## 19.1.1
28
+
29
+ ### Patch Changes
30
+
31
+ - 3d191f7: Allow CoreHeader to style start enhancer with enhancerStartClassName
32
+ prop
33
+ - af038f3: Update Biome v2
34
+ - Updated dependencies [4068f02]
35
+ - Updated dependencies [a551f01]
36
+ - @pexip/utils@17.1.0
37
+ - @pexip/signal@16.9.1
38
+ - @pexip/hooks@21.0.2
39
+
3
40
  ## 19.1.0
4
41
 
5
42
  ### Minor Changes
@@ -8,6 +8,7 @@ import {Content} from './content.mjs';
8
8
 
9
9
  const VARIABLE_ALIAS = 'VARIABLE_ALIAS';
10
10
  const MAPPED_DEFAULTS = 'Mapped';
11
+ const ALLOWED_MODES = ['Light', 'Dark'];
11
12
 
12
13
  const getHexCode = num => {
13
14
  const hex = Math.round(num * 255).toString(16);
@@ -42,7 +43,7 @@ export const getVariables = async () => {
42
43
  const modes = collection.modes;
43
44
 
44
45
  for (const mode of modes) {
45
- const valueRef = res.meta.variables[id].valuesByMode[mode.modeId];
46
+ const valueRef = variable.valuesByMode[mode.modeId];
46
47
  return valueRef.type === VARIABLE_ALIAS
47
48
  ? getVariable(valueRef.id)
48
49
  : getValue(valueRef, variable.resolvedType);
@@ -52,7 +53,7 @@ export const getVariables = async () => {
52
53
  const variables = {};
53
54
  for (const collection of Object.values(res.meta.variableCollections)) {
54
55
  console.log(collection.name);
55
- if (collection.name !== MAPPED_DEFAULTS) {
56
+ if (collection.name !== MAPPED_DEFAULTS || collection.remote) {
56
57
  continue;
57
58
  }
58
59
 
@@ -63,11 +64,20 @@ export const getVariables = async () => {
63
64
  });
64
65
 
65
66
  for (const mode of collection.modes) {
67
+ if (!ALLOWED_MODES.includes(mode.name)) {
68
+ continue;
69
+ }
66
70
  const modeName = camelCase(mode.name);
67
71
  variables[modeName] = {};
68
72
 
69
73
  for (const variableId of variableIds) {
70
74
  const variable = res.meta.variables[variableId];
75
+ if (variable.deletedButReferenced) {
76
+ console.warn(
77
+ `Variable ${variable.name} (${variableId}) is deleted but referenced. Skipping.`,
78
+ );
79
+ continue;
80
+ }
71
81
  const valueRef =
72
82
  res.meta.variables[variableId].valuesByMode[mode.modeId];
73
83
  const value =