@reddb-io/ui 0.1.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.
Files changed (169) hide show
  1. package/LICENSE +17 -0
  2. package/bin/red-ui.js +259 -0
  3. package/build/CNAME +1 -0
  4. package/build/_app/env.js +1 -0
  5. package/build/_app/immutable/assets/0.C63jY5jX.css +1 -0
  6. package/build/_app/immutable/assets/10.Dblyk0Kr.css +1 -0
  7. package/build/_app/immutable/assets/EmptyState.RXcH7ryE.css +1 -0
  8. package/build/_app/immutable/assets/Workspace.BCzG1DsH.css +1 -0
  9. package/build/_app/immutable/assets/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2 +0 -0
  10. package/build/_app/immutable/assets/inter-cyrillic-wght-normal.DqGufNeO.woff2 +0 -0
  11. package/build/_app/immutable/assets/inter-greek-ext-wght-normal.DlzME5K_.woff2 +0 -0
  12. package/build/_app/immutable/assets/inter-greek-wght-normal.CkhJZR-_.woff2 +0 -0
  13. package/build/_app/immutable/assets/inter-latin-ext-wght-normal.DO1Apj_S.woff2 +0 -0
  14. package/build/_app/immutable/assets/inter-latin-wght-normal.Dx4kXJAl.woff2 +0 -0
  15. package/build/_app/immutable/assets/inter-vietnamese-wght-normal.CBcvBZtf.woff2 +0 -0
  16. package/build/_app/immutable/assets/jetbrains-mono-cyrillic-wght-normal.D73BlboJ.woff2 +0 -0
  17. package/build/_app/immutable/assets/jetbrains-mono-greek-wght-normal.Bw9x6K1M.woff2 +0 -0
  18. package/build/_app/immutable/assets/jetbrains-mono-latin-ext-wght-normal.DBQx-q_a.woff2 +0 -0
  19. package/build/_app/immutable/assets/jetbrains-mono-latin-wght-normal.B9CIFXIH.woff2 +0 -0
  20. package/build/_app/immutable/assets/jetbrains-mono-vietnamese-wght-normal.Bt-aOZkq.woff2 +0 -0
  21. package/build/_app/immutable/chunks/3j4cZ58b.js +1 -0
  22. package/build/_app/immutable/chunks/69_IOA4Y.js +1 -0
  23. package/build/_app/immutable/chunks/ALqaDrNQ.js +2 -0
  24. package/build/_app/immutable/chunks/BGcIe2ep.js +2 -0
  25. package/build/_app/immutable/chunks/BMHKbvs8.js +1 -0
  26. package/build/_app/immutable/chunks/BQHbwf54.js +916 -0
  27. package/build/_app/immutable/chunks/Bgso8cDH.js +311 -0
  28. package/build/_app/immutable/chunks/Bmgx1mfv.js +310 -0
  29. package/build/_app/immutable/chunks/BrvvOVaJ.js +1 -0
  30. package/build/_app/immutable/chunks/Bzak7iHL.js +1 -0
  31. package/build/_app/immutable/chunks/D9CTkMjK.js +1 -0
  32. package/build/_app/immutable/chunks/DIeogL5L.js +1 -0
  33. package/build/_app/immutable/chunks/DXY_Rxa7.js +113 -0
  34. package/build/_app/immutable/chunks/DhEqZVGG.js +1 -0
  35. package/build/_app/immutable/chunks/Ov8N-vxt.js +1 -0
  36. package/build/_app/immutable/chunks/oiO4RLqp.js +1 -0
  37. package/build/_app/immutable/entry/app.D_IVtpdv.js +2 -0
  38. package/build/_app/immutable/entry/start.3oC0UQ_Q.js +1 -0
  39. package/build/_app/immutable/nodes/0.CHPiFxDo.js +1 -0
  40. package/build/_app/immutable/nodes/1.BC_4YZ0h.js +1 -0
  41. package/build/_app/immutable/nodes/10.B7DMKSNc.js +60 -0
  42. package/build/_app/immutable/nodes/2.CAG5_cGP.js +1 -0
  43. package/build/_app/immutable/nodes/3.CAG5_cGP.js +1 -0
  44. package/build/_app/immutable/nodes/4.CAG5_cGP.js +1 -0
  45. package/build/_app/immutable/nodes/5.CAG5_cGP.js +1 -0
  46. package/build/_app/immutable/nodes/6.CAG5_cGP.js +1 -0
  47. package/build/_app/immutable/nodes/7.BZX9Iird.js +134 -0
  48. package/build/_app/immutable/nodes/8.CAG5_cGP.js +1 -0
  49. package/build/_app/immutable/nodes/9.CAG5_cGP.js +1 -0
  50. package/build/_app/version.json +1 -0
  51. package/build/favicon.png +0 -0
  52. package/build/index.html +59 -0
  53. package/dist/embed/RedUiEmbedRoot-BGoLxJf1.js +26562 -0
  54. package/dist/embed/RedUiEmbedRoot-BGoLxJf1.js.map +1 -0
  55. package/dist/embed/bundle-mjs-UuVRz3O4.js +3047 -0
  56. package/dist/embed/bundle-mjs-UuVRz3O4.js.map +1 -0
  57. package/dist/embed/core-QuRYvMt8.js +118 -0
  58. package/dist/embed/core-QuRYvMt8.js.map +1 -0
  59. package/dist/embed/index-B6ZQhCsu.js +577 -0
  60. package/dist/embed/index-B6ZQhCsu.js.map +1 -0
  61. package/dist/embed/index-client-ItCEU64C.js +3087 -0
  62. package/dist/embed/index-client-ItCEU64C.js.map +1 -0
  63. package/dist/embed/index-fad77a13.esm-BqPj0saH.js +1318 -0
  64. package/dist/embed/index-fad77a13.esm-BqPj0saH.js.map +1 -0
  65. package/dist/embed/index.js +11 -0
  66. package/dist/embed/index.js.map +1 -0
  67. package/dist/embed/sigma-node-border.esm-CGtlgqmo.js +432 -0
  68. package/dist/embed/sigma-node-border.esm-CGtlgqmo.js.map +1 -0
  69. package/dist/embed/sigma.esm-y0qgY-OC.js +2355 -0
  70. package/dist/embed/sigma.esm-y0qgY-OC.js.map +1 -0
  71. package/dist/embed/ui.css +1 -0
  72. package/package.json +101 -0
  73. package/src/app.css +238 -0
  74. package/src/lib/ActivityIndicator.svelte +100 -0
  75. package/src/lib/ClusterNode.svelte +119 -0
  76. package/src/lib/ClusterView.svelte +541 -0
  77. package/src/lib/CollectionHistory.svelte +266 -0
  78. package/src/lib/CollectionsView.svelte +14 -0
  79. package/src/lib/CommandPalette.svelte +237 -0
  80. package/src/lib/ConnectDropdown.svelte +222 -0
  81. package/src/lib/EmptyState.svelte +27 -0
  82. package/src/lib/LiveChanges.svelte +195 -0
  83. package/src/lib/MasterPasswordDialog.svelte +168 -0
  84. package/src/lib/PageHeader.svelte +32 -0
  85. package/src/lib/PendingChangesPanel.svelte +153 -0
  86. package/src/lib/QueryEditor.svelte +122 -0
  87. package/src/lib/ResultsPane.svelte +747 -0
  88. package/src/lib/SchemaTree.svelte +193 -0
  89. package/src/lib/SecurityView.svelte +255 -0
  90. package/src/lib/ShortcutOverlay.svelte +104 -0
  91. package/src/lib/Splash.svelte +46 -0
  92. package/src/lib/StatusBar.svelte +163 -0
  93. package/src/lib/SubNav.svelte +62 -0
  94. package/src/lib/Topbar.svelte +119 -0
  95. package/src/lib/Workspace.svelte +247 -0
  96. package/src/lib/activity.svelte.ts +91 -0
  97. package/src/lib/build-info.ts +41 -0
  98. package/src/lib/capability.ts +221 -0
  99. package/src/lib/cn.ts +6 -0
  100. package/src/lib/collection-catalog.ts +116 -0
  101. package/src/lib/collection-pages.ts +33 -0
  102. package/src/lib/connection-history.ts +301 -0
  103. package/src/lib/connections.svelte.ts +493 -0
  104. package/src/lib/embed/RedUiEmbedRoot.svelte +31 -0
  105. package/src/lib/embed/index.ts +234 -0
  106. package/src/lib/graph-loader/contract.ts +336 -0
  107. package/src/lib/graph-loader/drilldown.ts +334 -0
  108. package/src/lib/graph-loader/index.ts +13 -0
  109. package/src/lib/index.ts +114 -0
  110. package/src/lib/pending-changes.svelte.ts +149 -0
  111. package/src/lib/query-tabs.svelte.ts +130 -0
  112. package/src/lib/reddb/boot-params.ts +254 -0
  113. package/src/lib/reddb/cdc-stream-client.ts +234 -0
  114. package/src/lib/reddb/client.ts +698 -0
  115. package/src/lib/reddb/connection-bootstrap.ts +260 -0
  116. package/src/lib/reddb/connection-provider.contract.ts +72 -0
  117. package/src/lib/reddb/connection-provider.ts +72 -0
  118. package/src/lib/reddb/index.ts +14 -0
  119. package/src/lib/reddb/injected-client-provider.ts +76 -0
  120. package/src/lib/reddb/local-url-provider.ts +245 -0
  121. package/src/lib/reddb/secure-store.ts +41 -0
  122. package/src/lib/reddb/server-capabilities.ts +71 -0
  123. package/src/lib/reddb/tauri-encrypted-store.ts +64 -0
  124. package/src/lib/reddb/transports.ts +89 -0
  125. package/src/lib/reddb/types.ts +32 -0
  126. package/src/lib/reddb/uri.ts +54 -0
  127. package/src/lib/reddb/web-encrypted-store.ts +201 -0
  128. package/src/lib/renderers/DiffRenderer.svelte +184 -0
  129. package/src/lib/renderers/DocumentRenderer.svelte +134 -0
  130. package/src/lib/renderers/GraphRenderer.svelte +1328 -0
  131. package/src/lib/renderers/HypertableRenderer.svelte +253 -0
  132. package/src/lib/renderers/JsonRenderer.svelte +30 -0
  133. package/src/lib/renderers/KvRenderer.svelte +150 -0
  134. package/src/lib/renderers/QueueRenderer.svelte +286 -0
  135. package/src/lib/renderers/StatsRenderer.svelte +123 -0
  136. package/src/lib/renderers/TableRenderer.svelte +440 -0
  137. package/src/lib/renderers/VectorRenderer.svelte +388 -0
  138. package/src/lib/renderers/diff-render.ts +122 -0
  139. package/src/lib/renderers/diff.ts +9 -0
  140. package/src/lib/renderers/document-render.ts +64 -0
  141. package/src/lib/renderers/document.ts +9 -0
  142. package/src/lib/renderers/graph-render.ts +631 -0
  143. package/src/lib/renderers/graph-sigma.ts +395 -0
  144. package/src/lib/renderers/graph.ts +9 -0
  145. package/src/lib/renderers/hypertable-render.ts +320 -0
  146. package/src/lib/renderers/hypertable.ts +9 -0
  147. package/src/lib/renderers/index.ts +42 -0
  148. package/src/lib/renderers/json-render.ts +89 -0
  149. package/src/lib/renderers/json.ts +10 -0
  150. package/src/lib/renderers/kv-render.ts +193 -0
  151. package/src/lib/renderers/kv.ts +9 -0
  152. package/src/lib/renderers/queue-render.ts +197 -0
  153. package/src/lib/renderers/queue.ts +9 -0
  154. package/src/lib/renderers/registry.ts +68 -0
  155. package/src/lib/renderers/stats-render.ts +73 -0
  156. package/src/lib/renderers/stats.ts +9 -0
  157. package/src/lib/renderers/table-render.ts +156 -0
  158. package/src/lib/renderers/table.ts +11 -0
  159. package/src/lib/renderers/types.ts +33 -0
  160. package/src/lib/renderers/vector-render.ts +154 -0
  161. package/src/lib/renderers/vector.ts +9 -0
  162. package/src/lib/router.svelte.ts +163 -0
  163. package/src/lib/secureStore.svelte.ts +148 -0
  164. package/src/lib/shadow-dom-spike/ShadowDomSpikeCore.svelte +198 -0
  165. package/src/lib/shadow-dom-spike/mount-shadow-dom-spike.ts +94 -0
  166. package/src/lib/shortcuts.ts +22 -0
  167. package/src/lib/surface.ts +80 -0
  168. package/src/lib/tabs.svelte.ts +115 -0
  169. package/src/lib/theme.svelte.ts +63 -0
