@ixo/editor 2.15.0 → 2.16.0

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.
@@ -69,7 +69,7 @@ var BlocknoteContext = createContext({
69
69
  throw new Error("BlocknoteContext not initialized");
70
70
  }
71
71
  });
72
- var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editable, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer }) => {
72
+ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editable, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer, domainCardRenderer }) => {
73
73
  const [sharedProposals, setSharedProposals] = useState({});
74
74
  const sharedProposalsRef = useRef2({});
75
75
  const [activeDrawerId, setActiveDrawerId] = useState(null);
@@ -165,7 +165,8 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
165
165
  closeDrawer,
166
166
  visualizationRenderer,
167
167
  getDynamicListData,
168
- dynamicListPanelRenderer
168
+ dynamicListPanelRenderer,
169
+ domainCardRenderer
169
170
  }
170
171
  },
171
172
  children
@@ -1333,7 +1334,8 @@ import {
1333
1334
  IconChecklist,
1334
1335
  IconThumbUp,
1335
1336
  IconBell,
1336
- IconFeather
1337
+ IconFeather,
1338
+ IconDotsCircleHorizontal
1337
1339
  } from "@tabler/icons-react";
1338
1340
  var ICON_MAP = {
1339
1341
  "square-check": IconSquareCheck,
@@ -1345,7 +1347,8 @@ var ICON_MAP = {
1345
1347
  bell: IconBell,
1346
1348
  plus: IconPlus,
1347
1349
  "dollar-sign": IconUserDollar,
1348
- feather: IconFeather
1350
+ feather: IconFeather,
1351
+ "dots-circle": IconDotsCircleHorizontal
1349
1352
  };
1350
1353
  var getIcon = (fallback = "square-check", key, color = "white", size = 26, stroke = 1.5) => {
1351
1354
  const validKey = key in ICON_MAP ? key : fallback;
@@ -16893,16 +16896,145 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16893
16896
  return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack121, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text95, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack121, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text95, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, domainCardData?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, block.props.entityType || domainCardData?.type?.[0] || "dao")), domainCardData?.description && /* @__PURE__ */ React184.createElement(Group58, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainCardData.description))), /* @__PURE__ */ React184.createElement(Button32, { leftSection: /* @__PURE__ */ React184.createElement(IconSignature, { size: 18 }), onClick: handleSign, fullWidth: true }, "Sign & Create Domain"));
16894
16897
  };
16895
16898
 
16899
+ // src/data/domainCard.ts
16900
+ var dummyDomainCardData = {
16901
+ id: "6fcb075108d95d7418a1336e81b07fd5b4bc28b6edf96f1d75a34bfaa40b146e",
16902
+ issuer: "did:ixo:issuer:blueventures",
16903
+ credential_type: ["VerifiableCredential", "ixo:DomainCard"],
16904
+ valid_from: "2025-01-15T08:00:00.000Z",
16905
+ schema_id: "https://github.com/ixofoundation/docs",
16906
+ entity_type: ["schema:Organization", "schema:NGO"],
16907
+ name: "Blue Ventures",
16908
+ alternate_names: ["Blue Ventures Conservation"],
16909
+ description: "Blue Ventures is an award-winning marine conservation organization supporting community-led management of coastal ecosystems across Madagascar, East Africa, Southeast Asia, and the Caribbean. Their work focuses on blue carbon restoration, sustainable fisheries, locally managed marine areas (LMMAs), and strengthening coastal community resilience through science-based conservation practices.",
16910
+ keywords: [
16911
+ "Marine Conservation",
16912
+ "Blue Carbon",
16913
+ "Mangrove Restoration",
16914
+ "Seagrass Conservation",
16915
+ "Sustainable Fisheries",
16916
+ "Biodiversity Protection",
16917
+ "Climate Resilience",
16918
+ "Community-Led Conservation",
16919
+ "LMMAs",
16920
+ "Coastal Livelihoods"
16921
+ ],
16922
+ categories: ["ixo:project"],
16923
+ knows_about: [
16924
+ "community-based conservation models",
16925
+ "blue carbon ecosystems",
16926
+ "mangrove reforestation",
16927
+ "seagrass mapping",
16928
+ "marine protected area development",
16929
+ "sustainable small-scale fisheries"
16930
+ ],
16931
+ url: "https://blueventures.org/",
16932
+ same_as: [
16933
+ "https://twitter.com/blueventures",
16934
+ "https://github.com/blueventures",
16935
+ "https://linkedin.com/company/blue-ventures",
16936
+ "https://facebook.com/blueventuresorg",
16937
+ "https://instagram.com/blueventures"
16938
+ ],
16939
+ logo_url: {
16940
+ url: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png",
16941
+ alt: "The page returned a 404 Not Found error, indicating the requested resource could not be located. The server is running nginx, which is a web server software."
16942
+ },
16943
+ image_urls: [
16944
+ {
16945
+ url: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg",
16946
+ alt: "The page returned a 404 Not Found error, indicating the requested resource could not be located. The server is running nginx, which is a web server software.",
16947
+ type: "schema:ImageObject"
16948
+ }
16949
+ ],
16950
+ contact: {
16951
+ email: "info@blueventures.org",
16952
+ website: "https://blueventures.org/",
16953
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
16954
+ socialLinks: []
16955
+ },
16956
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
16957
+ coordinates: {
16958
+ type: "Point",
16959
+ coordinates: [-2.674898, 51.487256]
16960
+ },
16961
+ address: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
16962
+ area_served: "Global Coastal Regions",
16963
+ relationships: {
16964
+ memberOf: ["The Blue Carbon Initiative"],
16965
+ partners: ["WWF", "The Nature Conservancy", "IUCN Mangrove Specialist Group"],
16966
+ funders: ["UK Aid / FCDO"]
16967
+ },
16968
+ additional_properties: {
16969
+ attributes: [
16970
+ {
16971
+ "@type": "schema:PropertyValue",
16972
+ "@id": "urn:ixo:attr:projects",
16973
+ name: "Active Conservation Sites",
16974
+ value: "40+"
16975
+ },
16976
+ {
16977
+ "@type": "schema:PropertyValue",
16978
+ "@id": "urn:ixo:attr:focus",
16979
+ name: "Core Focus Areas",
16980
+ value: "Blue carbon, fisheries, biodiversity"
16981
+ }
16982
+ ],
16983
+ content_hashes: {
16984
+ "https://blueventures.org/": "1765daf4a048e042bc651e13d6ed88d7f70f576c1b16ac4bc00cd42e78a9fcb0"
16985
+ },
16986
+ content_summaries: {
16987
+ "https://blueventures.org/": "The content highlights Blue Ventures' community-centered approach to marine conservation, emphasizing the critical role of coastal communities in sustaining fisheries and protecting ocean ecosystems. The organization works across 11 countries\u2014including Madagascar, Timor-Leste, Indonesia, and Belize\u2014supporting Locally Managed Marine Areas (LMMAs), community-led fisheries management, and the recognition of traditional governance systems like Tara Bandu. Key strategies include empowering local institutions, promoting data-driven decision-making, strengthening co-management partnerships, and advocating for small-scale fishers' rights. Blue Ventures also addresses social challenges by integrating healthcare access and supporting women-led initiatives. With a vision of 'Thriving Communities. Thriving Oceans,' the organization aims to scale locally led conservation to combat climate change, overfishing, and industrial exploitation, ensuring long-term resilience for both people and nature."
16988
+ },
16989
+ last_fetch_date: "2025-12-11T16:32:33.260Z"
16990
+ },
16991
+ faq: [
16992
+ {
16993
+ question: "What is Marine Conservation Partnerships and what problem does it solve?",
16994
+ answer: "Marine Conservation Partnerships is a service offering that enables NGOs, governments, and coastal communities to implement community-led marine conservation models\u2014primarily Locally Managed Marine Areas (LMMAs)\u2014to address threats to coastal ecosystems. It combines governance frameworks, science-based monitoring, and livelihoods support to deliver measurable conservation and community benefits."
16995
+ },
16996
+ {
16997
+ question: "How does Marine Conservation Partnerships work technically?",
16998
+ answer: "It works by designing and deploying locally led governance structures (LMMA frameworks), conducting science-driven monitoring (ecological surveys, standardized catch surveys), and enabling community-led patrols and fishery closures. The program also integrates mangrove blue carbon initiatives and drone-assisted seagrass mapping to track ecosystem change."
16999
+ },
17000
+ {
17001
+ question: "What can you do with Marine Conservation Partnerships?",
17002
+ answer: "You can establish LMMA networks, implement seasonal or spatial fishery closures, develop mangrove blue carbon projects, and leverage open-access research to inform policy. The offering supports capacity building, governance design, and community-driven stewardship with data-backed decision making."
17003
+ },
17004
+ {
17005
+ question: "Who uses Marine Conservation Partnerships?",
17006
+ answer: "NGOs and governments seeking community-based conservation models, researchers studying blue carbon and tropical fisheries, and funders supporting high-impact coastal restoration programs use Marine Conservation Partnerships. Communities actively participate in planning, monitoring, and stewardship."
17007
+ },
17008
+ {
17009
+ question: "What outcomes does Marine Conservation Partnerships aim to achieve?",
17010
+ answer: "The program targets verified ecological gains such as mangrove restoration and biomass accumulation, improved fisheries performance, and biodiversity rebound, supported by science-based monitoring and governance metrics. These outcomes are designed to be scalable across regions and inform broader conservation strategies."
17011
+ }
17012
+ ],
17013
+ summary: "Blue Ventures is a marine conservation NGO advancing community-led coastal stewardship across Madagascar, East Africa, Southeast Asia, and the Caribbean, focusing on blue carbon restoration, mangroves, seagrass meadows, and sustainable small-scale fisheries. Through Marine Conservation Partnerships, it enables NGOs, governments, and coastal communities to design Locally Managed Marine Areas (LMMAs), conduct science-based monitoring, and implement mangrove blue carbon initiatives and drone-assisted seagrass mapping. The organization differentiates itself by pioneering the LMMA model in Madagascar and integrating ecological science with livelihoods and conservation financing within a network that includes the Blue Carbon Initiative, WWF, The Nature Conservancy, and IUCN Mangrove Specialist Group, funded by UK Aid / FCDO.",
17014
+ overview: "### Mission & Technical Foundation\nBlue Ventures is a globally recognized marine conservation NGO focused on community-led management of coastal ecosystems. Its mission centers on empowering coastal communities to design, govern, and sustain their own marine management systems, with primary ecosystems including mangroves, coral reefs, seagrass meadows, and small-scale fisheries. The organization operates across Madagascar, East Africa, Southeast Asia, and the Caribbean, and maintains a science-driven program portfolio that integrates ecological surveys, fisheries data, and socioeconomic research to deliver measurable conservation and livelihood outcomes. The core technical approach combines governance design, field monitoring, and community-based stewardship to translate science into locally governed restoration and management.\n\n### Ecosystem & Capabilities\nBlue Ventures positions itself within a collaborative ecosystem that includes the Blue Carbon Initiative, Global Mangrove Alliance, WWF, IUCN, and The Nature Conservancy. Its flagship offering, Marine Conservation Partnerships, enables NGOs, governments, and coastal communities to implement Locally Managed Marine Areas (LMMAs), integrating governance frameworks, science-based monitoring, and livelihoods support to achieve scalable, community-first conservation. Key capabilities include LMMA design and governance, drone-assisted seagrass mapping, standardized catch surveys for fisheries monitoring, mangrove blue carbon initiatives, and community patrols with seasonal or spatial fishery closures. The organization also produces open-access research used by global conservation networks and pursues partnerships that expand mangrove restoration and blue carbon across regions. Notable collaborations include the Blue Carbon Initiative, Global Mangrove Alliance, and partnerships with WWF, IUCN, and TNC, with UK Aid / FCDO as a principal funder. Upcoming engagement includes the Global Mangrove Alliance \u2013 Annual Gathering 2025 in Dar es Salaam, reflecting a commitment to scale and knowledge exchange across Africa, Southeast Asia, and the Caribbean.",
17015
+ events: ["81382424481d6291b3caaaf6bb1d16eef568fe24a96fd2c1a3fddec9b368f165"],
17016
+ agents: [],
17017
+ indexed_at: "2025-12-11T16:32:33.260Z",
17018
+ updated_at: "2025-12-11T16:32:33.260Z",
17019
+ research_profile: {
17020
+ type: "ixo:ResearchProfile",
17021
+ "ixo:seedQueries": ["Blue Ventures blue carbon community conservation", "mangrove restoration Madagascar community management"],
17022
+ citation: [
17023
+ {
17024
+ type: "schema:CreativeWork",
17025
+ name: "Blue Carbon Ecosystems in Madagascar",
17026
+ url: "https://blueventures.org/blue-carbon/",
17027
+ publisher: "Blue Ventures",
17028
+ datePublished: "2023-11-14"
17029
+ }
17030
+ ],
17031
+ dateModified: "2025-01-15"
17032
+ }
17033
+ };
17034
+
16896
17035
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
16897
17036
  var DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID = "domain-creator-sign-flow-panel";
