@blocklet/pages-kit 0.2.242 → 0.2.243

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.
@@ -7,6 +7,10 @@ Object.defineProperty(exports, "withQuery", { enumerable: true, get: function ()
7
7
  Object.defineProperty(exports, "getQuery", { enumerable: true, get: function () { return ufo_1.getQuery; } });
8
8
  function getComponentMountPoint(name) {
9
9
  var _a, _b;
10
+ if (typeof window === 'undefined') {
11
+ // eslint-disable-next-line global-require
12
+ return require('@blocklet/sdk/lib/component').getComponentMountPoint(name);
13
+ }
10
14
  return (_b = (_a = globalThis.blocklet) === null || _a === void 0 ? void 0 : _a.componentMountPoints.find((i) => i.name === name || i.did === name)) === null || _b === void 0 ? void 0 : _b.mountPoint;
11
15
  }
12
16
  exports.getComponentMountPoint = getComponentMountPoint;
@@ -1,5 +1,9 @@
1
1
  export { joinURL, withQuery, getQuery } from 'ufo';
2
2
  export function getComponentMountPoint(name) {
3
3
  var _a, _b;
4
+ if (typeof window === 'undefined') {
5
+ // eslint-disable-next-line global-require
6
+ return require('@blocklet/sdk/lib/component').getComponentMountPoint(name);
7
+ }
4
8
  return (_b = (_a = globalThis.blocklet) === null || _a === void 0 ? void 0 : _a.componentMountPoints.find((i) => i.name === name || i.did === name)) === null || _b === void 0 ? void 0 : _b.mountPoint;
5
9
  }
@@ -1,2 +1,2 @@
1
1
  export { joinURL, withQuery, getQuery } from 'ufo';
2
- export declare function getComponentMountPoint(name: string): string | undefined;
2
+ export declare function getComponentMountPoint(name: string): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/pages-kit",
3
- "version": "0.2.242",
3
+ "version": "0.2.243",
4
4
  "description": "Pages Kit components and utils",
5
5
  "publishConfig": {
6
6
  "access": "public"