@primer/react 0.0.0-20260529001925 → 0.0.0-20260529012643

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,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260529001925
3
+ ## 0.0.0-20260529012643
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AA8CD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAiF/E,CAAA;AAED,wBAAgB,QAAQ;YA9Hd,KAAK;kBACC,MAAM;gBACR,iBAAiB;wBACT,SAAS;0BACP,MAAM;gBAChB,MAAM;kBACJ,MAAM;kBACN,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;kBACvD,KAAK,CAAC,QAAQ,CAAC,KAA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K,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAC1C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;EA8H7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,UAG1F;AAqED,eAAe,aAAa,CAAA"}
@@ -43,7 +43,7 @@ const getServerHandoff = id => {
43
43
  const emptySubscribe = () => () => {};
44
44
  const ThemeProvider = t0 => {
45
45
  var _ref, _props$colorMode, _ref2, _props$dayScheme, _ref3, _props$nightScheme;
46
- const $ = c(45);
46
+ const $ = c(46);
47
47
  let children;
48
48
  let props;
49
49
  if ($[0] !== t0) {
@@ -154,25 +154,9 @@ const ThemeProvider = t0 => {
154
154
  t6 = $[28];
155
155
  }
156
156
  const contextValue = t6;
157
- if (props.contextOnly) {
158
- let t7;
159
- if ($[29] !== children || $[30] !== contextValue) {
160
- t7 = /*#__PURE__*/jsx(ThemeContext.Provider, {
161
- value: contextValue,
162
- children: children
163
- });
164
- $[29] = children;
165
- $[30] = contextValue;
166
- $[31] = t7;
167
- } else {
168
- t7 = $[31];
169
- }
170
- return t7;
171
- }
172
- const t7 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
173
- let t8;
174
- if ($[32] !== props.preventSSRMismatch || $[33] !== resolvedColorMode || $[34] !== uniqueDataId) {
175
- t8 = props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
157
+ let t7;
158
+ if ($[29] !== props.preventSSRMismatch || $[30] !== resolvedColorMode || $[31] !== uniqueDataId) {
159
+ t7 = props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
176
160
  type: "application/json",
177
161
  id: `__PRIMER_DATA_${uniqueDataId}__`,
178
162
  dangerouslySetInnerHTML: {
@@ -181,41 +165,59 @@ const ThemeProvider = t0 => {
181
165
  })
182
166
  }
183
167
  }) : null;
184
- $[32] = props.preventSSRMismatch;
185
- $[33] = resolvedColorMode;
186
- $[34] = uniqueDataId;
187
- $[35] = t8;
168
+ $[29] = props.preventSSRMismatch;
169
+ $[30] = resolvedColorMode;
170
+ $[31] = uniqueDataId;
171
+ $[32] = t7;
188
172
  } else {
189
- t8 = $[35];
173
+ t7 = $[32];
174
+ }
175
+ const ssrHandoffScript = t7;
176
+ if (props.contextOnly) {
177
+ let t8;
178
+ if ($[33] !== children || $[34] !== contextValue || $[35] !== ssrHandoffScript) {
179
+ t8 = /*#__PURE__*/jsxs(ThemeContext.Provider, {
180
+ value: contextValue,
181
+ children: [children, ssrHandoffScript]
182
+ });
183
+ $[33] = children;
184
+ $[34] = contextValue;
185
+ $[35] = ssrHandoffScript;
186
+ $[36] = t8;
187
+ } else {
188
+ t8 = $[36];
189
+ }
190
+ return t8;
190
191
  }
192
+ const t8 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
191
193
  let t9;
192
- if ($[36] !== children || $[37] !== dayScheme || $[38] !== nightScheme || $[39] !== t7 || $[40] !== t8) {
194
+ if ($[37] !== children || $[38] !== dayScheme || $[39] !== nightScheme || $[40] !== ssrHandoffScript || $[41] !== t8) {
193
195
  t9 = /*#__PURE__*/jsxs("div", {
194
- "data-color-mode": t7,
196
+ "data-color-mode": t8,
195
197
  "data-light-theme": dayScheme,
196
198
  "data-dark-theme": nightScheme,
197
- children: [children, t8]
199
+ children: [children, ssrHandoffScript]
198
200
  });
199
- $[36] = children;
200
- $[37] = dayScheme;
201
- $[38] = nightScheme;
202
- $[39] = t7;
203
- $[40] = t8;
204
- $[41] = t9;
201
+ $[37] = children;
202
+ $[38] = dayScheme;
203
+ $[39] = nightScheme;
204
+ $[40] = ssrHandoffScript;
205
+ $[41] = t8;
206
+ $[42] = t9;
205
207
  } else {
206
- t9 = $[41];
208
+ t9 = $[42];
207
209
  }
208
210
  let t10;
209
- if ($[42] !== contextValue || $[43] !== t9) {
211
+ if ($[43] !== contextValue || $[44] !== t9) {
210
212
  t10 = /*#__PURE__*/jsx(ThemeContext.Provider, {
211
213
  value: contextValue,
212
214
  children: t9
213
215
  });
214
- $[42] = contextValue;
215
- $[43] = t9;
216
- $[44] = t10;
216
+ $[43] = contextValue;
217
+ $[44] = t9;
218
+ $[45] = t10;
217
219
  } else {
218
- t10 = $[44];
220
+ t10 = $[45];
219
221
  }
220
222
  return t10;
221
223
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260529001925",
4
+ "version": "0.0.0-20260529012643",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",