@ixo/editor 2.16.0 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16744,14 +16744,27 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
16744
16744
  };
16745
16745
 
16746
16746
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
16747
- import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47 } from "react";
16748
- import { ActionIcon as ActionIcon27, Badge as Badge28, Button as Button33, Group as Group59, Stack as Stack122, Text as Text96, Tooltip as Tooltip18 } from "@mantine/core";
16749
- import { IconChevronRight as IconChevronRight8, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
16747
+ import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47, useState as useState65 } from "react";
16748
+ import { ActionIcon as ActionIcon27, Badge as Badge28, Group as Group59, Stack as Stack122, Text as Text96, Tooltip as Tooltip18 } from "@mantine/core";
16749
+ import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
16750
16750
 
16751
16751
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
16752
16752
  import React184, { useCallback as useCallback46, useState as useState64 } from "react";
16753
16753
  import { Alert as Alert24, Button as Button32, CloseButton as CloseButton13, Group as Group58, Loader as Loader24, Stack as Stack121, Text as Text95, Title as Title16 } from "@mantine/core";
16754
16754
  import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck5, IconSignature } from "@tabler/icons-react";
16755
+ function getDomainCardDataFromViewer(editor) {
16756
+ const allBlocks = editor.document;
16757
+ for (const docBlock of allBlocks) {
16758
+ if (docBlock.type === "domainCardViewer") {
16759
+ try {
16760
+ return JSON.parse(docBlock.props.domainCardData || "{}");
16761
+ } catch {
16762
+ return null;
16763
+ }
16764
+ }
16765
+ }
16766
+ return null;
16767
+ }
16755
16768
  var SignPanel = ({ editor, block, onComplete, onError }) => {
16756
16769
  const { closePanel } = usePanelStore();
16757
16770
  const { handlers } = useBlocknoteContext();
@@ -16759,12 +16772,8 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16759
16772
  const [error, setError] = useState64(block.props.errorMessage || null);
16760
16773
  const [createdEntityDid, setCreatedEntityDid] = useState64(block.props.entityDid || null);
16761
16774
  const getDomainCardData = useCallback46(() => {
16762
- try {
16763
- return JSON.parse(block.props.domainCardData || "{}");
16764
- } catch {
16765
- return null;
16766
- }
16767
- }, [block.props.domainCardData]);
16775
+ return getDomainCardDataFromViewer(editor);
16776
+ }, [editor]);
16768
16777
  const processSignAndCreate = useCallback46(async () => {
16769
16778
  if (!handlers) {
16770
16779
  throw new Error("Handlers not available");
@@ -16896,145 +16905,20 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16896
16905
  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"));
16897
16906
  };
16898
16907
 
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
-
17035
16908
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
17036
16909
  var DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID = "domain-creator-sign-flow-panel";
17037
- var IS_DEV = false;
16910
+ function getDomainCardViewerData(editor) {
16911
+ const allBlocks = editor.document;
16912
+ for (const docBlock of allBlocks) {
16913
+ if (docBlock.type === "domainCardViewer") {
16914
+ return {
16915
+ domainCardData: docBlock.props.domainCardData || "{}",
16916
+ isApproved: docBlock.props.status === "approved"
16917
+ };
16918
+ }
16919
+ }
16920
+ return { domainCardData: "{}", isApproved: false };
16921
+ }
17038
16922
  function isDomainCardDataReady(domainCardData) {
17039
16923
  if (!domainCardData || domainCardData === "{}") return false;
17040
16924
  try {
@@ -17046,8 +16930,22 @@ function isDomainCardDataReady(domainCardData) {
17046
16930
  }
17047
16931
  var DomainCreatorSignFlowView = ({ editor, block }) => {
17048
16932
  const status = block.props.status || "pending";
17049
- const domainCardData = block.props.domainCardData || "{}";
17050
- const isDataReady = isDomainCardDataReady(domainCardData);
16933
+ const [viewerData, setViewerData] = useState65(() => getDomainCardViewerData(editor));
16934
+ useEffect47(() => {
16935
+ const updateViewerData = () => {
16936
+ const newData = getDomainCardViewerData(editor);
16937
+ setViewerData((prev) => {
16938
+ if (prev.domainCardData !== newData.domainCardData || prev.isApproved !== newData.isApproved) {
16939
+ return newData;
16940
+ }
16941
+ return prev;
16942
+ });
16943
+ };
16944
+ updateViewerData();
16945
+ return editor.onChange(updateViewerData);
16946
+ }, [editor]);
16947
+ const { domainCardData, isApproved: isViewerApproved } = viewerData;
16948
+ const isDataReady = isDomainCardDataReady(domainCardData) && isViewerApproved;
17051
16949
  useEffect47(() => {
17052
16950
  if (status === "pending" && isDataReady) {
17053
16951
  editor.updateBlock(block, {
@@ -17056,6 +16954,13 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17056
16954
  status: "ready"
17057
16955
  }
17058
16956
  });
16957
+ } else if (status === "ready" && !isDataReady) {
16958
+ editor.updateBlock(block, {
16959
+ props: {
16960
+ ...block.props,
16961
+ status: "pending"
16962
+ }
16963
+ });
17059
16964
  }
17060
16965
  }, [isDataReady, status, editor, block]);
17061
16966
  const handleComplete = useCallback47(
@@ -17109,33 +17014,6 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17109
17014
  };
17110
17015
  const badgeProps = getBadgeProps();
17111
17016
  const isClickable = isDataReady || status === "completed" || status === "error";
17112
- const handlePrefillDummyData = useCallback47(
17113
- (e) => {
17114
- e.stopPropagation();
17115
- editor.updateBlock(block, {
17116
- props: {
17117
- ...block.props,
17118
- domainCardData: JSON.stringify(dummyDomainCardData),
17119
- entityType: "dao"
17120
- }
17121
- });
17122
- },
17123
- [editor, block]
17124
- );
17125
- const handleClearDummyData = useCallback47(
17126
- (e) => {
17127
- e.stopPropagation();
17128
- editor.updateBlock(block, {
17129
- props: {
17130
- ...block.props,
17131
- domainCardData: "{}",
17132
- entityType: "",
17133
- status: "pending"
17134
- }
17135
- });
17136
- },
17137
- [editor, block]
17138
- );
17139
17017
  const getDescriptionText = () => {
17140
17018
  switch (status) {
17141
17019
  case "completed":
@@ -17145,10 +17023,10 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17145
17023
  case "ready":
17146
17024
  return "Click to sign and create the domain";
17147
17025
  default:
17148
- return "Waiting for domain card data to be filled";
17026
+ return "Waiting for domain data to be approved";
17149
17027
  }
17150
17028
  };
17151
- return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React185.createElement(Stack122, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React185.createElement(Group59, { gap: "xs", align: "center" }, /* @__PURE__ */ React185.createElement(Text96, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React185.createElement(Badge28, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React185.createElement(Text96, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && !isDataReady && /* @__PURE__ */ React185.createElement(Button33, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React185.createElement(IconTestPipe, { size: 14 }), onClick: handlePrefillDummyData }, "Test Data"), IS_DEV && isDataReady && /* @__PURE__ */ React185.createElement(Button33, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React185.createElement(IconTrash5, { size: 14 }), onClick: handleClearDummyData }, "Clear Data"), isClickable && /* @__PURE__ */ React185.createElement(Tooltip18, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React185.createElement(ActionIcon27, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React185.createElement(IconChevronRight8, { size: 18 })))));
17029
+ return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React185.createElement(Stack122, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React185.createElement(Group59, { gap: "xs", align: "center" }, /* @__PURE__ */ React185.createElement(Text96, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React185.createElement(Badge28, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React185.createElement(Text96, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), isClickable && /* @__PURE__ */ React185.createElement(Tooltip18, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React185.createElement(ActionIcon27, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React185.createElement(IconChevronRight8, { size: 18 })))));
17152
17030
  };
17153
17031
 
17154
17032
  // src/mantine/blocks/domainCreatorSign/DomainCreatorSignBlock.tsx
@@ -17167,12 +17045,11 @@ var DomainCreatorSignBlockSpec = createReactBlockSpec16(
17167
17045
  propSchema: {
17168
17046
  title: { default: "" },
17169
17047
  description: { default: "" },
17170
- icon: { default: "file-text" },
17171
- // JSON string of credential subject data (oracle fills this)
17172
- domainCardData: { default: "{}" },
17048
+ icon: { default: "feather" },
17173
17049
  // Entity type from protocol selector or oracle
17174
17050
  entityType: { default: "" },
17175
17051
  // Status: pending | ready | signing | uploading | creating | completed | error
17052
+ // NOTE: This block reads domainCardData from the domainCardViewer block
17176
17053
  status: { default: "pending" },
17177
17054
  // Created entity DID (after success)
17178
17055
  entityDid: { default: "" },
@@ -17207,11 +17084,11 @@ import React189, { useCallback as useCallback48 } from "react";
17207
17084
  import { Paper as Paper19, CloseButton as CloseButton14, Title as Title17 } from "@mantine/core";
17208
17085
 
17209
17086
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
17210
- import React188, { useEffect as useEffect48, useState as useState65 } from "react";
17087
+ import React188, { useEffect as useEffect48, useState as useState66 } from "react";
17211
17088
  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");
17089
+ const [localTitle, setLocalTitle] = useState66(title || "");
17090
+ const [localDescription, setLocalDescription] = useState66(description || "");
17091
+ const [localIcon, setLocalIcon] = useState66(icon || "dots-circle");
17215
17092
  useEffect48(() => setLocalTitle(title || ""), [title]);
17216
17093
  useEffect48(() => setLocalDescription(description || ""), [description]);
17217
17094
  useEffect48(() => setLocalIcon(icon || "dots-circle"), [icon]);
@@ -17330,15 +17207,15 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
17330
17207
  };
17331
17208
 
17332
17209
  // 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";
17210
+ import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as useEffect49 } from "react";
17211
+ import { ActionIcon as ActionIcon28, Badge as Badge30, Button as Button34, Group as Group61, Stack as Stack125, Text as Text99, Tooltip as Tooltip19 } from "@mantine/core";
17212
+ import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
17336
17213
 
17337
17214
  // src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
17338
17215
  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";
17216
+ import { Paper as Paper20, CloseButton as CloseButton15, Title as Title18, Stack as Stack124, Text as Text98, Loader as Loader25, Alert as Alert25, Button as Button33, Box as Box34, ScrollArea as ScrollArea6, Code as Code6 } from "@mantine/core";
17340
17217
  import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
17341
- function parseDomainCardData(jsonString) {
17218
+ function parsePreviewData(jsonString) {
17342
17219
  if (!jsonString || jsonString === "{}") return null;
17343
17220
  try {
17344
17221
  return JSON.parse(jsonString);
@@ -17355,12 +17232,12 @@ var ViewerPanel = ({ block, onApprove }) => {
17355
17232
  const status = block.props.status || "pending";
17356
17233
  const loadingMessage = block.props.loadingMessage || "Agents is generating your domain data...";
17357
17234
  const errorMessage = block.props.errorMessage || "An error occurred while generating the domain data.";
17358
- const domainCardData = useMemo58(() => parseDomainCardData(block.props.domainCardData || "{}"), [block.props.domainCardData]);
17235
+ const domainPreviewData = useMemo58(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
17359
17236
  const isLoading = status === "loading";
17360
17237
  const isError = status === "error";
17361
17238
  const isReady = status === "ready";
17362
17239
  const isApproved = status === "approved";
17363
- const hasData = domainCardData !== null;
17240
+ const hasData = domainPreviewData !== null;
17364
17241
  return /* @__PURE__ */ React191.createElement(
17365
17242
  Paper20,
17366
17243
  {
@@ -17388,10 +17265,10 @@ var ViewerPanel = ({ block, onApprove }) => {
17388
17265
  ),
17389
17266
  /* @__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
17267
  // Use custom renderer from web app
17391
- /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainCardData))
17268
+ /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
17392
17269
  ) : (
17393
17270
  // Fallback to JSON viewer
17394
- /* @__PURE__ */ React191.createElement(JsonViewer, { data: domainCardData })
17271
+ /* @__PURE__ */ React191.createElement(JsonViewer, { data: domainPreviewData })
17395
17272
  )), !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
17273
  isReady && hasData && /* @__PURE__ */ React191.createElement(
17397
17274
  Box34,
@@ -17405,7 +17282,7 @@ var ViewerPanel = ({ block, onApprove }) => {
17405
17282
  },
17406
17283
  /* @__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
17284
  /* @__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")
17285
+ /* @__PURE__ */ React191.createElement(Button33, { fullWidth: true, color: "teal", leftSection: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), onClick: onApprove }, "Approve")
17409
17286
  ),
17410
17287
  isApproved && /* @__PURE__ */ React191.createElement(
17411
17288
  Box34,
@@ -17422,46 +17299,230 @@ var ViewerPanel = ({ block, onApprove }) => {
17422
17299
  );
17423
17300
  };
17424
17301
 
17302
+ // src/data/domainCard.ts
17303
+ var dummyDomainCardData = {
17304
+ id: "6fcb075108d95d7418a1336e81b07fd5b4bc28b6edf96f1d75a34bfaa40b146e",
17305
+ issuer: "did:ixo:issuer:blueventures",
17306
+ credential_type: ["VerifiableCredential", "ixo:DomainCard"],
17307
+ valid_from: "2025-01-15T08:00:00.000Z",
17308
+ schema_id: "https://github.com/ixofoundation/docs",
17309
+ entity_type: ["schema:Organization", "schema:NGO"],
17310
+ name: "Blue Ventures",
17311
+ alternate_names: ["Blue Ventures Conservation"],
17312
+ 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.",
17313
+ keywords: [
17314
+ "Marine Conservation",
17315
+ "Blue Carbon",
17316
+ "Mangrove Restoration",
17317
+ "Seagrass Conservation",
17318
+ "Sustainable Fisheries",
17319
+ "Biodiversity Protection",
17320
+ "Climate Resilience",
17321
+ "Community-Led Conservation",
17322
+ "LMMAs",
17323
+ "Coastal Livelihoods"
17324
+ ],
17325
+ categories: ["ixo:project"],
17326
+ knows_about: [
17327
+ "community-based conservation models",
17328
+ "blue carbon ecosystems",
17329
+ "mangrove reforestation",
17330
+ "seagrass mapping",
17331
+ "marine protected area development",
17332
+ "sustainable small-scale fisheries"
17333
+ ],
17334
+ url: "https://blueventures.org/",
17335
+ same_as: [
17336
+ "https://twitter.com/blueventures",
17337
+ "https://github.com/blueventures",
17338
+ "https://linkedin.com/company/blue-ventures",
17339
+ "https://facebook.com/blueventuresorg",
17340
+ "https://instagram.com/blueventures"
17341
+ ],
17342
+ logo_url: {
17343
+ url: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png",
17344
+ 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."
17345
+ },
17346
+ image_urls: [
17347
+ {
17348
+ url: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg",
17349
+ 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.",
17350
+ type: "schema:ImageObject"
17351
+ }
17352
+ ],
17353
+ contact: {
17354
+ email: "info@blueventures.org",
17355
+ website: "https://blueventures.org/",
17356
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17357
+ socialLinks: []
17358
+ },
17359
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17360
+ coordinates: {
17361
+ type: "Point",
17362
+ coordinates: [-2.674898, 51.487256]
17363
+ },
17364
+ address: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17365
+ area_served: "Global Coastal Regions",
17366
+ relationships: {
17367
+ memberOf: ["The Blue Carbon Initiative"],
17368
+ partners: ["WWF", "The Nature Conservancy", "IUCN Mangrove Specialist Group"],
17369
+ funders: ["UK Aid / FCDO"]
17370
+ },
17371
+ additional_properties: {
17372
+ attributes: [
17373
+ {
17374
+ "@type": "schema:PropertyValue",
17375
+ "@id": "urn:ixo:attr:projects",
17376
+ name: "Active Conservation Sites",
17377
+ value: "40+"
17378
+ },
17379
+ {
17380
+ "@type": "schema:PropertyValue",
17381
+ "@id": "urn:ixo:attr:focus",
17382
+ name: "Core Focus Areas",
17383
+ value: "Blue carbon, fisheries, biodiversity"
17384
+ }
17385
+ ],
17386
+ content_hashes: {
17387
+ "https://blueventures.org/": "1765daf4a048e042bc651e13d6ed88d7f70f576c1b16ac4bc00cd42e78a9fcb0"
17388
+ },
17389
+ content_summaries: {
17390
+ "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."
17391
+ },
17392
+ last_fetch_date: "2025-12-11T16:32:33.260Z"
17393
+ },
17394
+ faq: [
17395
+ {
17396
+ question: "What is Marine Conservation Partnerships and what problem does it solve?",
17397
+ 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."
17398
+ },
17399
+ {
17400
+ question: "How does Marine Conservation Partnerships work technically?",
17401
+ 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."
17402
+ },
17403
+ {
17404
+ question: "What can you do with Marine Conservation Partnerships?",
17405
+ 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."
17406
+ },
17407
+ {
17408
+ question: "Who uses Marine Conservation Partnerships?",
17409
+ 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."
17410
+ },
17411
+ {
17412
+ question: "What outcomes does Marine Conservation Partnerships aim to achieve?",
17413
+ 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."
17414
+ }
17415
+ ],
17416
+ 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.",
17417
+ 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.",
17418
+ events: ["81382424481d6291b3caaaf6bb1d16eef568fe24a96fd2c1a3fddec9b368f165"],
17419
+ agents: [],
17420
+ indexed_at: "2025-12-11T16:32:33.260Z",
17421
+ updated_at: "2025-12-11T16:32:33.260Z",
17422
+ research_profile: {
17423
+ type: "ixo:ResearchProfile",
17424
+ "ixo:seedQueries": ["Blue Ventures blue carbon community conservation", "mangrove restoration Madagascar community management"],
17425
+ citation: [
17426
+ {
17427
+ type: "schema:CreativeWork",
17428
+ name: "Blue Carbon Ecosystems in Madagascar",
17429
+ url: "https://blueventures.org/blue-carbon/",
17430
+ publisher: "Blue Ventures",
17431
+ datePublished: "2023-11-14"
17432
+ }
17433
+ ],
17434
+ dateModified: "2025-01-15"
17435
+ }
17436
+ };
17437
+ var dummyCredentialSubject = {
17438
+ id: "did:ixo:entity:pending",
17439
+ type: ["ixo:dao"],
17440
+ name: "Blue Ventures",
17441
+ 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.",
17442
+ url: "https://blueventures.org/",
17443
+ sameAs: ["https://twitter.com/blueventures", "https://linkedin.com/company/blue-ventures", "https://facebook.com/blueventuresorg"],
17444
+ logo: {
17445
+ type: "schema:ImageObject",
17446
+ id: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png",
17447
+ contentUrl: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png"
17448
+ },
17449
+ image: [
17450
+ {
17451
+ type: "schema:ImageObject",
17452
+ id: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg",
17453
+ contentUrl: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg"
17454
+ }
17455
+ ],
17456
+ keywords: ["Marine Conservation", "Blue Carbon", "Mangrove Restoration", "Sustainable Fisheries", "Community-Led Conservation"],
17457
+ knowsAbout: ["community-based conservation models", "blue carbon ecosystems", "mangrove reforestation", "marine protected area development"],
17458
+ address: {
17459
+ type: "schema:PostalAddress",
17460
+ streetAddress: "22-26 Station Road",
17461
+ addressLocality: "Bristol",
17462
+ addressRegion: "England",
17463
+ postalCode: "BS1 4RQ",
17464
+ addressCountry: "GB"
17465
+ },
17466
+ areaServed: {
17467
+ type: "schema:AdministrativeArea",
17468
+ name: "Global Coastal Regions"
17469
+ },
17470
+ contactPoint: [
17471
+ {
17472
+ type: "schema:ContactPoint",
17473
+ contactType: "general",
17474
+ email: "info@blueventures.org"
17475
+ }
17476
+ ],
17477
+ relationships: {
17478
+ memberOf: [
17479
+ { type: "schema:Organization", name: "The Blue Carbon Initiative" },
17480
+ { type: "schema:Organization", name: "Global Mangrove Alliance" }
17481
+ ],
17482
+ "prov:wasAssociatedWith": [
17483
+ { type: "schema:Organization", name: "WWF", url: "https://wwf.org" },
17484
+ { type: "schema:Organization", name: "The Nature Conservancy" }
17485
+ ],
17486
+ funding: [
17487
+ {
17488
+ type: "schema:MonetaryGrant",
17489
+ funder: { type: "schema:Organization", name: "UK Aid / FCDO" }
17490
+ }
17491
+ ]
17492
+ },
17493
+ researchProfile: {
17494
+ type: "ixo:ResearchProfile",
17495
+ "ixo:seedQueries": ["Blue Ventures blue carbon community conservation"],
17496
+ citation: [
17497
+ {
17498
+ type: "schema:CreativeWork",
17499
+ name: "Blue Carbon Ecosystems in Madagascar",
17500
+ url: "https://blueventures.org/blue-carbon/",
17501
+ publisher: "Blue Ventures",
17502
+ datePublished: "2023-11-14"
17503
+ }
17504
+ ],
17505
+ dateModified: "2025-01-15"
17506
+ }
17507
+ };
17508
+
17425
17509
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
17426
17510
  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;
17511
+ var IS_DEV = false;
17512
+ function isPreviewDataReady(domainPreviewData) {
17513
+ if (!domainPreviewData || domainPreviewData === "{}") return false;
17430
17514
  try {
17431
- const parsed = JSON.parse(domainCardData);
17515
+ const parsed = JSON.parse(domainPreviewData);
17432
17516
  return Boolean(parsed && typeof parsed === "object" && parsed.name);
17433
17517
  } catch {
17434
17518
  return false;
17435
17519
  }
17436
17520
  }
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
17521
  var DomainCardViewerFlowView = ({ editor, block }) => {
17455
17522
  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]);
17523
+ const domainPreviewData = block.props.domainPreviewData || "{}";
17524
+ const isDataReady = isPreviewDataReady(domainPreviewData);
17525
+ console.log("block.props", block.props);
17465
17526
  useEffect49(() => {
17466
17527
  if (status === "pending" && isDataReady) {
17467
17528
  editor.updateBlock(block, {
@@ -17489,7 +17550,8 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17489
17550
  editor.updateBlock(block, {
17490
17551
  props: {
17491
17552
  ...block.props,
17492
- domainCardData: JSON.stringify(dummyDomainCardData),
17553
+ domainPreviewData: JSON.stringify(dummyDomainCardData),
17554
+ domainCardData: JSON.stringify(dummyCredentialSubject),
17493
17555
  status: "ready",
17494
17556
  loadingMessage: "",
17495
17557
  errorMessage: ""
@@ -17517,6 +17579,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17517
17579
  editor.updateBlock(block, {
17518
17580
  props: {
17519
17581
  ...block.props,
17582
+ domainPreviewData: "{}",
17520
17583
  domainCardData: "{}",
17521
17584
  status: "pending",
17522
17585
  loadingMessage: "",
@@ -17556,7 +17619,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17556
17619
  }
17557
17620
  };
17558
17621
  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 })))));
17622
+ 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_DEV && status === "pending" && /* @__PURE__ */ React192.createElement(React192.Fragment, null, /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React192.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTrash5, { 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
17623
  };
17561
17624
 
17562
17625
  // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
@@ -17576,7 +17639,11 @@ var DomainCardViewerBlockSpec = createReactBlockSpec17(
17576
17639
  title: { default: "" },
17577
17640
  description: { default: "" },
17578
17641
  icon: { default: "dots-circle" },
17579
- // Core domain card data (JSON string, injected by oracle)
17642
+ // Preview data for UI display (JSON string, injected by oracle)
17643
+ // Uses DomainCardResponse format with faq, summary, logo_url, etc.
17644
+ domainPreviewData: { default: "{}" },
17645
+ // Credential subject data for signing (JSON string, injected by oracle)
17646
+ // Uses DomainCardCredentialSubject format for W3C VC
17580
17647
  domainCardData: { default: "{}" },
17581
17648
  // Status tracking for oracle workflow
17582
17649
  status: { default: "pending" },
@@ -17767,7 +17834,7 @@ blockRegistry.register({
17767
17834
  });
17768
17835
 
17769
17836
  // src/mantine/blocks/hooks/useBlockDependencies.ts
17770
- import { useMemo as useMemo60, useEffect as useEffect50, useState as useState66, useCallback as useCallback50 } from "react";
17837
+ import { useMemo as useMemo60, useEffect as useEffect50, useState as useState67, useCallback as useCallback50 } from "react";
17771
17838
 
17772
17839
  // src/mantine/blocks/hooks/useDependsOn.ts
17773
17840
  import { useMemo as useMemo61 } from "react";
@@ -18123,7 +18190,6 @@ var getExtraSlashMenuItems = (editor) => {
18123
18190
  title: "",
18124
18191
  description: "",
18125
18192
  icon: "feather",
18126
- domainCardData: "{}",
18127
18193
  entityType: "",
18128
18194
  status: "pending",
18129
18195
  entityDid: "",
@@ -18151,6 +18217,7 @@ var getExtraSlashMenuItems = (editor) => {
18151
18217
  title: "",
18152
18218
  description: "",
18153
18219
  icon: "dots-circle",
18220
+ domainPreviewData: "{}",
18154
18221
  domainCardData: "{}",
18155
18222
  status: "pending",
18156
18223
  loadingMessage: "",
@@ -18245,14 +18312,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
18245
18312
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
18246
18313
 
18247
18314
  // src/core/hooks/useMatrixProvider.ts
18248
- import { useEffect as useEffect51, useState as useState67, useRef as useRef12, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18315
+ import { useEffect as useEffect51, useState as useState68, useRef as useRef11, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18249
18316
  import { MatrixProvider } from "@ixo/matrix-crdt";
18250
18317
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
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);
18318
+ const [matrixProvider, setProvider] = useState68(null);
18319
+ const [status, setStatus] = useState68("disconnected");
18320
+ const isMountedRef = useRef11(true);
18321
+ const providerRef = useRef11(null);
18322
+ const retryTimeoutRef = useRef11(null);
18256
18323
  const providerOptions = useMemo62(
18257
18324
  () => ({
18258
18325
  translator: {
@@ -18794,7 +18861,7 @@ function useCreateCollaborativeIxoEditor(options) {
18794
18861
  }
18795
18862
 
18796
18863
  // src/mantine/components/CoverImage.tsx
18797
- import React196, { useState as useState68, useRef as useRef13, useEffect as useEffect53 } from "react";
18864
+ import React196, { useState as useState69, useRef as useRef12, useEffect as useEffect53 } from "react";
18798
18865
  import { Box as Box35, Group as Group62 } from "@mantine/core";
18799
18866
 
18800
18867
  // src/core/lib/imageTransform.ts
@@ -18929,10 +18996,10 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
18929
18996
 
18930
18997
  // src/mantine/components/Base/CoverImageButton.tsx
18931
18998
  import React195 from "react";
18932
- import { Button as Button36 } from "@mantine/core";
18999
+ import { Button as Button35 } from "@mantine/core";
18933
19000
  function CoverImageButton({ isActive = false, children, onClick, style }) {
18934
19001
  return /* @__PURE__ */ React195.createElement(
18935
- Button36,
19002
+ Button35,
18936
19003
  {
18937
19004
  onClick,
18938
19005
  variant: "filled",
@@ -18954,12 +19021,12 @@ function CoverImageButton({ isActive = false, children, onClick, style }) {
18954
19021
  // src/mantine/components/CoverImage.tsx
18955
19022
  function CoverImage({ coverImageUrl, logoUrl }) {
18956
19023
  const { editor, handlers, editable } = useBlocknoteContext();
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);
19024
+ const [isHovering, setIsHovering] = useState69(false);
19025
+ const [isRepositioning, setIsRepositioning] = useState69(false);
19026
+ const [coverPosition, setCoverPosition] = useState69(50);
19027
+ const coverFileInputRef = useRef12(null);
19028
+ const logoFileInputRef = useRef12(null);
19029
+ const [metadata, setMetadata] = useState69(() => editor?.getPageMetadata?.() || null);
18963
19030
  useEffect53(() => {
18964
19031
  if (!editor?._metadataManager) {
18965
19032
  return;
@@ -19247,7 +19314,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
19247
19314
  }
19248
19315
 
19249
19316
  // src/mantine/components/PageHeader.tsx
19250
- import React197, { useState as useState69, useRef as useRef14, useEffect as useEffect54 } from "react";
19317
+ import React197, { useState as useState70, useRef as useRef13, useEffect as useEffect54 } from "react";
19251
19318
  function PageHeader({
19252
19319
  title = "New page",
19253
19320
  icon,
@@ -19258,8 +19325,8 @@ function PageHeader({
19258
19325
  isFavorited = false,
19259
19326
  menuItems = []
19260
19327
  }) {
19261
- const [isMenuOpen, setIsMenuOpen] = useState69(false);
19262
- const menuRef = useRef14(null);
19328
+ const [isMenuOpen, setIsMenuOpen] = useState70(false);
19329
+ const menuRef = useRef13(null);
19263
19330
  useEffect54(() => {
19264
19331
  function handleClickOutside(event) {
19265
19332
  if (menuRef.current && !menuRef.current.contains(event.target)) {
@@ -19440,7 +19507,7 @@ var styles = {
19440
19507
  };
19441
19508
 
19442
19509
  // src/mantine/components/ExternalDropZone.tsx
19443
- import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef15, useState as useState70 } from "react";
19510
+ import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef14, useState as useState71 } from "react";
19444
19511
  import { Box as Box36 } from "@mantine/core";
19445
19512
  var SCROLL_ZONE_SIZE = 80;
19446
19513
  var SCROLL_SPEED = 12;
@@ -19453,14 +19520,14 @@ var ExternalDropZone = ({
19453
19520
  onPlacementCancel,
19454
19521
  children
19455
19522
  }) => {
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);
19523
+ const containerRef = useRef14(null);
19524
+ const [isValidDrag, setIsValidDrag] = useState71(false);
19525
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState71(false);
19526
+ const [indicatorStyle, setIndicatorStyle] = useState71({});
19527
+ const dropPositionRef = useRef14(null);
19528
+ const scrollAnimationRef = useRef14(null);
19529
+ const scrollDirectionRef = useRef14(null);
19530
+ const scrollContainerRef = useRef14(null);
19464
19531
  const getBlockElements = useCallback52(() => {
19465
19532
  if (!containerRef.current) return [];
19466
19533
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
@@ -19978,8 +20045,8 @@ function IxoEditor({
19978
20045
  }
19979
20046
 
19980
20047
  // src/mantine/components/EntitySigningSetup.tsx
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";
20048
+ import React201, { useState as useState72 } from "react";
20049
+ import { Modal as Modal3, Stack as Stack126, Text as Text100, TextInput as TextInput6, Button as Button36, Alert as Alert26, Group as Group63 } from "@mantine/core";
19983
20050
  import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
19984
20051
  var EntitySigningSetup = ({
19985
20052
  opened,
@@ -19988,11 +20055,11 @@ var EntitySigningSetup = ({
19988
20055
  entityName,
19989
20056
  onSetup
19990
20057
  }) => {
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);
20058
+ const [pin, setPin] = useState72("");
20059
+ const [confirmPin, setConfirmPin] = useState72("");
20060
+ const [loading, setLoading] = useState72(false);
20061
+ const [error, setError] = useState72(null);
20062
+ const [success, setSuccess] = useState72(false);
19996
20063
  const handleSetup = async () => {
19997
20064
  if (pin.length < 4) {
19998
20065
  setError("PIN must be at least 4 characters");
@@ -20061,8 +20128,8 @@ var EntitySigningSetup = ({
20061
20128
  onChange: (e) => setConfirmPin(e.currentTarget.value),
20062
20129
  disabled: loading
20063
20130
  }
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,
20131
+ ), 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(Button36, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React201.createElement(
20132
+ Button36,
20066
20133
  {
20067
20134
  onClick: handleSetup,
20068
20135
  loading,
@@ -20074,9 +20141,9 @@ var EntitySigningSetup = ({
20074
20141
  };
20075
20142
 
20076
20143
  // src/mantine/components/FlowPermissionsPanel.tsx
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";
20144
+ import React202, { useState as useState73, useEffect as useEffect56, useMemo as useMemo65 } from "react";
20145
+ import { Stack as Stack127, Text as Text101, Paper as Paper21, Group as Group64, Badge as Badge31, Button as Button37, ActionIcon as ActionIcon29, Loader as Loader26, Alert as Alert27, Divider as Divider12 } from "@mantine/core";
20146
+ import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
20080
20147
  var FlowPermissionsPanel = ({
20081
20148
  editor,
20082
20149
  entityDid,
@@ -20085,9 +20152,9 @@ var FlowPermissionsPanel = ({
20085
20152
  onRevokePermission,
20086
20153
  getUserDisplayName
20087
20154
  }) => {
20088
- const [delegations, setDelegations] = useState72([]);
20089
- const [loading, setLoading] = useState72(true);
20090
- const [revoking, setRevoking] = useState72(null);
20155
+ const [delegations, setDelegations] = useState73([]);
20156
+ const [loading, setLoading] = useState73(true);
20157
+ const [revoking, setRevoking] = useState73(null);
20091
20158
  const rootCapability = useMemo65(() => editor.getRootCapability?.(), [editor]);
20092
20159
  useEffect56(() => {
20093
20160
  const loadDelegations = async () => {
@@ -20160,9 +20227,9 @@ var FlowPermissionsPanel = ({
20160
20227
  loading: revoking === capability.id,
20161
20228
  disabled: !!revoking
20162
20229
  },
20163
- /* @__PURE__ */ React202.createElement(IconTrash7, { size: 16 })
20230
+ /* @__PURE__ */ React202.createElement(IconTrash6, { size: 16 })
20164
20231
  ))))), /* @__PURE__ */ React202.createElement(
20165
- Button38,
20232
+ Button37,
20166
20233
  {
20167
20234
  leftSection: /* @__PURE__ */ React202.createElement(IconPlus5, { size: 16 }),
20168
20235
  variant: "light",
@@ -20173,13 +20240,13 @@ var FlowPermissionsPanel = ({
20173
20240
  };
20174
20241
 
20175
20242
  // src/mantine/components/GrantPermissionModal.tsx
20176
- import React203, { useState as useState73, useCallback as useCallback53 } from "react";
20243
+ import React203, { useState as useState74, useCallback as useCallback53 } from "react";
20177
20244
  import {
20178
20245
  Modal as Modal4,
20179
20246
  Stack as Stack128,
20180
20247
  Text as Text102,
20181
20248
  TextInput as TextInput7,
20182
- Button as Button39,
20249
+ Button as Button38,
20183
20250
  Group as Group65,
20184
20251
  Radio as Radio6,
20185
20252
  Checkbox as Checkbox12,
@@ -20205,20 +20272,20 @@ var GrantPermissionModal = ({
20205
20272
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
20206
20273
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
20207
20274
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
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);
20275
+ const [recipientType, setRecipientType] = useState74("user");
20276
+ const [searchQuery, setSearchQuery] = useState74("");
20277
+ const [searchResults, setSearchResults] = useState74([]);
20278
+ const [searching, setSearching] = useState74(false);
20279
+ const [selectedRecipient, setSelectedRecipient] = useState74(null);
20280
+ const [manualDid, setManualDid] = useState74("");
20281
+ const [scopeType, setScopeType] = useState74("full");
20282
+ const [selectedBlocks, setSelectedBlocks] = useState74([]);
20283
+ const [expirationEnabled, setExpirationEnabled] = useState74(false);
20284
+ const [expirationDays, setExpirationDays] = useState74(30);
20285
+ const [canDelegate, setCanDelegate] = useState74(false);
20286
+ const [pin, setPin] = useState74("");
20287
+ const [loading, setLoading] = useState74(false);
20288
+ const [error, setError] = useState74(null);
20222
20289
  const handleSearch = useCallback53(async () => {
20223
20290
  if (searchQuery.length < 2) return;
20224
20291
  setSearching(true);
@@ -20329,7 +20396,7 @@ var GrantPermissionModal = ({
20329
20396
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
20330
20397
  }
20331
20398
  ), 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,
20399
+ Button38,
20333
20400
  {
20334
20401
  key: result.did,
20335
20402
  variant: "subtle",
@@ -20400,7 +20467,7 @@ var GrantPermissionModal = ({
20400
20467
  value: pin,
20401
20468
  onChange: (e) => setPin(e.currentTarget.value)
20402
20469
  }
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")))
20470
+ ), error && /* @__PURE__ */ React203.createElement(Alert28, { color: "red" }, error), /* @__PURE__ */ React203.createElement(Group65, { justify: "flex-end" }, /* @__PURE__ */ React203.createElement(Button38, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React203.createElement(Button38, { onClick: handleGrant, loading }, "Grant Permission")))
20404
20471
  );
20405
20472
  };
20406
20473
 
@@ -20506,4 +20573,4 @@ export {
20506
20573
  ixoGraphQLClient,
20507
20574
  getEntity
20508
20575
  };
20509
- //# sourceMappingURL=chunk-AOSYWSEN.mjs.map
20576
+ //# sourceMappingURL=chunk-52ED245Y.mjs.map