zudoku 0.3.1-dev.2 → 0.3.1-dev.21

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 (126) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/config/config.d.ts +0 -3
  3. package/dist/lib/authentication/authentication.d.ts +1 -0
  4. package/dist/lib/authentication/components/CallbackHandler.d.ts +3 -0
  5. package/dist/lib/authentication/components/CallbackHandler.js +34 -0
  6. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -0
  7. package/dist/lib/authentication/providers/auth0.js +11 -6
  8. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  9. package/dist/lib/authentication/providers/openid.d.ts +4 -13
  10. package/dist/lib/authentication/providers/openid.js +50 -49
  11. package/dist/lib/authentication/providers/openid.js.map +1 -1
  12. package/dist/lib/components/Header.js +2 -4
  13. package/dist/lib/components/Header.js.map +1 -1
  14. package/dist/lib/components/Layout.js +5 -1
  15. package/dist/lib/components/Layout.js.map +1 -1
  16. package/dist/lib/components/context/ZudokuProvider.js +1 -3
  17. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  18. package/dist/lib/core/DevPortalContext.d.ts +1 -4
  19. package/dist/lib/core/DevPortalContext.js +2 -2
  20. package/dist/lib/core/DevPortalContext.js.map +1 -1
  21. package/dist/lib/core/plugins.d.ts +2 -4
  22. package/dist/lib/core/plugins.js.map +1 -1
  23. package/dist/lib/plugins/openapi/OperationList.js +3 -4
  24. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  25. package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
  26. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  27. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  28. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  29. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +2 -2
  30. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  31. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +9 -0
  32. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +14 -0
  33. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -0
  34. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +6 -0
  35. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +17 -0
  36. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -0
  37. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +7 -0
  38. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +10 -0
  39. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -0
  40. package/dist/lib/plugins/openapi/schema/SchemaComponents.d.ts +3 -3
  41. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +15 -15
  42. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  43. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  44. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  45. package/dist/lib/plugins/openapi/schema/utils.d.ts +6 -0
  46. package/dist/lib/plugins/openapi/schema/utils.js +5 -0
  47. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  48. package/lib/{AuthenticationPlugin-CH5NSVOu.js → AuthenticationPlugin-owbEUimP.js} +3 -3
  49. package/lib/{AuthenticationPlugin-CH5NSVOu.js.map → AuthenticationPlugin-owbEUimP.js.map} +1 -1
  50. package/lib/{CategoryHeading-z15xh7Jb.js → CategoryHeading-DnPprxtD.js} +2 -2
  51. package/lib/{CategoryHeading-z15xh7Jb.js.map → CategoryHeading-DnPprxtD.js.map} +1 -1
  52. package/lib/{Combination-DTfV-c98.js → Combination-DruV0zX_.js} +3 -3
  53. package/lib/{Combination-DTfV-c98.js.map → Combination-DruV0zX_.js.map} +1 -1
  54. package/lib/ErrorPage-PUg985n_.js +18 -0
  55. package/lib/ErrorPage-PUg985n_.js.map +1 -0
  56. package/lib/{Input-DB9VROFR.js → Input-CBfi9Yjc.js} +5 -4
  57. package/lib/{Input-DB9VROFR.js.map → Input-CBfi9Yjc.js.map} +1 -1
  58. package/lib/{Markdown-CEccPMI_.js → Markdown-Chb9VIBv.js} +2 -2
  59. package/lib/{Markdown-CEccPMI_.js.map → Markdown-Chb9VIBv.js.map} +1 -1
  60. package/lib/{MdxPage-CnqOoqvp.js → MdxPage-CIBHMwTd.js} +5 -5
  61. package/lib/{MdxPage-CnqOoqvp.js.map → MdxPage-CIBHMwTd.js.map} +1 -1
  62. package/lib/OperationList-CZiSz5JH.js +590 -0
  63. package/lib/OperationList-CZiSz5JH.js.map +1 -0
  64. package/lib/{Route-DfAFiR7v.js → Route-Cle-r-bq.js} +4 -4
  65. package/lib/{Route-DfAFiR7v.js.map → Route-Cle-r-bq.js.map} +1 -1
  66. package/lib/{Spinner-BT_AYFrA.js → SidebarBadge-Ba0PhibA.js} +66 -76
  67. package/lib/SidebarBadge-Ba0PhibA.js.map +1 -0
  68. package/lib/{SlotletProvider-ByLSCZQa.js → SlotletProvider-Dq80og6-.js} +4 -4
  69. package/lib/{SlotletProvider-ByLSCZQa.js.map → SlotletProvider-Dq80og6-.js.map} +1 -1
  70. package/lib/Spinner-CvXZ7QK4.js +15 -0
  71. package/lib/Spinner-CvXZ7QK4.js.map +1 -0
  72. package/lib/{ZudokuContext-BIZ8zHbZ.js → ZudokuContext-BQ45UjcB.js} +2 -2
  73. package/lib/{ZudokuContext-BIZ8zHbZ.js.map → ZudokuContext-BQ45UjcB.js.map} +1 -1
  74. package/lib/{index-D-9zqIOh.js → index-Br1MQPxy.js} +595 -587
  75. package/lib/index-Br1MQPxy.js.map +1 -0
  76. package/lib/{index-Dz4LyXZI.js → index-DCJ9wEIV.js} +3 -3
  77. package/lib/{index-Dz4LyXZI.js.map → index-DCJ9wEIV.js.map} +1 -1
  78. package/lib/{index-7kcHaXD6.js → index-Yjb2PyPF.js} +4 -4
  79. package/lib/{index-7kcHaXD6.js.map → index-Yjb2PyPF.js.map} +1 -1
  80. package/lib/{urql-DrBfkb92.js → urql-YhcsXYy8.js} +2 -2
  81. package/lib/urql-YhcsXYy8.js.map +1 -0
  82. package/lib/{utils-Bh4upQ0e.js → utils-pDHePxa0.js} +3 -3
  83. package/lib/{utils-Bh4upQ0e.js.map → utils-pDHePxa0.js.map} +1 -1
  84. package/lib/zudoku.auth-auth0.js +24 -22
  85. package/lib/zudoku.auth-auth0.js.map +1 -1
  86. package/lib/zudoku.auth-clerk.js +1 -1
  87. package/lib/zudoku.auth-openid.js +527 -469
  88. package/lib/zudoku.auth-openid.js.map +1 -1
  89. package/lib/zudoku.components.js +434 -443
  90. package/lib/zudoku.components.js.map +1 -1
  91. package/lib/zudoku.openapi-worker.js +1 -1
  92. package/lib/zudoku.plugin-api-keys.js +6 -6
  93. package/lib/zudoku.plugin-custom-page.js +1 -1
  94. package/lib/zudoku.plugin-markdown.js +1 -1
  95. package/lib/zudoku.plugin-openapi.js +8 -7
  96. package/lib/zudoku.plugin-openapi.js.map +1 -1
  97. package/package.json +80 -100
  98. package/src/app/main.css +26 -1
  99. package/src/lib/authentication/authentication.ts +1 -0
  100. package/src/lib/authentication/components/CallbackHandler.tsx +59 -0
  101. package/src/lib/authentication/providers/auth0.tsx +13 -7
  102. package/src/lib/authentication/providers/openid.tsx +56 -58
  103. package/src/lib/components/Header.tsx +3 -10
  104. package/src/lib/components/Layout.tsx +6 -1
  105. package/src/lib/components/context/ZudokuProvider.tsx +1 -4
  106. package/src/lib/core/DevPortalContext.ts +2 -7
  107. package/src/lib/core/plugins.ts +1 -2
  108. package/src/lib/plugins/openapi/OperationList.tsx +3 -7
  109. package/src/lib/plugins/openapi/OperationListItem.tsx +3 -4
  110. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
  111. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +27 -5
  112. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +47 -0
  113. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +54 -0
  114. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +30 -0
  115. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +41 -41
  116. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -4
  117. package/src/lib/plugins/openapi/schema/utils.ts +8 -0
  118. package/dist/lib/plugins/openapi/util/prose.d.ts +0 -1
  119. package/dist/lib/plugins/openapi/util/prose.js +0 -4
  120. package/dist/lib/plugins/openapi/util/prose.js.map +0 -1
  121. package/lib/OperationList-Cxiw2Z-v.js +0 -457
  122. package/lib/OperationList-Cxiw2Z-v.js.map +0 -1
  123. package/lib/Spinner-BT_AYFrA.js.map +0 -1
  124. package/lib/index-D-9zqIOh.js.map +0 -1
  125. package/lib/urql-DrBfkb92.js.map +0 -1
  126. package/src/lib/plugins/openapi/util/prose.ts +0 -7