@@ -0,0 +1,134 @@
1
+ import"../chunks/Bzak7iHL.js";import{aj as z,aZ as Nt,aU as zt,aW as Lt,b9 as g,ae as It,$ as jt,a0 as l,am as o,b3 as s,bl as V,bi as m,aQ as Ve,bp as j,bv as ce}from"../chunks/oiO4RLqp.js";import{d as K,a as b,g as Mt,j as S,s as y,h as Y,i as Et,t as Ne}from"../chunks/BGcIe2ep.js";import{l as ne,s as oe,i as P,b as Gt}from"../chunks/D9CTkMjK.js";import{h as At,k as Rt}from"../chunks/BrvvOVaJ.js";import{I as re,U as ae,o as Ft,d as Pt,l as Ye,M as Ze,E as Tt,z as Ot,k as Ut,L as Dt,G as qt,r as Te,O as Bt,v as Oe}from"../chunks/Bmgx1mfv.js";import{p as Ht}from"../chunks/Ov8N-vxt.js";import"../chunks/69_IOA4Y.js";function Jt(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
2
+ * @license lucide-svelte v0.475.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */const r=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]];re(e,oe({name:"arrow-left"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function Vt(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
21
+ * @license lucide-svelte v0.475.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */const r=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}],["path",{d:"m3.3 7 8.7 5 8.7-5"}],["path",{d:"M12 22V12"}]];re(e,oe({name:"box"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function ze(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
40
+ * @license lucide-svelte v0.475.0 - ISC
41
+ *
42
+ * ISC License
43
+ *
44
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
45
+ *
46
+ * Permission to use, copy, modify, and/or distribute this software for any
47
+ * purpose with or without fee is hereby granted, provided that the above
48
+ * copyright notice and this permission notice appear in all copies.
49
+ *
50
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
51
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
52
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
53
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
54
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
55
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
56
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
57
+ *
58
+ */const r=[["path",{d:"m9 18 6-6-6-6"}]];re(e,oe({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function Yt(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
59
+ * @license lucide-svelte v0.475.0 - ISC
60
+ *
61
+ * ISC License
62
+ *
63
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
64
+ *
65
+ * Permission to use, copy, modify, and/or distribute this software for any
66
+ * purpose with or without fee is hereby granted, provided that the above
67
+ * copyright notice and this permission notice appear in all copies.
68
+ *
69
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
70
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
71
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
72
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
73
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
74
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
75
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
76
+ *
77
+ */const r=[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]];re(e,oe({name:"circle-dot"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function Ke(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
78
+ * @license lucide-svelte v0.475.0 - ISC
79
+ *
80
+ * ISC License
81
+ *
82
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
83
+ *
84
+ * Permission to use, copy, modify, and/or distribute this software for any
85
+ * purpose with or without fee is hereby granted, provided that the above
86
+ * copyright notice and this permission notice appear in all copies.
87
+ *
88
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
89
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
90
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
91
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
92
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
93
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
94
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
95
+ *
96
+ */const r=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"}]];re(e,oe({name:"file-json"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function Zt(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
97
+ * @license lucide-svelte v0.475.0 - ISC
98
+ *
99
+ * ISC License
100
+ *
101
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
102
+ *
103
+ * Permission to use, copy, modify, and/or distribute this software for any
104
+ * purpose with or without fee is hereby granted, provided that the above
105
+ * copyright notice and this permission notice appear in all copies.
106
+ *
107
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
108
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
109
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
110
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
111
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
112
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
113
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
114
+ *
115
+ */const r=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12"}]];re(e,oe({name:"link-2"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}function Kt(e,t){const n=ne(t,["children","$$slots","$$events","$$legacy"]);/**
116
+ * @license lucide-svelte v0.475.0 - ISC
117
+ *
118
+ * ISC License
119
+ *
120
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
121
+ *
122
+ * Permission to use, copy, modify, and/or distribute this software for any
123
+ * purpose with or without fee is hereby granted, provided that the above
124
+ * copyright notice and this permission notice appear in all copies.
125
+ *
126
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
127
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
128
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
129
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
130
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
131
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
132
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
133
+ *
134
+ */const r=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];re(e,oe({name:"upload"},()=>n,{get iconNode(){return r},children:(a,c)=>{var i=K(),u=z(i);ae(u,t,"default",{}),b(a,i)},$$slots:{default:!0}}))}const Le=1;class $ extends Error{constructor(t){super(t),this.name="GraphContractError"}}function te(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Z(e,t){for(const n of t){const r=e[n];if(r!=null&&r!=="")return r}}function Qt(e){const t=Z(e,["version","schema_version","schemaVersion"]);if(typeof t!="string"||t.trim()==="")throw new $(`Graph export is missing a "version" string. This viewer supports the version ${Le}.x contract.`);const n=Number.parseInt(t.split(".")[0]??"",10);if(!Number.isFinite(n))throw new $(`Graph export declares an unparseable version "${t}". This viewer supports version ${Le}.x.`);if(n!==Le)throw new $(`Unsupported graph export version "${t}". This viewer supports version ${Le}.x.`);return t}function Wt(e,t){if(!te(e))throw new $(`Graph node at index ${t} is not an object.`);const n=Z(e,["id","rid","_id","uid"]);if(n===void 0)throw new $(`Graph node at index ${t} is missing the required "id" field.`);const r=String(n),a=Z(e,["label","name","title"]),c=Z(e,["type","node_type","kind"]),i=e.community;return{id:r,label:a!==void 0?String(a):r,type:c!==void 0?String(c):void 0,community:typeof i=="number"?i:void 0,data:e}}function Xt(e,t){if(!te(e))throw new $(`Graph edge at index ${t} is not an object.`);const n=Z(e,["source","from","src","start","from_rid"]);if(n===void 0)throw new $(`Graph edge at index ${t} is missing the required "source" field.`);const r=Z(e,["target","to","dst","end","to_rid"]);if(r===void 0)throw new $(`Graph edge at index ${t} is missing the required "target" field.`);const a=Z(e,["kind","type","label","rel"]),c=String(n),i=String(r),u=Z(e,["id","rid"]);return{id:u!==void 0?String(u):`${c}->${i}:${a??""}#${t}`,source:c,target:i,type:a!==void 0?String(a):void 0,data:e}}function en(e){if(e==null)return[];if(!Array.isArray(e))throw new $('Graph export "communities" must be an array when present.');return e.map((t,n)=>{if(!te(t))throw new $(`Community at index ${n} is not an object.`);if(typeof t.id!="number")throw new $(`Community at index ${n} is missing a numeric "id".`);const r=t.id;return{id:r,label:typeof t.label=="string"?t.label:`Community ${r}`,color:typeof t.color=="string"?t.color:Ft(r),size:typeof t.size=="number"?t.size:0}})}function tn(e,t){const n={};for(const a of e)n[a.id]={...a.data,id:a.id,label:a.label,...a.type!==void 0?{node_type:a.type}:{}};const r={};for(const a of t)r[a.id]={...a.data,source:a.source,target:a.target,...a.type!==void 0?{type:a.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:e.length+t.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:n,edges:r}]}}}function nn(e){if(!te(e))throw new $('Graph export must be a JSON object with "version" and graph data.');const t=te(e.contract)?e.contract:null,n=Qt(t??e),r=t??(te(e.graph)?e.graph:e),a=r.nodes,c=r.edges;if(!Array.isArray(a))throw new $('Graph export "nodes" must be an array.');if(!Array.isArray(c))throw new $('Graph export "edges" must be an array.');const i=a.map(Wt),u=c.map(Xt),v=en(e.communities??r.communities);return{version:n,model:{nodes:i,edges:u,communities:v},result:tn(i,u),meta:te(e.meta)?e.meta:{}}}function Xe(e){let t;try{t=JSON.parse(e)}catch(n){const r=n instanceof Error?n.message:String(n);throw new $(`Graph export is not valid JSON: ${r}`)}return nn(t)}async function on(e,t={}){const n=t.fetch??globalThis.fetch;if(typeof n!="function")throw new $("No fetch implementation available to load the graph.");let r;try{r=await n(e)}catch(c){const i=c instanceof Error?c.message:String(c);throw new $(`Failed to fetch graph from "${e}": ${i}`)}if(!r.ok)throw new $(`Failed to load graph from "${e}": HTTP ${r.status} ${r.statusText}`.trim());const a=await r.text();return Xe(a)}const rn=["layer","layer_name","layerName","layer_id","layerId","domain","namespace"],an=["community","community_name","communityName","community_id","communityId"],sn=["component","component_name","componentName","component_id","componentId","package","module","service","collection","file","path"],et={id:"unassigned",label:"Unassigned",color:"#94a3b8"},ln=/^(#[0-9a-f]{3,8}|rgba?\([\d\s.,%+-]+\)|hsla?\([\d\s.,%+-]+\)|oklch\([\d\s.%+-]+(?:\/\s*[\d.]+%?)?\))$/i;function cn(e){const t=e.trim();return ln.test(t)?t:et.color}function $e(e,t){for(const n of t){const r=e[n];if(!(r==null||r==="")&&(typeof r=="string"||typeof r=="number"))return String(r)}return null}function Ie(e,t){return`${e}:${t.toLowerCase().replace(/[^a-z0-9._:/-]+/g,"-")}`}function dn(e){return new Map(e.communities.map(t=>[t.id,{label:t.label,color:cn(t.color)}]))}function un(e,t){const n=$e(e.data,rn);if(n)return{id:Ie("layer",n),label:n,color:"#94a3b8"};if(typeof e.community=="number"){const a=t.get(e.community);return{id:`community:${e.community}`,label:(a==null?void 0:a.label)??`Community ${e.community}`,color:(a==null?void 0:a.color)??"#94a3b8"}}const r=$e(e.data,an);return r?{id:Ie("community",r),label:r,color:"#94a3b8"}:et}function pn(e){const t=$e(e.data,sn);if(t)return{id:Ie("component",t),label:t};const n=e.type??$e(e.data,["node_type","kind"]);return n?{id:Ie("type",n),label:`${n} nodes`}:{id:"component:unassigned",label:"Unassigned"}}function Qe(e,t){let n=0,r=0,a=0;for(const c of t){const i=e.has(c.source),u=e.has(c.target);!i&&!u||(n+=1,i&&u?r+=1:a+=1)}return{connectionCount:n,internalConnectionCount:r,externalConnectionCount:a}}function vn(e,t){let n=0,r=0;for(const a of t)a.source===e.id&&(r+=1),a.target===e.id&&(n+=1);return{id:e.id,label:e.label,type:e.type??$e(e.data,["node_type","kind"])??"node",degree:n+r,incoming:n,outgoing:r}}function We(e,t){const n=t.nodeCount-e.nodeCount;if(n!==0)return n;const r=t.connectionCount-e.connectionCount;if(r!==0)return r;const a=e.label.localeCompare(t.label);return a!==0?a:e.id.localeCompare(t.id)}function fn(e){const t=dn(e),n=new Map;for(const a of e.nodes){const c=un(a,t),i=n.get(c.id);i?i.nodes.push(a):n.set(c.id,{...c,nodes:[a]})}return{layers:[...n.values()].map(a=>{const c=a.nodes.map(w=>w.id),i=new Set(c),u=Qe(i,e.edges),v=new Map;for(const w of a.nodes){const _=pn(w),k=v.get(_.id);k?k.nodes.push(w):v.set(_.id,{..._,nodes:[w]})}const U=[...v.values()].map(w=>{const _=w.nodes.map(D=>D.id),k=Qe(new Set(_),e.edges);return{id:w.id,label:w.label,nodeCount:w.nodes.length,nodeIds:_,nodes:w.nodes.map(D=>vn(D,e.edges)).sort((D,de)=>de.degree-D.degree||D.label.localeCompare(de.label)),...k}}).sort(We);return{id:a.id,label:a.label,color:a.color,nodeCount:a.nodes.length,componentCount:U.length,nodeIds:c,components:U,...u}}).sort(We)}}function mn(e,t){const n=t===null?null:new Set(t),r=n?e.nodes.filter(v=>n.has(v.id)):e.nodes,a=new Set(r.map(v=>v.id)),c=e.edges.filter(v=>a.has(v.source)&&a.has(v.target)),i={};for(const v of r)i[v.id]={...v.data,id:v.id,label:v.label,...v.type!==void 0?{node_type:v.type}:{}};const u={};for(const v of c)u[v.id]={...v.data,source:v.source,target:v.target,...v.type!==void 0?{type:v.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:r.length+c.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:i,edges:u}]}}}var gn=S('<button type="button" aria-label="Back" class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3 hover:border-line-2 hover:text-fg-1"><!></button>'),bn=S('<span class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3"><!></span>'),xn=S('<!> <button type="button"> </button>',1),hn=S('<!> <span class="truncate rounded bg-bg-2 px-1.5 py-0.5 text-fg-0"> </span>',1),_n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1.5 size-2 rounded-full shrink-0"></span> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-[13px] font-medium text-fg-0"> </span> <span class="font-mono text-[10px] text-fg-3"> </span></span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),yn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),$n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),wn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),kn=S('<div class="px-3 py-2.5"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block truncate font-mono text-[11px] text-fg-3"> </span></span></div></div>'),Cn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),Sn=S('<div class="flex-1 min-h-0 overflow-auto"><!></div>'),Nn=S('<div class="flex items-center justify-between gap-4 px-3 py-2 border-b border-line-1 bg-bg-1 shrink-0"><span class="flex items-center gap-2 min-w-0 text-fg-2 text-[13px]"><!> <span class="font-mono text-fg-1 truncate max-w-[38vw]"> </span> <span class="text-fg-3 whitespace-nowrap"> <!></span></span> <button type="button" class="flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-line-1 text-fg-2 text-[12px] hover:border-fg-3 hover:text-fg-1"><!> Load another</button></div> <div class="flex-1 min-h-0 flex"><aside class="w-[min(320px,48vw)] shrink-0 border-r border-line-1 bg-bg-1/80 flex flex-col min-h-0"><div class="px-3 py-2 border-b border-line-1"><div class="flex items-center gap-2 text-fg-1"><!> <div class="min-w-0"><div class="type-label"><!></div> <div class="truncate text-[12px] font-medium text-fg-0"> </div></div></div> <nav class="mt-2 flex min-w-0 items-center gap-1 text-[11px] font-mono text-fg-3"><button type="button">overview</button> <!> <!></nav></div> <!></aside> <div class="flex-1 min-w-0"><!></div></div>',1),zn=S('<p class="m-0 px-3 py-2 rounded-md text-accent text-[12px] leading-relaxed border border-accent/35 bg-accent/10"> </p>'),Ln=S('<div class="flex flex-col gap-3 w-[min(34rem,90vw)] text-left"><form class="flex gap-2"><div class="relative flex-1 flex items-center"><!> <input class="w-full pl-8 pr-2.5 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] font-mono focus:outline-none focus:border-accent" type="text" placeholder="https://host/graph.json or /exports/memory.json" spellcheck="false" autocapitalize="off" autocorrect="off"/></div> <button class="px-4 py-2 bg-accent text-white rounded-md text-[13px] font-medium whitespace-nowrap disabled:opacity-50" type="submit"> </button></form> <div class="flex items-center gap-2 text-fg-3 text-[11px] uppercase tracking-wide"><span class="flex-1 h-px bg-line-1"></span> or <span class="flex-1 h-px bg-line-1"></span></div> <button type="button" class="flex items-center justify-center gap-2 px-3 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] hover:border-fg-3 disabled:opacity-50"><!> Choose a local graph.json</button> <input type="file" accept="application/json,.json" class="hidden"/> <!></div>'),In=S('<div class="flex items-center justify-center h-full w-full p-8"><!></div>'),jn=S('<div class="flex h-screen w-full flex-col"><!></div>');function On(e,t){Nt(t,!0);let n=V(null),r=V(!1),a=V(null),c=V(null),i=V(null),u=V(null),v=V(""),U=V(null);const w=ce(()=>o(n)?fn(o(n).model):null),_=ce(()=>{var p;return o(i)?(p=o(w))==null?void 0:p.layers.find(x=>x.id===o(i)):void 0}),k=ce(()=>{var p;return o(u)?(p=o(_))==null?void 0:p.components.find(x=>x.id===o(u)):void 0}),D=ce(()=>o(k)?o(k).nodeIds:o(_)?o(_).nodeIds:null),de=ce(()=>o(n)?mn(o(n).model,o(D)):null),tt=ce(()=>`${o(c)??"graph"}:${o(i)??"overview"}:${o(u)??"all"}`);async function Ue(p){const x=p.trim();if(x){g(r,!0),g(a,null);try{g(n,await on(x,{fetch}),!0),g(c,x,!0),we()}catch(I){g(n,null),g(a,I instanceof Error?I.message:String(I),!0)}finally{g(r,!1)}}}async function nt(p){g(r,!0),g(a,null);try{g(n,Xe(await p.text()),!0),g(c,p.name,!0),we()}catch(x){g(n,null),g(a,x instanceof Error?x.message:String(x),!0)}finally{g(r,!1)}}function ot(p){p.preventDefault(),Ue(o(v))}function rt(p){var I;const x=(I=p.target.files)==null?void 0:I[0];x&&nt(x)}function at(){g(n,null),g(a,null),g(c,null),g(v,""),we(),o(U)&&(o(U).value="")}function we(){g(i,null),g(u,null)}function st(p){g(i,p.id,!0),g(u,null)}function it(p){g(u,p.id,!0)}function lt(){if(o(u)){g(u,null);return}g(i,null)}function T(p,x){return`${p.toLocaleString()} ${x}${p===1?"":"s"}`}function je(p){const x=T(p.connectionCount,"connection");return p.externalConnectionCount===0?x:`${x} · ${p.externalConnectionCount.toLocaleString()} external`}zt(()=>{const p=Ht.url.searchParams.get("src");p&&(g(v,p,!0),Ue(p))});var Me=jn();At("315y67",p=>{It(()=>{jt.title="Load graph · red-ui"})});var ct=l(Me);{var dt=p=>{var x=Nn(),I=z(x),ke=l(I),Ce=l(ke);Ke(Ce,{size:14});var Q=m(Ce,2),se=l(Q,!0);s(Q);var ie=m(Q,2),ue=l(ie),pe=m(ue);{var ve=d=>{var f=Ne();j(()=>y(f,`· ${o(n).model.communities.length??""} communities`)),b(d,f)};P(pe,d=>{o(n).model.communities.length&&d(ve)})}s(ie),s(ke);var fe=m(ke,2),W=l(fe);Pt(W,{size:13}),Ve(),s(fe),s(I);var Se=m(I,2),X=l(Se),me=l(X),ge=l(me),N=l(ge);{var be=d=>{var f=gn(),C=l(f);Jt(C,{size:13}),s(f),Y("click",f,lt),b(d,f)},Ee=d=>{var f=bn(),C=l(f);Dt(C,{size:13}),s(f),b(d,f)};P(N,d=>{o(_)?d(be):d(Ee,-1)})}var De=m(N,2),Ge=l(De),pt=l(Ge);{var vt=d=>{var f=Ne("nodes");b(d,f)},ft=d=>{var f=Ne("components");b(d,f)},mt=d=>{var f=Ne("overview");b(d,f)};P(pt,d=>{o(k)?d(vt):o(_)?d(ft,1):d(mt,-1)})}s(Ge);var qe=m(Ge,2),gt=l(qe,!0);s(qe),s(De),s(ge);var Be=m(ge,2),Ae=l(Be),He=m(Ae,2);{var bt=d=>{var f=xn(),C=z(f);ze(C,{size:12,class:"shrink-0"});var M=m(C,2),xe=l(M,!0);s(M),j(Re=>{Ze(M,1,Re),y(xe,o(_).label)},[()=>Ye(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",o(_)&&!o(k)?"text-fg-0 bg-bg-2":""].join(" "))]),Y("click",M,()=>g(u,null)),b(d,f)};P(He,d=>{o(_)&&d(bt)})}var xt=m(He,2);{var ht=d=>{var f=hn(),C=z(f);ze(C,{size:12,class:"shrink-0"});var M=m(C,2),xe=l(M,!0);s(M),j(()=>y(xe,o(k).label)),b(d,f)};P(xt,d=>{o(k)&&d(ht)})}s(Be),s(me);var _t=m(me,2);{var yt=d=>{var f=Sn(),C=l(f);{var M=O=>{var q=yn(),E=z(q),he=l(E);s(E);var B=m(E,2);Te(B,21,()=>o(w).layers,Oe,(G,h)=>{var L=_n(),H=l(L),R=l(H),ee=m(R,2),F=l(ee),A=l(F),_e=l(A,!0);s(A);var J=m(A,2),ye=l(J,!0);s(J),s(F);var le=m(F,2),Fe=l(le);s(le),s(ee);var Pe=m(ee,2);ze(Pe,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(H),s(L),j((kt,Ct,St)=>{Bt(R,`background:${o(h).color};box-shadow:0 0 8px ${o(h).color}`),y(_e,o(h).label),y(ye,kt),y(Fe,`${Ct??""} · ${St??""}`)},[()=>T(o(h).componentCount,"component"),()=>T(o(h).nodeCount,"node"),()=>je(o(h))]),Y("click",L,()=>st(o(h))),b(G,L)}),s(B),j((G,h)=>y(he,`${G??""} · ${h??""}`),[()=>T(o(w).layers.length,"group"),()=>T(o(n).model.nodes.length,"node")]),b(O,q)},xe=O=>{var q=wn(),E=z(q),he=l(E);s(E);var B=m(E,2);Te(B,21,()=>o(_).components,Oe,(G,h)=>{var L=$n(),H=l(L),R=l(H),ee=l(R);Vt(ee,{size:14}),s(R);var F=m(R,2),A=l(F),_e=l(A,!0);s(A);var J=m(A,2),ye=l(J);s(J),s(F);var le=m(F,2);ze(le,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(H),s(L),j((Fe,Pe)=>{y(_e,o(h).label),y(ye,`${Fe??""} · ${Pe??""}`)},[()=>T(o(h).nodeCount,"node"),()=>je(o(h))]),Y("click",L,()=>it(o(h))),b(G,L)}),s(B),j((G,h)=>y(he,`${G??""} · ${h??""}`),[()=>T(o(_).components.length,"component"),()=>T(o(_).nodeCount,"node")]),b(O,q)},Re=O=>{var q=Cn(),E=z(q),he=l(E);s(E);var B=m(E,2);Te(B,21,()=>o(k).nodes,Oe,(G,h)=>{var L=kn(),H=l(L),R=l(H),ee=l(R);Yt(ee,{size:13}),s(R);var F=m(R,2),A=l(F),_e=l(A,!0);s(A);var J=m(A,2),ye=l(J);s(J),s(F),s(H),s(L),j(le=>{y(_e,o(h).label),y(ye,`${o(h).type??""} · degree ${le??""} · ${o(h).id??""}`)},[()=>o(h).degree.toLocaleString()]),b(G,L)}),s(B),j((G,h)=>y(he,`${G??""} · ${h??""}`),[()=>T(o(k).nodes.length,"node"),()=>je(o(k))]),b(O,q)};P(C,O=>{o(_)?o(k)?O(Re,-1):O(xe,1):O(M)})}s(f),b(d,f)};P(_t,d=>{o(w)&&d(yt)})}s(X);var Je=m(X,2),$t=l(Je);{var wt=d=>{var f=K(),C=z(f);Rt(C,()=>o(tt),M=>{qt(M,{get result(){return o(de)}})}),b(d,f)};P($t,d=>{o(de)&&d(wt)})}s(Je),s(Se),j(d=>{var f,C;y(se,o(c)),y(ue,`${o(n).model.nodes.length??""} nodes · ${o(n).model.edges.length??""} edges`),y(gt,((f=o(k))==null?void 0:f.label)??((C=o(_))==null?void 0:C.label)??"Layers and communities"),Ze(Ae,1,d)},[()=>Ye(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",o(_)?"":"text-fg-0 bg-bg-2"].join(" "))]),Y("click",fe,at),Y("click",Ae,we),b(p,x)},ut=p=>{var x=In(),I=l(x);Tt(I,{title:"Load a graph",message:"Render any contract-conformant graph.json — memory exports, codebase graphs, or graphify output — from a URL, a path, or a local file. No connection required.",get icon(){return Ke},actions:Ce=>{var Q=Ln(),se=l(Q),ie=l(se),ue=l(ie);Zt(ue,{size:15,class:"absolute left-2.5 text-fg-3 pointer-events-none"});var pe=m(ue,2);Ot(pe),s(ie);var ve=m(ie,2),fe=l(ve,!0);s(ve),s(se);var W=m(se,4),Se=l(W);Kt(Se,{size:15}),Ve(),s(W);var X=m(W,2);Gt(X,N=>g(U,N),()=>o(U));var me=m(X,2);{var ge=N=>{var be=zn(),Ee=l(be,!0);s(be),j(()=>y(Ee,o(a))),b(N,be)};P(me,N=>{o(a)&&N(ge)})}s(Q),j(N=>{pe.disabled=o(r),ve.disabled=N,y(fe,o(r)?"Loading…":"Load"),W.disabled=o(r)},[()=>o(r)||!o(v).trim()]),Et("submit",se,ot),Ut(pe,()=>o(v),N=>g(v,N)),Y("click",W,()=>{var N;return(N=o(U))==null?void 0:N.click()}),Y("change",X,rt),b(Ce,Q)}}),s(x),b(p,x)};P(ct,p=>{o(n)?p(dt):p(ut,-1)})}s(Me),b(e,Me),Lt()}Mt(["click","change"]);export{On as component};
@@ -0,0 +1 @@
1
+ import"../chunks/Bzak7iHL.js";import"../chunks/69_IOA4Y.js";function t(o){}export{t as component};
@@ -0,0 +1 @@
1
+ import"../chunks/Bzak7iHL.js";import"../chunks/69_IOA4Y.js";function t(o){}export{t as component};
@@ -0,0 +1 @@
1
+ {"version":"1780461815305"}
File without changes
@@ -0,0 +1,59 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="/favicon.png" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#ffffff" />
8
+ <script>
9
+ // Apply persisted theme before paint to avoid a flash of the wrong theme.
10
+ // Default is light; dark is opt-in via the topbar toggle / Cmd-K command.
11
+ (function () {
12
+ try {
13
+ var t = localStorage.getItem('red-ui-theme');
14
+ document.documentElement.dataset.theme = t === 'dark' ? 'dark' : 'light';
15
+ } catch (_) {
16
+ document.documentElement.dataset.theme = 'light';
17
+ }
18
+ })();
19
+ </script>
20
+ <title>red-ui</title>
21
+ <link href="/_app/immutable/entry/start.3oC0UQ_Q.js" rel="modulepreload">
22
+ <link href="/_app/immutable/chunks/BMHKbvs8.js" rel="modulepreload">
23
+ <link href="/_app/immutable/chunks/oiO4RLqp.js" rel="modulepreload">
24
+ <link href="/_app/immutable/chunks/DIeogL5L.js" rel="modulepreload">
25
+ <link href="/_app/immutable/entry/app.D_IVtpdv.js" rel="modulepreload">
26
+ <link href="/_app/immutable/chunks/D9CTkMjK.js" rel="modulepreload">
27
+ <link href="/_app/immutable/chunks/BGcIe2ep.js" rel="modulepreload">
28
+ <link href="/_app/immutable/chunks/Bzak7iHL.js" rel="modulepreload">
29
+ <link href="/_app/immutable/nodes/0.CHPiFxDo.js" rel="modulepreload">
30
+ <link href="/_app/immutable/chunks/Bmgx1mfv.js" rel="modulepreload">
31
+ <link href="/_app/immutable/chunks/69_IOA4Y.js" rel="modulepreload">
32
+ <link href="/_app/immutable/chunks/Ov8N-vxt.js" rel="modulepreload">
33
+ <link href="/_app/immutable/chunks/BQHbwf54.js" rel="modulepreload">
34
+
35
+ <link href="/_app/immutable/assets/EmptyState.RXcH7ryE.css" rel="stylesheet">
36
+ <link href="/_app/immutable/assets/Workspace.BCzG1DsH.css" rel="stylesheet">
37
+ <link href="/_app/immutable/assets/0.C63jY5jX.css" rel="stylesheet">
38
+ </head>
39
+ <body data-sveltekit-preload-data="hover">
40
+ <div style="display: contents">
41
+ <script>
42
+ {
43
+ __sveltekit_1601qfm = {
44
+ base: ""
45
+ };
46
+
47
+ const element = document.currentScript.parentElement;
48
+
49
+ Promise.all([
50
+ import("/_app/immutable/entry/start.3oC0UQ_Q.js"),
51
+ import("/_app/immutable/entry/app.D_IVtpdv.js")
52
+ ]).then(([kit, app]) => {
53
+ kit.start(app, element);
54
+ });
55
+ }
56
+ </script>
57
+ </div>
58
+ </body>
59
+ </html>