@ixo/editor 2.16.0 → 2.16.2

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,27 @@ 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
+ const unsubscribe = editor.onChange?.(updateViewerData);
16946
+ const pollInterval = setInterval(updateViewerData, 1e3);
16947
+ return () => {
16948
+ unsubscribe?.();
16949
+ clearInterval(pollInterval);
16950
+ };
16951
+ }, [editor]);
16952
+ const { domainCardData, isApproved: isViewerApproved } = viewerData;
16953
+ const isDataReady = isDomainCardDataReady(domainCardData) && isViewerApproved;
17051
16954
  useEffect47(() => {
17052
16955
  if (status === "pending" && isDataReady) {
17053
16956
  editor.updateBlock(block, {
@@ -17056,6 +16959,13 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17056
16959
  status: "ready"
17057
16960
  }
17058
16961
  });
16962
+ } else if (status === "ready" && !isDataReady) {
16963
+ editor.updateBlock(block, {
16964
+ props: {
16965
+ ...block.props,
16966
+ status: "pending"
16967
+ }
16968
+ });
17059
16969
  }
17060
16970
  }, [isDataReady, status, editor, block]);
17061
16971
  const handleComplete = useCallback47(
@@ -17109,33 +17019,6 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17109
17019
  };
17110
17020
  const badgeProps = getBadgeProps();
17111
17021
  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
17022
  const getDescriptionText = () => {
17140
17023
  switch (status) {
17141
17024
  case "completed":
@@ -17145,10 +17028,10 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17145
17028
  case "ready":
17146
17029
  return "Click to sign and create the domain";
17147
17030
  default:
17148
- return "Waiting for domain card data to be filled";
17031
+ return "Waiting for domain data to be approved";
17149
17032
  }
17150
17033
  };
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 })))));
17034
+ 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
17035
  };
17153
17036
 
17154
17037
  // src/mantine/blocks/domainCreatorSign/DomainCreatorSignBlock.tsx
@@ -17167,12 +17050,11 @@ var DomainCreatorSignBlockSpec = createReactBlockSpec16(
17167
17050
  propSchema: {
17168
17051
  title: { default: "" },
17169
17052
  description: { default: "" },
17170
- icon: { default: "file-text" },
17171
- // JSON string of credential subject data (oracle fills this)
17172
- domainCardData: { default: "{}" },
17053
+ icon: { default: "feather" },
17173
17054
  // Entity type from protocol selector or oracle
17174
17055
  entityType: { default: "" },
17175
17056
  // Status: pending | ready | signing | uploading | creating | completed | error
17057
+ // NOTE: This block reads domainCardData from the domainCardViewer block
17176
17058
  status: { default: "pending" },
17177
17059
  // Created entity DID (after success)
17178
17060
  entityDid: { default: "" },
@@ -17207,11 +17089,11 @@ import React189, { useCallback as useCallback48 } from "react";
17207
17089
  import { Paper as Paper19, CloseButton as CloseButton14, Title as Title17 } from "@mantine/core";
17208
17090
 
17209
17091
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
17210
- import React188, { useEffect as useEffect48, useState as useState65 } from "react";
17092
+ import React188, { useEffect as useEffect48, useState as useState66 } from "react";
17211
17093
  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");
17094
+ const [localTitle, setLocalTitle] = useState66(title || "");
17095
+ const [localDescription, setLocalDescription] = useState66(description || "");
17096
+ const [localIcon, setLocalIcon] = useState66(icon || "dots-circle");
17215
17097
  useEffect48(() => setLocalTitle(title || ""), [title]);
17216
17098
  useEffect48(() => setLocalDescription(description || ""), [description]);
17217
17099
  useEffect48(() => setLocalIcon(icon || "dots-circle"), [icon]);
@@ -17330,15 +17212,15 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
17330
17212
  };
17331
17213
 
17332
17214
  // 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";
17215
+ import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as useEffect49 } from "react";
17216
+ 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";
17217
+ import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
17336
17218
 