@@ -13,7 +13,7 @@ var ir = (t, e, n, r) => ({
13
13
  return m(t, e, r);
14
14
  }
15
15
  });
16
- import { C as Uo, c as Vo, m as Bo, f as Go } from "./urql-DrBfkb92.js";
16
+ import { C as Uo, c as Vo, m as Bo, f as Go } from "./urql-YhcsXYy8.js";
17
17
  import { a as Iu } from "./_commonjsHelpers-BVfed4GL.js";
18
18
  import { s as _u } from "./slugify-CiPVjteN.js";
19
19
  function Ou(t, e) {
@@ -1,12 +1,12 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
- import { S as p, R as f } from "./SlotletProvider-ByLSCZQa.js";
3
- import { u as g, a as u, I as j, S as k, b as v, c as w, d as b, e as K, f as y } from "./Input-DB9VROFR.js";
4
- import { b as N, L as x, O as E } from "./index-7kcHaXD6.js";
5
- import { u as h, t as A, j as S } from "./ZudokuContext-BIZ8zHbZ.js";
6
- import { B as l, p as I } from "./Combination-DTfV-c98.js";
2
+ import { S as p, R as f } from "./SlotletProvider-Dq80og6-.js";
3
+ import { u as g, a as u, I as j, S as k, b as v, c as w, d as b, e as K, f as y } from "./Input-CBfi9Yjc.js";
4
+ import { e as N, L as x, O as E } from "./index-Yjb2PyPF.js";
5
+ import { u as h, t as A, j as S } from "./ZudokuContext-BQ45UjcB.js";
6
+ import { B as l, p as I } from "./Combination-DruV0zX_.js";
7
7
  import { D as P } from "./DeveloperHint-BQSFXH01.js";
8
8
  import { useState as C } from "react";
9
- import { c as d, a as D } from "./Markdown-CEccPMI_.js";
9
+ import { c as d, a as D } from "./Markdown-Chb9VIBv.js";
10
10
  /**
11
11
  * @license lucide-react v0.378.0 - ISC
12
12
  *
@@ -1,5 +1,5 @@
1
1
  import { j as m } from "./jsx-runtime-B6kdoens.js";
2
- import { P as o } from "./Markdown-CEccPMI_.js";
2
+ import { P as o } from "./Markdown-Chb9VIBv.js";
3
3
  const l = (s) => ({
4
4
  getRoutes: () => s.map(({ path: e, element: t }) => ({
5
5
  path: e,
@@ -6,7 +6,7 @@ const u = (t, e) => Object.entries(t).flatMap(([a, r]) => {
6
6
  return {
7
7
  path: s.at(-1) === "index" ? s.slice(0, -1).join("/") : o,
8
8
  lazy: async () => {
9
- const { MdxPage: i } = await import("./MdxPage-CnqOoqvp.js"), { default: p, ...c } = await r();
9
+ const { MdxPage: i } = await import("./MdxPage-CIBHMwTd.js"), { default: p, ...c } = await r();
10
10
  return {
11
11
  element: /* @__PURE__ */ m.jsx(
12
12
  i,
@@ -1,14 +1,15 @@
1
1
  import "./jsx-runtime-B6kdoens.js";
2
- import { o as l } from "./index-D-9zqIOh.js";
3
- import "./urql-DrBfkb92.js";
4
- import "./ZudokuContext-BIZ8zHbZ.js";
2
+ import { o as s } from "./index-Br1MQPxy.js";
3
+ import "./urql-YhcsXYy8.js";
4
+ import "./ZudokuContext-BQ45UjcB.js";
5
5
  import "zudoku/openapi-worker";
6
- import "./Combination-DTfV-c98.js";
7
- import "./Markdown-CEccPMI_.js";
6
+ import "./Combination-DruV0zX_.js";
7
+ import "./ErrorPage-PUg985n_.js";
8
+ import "./Markdown-Chb9VIBv.js";
8
9
  import "./joinPath-B7kNnUX4.js";
9
10
  import "./router-BiRCp01d.js";
10
- import "./index-7kcHaXD6.js";
11
+ import "./index-Yjb2PyPF.js";
11
12
  export {
12
- l as openApiPlugin
13
+ s as openApiPlugin
13
14
  };
14
15
  //# sourceMappingURL=zudoku.plugin-openapi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.1-dev.2",
3
+ "version": "0.3.1-dev.21",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -13,104 +13,73 @@
13
13
  "zudoku": "./cli.js"
14
14
  },
15
15
  "exports": {
16
- ".": "./src/index.ts",
17
- "./internal": "./src/internal.ts",
18
- "./auth/clerk": "./src/lib/authentication/providers/clerk.ts",
19
- "./auth/auth0": "./src/lib/authentication/providers/auth0.ts",
20
- "./auth/openid": "./src/lib/authentication/providers/openid.ts",
21
- "./plugins/api-keys": "./src/lib/plugins/api-keys/index.ts",
22
- "./plugins/markdown": "./src/lib/plugins/markdown/index.ts",
23
- "./plugins/openapi": "./src/lib/plugins/openapi/index.ts",
24
- "./plugins/redirect": "./src/lib/plugins/redirect/index.ts",
25
- "./plugins/custom-page": "./src/lib/plugins/custom-page/index.ts",
26
- "./plugins/search-inkeep": "./src/lib/plugins/search-inkeep/index.ts",
27
- "./openapi-worker": "./src/lib/plugins/openapi-worker.ts",
28
- "./components": "./src/lib/components/index.ts",
29
- "./vite": "./src/vite/plugin.ts",
30
- "./tailwind": "./src/app/tailwind.ts",
31
- "./app/*": "./src/app/*"
32
- },
33
- "publishConfig": {
34
- "module": "./dist/index.js",
35
- "types": "./dist/index.d.ts",
36
- "exports": {
37
- ".": {
38
- "import": "./dist/index.js",
39
- "types": "./dist/index.d.ts"
40
- },
41
- "./internal": {
42
- "import": "./dist/internal.js"
43
- },
44
- "./auth/clerk": {
45
- "import": "./lib/zudoku.auth-clerk.js",
46
- "types": "./dist/lib/authentication/providers/clerk.d.ts"
47
- },
48
- "./auth/auth0": {
49
- "import": "./lib/zudoku.auth-auth0.js",
50
- "types": "./dist/lib/authentication/providers/auth0.d.ts"
51
- },
52
- "./auth/openid": {
53
- "import": "./lib/zudoku.auth-openid.js",
54
- "types": "./dist/lib/authentication/providers/openid.d.ts"
55
- },
56
- "./plugins/api-keys": {
57
- "import": "./lib/zudoku.plugin-api-keys.js",
58
- "types": "./dist/lib/plugins/api-keys/index.d.ts"
59
- },
60
- "./plugins/markdown": {
61
- "import": "./lib/zudoku.plugin-markdown.js",
62
- "types": "./dist/lib/plugins/markdown/index.d.ts"
63
- },
64
- "./plugins/openapi": {
65
- "import": "./lib/zudoku.plugin-openapi.js",
66
- "types": "./dist/lib/plugins/openapi/index.d.ts"
67
- },
68
- "./plugins/redirect": {
69
- "import": "./lib/zudoku.plugin-redirect.js",
70
- "types": "./dist/lib/plugins/redirect/index.d.ts"
71
- },
72
- "./plugins/custom-page": {
73
- "import": "./lib/zudoku.plugin-custom-page.js",
74
- "types": "./dist/lib/plugins/custom-page/index.d.ts"
75
- },
76
- "./plugins/search-inkeep": {
77
- "import": "./lib/zudoku.plugin-search-inkeep.js",
78
- "types": "./dist/lib/plugins/search-inkeep/index.d.ts"
79
- },
80
- "./openapi-worker": {
81
- "import": "./lib/zudoku.openapi-worker.js",
82
- "types": "./dist/lib/plugins/openapi-worker.d.ts"
83
- },
84
- "./components": {
85
- "import": "./lib/zudoku.components.js",
86
- "types": "./dist/lib/components/index.d.ts"
87
- },
88
- "./vite": {
89
- "require": "./dist/vite/plugin.js",
90
- "import": "./dist/vite/plugin.js"
91
- },
92
- "./tailwind": {
93
- "require": "./dist/app/tailwind.js",
94
- "import": "./dist/app/tailwind.js"
95
- },
96
- "./main.css": {
97
- "require": "./src/app/main.css",
98
- "import": "./src/app/main.css"
99
- },
100
- "./app/*": {
101
- "import": "./src/app/*"
102
- }
16
+ ".": {
17
+ "import": "./dist/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ },
20
+ "./internal": {
21
+ "import": "./dist/internal.js"
22
+ },
23
+ "./auth/clerk": {
24
+ "import": "./lib/zudoku.auth-clerk.js",
25
+ "types": "./dist/lib/authentication/providers/clerk.d.ts"
26
+ },
27
+ "./auth/auth0": {
28
+ "import": "./lib/zudoku.auth-auth0.js",
29
+ "types": "./dist/lib/authentication/providers/auth0.d.ts"
30
+ },
31
+ "./auth/openid": {
32
+ "import": "./lib/zudoku.auth-openid.js",
33
+ "types": "./dist/lib/authentication/providers/openid.d.ts"
34
+ },
35
+ "./plugins/api-keys": {
36
+ "import": "./lib/zudoku.plugin-api-keys.js",
37
+ "types": "./dist/lib/plugins/api-keys/index.d.ts"
38
+ },
39
+ "./plugins/markdown": {
40
+ "import": "./lib/zudoku.plugin-markdown.js",
41
+ "types": "./dist/lib/plugins/markdown/index.d.ts"
42
+ },
43
+ "./plugins/openapi": {
44
+ "import": "./lib/zudoku.plugin-openapi.js",
45
+ "types": "./dist/lib/plugins/openapi/index.d.ts"
46
+ },
47
+ "./plugins/redirect": {
48
+ "import": "./lib/zudoku.plugin-redirect.js",
49
+ "types": "./dist/lib/plugins/redirect/index.d.ts"
50
+ },
51
+ "./plugins/custom-page": {
52
+ "import": "./lib/zudoku.plugin-custom-page.js",
53
+ "types": "./dist/lib/plugins/custom-page/index.d.ts"
54
+ },
55
+ "./plugins/search-inkeep": {
56
+ "import": "./lib/zudoku.plugin-search-inkeep.js",
57
+ "types": "./dist/lib/plugins/search-inkeep/index.d.ts"
58
+ },
59
+ "./openapi-worker": {
60
+ "import": "./lib/zudoku.openapi-worker.js",
61
+ "types": "./dist/lib/plugins/openapi-worker.d.ts"
62
+ },
63
+ "./components": {
64
+ "import": "./lib/zudoku.components.js",
65
+ "types": "./dist/lib/components/index.d.ts"
66
+ },
67
+ "./vite": {
68
+ "require": "./dist/vite/plugin.js",
69
+ "import": "./dist/vite/plugin.js"
70
+ },
71
+ "./tailwind": {
72
+ "require": "./dist/app/tailwind.js",
73
+ "import": "./dist/app/tailwind.js"
74
+ },
75
+ "./main.css": {
76
+ "require": "./src/app/main.css",
77
+ "import": "./src/app/main.css"
78
+ },
79
+ "./app/*": {
80
+ "import": "./src/app/*"
103
81
  }
104
82
  },
105
- "scripts": {
106
- "build": "tsc --project tsconfig.json",
107
- "build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
108
- "build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
109
- "build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
110
- "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
111
- "clean": "tsc --build --clean",
112
- "test": "node --test --enable-source-maps"
113
- },
114
83
  "dependencies": {
115
84
  "@envelop/core": "5.0.1",
116
85
  "@graphql-typed-document-node/core": "3.2.0",
@@ -147,7 +116,7 @@
147
116
  "openapi-types": "12.1.3",
148
117
  "picocolors": "^1.0.1",
149
118
  "postcss": "8.4.39",
150
- "posthog-node": "^4.0.1",
119
+ "posthog-node": "^4.1.1",
151
120
  "prism-react-renderer": "2.3.1",
152
121
  "prismjs": "1.29.0",
153
122
  "react": "18.3.1",
@@ -216,5 +185,16 @@
216
185
  "optionalDependencies": {
217
186
  "@clerk/clerk-js": "5.11.0",
218
187
  "@inkeep/widgets": "^0.2.289"
219
- }
220
- }
188
+ },
189
+ "scripts": {
190
+ "build": "tsc --project tsconfig.json",
191
+ "build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
192
+ "build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
193
+ "build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
194
+ "hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
195
+ "clean": "tsc --build --clean",
196
+ "test": "node --test --enable-source-maps"
197
+ },
198
+ "module": "./dist/index.js",
199
+ "types": "./dist/index.d.ts"
200
+ }
package/src/app/main.css CHANGED
@@ -192,6 +192,31 @@
192
192
  background: transparent;
193
193
  }
