@blocklet/pages-kit-inner-components 0.6.99 → 0.6.101

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.
@@ -10,8 +10,8 @@ import { produce as De } from "immer";
10
10
  import Z from "lodash/difference";
11
11
  import { useState as D, useMemo as C, useCallback as O, useImperativeHandle as Oe, useEffect as E, useRef as Ae } from "react";
12
12
  import { useAsync as je } from "react-use";
13
- import { L as ve } from "./home-Bk69CtYQ.js";
14
- import { p as Ce, g as Re } from "./index-qonduhoW.js";
13
+ import { L as ve } from "./home-BGCy4qtn.js";
14
+ import { p as Ce, g as Re } from "./index-B3PuGYfF.js";
15
15
  function ze(s) {
16
16
  const [u, g] = D(!1);
17
17
  return /* @__PURE__ */ t(
package/lib/es/home.js CHANGED
@@ -21,8 +21,8 @@ import "react-helmet";
21
21
  import "react-router-dom";
22
22
  import "react-use";
23
23
  import "ufo";
24
- import "./chunks/index-qonduhoW.js";
25
- import { a as R, e as S, P as W, d as j, c as k, b as q, T as v, H as z } from "./chunks/home-Bk69CtYQ.js";
24
+ import "./chunks/index-B3PuGYfF.js";
25
+ import { a as R, e as S, P as W, d as j, c as k, b as q, T as v, H as z } from "./chunks/home-BGCy4qtn.js";
26
26
  import "./chunks/session-Dx5M-1r2.js";
27
27
  export {
28
28
  R as HomeView,
@@ -1,9 +1,9 @@
1
1
  import x from "@arcblock/did-connect-storage-nedb";
2
- import i, { getBlockletJs as L } from "@blocklet/sdk/lib/config";
3
- import M from "@blocklet/sdk/lib/wallet";
4
- import B from "@blocklet/sdk/lib/wallet-authenticator";
5
- import D from "@blocklet/sdk/lib/wallet-handler";
6
- import K from "@blocklet/sdk/service/auth";
2
+ import s, { getBlockletJs as L } from "@blocklet/sdk/lib/config";
3
+ import { getWallet as M } from "@blocklet/sdk/lib/wallet";
4
+ import { WalletAuthenticator as B } from "@blocklet/sdk/lib/wallet-authenticator";
5
+ import { WalletHandlers as D } from "@blocklet/sdk/lib/wallet-handler";
6
+ import { BlockletService as K } from "@blocklet/sdk/service/auth";
7
7
  import U, { resolve as C } from "path";
8
8
  import { l as v, g as W } from "./chunks/components-DLwSTd_N.js";
9
9
  import { e as H, i as N } from "./chunks/html-DOgzvdOd.js";
@@ -48,7 +48,7 @@ const q = new B();
48
48
  new D({
49
49
  authenticator: q,
50
50
  tokenStorage: new x({
51
- dbPath: U.join(i.env.dataDir, "auth.db")
51
+ dbPath: U.join(s.env.dataDir, "auth.db")
52
52
  })
53
53
  });
54
54
  const ee = new K(), te = async () => {
@@ -84,22 +84,22 @@ function Ce({
84
84
  return;
85
85
  }
86
86
  k();
87
- }), i.env.preferences.snapkitEnabled && i.env.preferences.snapkitEndpoint && i.env.SNAP_KIT_ACCESS_KEY && m.use(
87
+ }), s.env.preferences.snapkitEnabled && s.env.preferences.snapkitEndpoint && s.env.SNAP_KIT_ACCESS_KEY && m.use(
88
88
  O({
89
- endpoint: i.env.preferences.snapkitEndpoint,
90
- accessKey: i.env.SNAP_KIT_ACCESS_KEY,
91
- cacheMax: i.env.preferences.snapkitCacheSize || 100
89
+ endpoint: s.env.preferences.snapkitEndpoint,
90
+ accessKey: s.env.SNAP_KIT_ACCESS_KEY,
91
+ cacheMax: s.env.preferences.snapkitCacheSize || 100
92
92
  })
93
93
  ), m.get("/:path(*)?", async (n, f, k) => {
94
- if (oe.some((s) => n.path?.startsWith(s))) {
94
+ if (oe.some((i) => n.path?.startsWith(i))) {
95
95
  k();
96
96
  return;
97
97
  }
98
98
  const _ = "production";
99
99
  let l, b, g = p;
100
100
  if (n.path.startsWith("/pages")) {
101
- const s = n.params.lang, y = n.cookies.nf_lang, w = /* @__PURE__ */ new Set([...i.env.languages.map((h) => h.code)]);
102
- let u = (s && w.has(s) ? s : void 0) || (w.has(y) ? y : void 0) || [...w][0];
101
+ const i = n.params.lang, y = n.cookies.nf_lang, w = /* @__PURE__ */ new Set([...s.env.languages.map((h) => h.code)]);
102
+ let u = (i && w.has(i) ? i : void 0) || (w.has(y) ? y : void 0) || [...w][0];
103
103
  if ((!u || !t.supportedLocales?.find((h) => h.locale === u)) && (u = t.supportedLocales?.[0]?.locale || ""), u) {
104
104
  const h = [];
105
105
  Object.values(t.pages).forEach((r) => {
@@ -115,14 +115,14 @@ function Ce({
115
115
  }));
116
116
  h.push(...$);
117
117
  });
118
- const E = new Promise((r) => {
118
+ const A = new Promise((r) => {
119
119
  setTimeout(() => {
120
120
  r({});
121
121
  }, 30 * 1e3);
122
122
  });
123
123
  try {
124
124
  await Promise.race([
125
- E,
125
+ A,
126
126
  W({
127
127
  mode: _,
128
128
  req: n,
@@ -140,12 +140,12 @@ function Ce({
140
140
  }
141
141
  }
142
142
  try {
143
- const s = l?.title || i.env.appName, y = l?.description || i.env.appDescription, w = X(j(i.env.appUrl, "/.well-known/service/blocklet/og.png"), {
144
- title: s,
143
+ const i = l?.title || s.env.appName, y = l?.description || s.env.appDescription, w = X(j(s.env.appUrl, "/.well-known/service/blocklet/og.png"), {
144
+ title: i,
145
145
  description: y
146
146
  });
147
147
  g = V.render(p, {
148
- ogTitle: s,
148
+ ogTitle: i,
149
149
  ogDescription: y,
150
150
  ogImage: ne(l?.image) || w,
151
151
  pagesPublishedAt: t?.config.publishedAt || (/* @__PURE__ */ new Date()).getTime()
@@ -155,15 +155,15 @@ function Ce({
155
155
  const d = t?.config.fontFamily, P = n.query.mode === "draft" || n.url.includes("preview") || n.path?.startsWith("/admin");
156
156
  let a = l?.backgroundColor;
157
157
  if (a && F(a)) {
158
- const s = await te();
158
+ const i = await te();
159
159
  a = Q(
160
- s,
160
+ i,
161
161
  // 目前 dark 和 light 还是前端行为,后端通过 从 light 中获取
162
162
  `settings.theme.light.palette.${a}`,
163
163
  a
164
164
  );
165
165
  }
166
- const S = L(), A = [
166
+ const S = L(), E = [
167
167
  {
168
168
  selector: {
169
169
  cheerio: "#injected-head-elements",
@@ -222,12 +222,12 @@ function Ce({
222
222
  value: `<body>${H(n.cachedHtml)}</body>`
223
223
  }
224
224
  ].filter(Boolean);
225
- g = await N(g, A), f.send(g), v.info(`[html] render: ${n.path}`), g = null, l = null, b = null;
225
+ g = await N(g, E), f.send(g), v.info(`[html] render: ${n.path}`), g = null, l = null, b = null;
226
226
  }), o.use(m);
227
227
  }
228
228
  function ne(o) {
229
229
  const e = G("image-bin");
230
- return e && o && !/^(https?:\/\/|\/)/.test(o) ? i.env.appUrl + j(e, "uploads", o) : o;
230
+ return e && o && !/^(https?:\/\/|\/)/.test(o) ? s.env.appUrl + j(e, "uploads", o) : o;
231
231
  }
232
232
  export {
233
233
  Ce as default
@@ -6,7 +6,7 @@ import m from "joi";
6
6
  import C from "lodash/groupBy";
7
7
  import Y from "lodash/sortBy";
8
8
  import O, { join as $ } from "path";
9
- import _ from "@blocklet/sdk/lib/middlewares/auth";
9
+ import { authMiddleware as _ } from "@blocklet/sdk/lib/middlewares/auth";
10
10
  import { getResourceExportDir as z } from "@blocklet/sdk/lib/component";
11
11
  const H = async (e, t, o) => {
12
12
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/pages-kit-inner-components",
3
- "version": "0.6.99",
3
+ "version": "0.6.101",
4
4
  "description": "Pages Kit inner components library",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -69,21 +69,21 @@
69
69
  "url": "git+https://github.com/blocklet/pages-kit.git"
70
70
  },
71
71
  "dependencies": {
72
- "@arcblock/did-connect-react": "^3.1.49",
72
+ "@arcblock/did-connect-react": "^3.1.52",
73
73
  "@arcblock/did-connect-storage-nedb": "^1.8.0",
74
- "@arcblock/react-hooks": "^3.1.49",
75
- "@arcblock/ux": "^3.1.50",
76
- "@blocklet/aigne-hub": "^0.3.29",
74
+ "@arcblock/react-hooks": "^3.1.52",
75
+ "@arcblock/ux": "^3.1.52",
76
+ "@blocklet/aigne-hub": "^0.4.51",
77
77
  "@blocklet/aigne-sdk": "^0.5.26",
78
78
  "@blocklet/code-editor": "^0.5.26",
79
79
  "@blocklet/embed": "^0.2.5",
80
- "@blocklet/js-sdk": "^1.16.53",
81
- "@blocklet/logger": "1.16.48",
80
+ "@blocklet/js-sdk": "^1.16.54-beta-20251023-041534-36eec6b9",
81
+ "@blocklet/logger": "1.16.54-beta-20251021-070951-25e3083c",
82
82
  "@blocklet/quickjs": "^0.5.26",
83
- "@blocklet/sdk": "^1.16.53",
83
+ "@blocklet/sdk": "^1.16.54-beta-20251023-041534-36eec6b9",
84
84
  "@blocklet/studio-ui": "^0.5.26",
85
- "@blocklet/tracker": "^1.16.53",
86
- "@blocklet/ui-react": "^3.1.49",
85
+ "@blocklet/tracker": "^1.16.54-beta-20251023-041534-36eec6b9",
86
+ "@blocklet/ui-react": "^3.1.52",
87
87
  "@blocklet/uploader": "^0.2.15",
88
88
  "@blocklet/uploader-server": "^0.2.15",
89
89
  "@dnd-kit/core": "^6.3.1",
@@ -107,9 +107,9 @@
107
107
  "@mui/styles": "^5.16.14",
108
108
  "@mui/utils": "^7.1.1",
109
109
  "@mui/x-date-pickers": "^8.6.0",
110
- "@ocap/client": "^1.26.2",
111
- "@ocap/mcrypto": "^1.26.2",
112
- "@ocap/wallet": "^1.26.2",
110
+ "@ocap/client": "^1.26.3",
111
+ "@ocap/mcrypto": "^1.26.3",
112
+ "@ocap/wallet": "^1.26.3",
113
113
  "@reactivedata/reactive": "^0.2.2",
114
114
  "@syncedstore/core": "^0.6.0",
115
115
  "@syncedstore/react": "^0.6.0",
@@ -201,8 +201,8 @@
201
201
  "yaml": "^2.5.0",
202
202
  "yjs": "^13.6.18",
203
203
  "zustand": "^4.5.5",
204
- "@blocklet/pages-kit": "^0.6.99",
205
- "@blocklet/pages-kit-block-studio": "^0.6.99"
204
+ "@blocklet/pages-kit": "^0.6.101",
205
+ "@blocklet/pages-kit-block-studio": "^0.6.101"
206
206
  },
207
207
  "devDependencies": {
208
208
  "@trivago/prettier-plugin-sort-imports": "^5.2.1",