16898
17037
  var IS_DEV = false;
16899
- var DUMMY_DOMAIN_CARD_DATA = {
16900
- type: ["ixo:dao"],
16901
- name: "Test Domain",
16902
- description: "A test domain created for development purposes.",
16903
- keywords: ["test", "development", "demo"],
16904
- url: "https://example.com"
16905
- };
16906
17038
  function isDomainCardDataReady(domainCardData) {
16907
17039
  if (!domainCardData || domainCardData === "{}") return false;
16908
17040
  try {
@@ -16983,7 +17115,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
16983
17115
  editor.updateBlock(block, {
16984
17116
  props: {
16985
17117
  ...block.props,
16986
- domainCardData: JSON.stringify(DUMMY_DOMAIN_CARD_DATA),
17118
+ domainCardData: JSON.stringify(dummyDomainCardData),
16987
17119
  entityType: "dao"
16988
17120
  }
16989
17121
  });
@@ -17059,6 +17191,411 @@ var DomainCreatorSignBlockSpec = createReactBlockSpec16(
17059
17191
  }
17060
17192
  );
17061
17193
 
17194
+ // src/mantine/blocks/domainCardViewer/DomainCardViewerBlockSpec.tsx
17195
+ import React194 from "react";
17196
+ import { createReactBlockSpec as createReactBlockSpec17 } from "@blocknote/react";
17197
+
17198
+ // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
17199
+ import React193 from "react";
17200
+
17201
+ // src/mantine/blocks/domainCardViewer/template/TemplateView.tsx
17202
+ import React190, { useMemo as useMemo57 } from "react";
17203
+ import { Badge as Badge29, Group as Group60, Stack as Stack123, Text as Text97 } from "@mantine/core";
17204
+
17205
+ // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
17206
+ import React189, { useCallback as useCallback48 } from "react";
17207
+ import { Paper as Paper19, CloseButton as CloseButton14, Title as Title17 } from "@mantine/core";
17208
+
17209
+ // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
17210
+ import React188, { useEffect as useEffect48, useState as useState65 } from "react";
17211
+ var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
17212
+ const [localTitle, setLocalTitle] = useState65(title || "");
17213
+ const [localDescription, setLocalDescription] = useState65(description || "");
17214
+ const [localIcon, setLocalIcon] = useState65(icon || "dots-circle");
17215
+ useEffect48(() => setLocalTitle(title || ""), [title]);
17216
+ useEffect48(() => setLocalDescription(description || ""), [description]);
17217
+ useEffect48(() => setLocalIcon(icon || "dots-circle"), [icon]);
17218
+ return /* @__PURE__ */ React188.createElement(BaseSection, null, /* @__PURE__ */ React188.createElement(
17219
+ BaseTextInput,
17220
+ {
17221
+ label: "Title",
17222
+ placeholder: "e.g. Domain Card Preview",
17223
+ value: localTitle,
17224
+ onChange: (event) => {
17225
+ const newValue = event.currentTarget.value;
17226
+ setLocalTitle(newValue);
17227
+ onTitleChange(newValue);
17228
+ }
17229
+ }
17230
+ ), /* @__PURE__ */ React188.createElement(
17231
+ BaseTextArea,
17232
+ {
17233
+ label: "Description",
17234
+ placeholder: "Short description shown on the block",
17235
+ minRows: 2,
17236
+ value: localDescription,
17237
+ onChange: (event) => {
17238
+ const newValue = event.currentTarget.value;
17239
+ setLocalDescription(newValue);
17240
+ onDescriptionChange(newValue);
17241
+ }
17242
+ }
17243
+ ), /* @__PURE__ */ React188.createElement(
17244
+ BaseTextInput,
17245
+ {
17246
+ label: "Icon",
17247
+ description: "Use a supported icon key (e.g. id-badge, file-text, eye)",
17248
+ placeholder: "id-badge",
17249
+ value: localIcon,
17250
+ onChange: (event) => {
17251
+ const newValue = event.currentTarget.value;
17252
+ setLocalIcon(newValue);
17253
+ onIconChange(newValue);
17254
+ }
17255
+ }
17256
+ ));
17257
+ };
17258
+
17259
+ // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
17260
+ var TemplateConfig13 = ({ editor, block }) => {
17261
+ const { closePanel } = usePanelStore();
17262
+ const updateProp = useCallback48(
17263
+ (key, value) => {
17264
+ editor.updateBlock(block, {
17265
+ props: {
17266
+ ...block.props,
17267
+ [key]: value
17268
+ }
17269
+ });
17270
+ },
17271
+ [editor, block]
17272
+ );
17273
+ return /* @__PURE__ */ React189.createElement(
17274
+ Paper19,
17275
+ {
17276
+ p: "md",
17277
+ shadow: "sm",
17278
+ style: {
17279
+ height: "100%",
17280
+ display: "flex",
17281
+ flexDirection: "column"
17282
+ }
17283
+ },
17284
+ /* @__PURE__ */ React189.createElement(
17285
+ "div",
17286
+ {
17287
+ style: {
17288
+ display: "flex",
17289
+ justifyContent: "space-between",
17290
+ alignItems: "center",
17291
+ marginBottom: "1rem"
17292
+ }
17293
+ },
17294
+ /* @__PURE__ */ React189.createElement(Title17, { order: 5 }, "Domain Card Settings"),
17295
+ /* @__PURE__ */ React189.createElement(CloseButton14, { onClick: closePanel })
17296
+ ),
17297
+ /* @__PURE__ */ React189.createElement(
17298
+ ReusablePanel,
17299
+ {
17300
+ extraTabs: [
17301
+ {
17302
+ label: "General",
17303
+ value: "general",
17304
+ content: /* @__PURE__ */ React189.createElement(
17305
+ GeneralTab13,
17306
+ {
17307
+ title: block.props.title || "",
17308
+ description: block.props.description || "",
17309
+ icon: block.props.icon || "dots-circle",
17310
+ onTitleChange: (value) => updateProp("title", value),
17311
+ onDescriptionChange: (value) => updateProp("description", value),
17312
+ onIconChange: (value) => updateProp("icon", value)
17313
+ }
17314
+ )
17315
+ }
17316
+ ],
17317
+ context: { editor, block }
17318
+ }
17319
+ )
17320
+ );
17321
+ };
17322
+
17323
+ // src/mantine/blocks/domainCardViewer/template/TemplateView.tsx
17324
+ var DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID = "domain-card-viewer-template-panel";
17325
+ var DomainCardViewerTemplateView = ({ editor, block }) => {
17326
+ const panelId = `${DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID}-${block.id}`;
17327
+ const panelContent = useMemo57(() => /* @__PURE__ */ React190.createElement(TemplateConfig13, { editor, block }), [editor, block]);
17328
+ const { open } = usePanel(panelId, panelContent);
17329
+ return /* @__PURE__ */ React190.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React190.createElement(Badge29, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React190.createElement(Group60, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React190.createElement(Group60, { wrap: "nowrap", align: "center" }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React190.createElement(Stack123, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React190.createElement(Text97, { fw: 500, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React190.createElement(Text97, { size: "xs", c: "dimmed" }, block.props.description || "Preview domain card generated by AI")))));
17330
+ };
17331
+
17332
+ // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
17333
+ import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as useEffect49, useRef as useRef11 } from "react";
17334
+ import { ActionIcon as ActionIcon28, Badge as Badge30, Button as Button35, Group as Group61, Stack as Stack125, Text as Text99, Tooltip as Tooltip19 } from "@mantine/core";
17335
+ import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe as IconTestPipe2, IconTrash as IconTrash6 } from "@tabler/icons-react";
17336
+
17337
+ // src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
17338
+ import React191, { useMemo as useMemo58 } from "react";
17339
+ import { Paper as Paper20, CloseButton as CloseButton15, Title as Title18, Stack as Stack124, Text as Text98, Loader as Loader25, Alert as Alert25, Button as Button34, Box as Box34, ScrollArea as ScrollArea6, Code as Code6 } from "@mantine/core";
17340
+ import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
17341
+ function parseDomainCardData(jsonString) {
17342
+ if (!jsonString || jsonString === "{}") return null;
17343
+ try {
17344
+ return JSON.parse(jsonString);
17345
+ } catch {
17346
+ return null;
17347
+ }
17348
+ }
17349
+ var JsonViewer = ({ data }) => {
17350
+ return /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, /* @__PURE__ */ React191.createElement(Stack124, { gap: "md" }, data.name && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React191.createElement(Text98, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React191.createElement(Stack124, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React191.createElement(Box34, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React191.createElement(Text98, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React191.createElement(Box34, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React191.createElement(Code6, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
17351
+ };
17352
+ var ViewerPanel = ({ block, onApprove }) => {
17353
+ const { closePanel } = usePanelStore();
17354
+ const { domainCardRenderer } = useBlocknoteContext();
17355
+ const status = block.props.status || "pending";
17356
+ const loadingMessage = block.props.loadingMessage || "Agents is generating your domain data...";
17357
+ const errorMessage = block.props.errorMessage || "An error occurred while generating the domain data.";
17358
+ const domainCardData = useMemo58(() => parseDomainCardData(block.props.domainCardData || "{}"), [block.props.domainCardData]);
17359
+ const isLoading = status === "loading";
17360
+ const isError = status === "error";
17361
+ const isReady = status === "ready";
17362
+ const isApproved = status === "approved";
17363
+ const hasData = domainCardData !== null;
17364
+ return /* @__PURE__ */ React191.createElement(
17365
+ Paper20,
17366
+ {
17367
+ p: "md",
17368
+ shadow: "sm",
17369
+ style: {
17370
+ height: "100%",
17371
+ display: "flex",
17372
+ flexDirection: "column"
17373
+ }
17374
+ },
17375
+ /* @__PURE__ */ React191.createElement(
17376
+ "div",
17377
+ {
17378
+ style: {
17379
+ display: "flex",
17380
+ justifyContent: "space-between",
17381
+ alignItems: "center",
17382
+ marginBottom: "1rem",
17383
+ flexShrink: 0
17384
+ }
17385
+ },
17386
+ /* @__PURE__ */ React191.createElement(Title18, { order: 5 }, block.props.title || "Domain Card"),
17387
+ /* @__PURE__ */ React191.createElement(CloseButton15, { onClick: closePanel })
17388
+ ),
17389
+ /* @__PURE__ */ React191.createElement(Box34, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React191.createElement(Stack124, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Loader25, { size: "lg", color: "blue" }), /* @__PURE__ */ React191.createElement(Stack124, { align: "center", gap: "xs" }, /* @__PURE__ */ React191.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React191.createElement(Stack124, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Alert25, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle12, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React191.createElement(Box34, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
17390
+ // Use custom renderer from web app
17391
+ /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainCardData))
17392
+ ) : (
17393
+ // Fallback to JSON viewer
17394
+ /* @__PURE__ */ React191.createElement(JsonViewer, { data: domainCardData })
17395
+ )), !isLoading && !isError && !hasData && /* @__PURE__ */ React191.createElement(Stack124, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, "No domain data available yet."))),
17396
+ isReady && hasData && /* @__PURE__ */ React191.createElement(
17397
+ Box34,
17398
+ {
17399
+ pt: "md",
17400
+ mt: "md",
17401
+ style: {
17402
+ borderTop: "1px solid var(--mantine-color-dark-4)",
17403
+ flexShrink: 0
17404
+ }
17405
+ },
17406
+ /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", ta: "center", mb: "0" }, "This shows the domain details to see if the narrative aligns with what the domain is about."),
17407
+ /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", ta: "center", mb: "md" }, "If you'd like changes, ask the oracle to make changes for you."),
17408
+ /* @__PURE__ */ React191.createElement(Button34, { fullWidth: true, color: "teal", leftSection: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), onClick: onApprove }, "Approve")
17409
+ ),
17410
+ isApproved && /* @__PURE__ */ React191.createElement(
17411
+ Box34,
17412
+ {
17413
+ pt: "md",
17414
+ mt: "md",
17415
+ style: {
17416
+ borderTop: "1px solid var(--mantine-color-dark-4)",
17417
+ flexShrink: 0
17418
+ }
17419
+ },
17420
+ /* @__PURE__ */ React191.createElement(Alert25, { icon: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), color: "green", variant: "light" }, "Domain data approved. You can proceed to sign and create the domain.")
17421
+ )
17422
+ );
17423
+ };
17424
+
17425
+ // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
17426
+ var DOMAIN_CARD_VIEWER_FLOW_PANEL_ID = "domain-card-viewer-flow-panel";
17427
+ var IS_DEV2 = false;
17428
+ function isDomainCardDataReady2(domainCardData) {
17429
+ if (!domainCardData || domainCardData === "{}") return false;
17430
+ try {
17431
+ const parsed = JSON.parse(domainCardData);
17432
+ return Boolean(parsed && typeof parsed === "object" && parsed.name);
17433
+ } catch {
17434
+ return false;
17435
+ }
17436
+ }
17437
+ function syncToDomainCreatorSignBlocks(editor, domainCardData) {
17438
+ const allBlocks = editor.document;
17439
+ for (const block of allBlocks) {
17440
+ if (block.type === "domainCreatorSign") {
17441
+ if (block.props.domainCardData !== domainCardData) {
17442
+ editor.updateBlock(block, {
17443
+ props: {
17444
+ ...block.props,
17445
+ domainCardData,
17446
+ // Also update status if data is ready
17447
+ status: isDomainCardDataReady2(domainCardData) ? "ready" : "pending"
17448
+ }
17449
+ });
17450
+ }
17451
+ }
17452
+ }
17453
+ }
17454
+ var DomainCardViewerFlowView = ({ editor, block }) => {
17455
+ const status = block.props.status || "pending";
17456
+ const domainCardData = block.props.domainCardData || "{}";
17457
+ const isDataReady = isDomainCardDataReady2(domainCardData);
17458
+ const prevDomainCardDataRef = useRef11(domainCardData);
17459
+ useEffect49(() => {
17460
+ if (prevDomainCardDataRef.current !== domainCardData && isDataReady) {
17461
+ syncToDomainCreatorSignBlocks(editor, domainCardData);
17462
+ }
17463
+ prevDomainCardDataRef.current = domainCardData;
17464
+ }, [domainCardData, isDataReady, editor]);
17465
+ useEffect49(() => {
17466
+ if (status === "pending" && isDataReady) {
17467
+ editor.updateBlock(block, {
17468
+ props: {
17469
+ ...block.props,
17470
+ status: "ready"
17471
+ }
17472
+ });
17473
+ }
17474
+ }, [isDataReady, status, editor, block]);
17475
+ const handleApprove = useCallback49(() => {
17476
+ editor.updateBlock(block, {
17477
+ props: {
17478
+ ...block.props,
17479
+ status: "approved"
17480
+ }
17481
+ });
17482
+ }, [editor, block]);
17483
+ const panelId = `${DOMAIN_CARD_VIEWER_FLOW_PANEL_ID}-${block.id}`;
17484
+ const panelContent = useMemo59(() => /* @__PURE__ */ React192.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
17485
+ const { open } = usePanel(panelId, panelContent);
17486
+ const handleInjectDummyData = useCallback49(
17487
+ (e) => {
17488
+ e.stopPropagation();
17489
+ editor.updateBlock(block, {
17490
+ props: {
17491
+ ...block.props,
17492
+ domainCardData: JSON.stringify(dummyDomainCardData),
17493
+ status: "ready",
17494
+ loadingMessage: "",
17495
+ errorMessage: ""
17496
+ }
17497
+ });
17498
+ },
17499
+ [editor, block]
17500
+ );
17501
+ const handleSetLoading = useCallback49(
17502
+ (e) => {
17503
+ e.stopPropagation();
17504
+ editor.updateBlock(block, {
17505
+ props: {
17506
+ ...block.props,
17507
+ status: "loading",
17508
+ loadingMessage: "Agents are analyzing your domain information..."
17509
+ }
17510
+ });
17511
+ },
17512
+ [editor, block]
17513
+ );
17514
+ const handleClearData = useCallback49(
17515
+ (e) => {
17516
+ e.stopPropagation();
17517
+ editor.updateBlock(block, {
17518
+ props: {
17519
+ ...block.props,
17520
+ domainCardData: "{}",
17521
+ status: "pending",
17522
+ loadingMessage: "",
17523
+ errorMessage: ""
17524
+ }
17525
+ });
17526
+ },
17527
+ [editor, block]
17528
+ );
17529
+ const getBadgeProps = () => {
17530
+ switch (status) {
17531
+ case "approved":
17532
+ return { color: "green", text: "Approved" };
17533
+ case "error":
17534
+ return { color: "red", text: "Error" };
17535
+ case "loading":
17536
+ return { color: "blue", text: "Generating..." };
17537
+ case "ready":
17538
+ return { color: "teal", text: "Ready to Review" };
17539
+ default:
17540
+ return { color: "gray", text: "Waiting" };
17541
+ }
17542
+ };
17543
+ const badgeProps = getBadgeProps();
17544
+ const getDescriptionText = () => {
17545
+ switch (status) {
17546
+ case "approved":
17547
+ return "Domain data approved";
17548
+ case "error":
17549
+ return block.props.errorMessage || "An error occurred";
17550
+ case "loading":
17551
+ return block.props.loadingMessage || "Agents are generating domain data...";
17552
+ case "ready":
17553
+ return "Click to review and approve";
17554
+ default:
17555
+ return "Waiting for agents to generate domain data";
17556
+ }
17557
+ };
17558
+ const canOpenPanel = status !== "pending";
17559
+ return /* @__PURE__ */ React192.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React192.createElement(Group61, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React192.createElement(Group61, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React192.createElement(Stack125, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React192.createElement(Group61, { gap: "xs", align: "center" }, /* @__PURE__ */ React192.createElement(Text99, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React192.createElement(Badge30, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React192.createElement(Text99, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV2 && status === "pending" && /* @__PURE__ */ React192.createElement(React192.Fragment, null, /* @__PURE__ */ React192.createElement(Button35, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTestPipe2, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React192.createElement(Button35, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React192.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV2 && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React192.createElement(Button35, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTrash6, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React192.createElement(Tooltip19, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon28, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight9, { size: 18 })))));
17560
+ };
17561
+
17562
+ // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
17563
+ function DomainCardViewerBlock({ editor, block }) {
17564
+ const { docType } = useBlocknoteContext();
17565
+ if (docType === "template") {
17566
+ return /* @__PURE__ */ React193.createElement(DomainCardViewerTemplateView, { editor, block });
17567
+ }
17568
+ return /* @__PURE__ */ React193.createElement(DomainCardViewerFlowView, { editor, block });
17569
+ }
17570
+
17571
+ // src/mantine/blocks/domainCardViewer/DomainCardViewerBlockSpec.tsx
17572
+ var DomainCardViewerBlockSpec = createReactBlockSpec17(
17573
+ {
17574
+ type: "domainCardViewer",
17575
+ propSchema: {
17576
+ title: { default: "" },
17577
+ description: { default: "" },
17578
+ icon: { default: "dots-circle" },
17579
+ // Core domain card data (JSON string, injected by oracle)
17580
+ domainCardData: { default: "{}" },
17581
+ // Status tracking for oracle workflow
17582
+ status: { default: "pending" },
17583
+ // 'pending' | 'loading' | 'ready' | 'approved' | 'error'
17584
+ // Loading message from oracle
17585
+ loadingMessage: { default: "" },
17586
+ // Error message if something goes wrong
17587
+ errorMessage: { default: "" }
17588
+ },
17589
+ content: "none"
17590
+ },
17591
+ {
17592
+ render: (props) => {
17593
+ const ixoProps = props;
17594
+ return /* @__PURE__ */ React194.createElement(DomainCardViewerBlock, { ...ixoProps });
17595
+ }
17596
+ }
17597
+ );
17598
+
17062
17599
  // src/mantine/blocks/registry/blockRegistry.ts
17063
17600
  var BlockRegistry = class {
17064
17601
  constructor() {
@@ -17230,10 +17767,10 @@ blockRegistry.register({
17230
17767
  });
17231
17768
 
17232
17769
  // src/mantine/blocks/hooks/useBlockDependencies.ts
17233
- import { useMemo as useMemo57, useEffect as useEffect48, useState as useState65, useCallback as useCallback48 } from "react";
17770
+ import { useMemo as useMemo60, useEffect as useEffect50, useState as useState66, useCallback as useCallback50 } from "react";
17234
17771
 
17235
17772
  // src/mantine/blocks/hooks/useDependsOn.ts
17236
- import { useMemo as useMemo58 } from "react";
17773
+ import { useMemo as useMemo61 } from "react";
17237
17774
 
17238
17775
  // src/mantine/blocks/index.ts
17239
17776
  var blockSpecs = {
@@ -17252,7 +17789,8 @@ var blockSpecs = {
17252
17789
  dynamicList: DynamicListBlockSpec,
17253
17790
  protocolSelector: ProtocolSelectorBlockSpec,
17254
17791
  form: FormBlockSpec,
17255
- domainCreatorSign: DomainCreatorSignBlockSpec
17792
+ domainCreatorSign: DomainCreatorSignBlockSpec,
17793
+ domainCardViewer: DomainCardViewerBlockSpec
17256
17794
  };
17257
17795
  var getExtraSlashMenuItems = (editor) => {
17258
17796
  const slashMenuList = [
@@ -17601,6 +18139,32 @@ var getExtraSlashMenuItems = (editor) => {
17601
18139
  aliases: ["domain-sign"],
17602
18140
  group: "Domains",
17603
18141
  subtext: "Sign domain card and create entity on-chain"
18142
+ },
18143
+ {
18144
+ title: "Domain Card",
18145
+ onItemClick: () => {
18146
+ editor.insertBlocks(
18147
+ [
18148
+ {
18149
+ type: "domainCardViewer",
18150
+ props: {
18151
+ title: "",
18152
+ description: "",
18153
+ icon: "dots-circle",
18154
+ domainCardData: "{}",
18155
+ status: "pending",
18156
+ loadingMessage: "",
18157
+ errorMessage: ""
18158
+ }
18159
+ }
18160
+ ],
18161
+ editor.getTextCursorPosition().block,
18162
+ "after"
18163
+ );
18164
+ },
18165
+ aliases: ["domain-card", "domain-viewer", "card-preview"],
18166
+ group: "Domains",
18167
+ subtext: "Preview domain card before signing"
17604
18168
  }
17605
18169
  ];
17606
18170
  const yRoot = editor?._yRoot;
@@ -17681,15 +18245,15 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
17681
18245
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
17682
18246
 
17683
18247
  // src/core/hooks/useMatrixProvider.ts
17684
- import { useEffect as useEffect49, useState as useState66, useRef as useRef11, useCallback as useCallback49, useMemo as useMemo59 } from "react";
18248
+ import { useEffect as useEffect51, useState as useState67, useRef as useRef12, useCallback as useCallback51, useMemo as useMemo62 } from "react";
17685
18249
  import { MatrixProvider } from "@ixo/matrix-crdt";
17686
18250
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
17687
- const [matrixProvider, setProvider] = useState66(null);
17688
- const [status, setStatus] = useState66("disconnected");
17689
- const isMountedRef = useRef11(true);
17690
- const providerRef = useRef11(null);
17691
- const retryTimeoutRef = useRef11(null);
17692
- const providerOptions = useMemo59(
18251
+ const [matrixProvider, setProvider] = useState67(null);
18252
+ const [status, setStatus] = useState67("disconnected");
18253
+ const isMountedRef = useRef12(true);
18254
+ const providerRef = useRef12(null);
18255
+ const retryTimeoutRef = useRef12(null);
18256
+ const providerOptions = useMemo62(
17693
18257
  () => ({
17694
18258
  translator: {
17695
18259
  updateEventType: "matrix-crdt.doc_update",
@@ -17702,22 +18266,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
17702
18266
  }),
17703
18267
  []
17704
18268
  );
17705
- const handleDocumentAvailable = useCallback49(() => {
18269
+ const handleDocumentAvailable = useCallback51(() => {
17706
18270
  if (isMountedRef.current) {
17707
18271
  setStatus("connected");
17708
18272
  }
17709
18273
  }, []);
17710
- const handleDocumentUnavailable = useCallback49(() => {
18274
+ const handleDocumentUnavailable = useCallback51(() => {
17711
18275
  if (isMountedRef.current) {
17712
18276
  setStatus("failed");
17713
18277
  }
17714
18278
  }, []);
17715
- const handleCanWriteChanged = useCallback49(() => {
18279
+ const handleCanWriteChanged = useCallback51(() => {
17716
18280
  if (isMountedRef.current && providerRef.current) {
17717
18281
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
17718
18282
  }
17719
18283
  }, []);
17720
- const initProvider = useCallback49(async () => {
18284
+ const initProvider = useCallback51(async () => {
17721
18285
  if (!isMountedRef.current) return;
17722
18286
  if (retryTimeoutRef.current) {
17723
18287
  clearTimeout(retryTimeoutRef.current);
@@ -17750,7 +18314,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
17750
18314
  }
17751
18315
  }
17752
18316
  }, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
17753
- useEffect49(() => {
18317
+ useEffect51(() => {
17754
18318
  isMountedRef.current = true;
17755
18319
  initProvider();
17756
18320
  return () => {
@@ -17767,7 +18331,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
17767
18331
  setStatus("disconnected");
17768
18332
  };
17769
18333
  }, [initProvider]);
17770
- useEffect49(() => {
18334
+ useEffect51(() => {
17771
18335
  return () => {
17772
18336
  isMountedRef.current = false;
17773
18337
  };
@@ -17776,17 +18340,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
17776
18340
  }
17777
18341
 
17778
18342
  // src/mantine/hooks/useCollaborativeYDoc.ts
17779
- import { useMemo as useMemo60 } from "react";
18343
+ import { useMemo as useMemo63 } from "react";
17780
18344
  import * as Y from "yjs";
17781
18345
  function useCollaborativeYDoc(_options) {
17782
- return useMemo60(() => {
18346
+ return useMemo63(() => {
17783
18347
  const doc = new Y.Doc();
17784
18348
  return doc;
17785
18349
  }, []);
17786
18350
  }
17787
18351
 
17788
18352
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
17789
- import { useMemo as useMemo61, useEffect as useEffect50 } from "react";
18353
+ import { useMemo as useMemo64, useEffect as useEffect52 } from "react";
17790
18354
 
17791
18355
  // src/core/lib/matrixMetadata.ts
17792
18356
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -17955,7 +18519,7 @@ function useCreateCollaborativeIxoEditor(options) {
17955
18519
  matrixClient,
17956
18520
  permissions = { write: false }
17957
18521
  } = options || {};
17958
- const memoizedUser = useMemo61(
18522
+ const memoizedUser = useMemo64(
17959
18523
  () => ({
17960
18524
  id: user?.id || "",
17961
18525
  name: user?.name || "",
@@ -17970,13 +18534,13 @@ function useCreateCollaborativeIxoEditor(options) {
17970
18534
  matrixClient,
17971
18535
  roomId: options.roomId
17972
18536
  });
17973
- const metadataManager = useMemo61(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
17974
- useEffect50(() => {
18537
+ const metadataManager = useMemo64(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
18538
+ useEffect52(() => {
17975
18539
  return () => {
17976
18540
  metadataManager.dispose();
17977
18541
  };
17978
18542
  }, [metadataManager]);
17979
- const defaultUploadFile = useMemo61(
18543
+ const defaultUploadFile = useMemo64(
17980
18544
  () => uploadFile || (async (file) => {
17981
18545
  return new Promise((resolve, reject) => {
17982
18546
  const reader = new FileReader();
@@ -17990,7 +18554,7 @@ function useCreateCollaborativeIxoEditor(options) {
17990
18554
  }),
17991
18555
  [uploadFile]
17992
18556
  );
17993
- const schema = useMemo61(
18557
+ const schema = useMemo64(
17994
18558
  () => BlockNoteSchema2.create({
17995
18559
  blockSpecs: {
17996
18560
  ...defaultBlockSpecs2,
@@ -18005,13 +18569,13 @@ function useCreateCollaborativeIxoEditor(options) {
18005
18569
  }),
18006
18570
  []
18007
18571
  );
18008
- const root = useMemo61(() => yDoc.getMap("root"), [yDoc]);
18009
- const documentFragment = useMemo61(() => yDoc.getXmlFragment("document"), [yDoc]);
18010
- const flowArray = useMemo61(() => yDoc.getArray("flow"), [yDoc]);
18011
- const runtimeMap = useMemo61(() => yDoc.getMap("runtime"), [yDoc]);
18012
- const delegationsMap = useMemo61(() => yDoc.getMap("delegations"), [yDoc]);
18013
- const userFragment = useMemo61(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
18014
- const collaborationConfig = useMemo61(
18572
+ const root = useMemo64(() => yDoc.getMap("root"), [yDoc]);
18573
+ const documentFragment = useMemo64(() => yDoc.getXmlFragment("document"), [yDoc]);
18574
+ const flowArray = useMemo64(() => yDoc.getArray("flow"), [yDoc]);
18575
+ const runtimeMap = useMemo64(() => yDoc.getMap("runtime"), [yDoc]);
18576
+ const delegationsMap = useMemo64(() => yDoc.getMap("delegations"), [yDoc]);
18577
+ const userFragment = useMemo64(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
18578
+ const collaborationConfig = useMemo64(
18015
18579
  () => ({
18016
18580
  provider: matrixProvider,
18017
18581
  fragment: documentFragment,
@@ -18023,7 +18587,7 @@ function useCreateCollaborativeIxoEditor(options) {
18023
18587
  }),
18024
18588
  [matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
18025
18589
  );
18026
- const ixoConfig = useMemo61(
18590
+ const ixoConfig = useMemo64(
18027
18591
  () => ({
18028
18592
  theme,
18029
18593
  editable,
@@ -18042,7 +18606,7 @@ function useCreateCollaborativeIxoEditor(options) {
18042
18606
  uploadFile: defaultUploadFile,
18043
18607
  collaboration: collaborationConfig
18044
18608
  });
18045
- const titleText = useMemo61(() => yDoc.getText("title"), [yDoc]);
18609
+ const titleText = useMemo64(() => yDoc.getText("title"), [yDoc]);
18046
18610
  let ixoEditor;
18047
18611
  if (editor) {
18048
18612
  ixoEditor = editor;
@@ -18192,12 +18756,12 @@ function useCreateCollaborativeIxoEditor(options) {
18192
18756
  return void 0;
18193
18757
  };
18194
18758
  }
18195
- useEffect50(() => {
18759
+ useEffect52(() => {
18196
18760
  if (ixoEditor) {
18197
18761
  ixoEditor.isEditable = editable;
18198
18762
  }
18199
18763
  }, [ixoEditor, editable]);
18200
- useEffect50(() => {
18764
+ useEffect52(() => {
18201
18765
  if (connectionStatus !== "connected") {
18202
18766
  return;
18203
18767
  }
@@ -18230,8 +18794,8 @@ function useCreateCollaborativeIxoEditor(options) {
18230
18794
  }
18231
18795
 
18232
18796
  // src/mantine/components/CoverImage.tsx
18233
- import React189, { useState as useState67, useRef as useRef12, useEffect as useEffect51 } from "react";
18234
- import { Box as Box34, Group as Group60 } from "@mantine/core";
18797
+ import React196, { useState as useState68, useRef as useRef13, useEffect as useEffect53 } from "react";
18798
+ import { Box as Box35, Group as Group62 } from "@mantine/core";
18235
18799
 
18236
18800
  // src/core/lib/imageTransform.ts
18237
18801
  var CLOUDFLARE_CDN_BASE = "https://www.ixo.earth/cdn-cgi/image";
@@ -18364,11 +18928,11 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
18364
18928
  }
18365
18929
 
18366
18930
  // src/mantine/components/Base/CoverImageButton.tsx
18367
- import React188 from "react";
18368
- import { Button as Button34 } from "@mantine/core";
18931
+ import React195 from "react";
18932
+ import { Button as Button36 } from "@mantine/core";
18369
18933
  function CoverImageButton({ isActive = false, children, onClick, style }) {
18370
- return /* @__PURE__ */ React188.createElement(
18371
- Button34,
18934
+ return /* @__PURE__ */ React195.createElement(
18935
+ Button36,
18372
18936
  {
18373
18937
  onClick,
18374
18938
  variant: "filled",
@@ -18390,13 +18954,13 @@ function CoverImageButton({ isActive = false, children, onClick, style }) {
18390
18954
  // src/mantine/components/CoverImage.tsx
18391
18955
  function CoverImage({ coverImageUrl, logoUrl }) {
18392
18956
  const { editor, handlers, editable } = useBlocknoteContext();
18393
- const [isHovering, setIsHovering] = useState67(false);
18394
- const [isRepositioning, setIsRepositioning] = useState67(false);
18395
- const [coverPosition, setCoverPosition] = useState67(50);
18396
- const coverFileInputRef = useRef12(null);
18397
- const logoFileInputRef = useRef12(null);
18398
- const [metadata, setMetadata] = useState67(() => editor?.getPageMetadata?.() || null);
18399
- useEffect51(() => {
18957
+ const [isHovering, setIsHovering] = useState68(false);
18958
+ const [isRepositioning, setIsRepositioning] = useState68(false);
18959
+ const [coverPosition, setCoverPosition] = useState68(50);
18960
+ const coverFileInputRef = useRef13(null);
18961
+ const logoFileInputRef = useRef13(null);
18962
+ const [metadata, setMetadata] = useState68(() => editor?.getPageMetadata?.() || null);
18963
+ useEffect53(() => {
18400
18964
  if (!editor?._metadataManager) {
18401
18965
  return;
18402
18966
  }
@@ -18487,8 +19051,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18487
19051
  return null;
18488
19052
  }
18489
19053
  if (!hasCover) {
18490
- return /* @__PURE__ */ React189.createElement(
18491
- Box34,
19054
+ return /* @__PURE__ */ React196.createElement(
19055
+ Box35,
18492
19056
  {
18493
19057
  style: {
18494
19058
  position: "relative",
@@ -18500,8 +19064,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18500
19064
  onMouseEnter: () => editable && setIsHovering(true),
18501
19065
  onMouseLeave: () => editable && setIsHovering(false)
18502
19066
  },
18503
- /* @__PURE__ */ React189.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", height: "100%" } }, /* @__PURE__ */ React189.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React189.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), editable && isHovering && !logoSrc && /* @__PURE__ */ React189.createElement(
18504
- Group60,
19067
+ /* @__PURE__ */ React196.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", height: "100%" } }, /* @__PURE__ */ React196.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React196.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), editable && isHovering && !logoSrc && /* @__PURE__ */ React196.createElement(
19068
+ Group62,
18505
19069
  {
18506
19070
  gap: "xs",
18507
19071
  style: {
@@ -18511,10 +19075,10 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18511
19075
  zIndex: 10
18512
19076
  }
18513
19077
  },
18514
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleAddLogo }, "Add icon"),
18515
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
18516
- ), logoSrc && /* @__PURE__ */ React189.createElement(
18517
- Box34,
19078
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleAddLogo }, "Add icon"),
19079
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
19080
+ ), logoSrc && /* @__PURE__ */ React196.createElement(
19081
+ Box35,
18518
19082
  {
18519
19083
  style: {
18520
19084
  position: "relative",
@@ -18527,7 +19091,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18527
19091
  zIndex: 11
18528
19092
  }
18529
19093
  },
18530
- /* @__PURE__ */ React189.createElement(
19094
+ /* @__PURE__ */ React196.createElement(
18531
19095
  "img",
18532
19096
  {
18533
19097
  src: logoSrc,
@@ -18541,7 +19105,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18541
19105
  }
18542
19106
  }
18543
19107
  ),
18544
- editable && isHovering && /* @__PURE__ */ React189.createElement(
19108
+ editable && isHovering && /* @__PURE__ */ React196.createElement(
18545
19109
  "div",
18546
19110
  {
18547
19111
  style: {
@@ -18556,15 +19120,15 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18556
19120
  alignItems: "center"
18557
19121
  }
18558
19122
  },
18559
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
18560
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove"),
18561
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
19123
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
19124
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove"),
19125
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleAddCover }, "Add cover")
18562
19126
  )
18563
19127
  ))
18564
19128
  );
18565
19129
  }
18566
- return /* @__PURE__ */ React189.createElement(
18567
- Box34,
19130
+ return /* @__PURE__ */ React196.createElement(
19131
+ Box35,
18568
19132
  {
18569
19133
  style: {
18570
19134
  position: "relative",
@@ -18584,7 +19148,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18584
19148
  onMouseMove: handleMouseMove,
18585
19149
  onClick: () => isRepositioning && setIsRepositioning(false)
18586
19150
  },
18587
- /* @__PURE__ */ React189.createElement(
19151
+ /* @__PURE__ */ React196.createElement(
18588
19152
  "img",
18589
19153
  {
18590
19154
  src: coverUrl,
@@ -18602,8 +19166,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18602
19166
  }
18603
19167
  }
18604
19168
  ),
18605
- editable && isHovering && /* @__PURE__ */ React189.createElement(
18606
- Group60,
19169
+ editable && isHovering && /* @__PURE__ */ React196.createElement(
19170
+ Group62,
18607
19171
  {
18608
19172
  gap: "xs",
18609
19173
  style: {
@@ -18613,12 +19177,12 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18613
19177
  zIndex: 10
18614
19178
  }
18615
19179
  },
18616
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleChangeCover }, "Change cover"),
18617
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleReposition, isActive: isRepositioning }, isRepositioning ? "Done" : "Reposition"),
18618
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleRemoveCover }, "Remove")
19180
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleChangeCover }, "Change cover"),
19181
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleReposition, isActive: isRepositioning }, isRepositioning ? "Done" : "Reposition"),
19182
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleRemoveCover }, "Remove")
18619
19183
  ),
18620
- /* @__PURE__ */ React189.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "absolute", bottom: 0, left: -40, right: 0, height: "70px" } }, /* @__PURE__ */ React189.createElement(
18621
- Box34,
19184
+ /* @__PURE__ */ React196.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "absolute", bottom: 0, left: -40, right: 0, height: "70px" } }, /* @__PURE__ */ React196.createElement(
19185
+ Box35,
18622
19186
  {
18623
19187
  style: {
18624
19188
  position: "absolute",
@@ -18629,7 +19193,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18629
19193
  zIndex: 11
18630
19194
  }
18631
19195
  },
18632
- logoSrc && /* @__PURE__ */ React189.createElement(
19196
+ logoSrc && /* @__PURE__ */ React196.createElement(
18633
19197
  "img",
18634
19198
  {
18635
19199
  src: logoSrc,
@@ -18643,10 +19207,10 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18643
19207
  }
18644
19208
  }
18645
19209
  ),
18646
- editable && isHovering && /* @__PURE__ */ React189.createElement(React189.Fragment, null, logoSrc ? (
19210
+ editable && isHovering && /* @__PURE__ */ React196.createElement(React196.Fragment, null, logoSrc ? (
18647
19211
  // Logo exists: Show Change/Remove buttons when hovering on cover
18648
- /* @__PURE__ */ React189.createElement(
18649
- Group60,
19212
+ /* @__PURE__ */ React196.createElement(
19213
+ Group62,
18650
19214
  {
18651
19215
  gap: "xs",
18652
19216
  style: {
@@ -18656,12 +19220,12 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18656
19220
  zIndex: 12
18657
19221
  }
18658
19222
  },
18659
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
18660
- /* @__PURE__ */ React189.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove")
19223
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
19224
+ /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove")
18661
19225
  )
18662
19226
  ) : (
18663
19227
  // No logo: Show "Add icon" button when hovering anywhere on cover
18664
- /* @__PURE__ */ React189.createElement(
19228
+ /* @__PURE__ */ React196.createElement(
18665
19229
  CoverImageButton,
18666
19230
  {
18667
19231
  onClick: handleAddLogo,
@@ -18677,13 +19241,13 @@ function CoverImage({ coverImageUrl, logoUrl }) {
18677
19241
  )
18678
19242
  ))
18679
19243
  )),
18680
- /* @__PURE__ */ React189.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }),
18681
- /* @__PURE__ */ React189.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") })
19244
+ /* @__PURE__ */ React196.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }),
19245
+ /* @__PURE__ */ React196.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") })
18682
19246
  );
18683
19247
  }
18684
19248
 
18685
19249
  // src/mantine/components/PageHeader.tsx
18686
- import React190, { useState as useState68, useRef as useRef13, useEffect as useEffect52 } from "react";
19250
+ import React197, { useState as useState69, useRef as useRef14, useEffect as useEffect54 } from "react";
18687
19251
  function PageHeader({
18688
19252
  title = "New page",
18689
19253
  icon,
@@ -18694,9 +19258,9 @@ function PageHeader({
18694
19258
  isFavorited = false,
18695
19259
  menuItems = []
18696
19260
  }) {
18697
- const [isMenuOpen, setIsMenuOpen] = useState68(false);
18698
- const menuRef = useRef13(null);
18699
- useEffect52(() => {
19261
+ const [isMenuOpen, setIsMenuOpen] = useState69(false);
19262
+ const menuRef = useRef14(null);
19263
+ useEffect54(() => {
18700
19264
  function handleClickOutside(event) {
18701
19265
  if (menuRef.current && !menuRef.current.contains(event.target)) {
18702
19266
  setIsMenuOpen(false);
@@ -18715,14 +19279,14 @@ function PageHeader({
18715
19279
  setIsMenuOpen(false);
18716
19280
  }
18717
19281
  };
18718
- return /* @__PURE__ */ React190.createElement("div", { style: styles.container }, /* @__PURE__ */ React190.createElement("div", { style: styles.leftSection }, /* @__PURE__ */ React190.createElement("span", { style: styles.icon }, icon || "\u{1F4C4}"), /* @__PURE__ */ React190.createElement("span", { style: styles.title }, title), isPrivate && /* @__PURE__ */ React190.createElement("button", { style: styles.privacyBadge }, /* @__PURE__ */ React190.createElement("span", { style: styles.lockIcon }, "\u{1F512}"), /* @__PURE__ */ React190.createElement("span", null, "Private"), /* @__PURE__ */ React190.createElement("span", { style: styles.chevron }, "\u25BE"))), /* @__PURE__ */ React190.createElement("div", { style: styles.rightSection }, lastEdited && /* @__PURE__ */ React190.createElement("span", { style: styles.editedText }, lastEdited), onShare && /* @__PURE__ */ React190.createElement("button", { style: styles.shareButton, onClick: onShare }, "Share"), onFavorite && /* @__PURE__ */ React190.createElement("button", { style: styles.iconButton, onClick: onFavorite }, isFavorited ? "\u2605" : "\u2606"), menuItems.length > 0 && /* @__PURE__ */ React190.createElement("div", { style: styles.menuContainer, ref: menuRef }, /* @__PURE__ */ React190.createElement(
19282
+ return /* @__PURE__ */ React197.createElement("div", { style: styles.container }, /* @__PURE__ */ React197.createElement("div", { style: styles.leftSection }, /* @__PURE__ */ React197.createElement("span", { style: styles.icon }, icon || "\u{1F4C4}"), /* @__PURE__ */ React197.createElement("span", { style: styles.title }, title), isPrivate && /* @__PURE__ */ React197.createElement("button", { style: styles.privacyBadge }, /* @__PURE__ */ React197.createElement("span", { style: styles.lockIcon }, "\u{1F512}"), /* @__PURE__ */ React197.createElement("span", null, "Private"), /* @__PURE__ */ React197.createElement("span", { style: styles.chevron }, "\u25BE"))), /* @__PURE__ */ React197.createElement("div", { style: styles.rightSection }, lastEdited && /* @__PURE__ */ React197.createElement("span", { style: styles.editedText }, lastEdited), onShare && /* @__PURE__ */ React197.createElement("button", { style: styles.shareButton, onClick: onShare }, "Share"), onFavorite && /* @__PURE__ */ React197.createElement("button", { style: styles.iconButton, onClick: onFavorite }, isFavorited ? "\u2605" : "\u2606"), menuItems.length > 0 && /* @__PURE__ */ React197.createElement("div", { style: styles.menuContainer, ref: menuRef }, /* @__PURE__ */ React197.createElement(
18719
19283
  "button",
18720
19284
  {
18721
19285
  style: styles.menuButton,
18722
19286
  onClick: () => setIsMenuOpen(!isMenuOpen),
18723
19287
  "aria-label": "Menu"
18724
19288
  },
18725
- /* @__PURE__ */ React190.createElement(
19289
+ /* @__PURE__ */ React197.createElement(
18726
19290
  "svg",
18727
19291
  {
18728
19292
  width: "16",
@@ -18730,11 +19294,11 @@ function PageHeader({
18730
19294
  viewBox: "0 0 16 16",
18731
19295
  fill: "currentColor"
18732
19296
  },
18733
- /* @__PURE__ */ React190.createElement("circle", { cx: "3", cy: "8", r: "1.5" }),
18734
- /* @__PURE__ */ React190.createElement("circle", { cx: "8", cy: "8", r: "1.5" }),
18735
- /* @__PURE__ */ React190.createElement("circle", { cx: "13", cy: "8", r: "1.5" })
19297
+ /* @__PURE__ */ React197.createElement("circle", { cx: "3", cy: "8", r: "1.5" }),
19298
+ /* @__PURE__ */ React197.createElement("circle", { cx: "8", cy: "8", r: "1.5" }),
19299
+ /* @__PURE__ */ React197.createElement("circle", { cx: "13", cy: "8", r: "1.5" })
18736
19300
  )
18737
- ), isMenuOpen && /* @__PURE__ */ React190.createElement("div", { style: styles.dropdown }, menuItems.map((item, index) => /* @__PURE__ */ React190.createElement(React190.Fragment, { key: index }, item.divider && index > 0 && /* @__PURE__ */ React190.createElement("div", { style: styles.divider }), /* @__PURE__ */ React190.createElement(
19301
+ ), isMenuOpen && /* @__PURE__ */ React197.createElement("div", { style: styles.dropdown }, menuItems.map((item, index) => /* @__PURE__ */ React197.createElement(React197.Fragment, { key: index }, item.divider && index > 0 && /* @__PURE__ */ React197.createElement("div", { style: styles.divider }), /* @__PURE__ */ React197.createElement(
18738
19302
  "button",
18739
19303
  {
18740
19304
  style: {
@@ -18744,8 +19308,8 @@ function PageHeader({
18744
19308
  onClick: () => handleMenuItemClick(item),
18745
19309
  disabled: item.disabled
18746
19310
  },
18747
- item.icon && /* @__PURE__ */ React190.createElement("span", { style: styles.menuItemIcon }, item.icon),
18748
- /* @__PURE__ */ React190.createElement("span", null, item.label)
19311
+ item.icon && /* @__PURE__ */ React197.createElement("span", { style: styles.menuItemIcon }, item.icon),
19312
+ /* @__PURE__ */ React197.createElement("span", null, item.label)
18749
19313
  )))))));
18750
19314
  }
18751
19315
  var styles = {
@@ -18876,8 +19440,8 @@ var styles = {
18876
19440
  };
18877
19441
 
18878
19442
  // src/mantine/components/ExternalDropZone.tsx
18879
- import React191, { useCallback as useCallback50, useEffect as useEffect53, useRef as useRef14, useState as useState69 } from "react";
18880
- import { Box as Box35 } from "@mantine/core";
19443
+ import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef15, useState as useState70 } from "react";
19444
+ import { Box as Box36 } from "@mantine/core";
18881
19445
  var SCROLL_ZONE_SIZE = 80;
18882
19446
  var SCROLL_SPEED = 12;
18883
19447
  var ExternalDropZone = ({
@@ -18889,20 +19453,20 @@ var ExternalDropZone = ({
18889
19453
  onPlacementCancel,
18890
19454
  children
18891
19455
  }) => {
18892
- const containerRef = useRef14(null);
18893
- const [isValidDrag, setIsValidDrag] = useState69(false);
18894
- const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState69(false);
18895
- const [indicatorStyle, setIndicatorStyle] = useState69({});
18896
- const dropPositionRef = useRef14(null);
18897
- const scrollAnimationRef = useRef14(null);
18898
- const scrollDirectionRef = useRef14(null);
18899
- const scrollContainerRef = useRef14(null);
18900
- const getBlockElements = useCallback50(() => {
19456
+ const containerRef = useRef15(null);
19457
+ const [isValidDrag, setIsValidDrag] = useState70(false);
19458
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState70(false);
19459
+ const [indicatorStyle, setIndicatorStyle] = useState70({});
19460
+ const dropPositionRef = useRef15(null);
19461
+ const scrollAnimationRef = useRef15(null);
19462
+ const scrollDirectionRef = useRef15(null);
19463
+ const scrollContainerRef = useRef15(null);
19464
+ const getBlockElements = useCallback52(() => {
18901
19465
  if (!containerRef.current) return [];
18902
19466
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
18903
19467
  return Array.from(blocks);
18904
19468
  }, []);
18905
- const getScrollContainer = useCallback50(() => {
19469
+ const getScrollContainer = useCallback52(() => {
18906
19470
  if (scrollContainerRef.current) return scrollContainerRef.current;
18907
19471
  let element = containerRef.current;
18908
19472
  while (element) {
@@ -18917,7 +19481,7 @@ var ExternalDropZone = ({
18917
19481
  scrollContainerRef.current = window;
18918
19482
  return window;
18919
19483
  }, []);
18920
- const performScroll = useCallback50(() => {
19484
+ const performScroll = useCallback52(() => {
18921
19485
  const container = getScrollContainer();
18922
19486
  const direction = scrollDirectionRef.current;
18923
19487
  if (!direction) {
@@ -18932,7 +19496,7 @@ var ExternalDropZone = ({
18932
19496
  }
18933
19497
  scrollAnimationRef.current = requestAnimationFrame(performScroll);
18934
19498
  }, [getScrollContainer]);
18935
- const startAutoScroll = useCallback50(
19499
+ const startAutoScroll = useCallback52(
18936
19500
  (direction) => {
18937
19501
  if (scrollDirectionRef.current === direction) return;
18938
19502
  scrollDirectionRef.current = direction;
@@ -18942,14 +19506,14 @@ var ExternalDropZone = ({
18942
19506
  },
18943
19507
  [performScroll]
18944
19508
  );
18945
- const stopAutoScroll = useCallback50(() => {
19509
+ const stopAutoScroll = useCallback52(() => {
18946
19510
  scrollDirectionRef.current = null;
18947
19511
  if (scrollAnimationRef.current) {
18948
19512
  cancelAnimationFrame(scrollAnimationRef.current);
18949
19513
  scrollAnimationRef.current = null;
18950
19514
  }
18951
19515
  }, []);
18952
- const checkAutoScroll = useCallback50(
19516
+ const checkAutoScroll = useCallback52(
18953
19517
  (clientY) => {
18954
19518
  const container = getScrollContainer();
18955
19519
  let containerTop;
@@ -18972,7 +19536,7 @@ var ExternalDropZone = ({
18972
19536
  },
18973
19537
  [getScrollContainer, startAutoScroll, stopAutoScroll]
18974
19538
  );
18975
- const findDropPosition = useCallback50(
19539
+ const findDropPosition = useCallback52(
18976
19540
  (clientY) => {
18977
19541
  const blocks = getBlockElements();
18978
19542
  if (blocks.length === 0 || !editor?.document) return null;
@@ -19005,7 +19569,7 @@ var ExternalDropZone = ({
19005
19569
  },
19006
19570
  [getBlockElements, editor]
19007
19571
  );
19008
- const handleDragOver = useCallback50(
19572
+ const handleDragOver = useCallback52(
19009
19573
  (e) => {
19010
19574
  if (!e.dataTransfer.types.includes(acceptedType)) return;
19011
19575
  e.preventDefault();
@@ -19028,7 +19592,7 @@ var ExternalDropZone = ({
19028
19592
  },
19029
19593
  [acceptedType, findDropPosition, checkAutoScroll]
19030
19594
  );
19031
- const handleDragLeave = useCallback50(
19595
+ const handleDragLeave = useCallback52(
19032
19596
  (e) => {
19033
19597
  if (containerRef.current && !containerRef.current.contains(e.relatedTarget)) {
19034
19598
  setIsValidDrag(false);
@@ -19038,7 +19602,7 @@ var ExternalDropZone = ({
19038
19602
  },
19039
19603
  [stopAutoScroll]
19040
19604
  );
19041
- const handleDrop = useCallback50(
19605
+ const handleDrop = useCallback52(
19042
19606
  (e) => {
19043
19607
  e.preventDefault();
19044
19608
  e.stopPropagation();
@@ -19052,7 +19616,7 @@ var ExternalDropZone = ({
19052
19616
  },
19053
19617
  [onDrop, stopAutoScroll]
19054
19618
  );
19055
- useEffect53(() => {
19619
+ useEffect55(() => {
19056
19620
  const handleGlobalDragEnd = () => {
19057
19621
  setIsValidDrag(false);
19058
19622
  dropPositionRef.current = null;
@@ -19061,7 +19625,7 @@ var ExternalDropZone = ({
19061
19625
  window.addEventListener("dragend", handleGlobalDragEnd);
19062
19626
  return () => window.removeEventListener("dragend", handleGlobalDragEnd);
19063
19627
  }, [stopAutoScroll]);
19064
- const handleOverlayMouseMove = useCallback50(
19628
+ const handleOverlayMouseMove = useCallback52(
19065
19629
  (e) => {
19066
19630
  setIsHoveringInPlacementMode(true);
19067
19631
  checkAutoScroll(e.clientY);
@@ -19080,12 +19644,12 @@ var ExternalDropZone = ({
19080
19644
  },
19081
19645
  [findDropPosition, checkAutoScroll]
19082
19646
  );
19083
- const handleOverlayMouseLeave = useCallback50(() => {
19647
+ const handleOverlayMouseLeave = useCallback52(() => {
19084
19648
  setIsHoveringInPlacementMode(false);
19085
19649
  dropPositionRef.current = null;
19086
19650
  stopAutoScroll();
19087
19651
  }, [stopAutoScroll]);
19088
- const handleOverlayClick = useCallback50(
19652
+ const handleOverlayClick = useCallback52(
19089
19653
  (e) => {
19090
19654
  e.preventDefault();
19091
19655
  e.stopPropagation();
@@ -19099,7 +19663,7 @@ var ExternalDropZone = ({
19099
19663
  },
19100
19664
  [onDrop, stopAutoScroll]
19101
19665
  );
19102
- const handleOverlayWheel = useCallback50(
19666
+ const handleOverlayWheel = useCallback52(
19103
19667
  (e) => {
19104
19668
  const container = getScrollContainer();
19105
19669
  if (container === window) {
@@ -19110,7 +19674,7 @@ var ExternalDropZone = ({
19110
19674
  },
19111
19675
  [getScrollContainer]
19112
19676
  );
19113
- useEffect53(() => {
19677
+ useEffect55(() => {
19114
19678
  if (!isPlacementMode) return;
19115
19679
  const handleKeyDown = (e) => {
19116
19680
  if (e.key === "Escape") {
@@ -19133,13 +19697,13 @@ var ExternalDropZone = ({
19133
19697
  document.removeEventListener("click", handleGlobalClick, true);
19134
19698
  };
19135
19699
  }, [isPlacementMode, onPlacementCancel]);
19136
- useEffect53(() => {
19700
+ useEffect55(() => {
19137
19701
  if (!isPlacementMode) {
19138
19702
  setIsHoveringInPlacementMode(false);
19139
19703
  dropPositionRef.current = null;
19140
19704
  }
19141
19705
  }, [isPlacementMode]);
19142
- useEffect53(() => {
19706
+ useEffect55(() => {
19143
19707
  const isActive = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
19144
19708
  if (isActive) {
19145
19709
  document.body.classList.add("external-artifact-drag-active");
@@ -19150,19 +19714,19 @@ var ExternalDropZone = ({
19150
19714
  document.body.classList.remove("external-artifact-drag-active");
19151
19715
  };
19152
19716
  }, [isValidDrag, isPlacementMode, isHoveringInPlacementMode]);
19153
- useEffect53(() => {
19717
+ useEffect55(() => {
19154
19718
  return () => {
19155
19719
  if (scrollAnimationRef.current) {
19156
19720
  cancelAnimationFrame(scrollAnimationRef.current);
19157
19721
  }
19158
19722
  };
19159
19723
  }, []);
19160
- const indicatorWithPosition = dropIndicator && React191.isValidElement(dropIndicator) ? React191.cloneElement(dropIndicator, {
19724
+ const indicatorWithPosition = dropIndicator && React198.isValidElement(dropIndicator) ? React198.cloneElement(dropIndicator, {
19161
19725
  indicatorTop: typeof indicatorStyle.top === "number" ? indicatorStyle.top : void 0
19162
19726
  }) : dropIndicator;
19163
19727
  const shouldShowIndicator = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
19164
- return /* @__PURE__ */ React191.createElement(
19165
- Box35,
19728
+ return /* @__PURE__ */ React198.createElement(
19729
+ Box36,
19166
19730
  {
19167
19731
  ref: containerRef,
19168
19732
  style: {
@@ -19177,8 +19741,8 @@ var ExternalDropZone = ({
19177
19741
  "data-placement-mode": isPlacementMode ? "true" : void 0
19178
19742
  },
19179
19743
  children,
19180
- isPlacementMode && /* @__PURE__ */ React191.createElement(
19181
- Box35,
19744
+ isPlacementMode && /* @__PURE__ */ React198.createElement(
19745
+ Box36,
19182
19746
  {
19183
19747
  style: {
19184
19748
  position: "absolute",
@@ -19197,20 +19761,20 @@ var ExternalDropZone = ({
19197
19761
  onWheel: handleOverlayWheel
19198
19762
  }
19199
19763
  ),
19200
- shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */ React191.createElement(Box35, { style: { ...indicatorStyle, background: "none", border: "none", boxShadow: "none" } }, indicatorWithPosition)
19764
+ shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */ React198.createElement(Box36, { style: { ...indicatorStyle, background: "none", border: "none", boxShadow: "none" } }, indicatorWithPosition)
19201
19765
  );
19202
19766
  };
19203
19767
 
19204
19768
  // src/mantine/IxoEditor.tsx
19205
- import React193 from "react";
19769
+ import React200 from "react";
19206
19770
  import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
19207
19771
  import { BlockNoteView } from "@blocknote/mantine";
19208
19772
  import { filterSuggestionItems } from "@blocknote/core";
19209
19773
  import { MantineProvider } from "@mantine/core";
19210
19774
 
19211
19775
  // src/mantine/components/PanelContent.tsx
19212
- import React192 from "react";
19213
- import { Box as Box36 } from "@mantine/core";
19776
+ import React199 from "react";
19777
+ import { Box as Box37 } from "@mantine/core";
19214
19778
  var panelStyles = {
19215
19779
  light: {
19216
19780
  backgroundColor: "#ffffff",
@@ -19239,8 +19803,8 @@ function PanelContent({ theme }) {
19239
19803
  const { activePanel, registeredPanels } = usePanelStore();
19240
19804
  const isOpen = activePanel !== null;
19241
19805
  const content = activePanel ? registeredPanels.get(activePanel) : null;
19242
- return /* @__PURE__ */ React192.createElement(
19243
- Box36,
19806
+ return /* @__PURE__ */ React199.createElement(
19807
+ Box37,
19244
19808
  {
19245
19809
  pos: "sticky",
19246
19810
  right: 0,
@@ -19280,7 +19844,7 @@ function IxoEditorContent({
19280
19844
  }) {
19281
19845
  const { activePanel } = usePanelStore();
19282
19846
  const isPanelOpen = activePanel !== null;
19283
- const editorContent = /* @__PURE__ */ React193.createElement(
19847
+ const editorContent = /* @__PURE__ */ React200.createElement(
19284
19848
  BlockNoteView,
19285
19849
  {
19286
19850
  editor,
@@ -19295,7 +19859,7 @@ function IxoEditorContent({
19295
19859
  onChange,
19296
19860
  onSelectionChange
19297
19861
  },
19298
- config.slashMenu && /* @__PURE__ */ React193.createElement(
19862
+ config.slashMenu && /* @__PURE__ */ React200.createElement(
19299
19863
  SuggestionMenuController,
19300
19864
  {
19301
19865
  triggerCharacter: "/",
@@ -19308,7 +19872,7 @@ function IxoEditorContent({
19308
19872
  ),
19309
19873
  children
19310
19874
  );
19311
- return /* @__PURE__ */ React193.createElement("div", { style: { display: "flex", height: "100%", width: "100%", gap: 0 } }, /* @__PURE__ */ React193.createElement(
19875
+ return /* @__PURE__ */ React200.createElement("div", { style: { display: "flex", height: "100%", width: "100%", gap: 0 } }, /* @__PURE__ */ React200.createElement(
19312
19876
  "div",
19313
19877
  {
19314
19878
  className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`,
@@ -19317,9 +19881,9 @@ function IxoEditorContent({
19317
19881
  transition: "width 0.2s ease"
19318
19882
  }
19319
19883
  },
19320
- selfNav && /* @__PURE__ */ React193.createElement(PageHeader, { ...pageHeaderProps }),
19321
- /* @__PURE__ */ React193.createElement(CoverImage, { coverImageUrl, logoUrl }),
19322
- (onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */ React193.createElement(
19884
+ selfNav && /* @__PURE__ */ React200.createElement(PageHeader, { ...pageHeaderProps }),
19885
+ /* @__PURE__ */ React200.createElement(CoverImage, { coverImageUrl, logoUrl }),
19886
+ (onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */ React200.createElement(
19323
19887
  ExternalDropZone,
19324
19888
  {
19325
19889
  editor,
@@ -19332,7 +19896,7 @@ function IxoEditorContent({
19332
19896
  },
19333
19897
  editorContent
19334
19898
  ) : editorContent
19335
- ), isPanelVisible && /* @__PURE__ */ React193.createElement(PanelContent, { theme: config.theme }));
19899
+ ), isPanelVisible && /* @__PURE__ */ React200.createElement(PanelContent, { theme: config.theme }));
19336
19900
  }
19337
19901
  function IxoEditor({
19338
19902
  editor,
@@ -19352,6 +19916,7 @@ function IxoEditor({
19352
19916
  visualizationRenderer,
19353
19917
  getDynamicListData,
19354
19918
  dynamicListPanelRenderer,
19919
+ domainCardRenderer,
19355
19920
  onExternalDrop,
19356
19921
  externalDropType,
19357
19922
  dropIndicator,
@@ -19371,7 +19936,7 @@ function IxoEditor({
19371
19936
  tableHandles: true
19372
19937
  };
19373
19938
  const isEditable = editable;
19374
- const editorContent = /* @__PURE__ */ React193.createElement(
19939
+ const editorContent = /* @__PURE__ */ React200.createElement(
19375
19940
  BlocknoteProvider,
19376
19941
  {
19377
19942
  editor,
@@ -19380,9 +19945,10 @@ function IxoEditor({
19380
19945
  editable: isEditable,
19381
19946
  visualizationRenderer,
19382
19947
  getDynamicListData,
19383
- dynamicListPanelRenderer
19948
+ dynamicListPanelRenderer,
19949
+ domainCardRenderer
19384
19950
  },
19385
- /* @__PURE__ */ React193.createElement(
19951
+ /* @__PURE__ */ React200.createElement(
19386
19952
  IxoEditorContent,
19387
19953
  {
19388
19954
  isPanelVisible,
@@ -19406,15 +19972,15 @@ function IxoEditor({
19406
19972
  )
19407
19973
  );
19408
19974
  if (mantineTheme) {
19409
- return /* @__PURE__ */ React193.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
19975
+ return /* @__PURE__ */ React200.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
19410
19976
  }
19411
19977
  return editorContent;
19412
19978
  }
19413
19979
 
19414
19980
  // src/mantine/components/EntitySigningSetup.tsx
19415
- import React194, { useState as useState70 } from "react";
19416
- import { Modal as Modal3, Stack as Stack123, Text as Text97, TextInput as TextInput6, Button as Button35, Alert as Alert25, Group as Group61 } from "@mantine/core";
19417
- import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconKey as IconKey2 } from "@tabler/icons-react";
19981
+ import React201, { useState as useState71 } from "react";
19982
+ import { Modal as Modal3, Stack as Stack126, Text as Text100, TextInput as TextInput6, Button as Button37, Alert as Alert26, Group as Group63 } from "@mantine/core";
19983
+ import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
19418
19984
  var EntitySigningSetup = ({
19419
19985
  opened,
19420
19986
  onClose,
@@ -19422,11 +19988,11 @@ var EntitySigningSetup = ({
19422
19988
  entityName,
19423
19989
  onSetup
19424
19990
  }) => {
19425
- const [pin, setPin] = useState70("");
19426
- const [confirmPin, setConfirmPin] = useState70("");
19427
- const [loading, setLoading] = useState70(false);
19428
- const [error, setError] = useState70(null);
19429
- const [success, setSuccess] = useState70(false);
19991
+ const [pin, setPin] = useState71("");
19992
+ const [confirmPin, setConfirmPin] = useState71("");
19993
+ const [loading, setLoading] = useState71(false);
19994
+ const [error, setError] = useState71(null);
19995
+ const [success, setSuccess] = useState71(false);
19430
19996
  const handleSetup = async () => {
19431
19997
  if (pin.length < 4) {
19432
19998
  setError("PIN must be at least 4 characters");
@@ -19466,15 +20032,15 @@ var EntitySigningSetup = ({
19466
20032
  setSuccess(false);
19467
20033
  }
19468
20034
  };
19469
- return /* @__PURE__ */ React194.createElement(
20035
+ return /* @__PURE__ */ React201.createElement(
19470
20036
  Modal3,
19471
20037
  {
19472
20038
  opened,
19473
20039
  onClose: handleClose,
19474
- title: /* @__PURE__ */ React194.createElement(Group61, { gap: "xs" }, /* @__PURE__ */ React194.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React194.createElement(Text97, { fw: 600 }, "Entity Signing Setup")),
20040
+ title: /* @__PURE__ */ React201.createElement(Group63, { gap: "xs" }, /* @__PURE__ */ React201.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React201.createElement(Text100, { fw: 600 }, "Entity Signing Setup")),
19475
20041
  size: "md"
19476
20042
  },
19477
- /* @__PURE__ */ React194.createElement(Stack123, { gap: "md" }, success ? /* @__PURE__ */ React194.createElement(Alert25, { color: "green", icon: /* @__PURE__ */ React194.createElement(IconCheck6, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React194.createElement(React194.Fragment, null, /* @__PURE__ */ React194.createElement(Text97, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React194.createElement(Text97, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React194.createElement(Alert25, { color: "blue", variant: "light" }, /* @__PURE__ */ React194.createElement(Text97, { size: "sm" }, "This is a ", /* @__PURE__ */ React194.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React194.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React194.createElement(Text97, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React194.createElement(Text97, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React194.createElement(Text97, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React194.createElement(Text97, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React194.createElement(
20043
+ /* @__PURE__ */ React201.createElement(Stack126, { gap: "md" }, success ? /* @__PURE__ */ React201.createElement(Alert26, { color: "green", icon: /* @__PURE__ */ React201.createElement(IconCheck7, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React201.createElement(React201.Fragment, null, /* @__PURE__ */ React201.createElement(Text100, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React201.createElement(Text100, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React201.createElement(Alert26, { color: "blue", variant: "light" }, /* @__PURE__ */ React201.createElement(Text100, { size: "sm" }, "This is a ", /* @__PURE__ */ React201.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React201.createElement(Stack126, { gap: "xs" }, /* @__PURE__ */ React201.createElement(Text100, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React201.createElement(Text100, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React201.createElement(Text100, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React201.createElement(Text100, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React201.createElement(
19478
20044
  TextInput6,
19479
20045
  {
19480
20046
  label: "Enter PIN to encrypt signing key",
@@ -19485,7 +20051,7 @@ var EntitySigningSetup = ({
19485
20051
  onChange: (e) => setPin(e.currentTarget.value),
19486
20052
  disabled: loading
19487
20053
  }
19488
- ), /* @__PURE__ */ React194.createElement(
20054
+ ), /* @__PURE__ */ React201.createElement(
19489
20055
  TextInput6,
19490
20056
  {
19491
20057
  label: "Confirm PIN",
@@ -19495,12 +20061,12 @@ var EntitySigningSetup = ({
19495
20061
  onChange: (e) => setConfirmPin(e.currentTarget.value),
19496
20062
  disabled: loading
19497
20063
  }
19498
- ), error && /* @__PURE__ */ React194.createElement(Alert25, { color: "red", icon: /* @__PURE__ */ React194.createElement(IconAlertCircle12, { size: 16 }) }, error), /* @__PURE__ */ React194.createElement(Group61, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React194.createElement(Button35, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React194.createElement(
19499
- Button35,
20064
+ ), error && /* @__PURE__ */ React201.createElement(Alert26, { color: "red", icon: /* @__PURE__ */ React201.createElement(IconAlertCircle13, { size: 16 }) }, error), /* @__PURE__ */ React201.createElement(Group63, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React201.createElement(Button37, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React201.createElement(
20065
+ Button37,
19500
20066
  {
19501
20067
  onClick: handleSetup,
19502
20068
  loading,
19503
- leftSection: /* @__PURE__ */ React194.createElement(IconKey2, { size: 16 })
20069
+ leftSection: /* @__PURE__ */ React201.createElement(IconKey2, { size: 16 })
19504
20070
  },
19505
20071
  "Setup Entity Signing"
19506
20072
  ))))
@@ -19508,9 +20074,9 @@ var EntitySigningSetup = ({
19508
20074
  };
19509
20075
 
19510
20076
  // src/mantine/components/FlowPermissionsPanel.tsx
19511
- import React195, { useState as useState71, useEffect as useEffect54, useMemo as useMemo62 } from "react";
19512
- import { Stack as Stack124, Text as Text98, Paper as Paper19, Group as Group62, Badge as Badge29, Button as Button36, ActionIcon as ActionIcon28, Loader as Loader25, Alert as Alert26, Divider as Divider12 } from "@mantine/core";
19513
- import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
20077
+ import React202, { useState as useState72, useEffect as useEffect56, useMemo as useMemo65 } from "react";
20078
+ import { Stack as Stack127, Text as Text101, Paper as Paper21, Group as Group64, Badge as Badge31, Button as Button38, ActionIcon as ActionIcon29, Loader as Loader26, Alert as Alert27, Divider as Divider12 } from "@mantine/core";
20079
+ import { IconPlus as IconPlus5, IconTrash as IconTrash7, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
19514
20080
  var FlowPermissionsPanel = ({
19515
20081
  editor,
19516
20082
  entityDid,
@@ -19519,11 +20085,11 @@ var FlowPermissionsPanel = ({
19519
20085
  onRevokePermission,
19520
20086
  getUserDisplayName
19521
20087
  }) => {
19522
- const [delegations, setDelegations] = useState71([]);
19523
- const [loading, setLoading] = useState71(true);
19524
- const [revoking, setRevoking] = useState71(null);
19525
- const rootCapability = useMemo62(() => editor.getRootCapability?.(), [editor]);
19526
- useEffect54(() => {
20088
+ const [delegations, setDelegations] = useState72([]);
20089
+ const [loading, setLoading] = useState72(true);
20090
+ const [revoking, setRevoking] = useState72(null);
20091
+ const rootCapability = useMemo65(() => editor.getRootCapability?.(), [editor]);
20092
+ useEffect56(() => {
19527
20093
  const loadDelegations = async () => {
19528
20094
  setLoading(true);
19529
20095
  const allDelegations = editor.getAllDelegations?.() || [];
@@ -19562,11 +20128,11 @@ var FlowPermissionsPanel = ({
19562
20128
  const getIcon2 = (type) => {
19563
20129
  switch (type) {
19564
20130
  case "oracle":
19565
- return /* @__PURE__ */ React195.createElement(IconRobot3, { size: 16 });
20131
+ return /* @__PURE__ */ React202.createElement(IconRobot3, { size: 16 });
19566
20132
  case "entity":
19567
- return /* @__PURE__ */ React195.createElement(IconBuilding, { size: 16 });
20133
+ return /* @__PURE__ */ React202.createElement(IconBuilding, { size: 16 });
19568
20134
  default:
19569
- return /* @__PURE__ */ React195.createElement(IconUser4, { size: 16 });
20135
+ return /* @__PURE__ */ React202.createElement(IconUser4, { size: 16 });
19570
20136
  }
19571
20137
  };
19572
20138
  const formatCapabilities = (caps) => {
@@ -19585,8 +20151,8 @@ var FlowPermissionsPanel = ({
19585
20151
  if (date < /* @__PURE__ */ new Date()) return "Expired";
19586
20152
  return date.toLocaleDateString();
19587
20153
  };
19588
- return /* @__PURE__ */ React195.createElement(Stack124, { gap: "md" }, /* @__PURE__ */ React195.createElement(Stack124, { gap: "xs" }, /* @__PURE__ */ React195.createElement(Text98, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React195.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React195.createElement(Group62, { gap: "xs" }, /* @__PURE__ */ React195.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React195.createElement(Stack124, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React195.createElement(Text98, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React195.createElement(Text98, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React195.createElement(Badge29, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React195.createElement(Divider12, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React195.createElement(Group62, { justify: "center", py: "xl" }, /* @__PURE__ */ React195.createElement(Loader25, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React195.createElement(Alert26, { color: "gray", variant: "light" }, /* @__PURE__ */ React195.createElement(Text98, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React195.createElement(Stack124, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React195.createElement(Paper19, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React195.createElement(Group62, { justify: "space-between" }, /* @__PURE__ */ React195.createElement(Group62, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React195.createElement(Stack124, { gap: 2 }, /* @__PURE__ */ React195.createElement(Text98, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React195.createElement(Text98, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React195.createElement(Group62, { gap: "xs" }, /* @__PURE__ */ React195.createElement(Text98, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React195.createElement(Text98, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React195.createElement(Text98, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React195.createElement(
19589
- ActionIcon28,
20154
+ return /* @__PURE__ */ React202.createElement(Stack127, { gap: "md" }, /* @__PURE__ */ React202.createElement(Stack127, { gap: "xs" }, /* @__PURE__ */ React202.createElement(Text101, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React202.createElement(Paper21, { p: "sm", withBorder: true }, /* @__PURE__ */ React202.createElement(Group64, { gap: "xs" }, /* @__PURE__ */ React202.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React202.createElement(Stack127, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React202.createElement(Text101, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React202.createElement(Text101, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React202.createElement(Badge31, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React202.createElement(Divider12, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React202.createElement(Group64, { justify: "center", py: "xl" }, /* @__PURE__ */ React202.createElement(Loader26, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React202.createElement(Alert27, { color: "gray", variant: "light" }, /* @__PURE__ */ React202.createElement(Text101, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React202.createElement(Stack127, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React202.createElement(Paper21, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React202.createElement(Group64, { justify: "space-between" }, /* @__PURE__ */ React202.createElement(Group64, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React202.createElement(Stack127, { gap: 2 }, /* @__PURE__ */ React202.createElement(Text101, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React202.createElement(Text101, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React202.createElement(Group64, { gap: "xs" }, /* @__PURE__ */ React202.createElement(Text101, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React202.createElement(Text101, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React202.createElement(Text101, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React202.createElement(
20155
+ ActionIcon29,
19590
20156
  {
19591
20157
  color: "red",
19592
20158
  variant: "subtle",
@@ -19594,11 +20160,11 @@ var FlowPermissionsPanel = ({
19594
20160
  loading: revoking === capability.id,
19595
20161
  disabled: !!revoking
19596
20162
  },
19597
- /* @__PURE__ */ React195.createElement(IconTrash6, { size: 16 })
19598
- ))))), /* @__PURE__ */ React195.createElement(
19599
- Button36,
20163
+ /* @__PURE__ */ React202.createElement(IconTrash7, { size: 16 })
20164
+ ))))), /* @__PURE__ */ React202.createElement(
20165
+ Button38,
19600
20166
  {
19601
- leftSection: /* @__PURE__ */ React195.createElement(IconPlus5, { size: 16 }),
20167
+ leftSection: /* @__PURE__ */ React202.createElement(IconPlus5, { size: 16 }),
19602
20168
  variant: "light",
19603
20169
  onClick: onGrantPermission
19604
20170
  },
@@ -19607,21 +20173,21 @@ var FlowPermissionsPanel = ({
19607
20173
  };
19608
20174
 
19609
20175
  // src/mantine/components/GrantPermissionModal.tsx
19610
- import React196, { useState as useState72, useCallback as useCallback51 } from "react";
20176
+ import React203, { useState as useState73, useCallback as useCallback53 } from "react";
19611
20177
  import {
19612
20178
  Modal as Modal4,
19613
- Stack as Stack125,
19614
- Text as Text99,
20179
+ Stack as Stack128,
20180
+ Text as Text102,
19615
20181
  TextInput as TextInput7,
19616
- Button as Button37,
19617
- Group as Group63,
20182
+ Button as Button39,
20183
+ Group as Group65,
19618
20184
  Radio as Radio6,
19619
20185
  Checkbox as Checkbox12,
19620
- Alert as Alert27,
19621
- Paper as Paper20,
19622
- Loader as Loader26,
19623
- Badge as Badge30,
19624
- ActionIcon as ActionIcon29,
20186
+ Alert as Alert28,
20187
+ Paper as Paper22,
20188
+ Loader as Loader27,
20189
+ Badge as Badge32,
20190
+ ActionIcon as ActionIcon30,
19625
20191
  Divider as Divider13,
19626
20192
  NumberInput as NumberInput3
19627
20193
  } from "@mantine/core";
@@ -19639,21 +20205,21 @@ var GrantPermissionModal = ({
19639
20205
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
19640
20206
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
19641
20207
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
19642
- const [recipientType, setRecipientType] = useState72("user");
19643
- const [searchQuery, setSearchQuery] = useState72("");
19644
- const [searchResults, setSearchResults] = useState72([]);
19645
- const [searching, setSearching] = useState72(false);
19646
- const [selectedRecipient, setSelectedRecipient] = useState72(null);
19647
- const [manualDid, setManualDid] = useState72("");
19648
- const [scopeType, setScopeType] = useState72("full");
19649
- const [selectedBlocks, setSelectedBlocks] = useState72([]);
19650
- const [expirationEnabled, setExpirationEnabled] = useState72(false);
19651
- const [expirationDays, setExpirationDays] = useState72(30);
19652
- const [canDelegate, setCanDelegate] = useState72(false);
19653
- const [pin, setPin] = useState72("");
19654
- const [loading, setLoading] = useState72(false);
19655
- const [error, setError] = useState72(null);
19656
- const handleSearch = useCallback51(async () => {
20208
+ const [recipientType, setRecipientType] = useState73("user");
20209
+ const [searchQuery, setSearchQuery] = useState73("");
20210
+ const [searchResults, setSearchResults] = useState73([]);
20211
+ const [searching, setSearching] = useState73(false);
20212
+ const [selectedRecipient, setSelectedRecipient] = useState73(null);
20213
+ const [manualDid, setManualDid] = useState73("");
20214
+ const [scopeType, setScopeType] = useState73("full");
20215
+ const [selectedBlocks, setSelectedBlocks] = useState73([]);
20216
+ const [expirationEnabled, setExpirationEnabled] = useState73(false);
20217
+ const [expirationDays, setExpirationDays] = useState73(30);
20218
+ const [canDelegate, setCanDelegate] = useState73(false);
20219
+ const [pin, setPin] = useState73("");
20220
+ const [loading, setLoading] = useState73(false);
20221
+ const [error, setError] = useState73(null);
20222
+ const handleSearch = useCallback53(async () => {
19657
20223
  if (searchQuery.length < 2) return;
19658
20224
  setSearching(true);
19659
20225
  try {
@@ -19740,30 +20306,30 @@ var GrantPermissionModal = ({
19740
20306
  resetForm();
19741
20307
  }
19742
20308
  };
19743
- return /* @__PURE__ */ React196.createElement(
20309
+ return /* @__PURE__ */ React203.createElement(
19744
20310
  Modal4,
19745
20311
  {
19746
20312
  opened,
19747
20313
  onClose: handleClose,
19748
- title: /* @__PURE__ */ React196.createElement(Group63, { gap: "xs" }, /* @__PURE__ */ React196.createElement(IconShieldPlus3, { size: 20 }), /* @__PURE__ */ React196.createElement(Text99, { fw: 600 }, "Grant Permission")),
20314
+ title: /* @__PURE__ */ React203.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React203.createElement(IconShieldPlus3, { size: 20 }), /* @__PURE__ */ React203.createElement(Text102, { fw: 600 }, "Grant Permission")),
19749
20315
  size: "lg"
19750
20316
  },
19751
- /* @__PURE__ */ React196.createElement(Stack125, { gap: "md" }, /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Text99, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React196.createElement(Radio6.Group, { value: recipientType, onChange: (v) => {
20317
+ /* @__PURE__ */ React203.createElement(Stack128, { gap: "md" }, /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Text102, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React203.createElement(Radio6.Group, { value: recipientType, onChange: (v) => {
19752
20318
  setRecipientType(v);
19753
20319
  setSelectedRecipient(null);
19754
20320
  setSearchResults([]);
19755
- } }, /* @__PURE__ */ React196.createElement(Group63, null, /* @__PURE__ */ React196.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React196.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React196.createElement(Radio6, { value: "manual", label: "Enter DID" })))), recipientType !== "manual" ? /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, /* @__PURE__ */ React196.createElement(
20321
+ } }, /* @__PURE__ */ React203.createElement(Group65, null, /* @__PURE__ */ React203.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React203.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React203.createElement(Radio6, { value: "manual", label: "Enter DID" })))), recipientType !== "manual" ? /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React203.createElement(
19756
20322
  TextInput7,
19757
20323
  {
19758
20324
  placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
19759
- leftSection: /* @__PURE__ */ React196.createElement(IconSearch5, { size: 16 }),
19760
- rightSection: searching ? /* @__PURE__ */ React196.createElement(Loader26, { size: 14 }) : null,
20325
+ leftSection: /* @__PURE__ */ React203.createElement(IconSearch5, { size: 16 }),
20326
+ rightSection: searching ? /* @__PURE__ */ React203.createElement(Loader27, { size: 14 }) : null,
19761
20327
  value: searchQuery,
19762
20328
  onChange: (e) => setSearchQuery(e.currentTarget.value),
19763
20329
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
19764
20330
  }
19765
- ), selectedRecipient ? /* @__PURE__ */ React196.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React196.createElement(Group63, { justify: "space-between" }, /* @__PURE__ */ React196.createElement(Group63, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React196.createElement(IconRobot4, { size: 16 }) : /* @__PURE__ */ React196.createElement(IconUser5, { size: 16 }), /* @__PURE__ */ React196.createElement(Text99, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React196.createElement(Badge30, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React196.createElement(ActionIcon29, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React196.createElement(IconX8, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React196.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React196.createElement(Stack125, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React196.createElement(
19766
- Button37,
20331
+ ), selectedRecipient ? /* @__PURE__ */ React203.createElement(Paper22, { p: "sm", withBorder: true }, /* @__PURE__ */ React203.createElement(Group65, { justify: "space-between" }, /* @__PURE__ */ React203.createElement(Group65, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React203.createElement(IconRobot4, { size: 16 }) : /* @__PURE__ */ React203.createElement(IconUser5, { size: 16 }), /* @__PURE__ */ React203.createElement(Text102, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React203.createElement(Badge32, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React203.createElement(ActionIcon30, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React203.createElement(IconX8, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React203.createElement(Paper22, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React203.createElement(Stack128, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React203.createElement(
20332
+ Button39,
19767
20333
  {
19768
20334
  key: result.did,
19769
20335
  variant: "subtle",
@@ -19772,7 +20338,7 @@ var GrantPermissionModal = ({
19772
20338
  onClick: () => setSelectedRecipient(result)
19773
20339
  },
19774
20340
  result.displayName
19775
- )))) : null) : /* @__PURE__ */ React196.createElement(
20341
+ )))) : null) : /* @__PURE__ */ React203.createElement(
19776
20342
  TextInput7,
19777
20343
  {
19778
20344
  label: "Recipient DID",
@@ -19780,12 +20346,12 @@ var GrantPermissionModal = ({
19780
20346
  value: manualDid,
19781
20347
  onChange: (e) => setManualDid(e.currentTarget.value)
19782
20348
  }
19783
- ), /* @__PURE__ */ React196.createElement(Divider13, null), /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Text99, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
20349
+ ), /* @__PURE__ */ React203.createElement(Divider13, null), /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Text102, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
19784
20350
  // Single block mode: show fixed block info
19785
- /* @__PURE__ */ React196.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React196.createElement(Group63, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Badge30, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React196.createElement(Text99, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React196.createElement(Text99, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
20351
+ /* @__PURE__ */ React203.createElement(Paper22, { p: "sm", withBorder: true }, /* @__PURE__ */ React203.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Badge32, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React203.createElement(Text102, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React203.createElement(Text102, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
19786
20352
  ) : (
19787
20353
  // Multi-block mode: show scope selection
19788
- /* @__PURE__ */ React196.createElement(React196.Fragment, null, /* @__PURE__ */ React196.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React196.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React196.createElement(Paper20, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React196.createElement(
20354
+ /* @__PURE__ */ React203.createElement(React203.Fragment, null, /* @__PURE__ */ React203.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React203.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React203.createElement(Paper22, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React203.createElement(
19789
20355
  Checkbox12,
19790
20356
  {
19791
20357
  key: block.id,
@@ -19800,14 +20366,14 @@ var GrantPermissionModal = ({
19800
20366
  }
19801
20367
  }
19802
20368
  )))))
19803
- )), /* @__PURE__ */ React196.createElement(Divider13, null), /* @__PURE__ */ React196.createElement(Stack125, { gap: "xs" }, /* @__PURE__ */ React196.createElement(
20369
+ )), /* @__PURE__ */ React203.createElement(Divider13, null), /* @__PURE__ */ React203.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React203.createElement(
19804
20370
  Checkbox12,
19805
20371
  {
19806
20372
  label: "Set expiration",
19807
20373
  checked: expirationEnabled,
19808
20374
  onChange: (e) => setExpirationEnabled(e.currentTarget.checked)
19809
20375
  }
19810
- ), expirationEnabled && /* @__PURE__ */ React196.createElement(
20376
+ ), expirationEnabled && /* @__PURE__ */ React203.createElement(
19811
20377
  NumberInput3,
19812
20378
  {
19813
20379
  label: "Expires in (days)",
@@ -19817,7 +20383,7 @@ var GrantPermissionModal = ({
19817
20383
  min: 1,
19818
20384
  max: 365
19819
20385
  }
19820
- )), /* @__PURE__ */ React196.createElement(
20386
+ )), /* @__PURE__ */ React203.createElement(
19821
20387
  Checkbox12,
19822
20388
  {
19823
20389
  label: "Recipient can grant permissions to others",
@@ -19825,7 +20391,7 @@ var GrantPermissionModal = ({
19825
20391
  checked: canDelegate,
19826
20392
  onChange: (e) => setCanDelegate(e.currentTarget.checked)
19827
20393
  }
19828
- ), /* @__PURE__ */ React196.createElement(Divider13, null), /* @__PURE__ */ React196.createElement(
20394
+ ), /* @__PURE__ */ React203.createElement(Divider13, null), /* @__PURE__ */ React203.createElement(
19829
20395
  TextInput7,
19830
20396
  {
19831
20397
  label: "Enter your PIN to sign this delegation",
@@ -19834,7 +20400,7 @@ var GrantPermissionModal = ({
19834
20400
  value: pin,
19835
20401
  onChange: (e) => setPin(e.currentTarget.value)
19836
20402
  }
19837
- ), error && /* @__PURE__ */ React196.createElement(Alert27, { color: "red" }, error), /* @__PURE__ */ React196.createElement(Group63, { justify: "flex-end" }, /* @__PURE__ */ React196.createElement(Button37, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React196.createElement(Button37, { onClick: handleGrant, loading }, "Grant Permission")))
20403
+ ), error && /* @__PURE__ */ React203.createElement(Alert28, { color: "red" }, error), /* @__PURE__ */ React203.createElement(Group65, { justify: "flex-end" }, /* @__PURE__ */ React203.createElement(Button39, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React203.createElement(Button39, { onClick: handleGrant, loading }, "Grant Permission")))
19838
20404
  );
19839
20405
  };
19840
20406
 
@@ -19940,4 +20506,4 @@ export {
19940
20506
  ixoGraphQLClient,
19941
20507
  getEntity
19942
20508
  };
19943
- //# sourceMappingURL=chunk-ER7KTMUM.mjs.map
20509
+ //# sourceMappingURL=chunk-AOSYWSEN.mjs.map