194
194
 
195
+ .wavy-line {
196
+ @apply bg-primary w-full;
197
+
198
+ --s: 3px; /* size of the wave */
199
+ --b: 2px; /* thickness of the line */
200
+ --m: 1; /* curvature of the wave [0 2] */
201
+
202
+ --R: calc(var(--s) * sqrt(var(--m) * var(--m) + 1) + var(--b) / 2);
203
+ height: calc(2 * var(--R));
204
+ --_g: #0000 calc(99% - var(--b)), #000 calc(101% - var(--b)) 99%, #0000 101%;
205
+ mask:
206
+ radial-gradient(
207
+ var(--R) at left 50% bottom calc(-1 * var(--m) * var(--s)),
208
+ var(--_g)
209
+ )
210
+ calc(50% - 2 * var(--s)) calc(50% - var(--s) / 2 - var(--b) / 2) /
211
+ calc(4 * var(--s)) calc(var(--s) + var(--b)) repeat-x,
212
+ radial-gradient(
213
+ var(--R) at left 50% top calc(-1 * var(--m) * var(--s)),
214
+ var(--_g)
215
+ )
216
+ 50% calc(50% + var(--s) / 2 + var(--b) / 2) / calc(4 * var(--s))
217
+ calc(var(--s) + var(--b)) repeat-x;
218
+ }
219
+
195
220
  /* Theme */