17337
17219
  // src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
17338
17220
  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";
17221
+ 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
17222
  import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
17341
- function parseDomainCardData(jsonString) {
17223
+ function parsePreviewData(jsonString) {
17342
17224
  if (!jsonString || jsonString === "{}") return null;
17343
17225
  try {
17344
17226
  return JSON.parse(jsonString);
@@ -17355,12 +17237,12 @@ var ViewerPanel = ({ block, onApprove }) => {
17355
17237
  const status = block.props.status || "pending";
17356
17238
  const loadingMessage = block.props.loadingMessage || "Agents is generating your domain data...";
17357
17239
  const errorMessage = block.props.errorMessage || "An error occurred while generating the domain data.";
17358
- const domainCardData = useMemo58(() => parseDomainCardData(block.props.domainCardData || "{}"), [block.props.domainCardData]);
17240
+ const domainPreviewData = useMemo58(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
17359
17241
  const isLoading = status === "loading";
17360
17242
  const isError = status === "error";
17361
17243
  const isReady = status === "ready";
17362
17244
  const isApproved = status === "approved";
17363
- const hasData = domainCardData !== null;
17245
+ const hasData = domainPreviewData !== null;
17364
17246
  return /* @__PURE__ */ React191.createElement(
17365
17247
  Paper20,
17366
17248
  {
@@ -17388,10 +17270,10 @@ var ViewerPanel = ({ block, onApprove }) => {
17388
17270
  ),
17389
17271
  /* @__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
17272
  // Use custom renderer from web app
17391
- /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainCardData))
17273
+ /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
17392
17274
  ) : (
17393
17275
  // Fallback to JSON viewer
17394
- /* @__PURE__ */ React191.createElement(JsonViewer, { data: domainCardData })
17276
+ /* @__PURE__ */ React191.createElement(JsonViewer, { data: domainPreviewData })
17395
17277
  )), !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
17278
  isReady && hasData && /* @__PURE__ */ React191.createElement(
17397
17279
  Box34,
@@ -17405,7 +17287,7 @@ var ViewerPanel = ({ block, onApprove }) => {
17405
17287
  },
17406
17288
  /* @__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
17289
  /* @__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")
17290
+ /* @__PURE__ */ React191.createElement(Button33, { fullWidth: true, color: "teal", leftSection: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), onClick: onApprove }, "Approve")
17409
17291
  ),
17410
17292
  isApproved && /* @__PURE__ */ React191.createElement(
17411
17293
  Box34,
@@ -17422,46 +17304,230 @@ var ViewerPanel = ({ block, onApprove }) => {
17422
17304
  );
17423
17305
  };
17424
17306
 
17307
+ // src/data/domainCard.ts
17308
+ var dummyDomainCardData = {
17309
+ id: "6fcb075108d95d7418a1336e81b07fd5b4bc28b6edf96f1d75a34bfaa40b146e",
17310
+ issuer: "did:ixo:issuer:blueventures",
17311
+ credential_type: ["VerifiableCredential", "ixo:DomainCard"],
17312
+ valid_from: "2025-01-15T08:00:00.000Z",
17313
+ schema_id: "https://github.com/ixofoundation/docs",
17314
+ entity_type: ["schema:Organization", "schema:NGO"],
17315
+ name: "Blue Ventures",
17316
+ alternate_names: ["Blue Ventures Conservation"],
17317
+ 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.",
17318
+ keywords: [
17319
+ "Marine Conservation",
17320
+ "Blue Carbon",
17321
+ "Mangrove Restoration",
17322
+ "Seagrass Conservation",
17323
+ "Sustainable Fisheries",
17324
+ "Biodiversity Protection",
17325
+ "Climate Resilience",
17326
+ "Community-Led Conservation",
17327
+ "LMMAs",
17328
+ "Coastal Livelihoods"
17329
+ ],
17330
+ categories: ["ixo:project"],
17331
+ knows_about: [
17332
+ "community-based conservation models",
17333
+ "blue carbon ecosystems",
17334
+ "mangrove reforestation",
17335
+ "seagrass mapping",
17336
+ "marine protected area development",
17337
+ "sustainable small-scale fisheries"
17338
+ ],
17339
+ url: "https://blueventures.org/",
17340
+ same_as: [
17341
+ "https://twitter.com/blueventures",
17342
+ "https://github.com/blueventures",
17343
+ "https://linkedin.com/company/blue-ventures",
17344
+ "https://facebook.com/blueventuresorg",
17345
+ "https://instagram.com/blueventures"
17346
+ ],
17347
+ logo_url: {
17348
+ url: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png",
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
+ },
17351
+ image_urls: [
17352
+ {
17353
+ url: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg",
17354
+ 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.",
17355
+ type: "schema:ImageObject"
17356
+ }
17357
+ ],
17358
+ contact: {
17359
+ email: "info@blueventures.org",
17360
+ website: "https://blueventures.org/",
17361
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17362
+ socialLinks: []
17363
+ },
17364
+ location: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17365
+ coordinates: {
17366
+ type: "Point",
17367
+ coordinates: [-2.674898, 51.487256]
17368
+ },
17369
+ address: "22-26 Station Road, Bristol, England, BS1 4RQ, GB",
17370
+ area_served: "Global Coastal Regions",
17371
+ relationships: {
17372
+ memberOf: ["The Blue Carbon Initiative"],
17373
+ partners: ["WWF", "The Nature Conservancy", "IUCN Mangrove Specialist Group"],
17374
+ funders: ["UK Aid / FCDO"]
17375
+ },
17376
+ additional_properties: {
17377
+ attributes: [
17378
+ {
17379
+ "@type": "schema:PropertyValue",
17380
+ "@id": "urn:ixo:attr:projects",
17381
+ name: "Active Conservation Sites",
17382
+ value: "40+"
17383
+ },
17384
+ {
17385
+ "@type": "schema:PropertyValue",
17386
+ "@id": "urn:ixo:attr:focus",
17387
+ name: "Core Focus Areas",
17388
+ value: "Blue carbon, fisheries, biodiversity"
17389
+ }
17390
+ ],
17391
+ content_hashes: {
17392
+ "https://blueventures.org/": "1765daf4a048e042bc651e13d6ed88d7f70f576c1b16ac4bc00cd42e78a9fcb0"
17393
+ },
17394
+ content_summaries: {
17395
+ "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."
17396
+ },
17397
+ last_fetch_date: "2025-12-11T16:32:33.260Z"
17398
+ },
17399
+ faq: [
17400
+ {
17401
+ question: "What is Marine Conservation Partnerships and what problem does it solve?",
17402
+ 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."
17403
+ },
17404
+ {
17405
+ question: "How does Marine Conservation Partnerships work technically?",
17406
+ 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."
17407
+ },
17408
+ {
17409
+ question: "What can you do with Marine Conservation Partnerships?",
17410
+ 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."
17411
+ },
17412
+ {
17413
+ question: "Who uses Marine Conservation Partnerships?",
17414
+ 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."
17415
+ },
17416
+ {
17417
+ question: "What outcomes does Marine Conservation Partnerships aim to achieve?",
17418
+ 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."
17419
+ }
17420
+ ],
17421
+ 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.",
17422
+ 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.",
17423
+ events: ["81382424481d6291b3caaaf6bb1d16eef568fe24a96fd2c1a3fddec9b368f165"],
17424
+ agents: [],
17425
+ indexed_at: "2025-12-11T16:32:33.260Z",
17426
+ updated_at: "2025-12-11T16:32:33.260Z",
17427
+ research_profile: {
17428
+ type: "ixo:ResearchProfile",
17429
+ "ixo:seedQueries": ["Blue Ventures blue carbon community conservation", "mangrove restoration Madagascar community management"],
17430
+ citation: [
17431
+ {
17432
+ type: "schema:CreativeWork",
17433
+ name: "Blue Carbon Ecosystems in Madagascar",
17434
+ url: "https://blueventures.org/blue-carbon/",
17435
+ publisher: "Blue Ventures",
17436
+ datePublished: "2023-11-14"
17437
+ }
17438
+ ],
17439
+ dateModified: "2025-01-15"
17440
+ }
17441
+ };
17442
+ var dummyCredentialSubject = {
17443
+ id: "did:ixo:entity:pending",
17444
+ type: ["ixo:dao"],
17445
+ name: "Blue Ventures",
17446
+ 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.",
17447
+ url: "https://blueventures.org/",
17448
+ sameAs: ["https://twitter.com/blueventures", "https://linkedin.com/company/blue-ventures", "https://facebook.com/blueventuresorg"],
17449
+ logo: {
17450
+ type: "schema:ImageObject",
17451
+ id: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png",
17452
+ contentUrl: "https://blueventures.org/wp-content/uploads/2023/08/BlueVentures_logo.png"
17453
+ },
17454
+ image: [
17455
+ {
17456
+ type: "schema:ImageObject",
17457
+ id: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg",
17458
+ contentUrl: "https://blueventures.org/wp-content/uploads/2024/01/bluecarbon_seascape.jpg"
17459
+ }
17460
+ ],
17461
+ keywords: ["Marine Conservation", "Blue Carbon", "Mangrove Restoration", "Sustainable Fisheries", "Community-Led Conservation"],
17462
+ knowsAbout: ["community-based conservation models", "blue carbon ecosystems", "mangrove reforestation", "marine protected area development"],
17463
+ address: {
17464
+ type: "schema:PostalAddress",
17465
+ streetAddress: "22-26 Station Road",
17466
+ addressLocality: "Bristol",
17467
+ addressRegion: "England",
17468
+ postalCode: "BS1 4RQ",
17469
+ addressCountry: "GB"
17470
+ },
17471
+ areaServed: {
17472
+ type: "schema:AdministrativeArea",
17473
+ name: "Global Coastal Regions"
17474
+ },
17475
+ contactPoint: [
17476
+ {
17477
+ type: "schema:ContactPoint",
17478
+ contactType: "general",
17479
+ email: "info@blueventures.org"
17480
+ }
17481
+ ],
17482
+ relationships: {
17483
+ memberOf: [
17484
+ { type: "schema:Organization", name: "The Blue Carbon Initiative" },
17485
+ { type: "schema:Organization", name: "Global Mangrove Alliance" }
17486
+ ],
17487
+ "prov:wasAssociatedWith": [
17488
+ { type: "schema:Organization", name: "WWF", url: "https://wwf.org" },
17489
+ { type: "schema:Organization", name: "The Nature Conservancy" }
17490
+ ],
17491
+ funding: [
17492
+ {
17493
+ type: "schema:MonetaryGrant",
17494
+ funder: { type: "schema:Organization", name: "UK Aid / FCDO" }
17495
+ }
17496
+ ]
17497
+ },
17498
+ researchProfile: {
17499
+ type: "ixo:ResearchProfile",
17500
+ "ixo:seedQueries": ["Blue Ventures blue carbon community conservation"],
17501
+ citation: [
17502
+ {
17503
+ type: "schema:CreativeWork",
17504
+ name: "Blue Carbon Ecosystems in Madagascar",
17505
+ url: "https://blueventures.org/blue-carbon/",
17506
+ publisher: "Blue Ventures",
17507
+ datePublished: "2023-11-14"
17508
+ }
17509
+ ],
17510
+ dateModified: "2025-01-15"
17511
+ }
17512
+ };
17513
+
17425
17514
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
17426
17515
  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;
17516
+ var IS_DEV = false;
17517
+ function isPreviewDataReady(domainPreviewData) {
17518
+ if (!domainPreviewData || domainPreviewData === "{}") return false;
17430
17519
  try {
17431
- const parsed = JSON.parse(domainCardData);
17520
+ const parsed = JSON.parse(domainPreviewData);
17432
17521
  return Boolean(parsed && typeof parsed === "object" && parsed.name);
17433
17522
  } catch {
17434
17523
  return false;
17435
17524
  }
17436
17525
  }
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
17526
  var DomainCardViewerFlowView = ({ editor, block }) => {
17455
17527
  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]);
17528
+ const domainPreviewData = block.props.domainPreviewData || "{}";
17529
+ const isDataReady = isPreviewDataReady(domainPreviewData);
17530
+ console.log("block.props", block.props);
17465
17531
  useEffect49(() => {
17466
17532
  if (status === "pending" && isDataReady) {
17467
17533
  editor.updateBlock(block, {
@@ -17489,7 +17555,8 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17489
17555
  editor.updateBlock(block, {
17490
17556
  props: {
17491
17557
  ...block.props,
17492
- domainCardData: JSON.stringify(dummyDomainCardData),
17558
+ domainPreviewData: JSON.stringify(dummyDomainCardData),
17559
+ domainCardData: JSON.stringify(dummyCredentialSubject),
17493
17560
  status: "ready",
17494
17561
  loadingMessage: "",
17495
17562
  errorMessage: ""
@@ -17517,6 +17584,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17517
17584
  editor.updateBlock(block, {
17518
17585
  props: {
17519
17586
  ...block.props,
17587
+ domainPreviewData: "{}",
17520
17588
  domainCardData: "{}",
17521
17589
  status: "pending",
17522
17590
  loadingMessage: "",
@@ -17556,7 +17624,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17556
17624
  }
17557
17625
  };
17558
17626
  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 })))));
17627
+ 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
17628
  };
17561
17629
 
17562
17630
  // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
@@ -17576,7 +17644,11 @@ var DomainCardViewerBlockSpec = createReactBlockSpec17(
17576
17644
  title: { default: "" },
17577
17645
  description: { default: "" },
17578
17646
  icon: { default: "dots-circle" },
17579
- // Core domain card data (JSON string, injected by oracle)
17647
+ // Preview data for UI display (JSON string, injected by oracle)
17648
+ // Uses DomainCardResponse format with faq, summary, logo_url, etc.
17649
+ domainPreviewData: { default: "{}" },
17650
+ // Credential subject data for signing (JSON string, injected by oracle)
17651
+ // Uses DomainCardCredentialSubject format for W3C VC
17580
17652
  domainCardData: { default: "{}" },
17581
17653
  // Status tracking for oracle workflow
17582
17654
  status: { default: "pending" },
@@ -17767,7 +17839,7 @@ blockRegistry.register({
17767
17839
  });
17768
17840
 
17769
17841
  // src/mantine/blocks/hooks/useBlockDependencies.ts
17770
- import { useMemo as useMemo60, useEffect as useEffect50, useState as useState66, useCallback as useCallback50 } from "react";
17842
+ import { useMemo as useMemo60, useEffect as useEffect50, useState as useState67, useCallback as useCallback50 } from "react";
17771
17843
 
17772
17844
  // src/mantine/blocks/hooks/useDependsOn.ts
17773
17845
  import { useMemo as useMemo61 } from "react";
@@ -18123,7 +18195,6 @@ var getExtraSlashMenuItems = (editor) => {
18123
18195
  title: "",
18124
18196
  description: "",
18125
18197
  icon: "feather",
18126
- domainCardData: "{}",
18127
18198
  entityType: "",
18128
18199
  status: "pending",
18129
18200
  entityDid: "",
@@ -18151,6 +18222,7 @@ var getExtraSlashMenuItems = (editor) => {
18151
18222
  title: "",
18152
18223
  description: "",
18153
18224
  icon: "dots-circle",
18225
+ domainPreviewData: "{}",
18154
18226
  domainCardData: "{}",
18155
18227
  status: "pending",
18156
18228
  loadingMessage: "",
@@ -18245,14 +18317,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
18245
18317
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
18246
18318
 
18247
18319
  // src/core/hooks/useMatrixProvider.ts
18248
- import { useEffect as useEffect51, useState as useState67, useRef as useRef12, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18320
+ import { useEffect as useEffect51, useState as useState68, useRef as useRef11, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18249
18321
  import { MatrixProvider } from "@ixo/matrix-crdt";
18250
18322
  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);
18323
+ const [matrixProvider, setProvider] = useState68(null);
18324
+ const [status, setStatus] = useState68("disconnected");
18325
+ const isMountedRef = useRef11(true);
18326
+ const providerRef = useRef11(null);
18327
+ const retryTimeoutRef = useRef11(null);
18256
18328
  const providerOptions = useMemo62(
18257
18329
  () => ({
18258
18330
  translator: {
@@ -18794,7 +18866,7 @@ function useCreateCollaborativeIxoEditor(options) {
18794
18866
  }
18795
18867
 
18796
18868
  // src/mantine/components/CoverImage.tsx
18797
- import React196, { useState as useState68, useRef as useRef13, useEffect as useEffect53 } from "react";
18869
+ import React196, { useState as useState69, useRef as useRef12, useEffect as useEffect53 } from "react";
18798
18870
  import { Box as Box35, Group as Group62 } from "@mantine/core";
18799
18871
 
18800
18872
  // src/core/lib/imageTransform.ts
@@ -18929,10 +19001,10 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
18929
19001
 
18930
19002
  // src/mantine/components/Base/CoverImageButton.tsx
18931
19003
  import React195 from "react";
18932
- import { Button as Button36 } from "@mantine/core";
19004
+ import { Button as Button35 } from "@mantine/core";
18933
19005
  function CoverImageButton({ isActive = false, children, onClick, style }) {
18934
19006
  return /* @__PURE__ */ React195.createElement(
18935
- Button36,
19007
+ Button35,
18936
19008
  {
18937
19009
  onClick,
18938
19010
  variant: "filled",
@@ -18954,12 +19026,12 @@ function CoverImageButton({ isActive = false, children, onClick, style }) {
18954
19026
  // src/mantine/components/CoverImage.tsx
18955
19027
  function CoverImage({ coverImageUrl, logoUrl }) {
18956
19028
  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);
19029
+ const [isHovering, setIsHovering] = useState69(false);
19030
+ const [isRepositioning, setIsRepositioning] = useState69(false);
19031
+ const [coverPosition, setCoverPosition] = useState69(50);
19032
+ const coverFileInputRef = useRef12(null);
19033
+ const logoFileInputRef = useRef12(null);
19034
+ const [metadata, setMetadata] = useState69(() => editor?.getPageMetadata?.() || null);
18963
19035
  useEffect53(() => {
18964
19036
  if (!editor?._metadataManager) {
18965
19037
  return;
@@ -19247,7 +19319,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
19247
19319
  }
19248
19320
 
19249
19321
  // src/mantine/components/PageHeader.tsx
19250
- import React197, { useState as useState69, useRef as useRef14, useEffect as useEffect54 } from "react";
19322
+ import React197, { useState as useState70, useRef as useRef13, useEffect as useEffect54 } from "react";
19251
19323
  function PageHeader({
19252
19324
  title = "New page",
19253
19325
  icon,
@@ -19258,8 +19330,8 @@ function PageHeader({
19258
19330
  isFavorited = false,
19259
19331
  menuItems = []
19260
19332
  }) {
19261
- const [isMenuOpen, setIsMenuOpen] = useState69(false);
19262
- const menuRef = useRef14(null);
19333
+ const [isMenuOpen, setIsMenuOpen] = useState70(false);
19334
+ const menuRef = useRef13(null);
19263
19335
  useEffect54(() => {
19264
19336
  function handleClickOutside(event) {
19265
19337
  if (menuRef.current && !menuRef.current.contains(event.target)) {
@@ -19440,7 +19512,7 @@ var styles = {
19440
19512
  };
19441
19513
 
19442
19514
  // src/mantine/components/ExternalDropZone.tsx
19443
- import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef15, useState as useState70 } from "react";
19515
+ import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef14, useState as useState71 } from "react";
19444
19516
  import { Box as Box36 } from "@mantine/core";
19445
19517
  var SCROLL_ZONE_SIZE = 80;
19446
19518
  var SCROLL_SPEED = 12;
@@ -19453,14 +19525,14 @@ var ExternalDropZone = ({
19453
19525
  onPlacementCancel,
19454
19526
  children
19455
19527
  }) => {
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);
19528
+ const containerRef = useRef14(null);
19529
+ const [isValidDrag, setIsValidDrag] = useState71(false);
19530
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState71(false);
19531
+ const [indicatorStyle, setIndicatorStyle] = useState71({});
19532
+ const dropPositionRef = useRef14(null);
19533
+ const scrollAnimationRef = useRef14(null);
19534
+ const scrollDirectionRef = useRef14(null);
19535
+ const scrollContainerRef = useRef14(null);
19464
19536
  const getBlockElements = useCallback52(() => {
19465
19537
  if (!containerRef.current) return [];
19466
19538
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
@@ -19978,8 +20050,8 @@ function IxoEditor({
19978
20050
  }
19979
20051
 
19980
20052
  // 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";
20053
+ import React201, { useState as useState72 } from "react";
20054
+ 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
20055
  import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
19984
20056
  var EntitySigningSetup = ({
19985
20057
  opened,
@@ -19988,11 +20060,11 @@ var EntitySigningSetup = ({
19988
20060
  entityName,
19989
20061
  onSetup
19990
20062
  }) => {
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);
20063
+ const [pin, setPin] = useState72("");
20064
+ const [confirmPin, setConfirmPin] = useState72("");
20065
+ const [loading, setLoading] = useState72(false);
20066
+ const [error, setError] = useState72(null);
20067
+ const [success, setSuccess] = useState72(false);
19996
20068
  const handleSetup = async () => {
19997
20069
  if (pin.length < 4) {
19998
20070
  setError("PIN must be at least 4 characters");
@@ -20061,8 +20133,8 @@ var EntitySigningSetup = ({
20061
20133
  onChange: (e) => setConfirmPin(e.currentTarget.value),
20062
20134
  disabled: loading
20063
20135
  }
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,
20136
+ ), 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(
20137
+ Button36,
20066
20138
  {
20067
20139
  onClick: handleSetup,
20068
20140
  loading,
@@ -20074,9 +20146,9 @@ var EntitySigningSetup = ({
20074
20146
  };
20075
20147
 
20076
20148
  // 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";
20149
+ import React202, { useState as useState73, useEffect as useEffect56, useMemo as useMemo65 } from "react";
20150
+ 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";
20151
+ import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
20080
20152
  var FlowPermissionsPanel = ({
20081
20153
  editor,
20082
20154
  entityDid,
@@ -20085,9 +20157,9 @@ var FlowPermissionsPanel = ({
20085
20157
  onRevokePermission,
20086
20158
  getUserDisplayName
20087
20159
  }) => {
20088
- const [delegations, setDelegations] = useState72([]);
20089
- const [loading, setLoading] = useState72(true);
20090
- const [revoking, setRevoking] = useState72(null);
20160
+ const [delegations, setDelegations] = useState73([]);
20161
+ const [loading, setLoading] = useState73(true);
20162
+ const [revoking, setRevoking] = useState73(null);
20091
20163
  const rootCapability = useMemo65(() => editor.getRootCapability?.(), [editor]);
20092
20164
  useEffect56(() => {
20093
20165
  const loadDelegations = async () => {
@@ -20160,9 +20232,9 @@ var FlowPermissionsPanel = ({
20160
20232
  loading: revoking === capability.id,
20161
20233
  disabled: !!revoking
20162
20234
  },
20163
- /* @__PURE__ */ React202.createElement(IconTrash7, { size: 16 })
20235
+ /* @__PURE__ */ React202.createElement(IconTrash6, { size: 16 })
20164
20236
  ))))), /* @__PURE__ */ React202.createElement(
20165
- Button38,
20237
+ Button37,
20166
20238
  {
20167
20239
  leftSection: /* @__PURE__ */ React202.createElement(IconPlus5, { size: 16 }),
20168
20240
  variant: "light",
@@ -20173,13 +20245,13 @@ var FlowPermissionsPanel = ({
20173
20245
  };
20174
20246
 
20175
20247
  // src/mantine/components/GrantPermissionModal.tsx
20176
- import React203, { useState as useState73, useCallback as useCallback53 } from "react";
20248
+ import React203, { useState as useState74, useCallback as useCallback53 } from "react";
20177
20249
  import {
20178
20250
  Modal as Modal4,
20179
20251
  Stack as Stack128,
20180
20252
  Text as Text102,
20181
20253
  TextInput as TextInput7,
20182
- Button as Button39,
20254
+ Button as Button38,
20183
20255
  Group as Group65,
20184
20256
  Radio as Radio6,
20185
20257
  Checkbox as Checkbox12,
@@ -20205,20 +20277,20 @@ var GrantPermissionModal = ({
20205
20277
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
20206
20278
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
20207
20279
  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);
20280
+ const [recipientType, setRecipientType] = useState74("user");
20281
+ const [searchQuery, setSearchQuery] = useState74("");
20282
+ const [searchResults, setSearchResults] = useState74([]);
20283
+ const [searching, setSearching] = useState74(false);
20284
+ const [selectedRecipient, setSelectedRecipient] = useState74(null);
20285
+ const [manualDid, setManualDid] = useState74("");
20286
+ const [scopeType, setScopeType] = useState74("full");
20287
+ const [selectedBlocks, setSelectedBlocks] = useState74([]);
20288
+ const [expirationEnabled, setExpirationEnabled] = useState74(false);
20289
+ const [expirationDays, setExpirationDays] = useState74(30);
20290
+ const [canDelegate, setCanDelegate] = useState74(false);
20291
+ const [pin, setPin] = useState74("");
20292
+ const [loading, setLoading] = useState74(false);
20293
+ const [error, setError] = useState74(null);
20222
20294
  const handleSearch = useCallback53(async () => {
20223
20295
  if (searchQuery.length < 2) return;
20224
20296
  setSearching(true);
@@ -20329,7 +20401,7 @@ var GrantPermissionModal = ({
20329
20401
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
20330
20402
  }
20331
20403
  ), 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,
20404
+ Button38,
20333
20405
  {
20334
20406
  key: result.did,
20335
20407
  variant: "subtle",
@@ -20400,7 +20472,7 @@ var GrantPermissionModal = ({
20400
20472
  value: pin,
20401
20473
  onChange: (e) => setPin(e.currentTarget.value)
20402
20474
  }
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")))
20475
+ ), 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
20476
  );
20405
20477
  };
20406
20478
 
@@ -20506,4 +20578,4 @@ export {
20506
20578
  ixoGraphQLClient,
20507
20579
  getEntity
20508
20580
  };
20509
- //# sourceMappingURL=chunk-AOSYWSEN.mjs.map
20581
+ //# sourceMappingURL=chunk-3ER6BXWB.mjs.map