zudoku 0.71.7 → 0.71.8

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/dist/cli/cli.js CHANGED
@@ -3794,7 +3794,7 @@ import {
3794
3794
  // package.json
3795
3795
  var package_default = {
3796
3796
  name: "zudoku",
3797
- version: "0.71.6",
3797
+ version: "0.71.7",
3798
3798
  type: "module",
3799
3799
  sideEffects: [
3800
3800
  "**/*.css",
@@ -4755,7 +4755,8 @@ var getAllTags = (schema2) => {
4755
4755
  });
4756
4756
  };
4757
4757
  var getAllSlugs = (ops, schemaTags = []) => {
4758
- const slugify2 = slugifyWithCounter();
4758
+ const operationSlugify = slugifyWithCounter();
4759
+ const tagSlugify = slugifyWithCounter();
4759
4760
  const tags = Array.from(
4760
4761
  /* @__PURE__ */ new Set([
4761
4762
  ...ops.flatMap((op) => op.tags ?? []),
@@ -4766,10 +4767,10 @@ var getAllSlugs = (ops, schemaTags = []) => {
4766
4767
  operations: Object.fromEntries(
4767
4768
  ops.map((op) => [
4768
4769
  getOperationSlugKey(op),
4769
- createOperationSlug(slugify2, op)
4770
+ createOperationSlug(operationSlugify, op)
4770
4771
  ])
4771
4772
  ),
4772
- tags: Object.fromEntries(tags.map((tag) => [tag, slugify2(tag)]))
4773
+ tags: Object.fromEntries(tags.map((tag) => [tag, tagSlugify(tag)]))
4773
4774
  };
4774
4775
  };
4775
4776
  var getOperationSlugKey = (op) => [op.path, op.method, op.operationId, op.summary].filter(Boolean).join("-");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.71.7",
3
+ "version": "0.71.8",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -16,6 +16,28 @@ if (typeof Object.groupBy === "undefined") {
16
16
  };
17
17
  }
18
18
 
19
+ // Freeze --scrollbar-width when react-remove-scroll locks the body, preventing
20
+ // the CSS calc(100vw - 100%) from recalculating to 0 and causing layout shift.
21
+ if (typeof window !== "undefined") {
22
+ new MutationObserver(() => {
23
+ const locked = document.body.hasAttribute("data-scroll-locked");
24
+ const gap = locked
25
+ ? getComputedStyle(document.body).getPropertyValue(
26
+ "--removed-body-scroll-bar-size",
27
+ )
28
+ : "";
29
+
30
+ if (gap) {
31
+ document.documentElement.style.setProperty("--scrollbar-width", gap);
32
+ } else {
33
+ document.documentElement.style.removeProperty("--scrollbar-width");
34
+ }
35
+ }).observe(document.body, {
36
+ attributes: true,
37
+ attributeFilter: ["data-scroll-locked"],
38
+ });
39
+ }
40
+
19
41
  if (typeof window !== "undefined" && !window.requestIdleCallback) {
20
42
  window.requestIdleCallback = (cb: IdleRequestCallback) =>
21
43
  Number(
@@ -325,6 +325,12 @@ export class OpenIDAuthenticationProvider
325
325
  };
326
326
 
327
327
  signOut = async (_: AuthActionContext) => {
328
+ const { providerData } = useAuthState.getState();
329
+ const idToken =
330
+ providerData?.type === "openid" || providerData?.type === undefined
331
+ ? providerData?.idToken
332
+ : undefined;
333
+
328
334
  useAuthState.getState().setLoggedOut();
329
335
 
330
336
  const as = await this.getAuthServer();
@@ -340,11 +346,9 @@ export class OpenIDAuthenticationProvider
340
346
  // so we use the IdP logout. Otherwise, just redirect the user to home
341
347
  if (as.end_session_endpoint) {
342
348
  logoutUrl = new URL(as.end_session_endpoint);
343
- // TODO: get id_token and set hint
344
- // const { id_token } = session;
345
- // if (id_token) {
346
- // logoutUrl.searchParams.set("id_token_hint", id_token);
347
- // }
349
+ if (idToken) {
350
+ logoutUrl.searchParams.set("id_token_hint", idToken);
351
+ }
348
352
  logoutUrl.searchParams.set(
349
353
  "post_logout_redirect_uri",
350
354
  redirectUrl.toString(),
@@ -153,7 +153,8 @@ export const getAllSlugs = (
153
153
  ops: GraphQLOperationObject[],
154
154
  schemaTags: TagObject[] = [],
155
155
  ): Slugs => {
156
- const slugify = slugifyWithCounter();
156
+ const operationSlugify = slugifyWithCounter();
157
+ const tagSlugify = slugifyWithCounter();
157
158
 
158
159
  const tags = Array.from(
159
160
  new Set([
@@ -166,10 +167,10 @@ export const getAllSlugs = (
166
167
  operations: Object.fromEntries(
167
168
  ops.map((op) => [
168
169
  getOperationSlugKey(op),
169
- createOperationSlug(slugify, op),
170
+ createOperationSlug(operationSlugify, op),
170
171
  ]),
171
172
  ),
172
- tags: Object.fromEntries(tags.map((tag) => [tag, slugify(tag)])),
173
+ tags: Object.fromEntries(tags.map((tag) => [tag, tagSlugify(tag)])),
173
174
  };
174
175
  };
175
176