196
221
  :root {
197
222
  --background: 0 0% 100%;
@@ -224,7 +249,7 @@
224
249
  --popover: 222.2 84% 4.9%;
225
250
  --popover-foreground: 210 40% 98%;
226
251
  --primary: 217.2 91.2% 59.8%;
227
- --primary-foreground: 222.2 47.4% 11.2%;
252
+ --primary-foreground: 210 40% 98%;
228
253
  --secondary: 217.2 32.6% 17.5%;
229
254
  --secondary-foreground: 210 40% 98%;
230
255
  --muted: 217.2 32.6% 17.5%;
@@ -5,6 +5,7 @@ export interface AuthenticationProvider {
5
5
  signIn(options?: { redirectTo?: string }): Promise<void>;
6
6
  signOut(): Promise<void>;
7
7
  getAccessToken(): Promise<string>;
8
+ pageLoad?(): void;
8
9
  getAuthenticationPlugin?(): DevPortalPlugin;
9
10
  }
10
11
 
@@ -0,0 +1,59 @@
1
+ import logger from "loglevel";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { useNavigate } from "react-router-dom";
4
+ import { DeveloperHint } from "../../components/DeveloperHint.js";
5
+ import { ErrorPage } from "../../components/ErrorPage.js";
6
+ import { Spinner } from "../../components/Spinner.js";
7
+ import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
8
+
9
+ export function CallbackHandler({
10
+ handleCallback,
11
+ }: {
12
+ handleCallback: () => Promise<string>;
13
+ }) {
14
+ const [error, setError] = useState<Error | null>(null);
15
+ const navigate = useNavigate();
16
+ // Deal with double mount in dev mode which will break
17
+ // the OAuth flow because you can only use the code once
18
+ const didInitialize = useRef(false);
19
+
20
+ useEffect(() => {
21
+ if (didInitialize.current) {
22
+ return;
23
+ }
24
+ didInitialize.current = true;
25
+ handleCallback()
26
+ .then((redirect) => {
27
+ navigate(redirect);
28
+ })
29
+ .catch((err) => {
30
+ logger.error(err);
31
+ setError(err);
32
+ });
33
+ }, [navigate, handleCallback]);
34
+
35
+ if (error) {
36
+ return (
37
+ <ErrorPage
38
+ category="Error"
39
+ title="Authentication Error"
40
+ message={
41
+ <>
42
+ <DeveloperHint className="mb-4">
43
+ Check the configuration of your authorization provider and ensure
44
+ all settings such as the callback URL are configured correctly.
45
+ </DeveloperHint>
46
+ An error occurred while authorizing the user.
47
+ <SyntaxHighlight code={error.toString()} language="plain" />
48
+ </>
49
+ }
50
+ />
51
+ );
52
+ }
53
+
54
+ return (
55
+ <div className="grid h-full place-items-center">
56
+ <Spinner />
57
+ </div>
58
+ );
59
+ }
@@ -4,6 +4,16 @@ import { useAuthState } from "../state.js";
4
4
  import { OpenIDAuthenticationProvider } from "./openid.js";
5
5
 
6
6
  class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
7
+ constructor(config: Auth0AuthenticationConfig) {
8
+ super({
9
+ ...config,
10
+ type: "openid",
11
+ issuer: `https://${config.domain}`,
12
+ clientId: config.clientId,
13
+ audience: config.audience,
14
+ });
15
+ }
16
+
7
17
  onAuthorizationUrl = async (
8
18
  url: URL,
9
19
  { isSignUp }: { isSignUp: boolean },
@@ -12,13 +22,14 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
12
22
  url.searchParams.set("screen_hint", "signup");
13
23
  }
14
24
  };
25
+
15
26
  signOut = async (): Promise<void> => {
16
27
  useAuthState.setState({
17
28
  isAuthenticated: false,
18
29
  isPending: false,
19
30
  profile: undefined,
20
31
  });
21
- localStorage.removeItem("auto-login");
32
+ sessionStorage.clear();
22
33
  const as = await this.getAuthServer();
23
34
 
24
35
  const redirectUrl = new URL(
@@ -53,11 +64,6 @@ class Auth0AuthenticationProvider extends OpenIDAuthenticationProvider {
53
64
 
54
65
  const auth0Auth: AuthenticationProviderInitializer<
55
66
  Auth0AuthenticationConfig
56
- > = ({ domain, ...options }) =>
57
- new Auth0AuthenticationProvider({
58
- ...options,
59
- type: "openid",
60
- issuer: `https://${domain}`,
61
- });
67
+ > = (options) => new Auth0AuthenticationProvider(options);
62
68
 
63
69
  export default auth0Auth;