@octaviaflow/core 3.0.0 → 3.0.1

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/index.js CHANGED
@@ -8594,8 +8594,9 @@ function LinkButton({
8594
8594
  }
8595
8595
 
8596
8596
  // src/components/MonacoEditor/MonacoEditor.tsx
8597
- import { Editor } from "@monaco-editor/react";
8598
8597
  import {
8598
+ Suspense,
8599
+ lazy,
8599
8600
  useCallback as useCallback9,
8600
8601
  useEffect as useEffect10,
8601
8602
  useRef as useRef19,
@@ -8693,6 +8694,9 @@ var OCTAVIAFLOW_THEME_ID = "octaviaflow-light";
8693
8694
 
8694
8695
  // src/components/MonacoEditor/MonacoEditor.tsx
8695
8696
  import { Fragment as Fragment12, jsx as jsx48, jsxs as jsxs47 } from "react/jsx-runtime";
8697
+ var Editor = lazy(
8698
+ () => import("@monaco-editor/react").then((mod) => ({ default: mod.Editor }))
8699
+ );
8696
8700
  var MARKER_SEVERITY = {
8697
8701
  hint: 1,
8698
8702
  info: 2,
@@ -8948,7 +8952,10 @@ function MonacoEditor({
8948
8952
  )
8949
8953
  ] })
8950
8954
  ] }),
8951
- /* @__PURE__ */ jsx48("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx48(
8955
+ /* @__PURE__ */ jsx48("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx48(Suspense, { fallback: /* @__PURE__ */ jsxs47("div", { className: "ods-monaco__loading", children: [
8956
+ /* @__PURE__ */ jsx48("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx48("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx48("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
8957
+ /* @__PURE__ */ jsx48("span", { children: "Loading editor\u2026" })
8958
+ ] }), children: /* @__PURE__ */ jsx48(
8952
8959
  Editor,
8953
8960
  {
8954
8961
  value,
@@ -8964,7 +8971,7 @@ function MonacoEditor({
8964
8971
  ] }),
8965
8972
  "aria-label": ariaLabel
8966
8973
  }
8967
- ) }),
8974
+ ) }) }),
8968
8975
  !hideFooter && /* @__PURE__ */ jsxs47("div", { className: "ods-monaco__footer", children: [
8969
8976
  /* @__PURE__ */ jsxs47("span", { className: "ods-monaco__pos", children: [
8970
8977
  "Ln ",
@@ -8997,9 +9004,11 @@ function MonacoEditor({
8997
9004
  }
8998
9005
 
8999
9006
  // src/components/MonacoEditor/MonacoDiffEditor.tsx
9000
- import { DiffEditor } from "@monaco-editor/react";
9001
- import { useRef as useRef20, useState as useState14 } from "react";
9007
+ import { Suspense as Suspense2, lazy as lazy2, useRef as useRef20, useState as useState14 } from "react";
9002
9008
  import { jsx as jsx49, jsxs as jsxs48 } from "react/jsx-runtime";
9009
+ var DiffEditor = lazy2(
9010
+ () => import("@monaco-editor/react").then((mod) => ({ default: mod.DiffEditor }))
9011
+ );
9003
9012
  function MonacoDiffEditor({
9004
9013
  original,
9005
9014
  modified,
@@ -9104,7 +9113,10 @@ function MonacoDiffEditor({
9104
9113
  }
9105
9114
  ) })
9106
9115
  ] }),
9107
- /* @__PURE__ */ jsx49("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx49(
9116
+ /* @__PURE__ */ jsx49("div", { className: "ods-monaco__body", style: { minHeight }, children: /* @__PURE__ */ jsx49(Suspense2, { fallback: /* @__PURE__ */ jsxs48("div", { className: "ods-monaco__loading", children: [
9117
+ /* @__PURE__ */ jsx49("span", { className: "ods-monaco__loading-spin", "aria-hidden": "true", children: /* @__PURE__ */ jsx49("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsx49("circle", { cx: "7", cy: "7", r: "5", stroke: "currentColor", strokeWidth: "1.4", strokeDasharray: "4 18", strokeLinecap: "round" }) }) }),
9118
+ /* @__PURE__ */ jsx49("span", { children: "Loading diff\u2026" })
9119
+ ] }), children: /* @__PURE__ */ jsx49(
9108
9120
  DiffEditor,
9109
9121
  {
9110
9122
  original,
@@ -9119,7 +9131,7 @@ function MonacoDiffEditor({
9119
9131
  /* @__PURE__ */ jsx49("span", { children: "Loading diff\u2026" })
9120
9132
  ] })
9121
9133
  }
9122
- ) })
9134
+ ) }) })
9123
9135
  ]
9124
9136
  }
9125
9137
  );