@lark-apaas/miaoda-inspector 1.0.4 → 1.0.5

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.
@@ -621,7 +621,7 @@ function MiaodaInspector(props) {
621
621
  postMessage({
622
622
  type: "PageMounted",
623
623
  data: {
624
- version: "1.0.4",
624
+ version: "1.0.5",
625
625
  feature: {
626
626
  selectParent: true,
627
627
  reverseSelect: true
@@ -1,13 +1,16 @@
1
1
  import "../chunk-I4E63NIC.mjs";
2
2
  function getPreviewParentOrigin() {
3
3
  const { origin } = window.location;
4
+ if (origin.includes("force.byted.org")) {
5
+ return "https://force.feishu-boe.cn";
6
+ }
4
7
  if (origin.includes("feishuapp.cn") || origin.includes("miaoda.feishuapp.net")) {
5
8
  return "https://miaoda.feishu.cn";
6
- }
7
- if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net")) {
9
+ } else if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net")) {
8
10
  return "https://miaoda.feishu-pre.cn";
11
+ } else {
12
+ return "https://miaoda.feishu-boe.cn";
9
13
  }
10
- return "https://miaoda.feishu-boe.cn";
11
14
  }
12
15
  function postMessage(message, targetOrigin) {
13
16
  window.parent.postMessage(message, targetOrigin != null ? targetOrigin : getPreviewParentOrigin());
@@ -639,7 +639,7 @@ function MiaodaInspector(props) {
639
639
  (0, import_utils2.postMessage)({
640
640
  type: "PageMounted",
641
641
  data: {
642
- version: "1.0.4",
642
+ version: "1.0.5",
643
643
  feature: {
644
644
  selectParent: true,
645
645
  reverseSelect: true
@@ -26,13 +26,16 @@ __export(origin_exports, {
26
26
  module.exports = __toCommonJS(origin_exports);
27
27
  function getPreviewParentOrigin() {
28
28
  const { origin } = window.location;
29
+ if (origin.includes("force.byted.org")) {
30
+ return "https://force.feishu-boe.cn";
31
+ }
29
32
  if (origin.includes("feishuapp.cn") || origin.includes("miaoda.feishuapp.net")) {
30
33
  return "https://miaoda.feishu.cn";
31
- }
32
- if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net")) {
34
+ } else if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net")) {
33
35
  return "https://miaoda.feishu-pre.cn";
36
+ } else {
37
+ return "https://miaoda.feishu-boe.cn";
34
38
  }
35
- return "https://miaoda.feishu-boe.cn";
36
39
  }
37
40
  function postMessage(message, targetOrigin) {
38
41
  window.parent.postMessage(message, targetOrigin != null ? targetOrigin : getPreviewParentOrigin());
@@ -1,5 +1,5 @@
1
- import { useEffect } from 'react';
1
+ import { useLayoutEffect as useLayoutEffect$1 } from 'react';
2
2
 
3
- declare const useLayoutEffect: typeof useEffect;
3
+ declare const useLayoutEffect: typeof useLayoutEffect$1;
4
4
 
5
5
  export { useLayoutEffect };
@@ -2,7 +2,7 @@ import { OutgoingMessage, IncomingMessage } from '../types/iframe-events.js';
2
2
  import '../types/feature.js';
3
3
  import '../config/ui-config.js';
4
4
 
5
- declare function getPreviewParentOrigin(): string;
5
+ declare function getPreviewParentOrigin(): "https://force.feishu-boe.cn" | "https://miaoda.feishu.cn" | "https://miaoda.feishu-pre.cn" | "https://miaoda.feishu-boe.cn";
6
6
  declare function postMessage<T extends OutgoingMessage>(message: T, targetOrigin?: string): void;
7
7
  declare function isOutgoingMessage<T extends OutgoingMessage['type']>(msg: OutgoingMessage, type: T): msg is Extract<OutgoingMessage, {
8
8
  type: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/miaoda-inspector",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Inspector for Lark Apaas",
5
5
  "sideEffects": [
6
6
  "*.css"