@marimo-team/islands 0.21.2-dev27 → 0.21.2-dev28

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.
@@ -5,7 +5,7 @@ import { g as Logger } from "./button-BKkuUpZh.js";
5
5
  import "./Combination-BBPQRrDo.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
7
7
  import "./react-dom-CqtLRVZP.js";
8
- import { f as CopyClipboardIcon, n as loadLanguage, r as esm_default, t as langs } from "./esm-BLobyqMs.js";
8
+ import { f as CopyClipboardIcon, n as loadLanguage, r as esm_default, t as langs } from "./esm-No_6eSQS.js";
9
9
  import "./dist-DOoqn-VL.js";
10
10
  import "./dist-BGZ7TWS9.js";
11
11
  import "./dist-BpMlUdNO.js";
@@ -122,12 +122,22 @@ var Copy = createLucideIcon("copy", [["rect", {
122
122
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
123
123
  key: "zix9uf"
124
124
  }]]);
125
- async function copyToClipboard(e) {
125
+ async function copyToClipboard(e, p) {
126
126
  if (navigator.clipboard === void 0) {
127
127
  Logger.warn("navigator.clipboard is not supported"), window.prompt("Copy to clipboard: Ctrl+C, Enter", e);
128
128
  return;
129
129
  }
130
- await navigator.clipboard.writeText(e).catch(async () => {
130
+ if (p && navigator.clipboard.write) try {
131
+ let m = new ClipboardItem({
132
+ "text/html": new Blob([p], { type: "text/html" }),
133
+ "text/plain": new Blob([e], { type: "text/plain" })
134
+ });
135
+ await navigator.clipboard.write([m]);
136
+ return;
137
+ } catch {
138
+ Logger.warn("Failed to write rich text, falling back to plain text");
139
+ }
140
+ await navigator.clipboard.writeText(e).catch(() => {
131
141
  Logger.warn("Failed to copy to clipboard using navigator.clipboard"), window.prompt("Copy to clipboard: Ctrl+C, Enter", e);
132
142
  });
133
143
  }
@@ -1,7 +1,7 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_react } from "./react-Bs6Z0kvn.js";
3
3
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DIK6DiIA.js";
4
+ import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BjkXCUxP.js";
5
5
  import { t as Check } from "./check-Diwc5emq.js";
6
6
  import { h as Events, y as cn } from "./button-BKkuUpZh.js";
7
7
  import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
5
  import { t as require_react } from "./react-Bs6Z0kvn.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
7
- import { n as Copy, r as toast, t as copyToClipboard } from "./copy-DIK6DiIA.js";
7
+ import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BjkXCUxP.js";
8
8
  import { O as logNever, i as SelectContent, l as SelectTrigger, o as SelectItem, r as Select, t as Label, u as SelectValue } from "./label-BbpGrh4j.js";
9
9
  import { H as ErrorBoundary, U as require_prop_types, _ as DropdownMenuSeparator, _n as Plus, _t as capitalize_default, b as DropdownMenuSubTrigger, d as DropdownMenu, f as DropdownMenuContent, g as DropdownMenuPortal, hn as Trash, i as Input, m as DropdownMenuItem, mt as marked, pt as useNonce, t as BulkEdit, v as DropdownMenuSub, vn as Pencil, y as DropdownMenuSubContent } from "./types-CGc7peZV.js";
10
10
  import { g as Logger, h as Events, t as Button } from "./button-BKkuUpZh.js";