likec4 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (969) hide show
  1. package/dist/__app__/react/likec4.tsx +44 -17
  2. package/dist/__app__/src/chunks/{-index-overview-DZ3H7kDb.js → -index-overview-B8AbCuYt.js} +6 -6
  3. package/dist/__app__/src/chunks/{likec4-BqIZe8Y0.js → likec4-DOemzWvz.js} +167 -120
  4. package/dist/__app__/src/chunks/{main-KEhBGhZ8.js → main-OEl3ruxE.js} +6509 -5309
  5. package/dist/__app__/src/chunks/{mantine-BnwtT_Nz.js → mantine-BqgMLMPH.js} +64 -58
  6. package/dist/__app__/src/chunks/{tanstack-router-Bc_WYOzY.js → tanstack-router-Mzh8n5Lx.js} +1 -1
  7. package/dist/__app__/src/main.js +1 -1
  8. package/dist/__app__/src/style.css +1 -1
  9. package/dist/__app__/webcomponent/webcomponent.js +5218 -3791
  10. package/dist/chunks/prompt.mjs +45 -0
  11. package/dist/cli/index.d.ts +1 -0
  12. package/dist/cli/index.mjs +213 -161
  13. package/dist/index.d.mts +1205 -1748
  14. package/dist/index.d.ts +16953 -0
  15. package/dist/index.mjs +1 -1
  16. package/dist/shared/likec4.Cjx4es-x.mjs +1224 -0
  17. package/icons/all.js +1 -1
  18. package/icons/aws/activate.js +10 -10
  19. package/icons/aws/alexa-for-business.js +10 -10
  20. package/icons/aws/amplify.js +10 -10
  21. package/icons/aws/apache-mxnet-on-aws.js +10 -10
  22. package/icons/aws/api-gateway.js +10 -10
  23. package/icons/aws/app-config.js +10 -10
  24. package/icons/aws/app-flow.js +10 -10
  25. package/icons/aws/app-mesh.js +10 -10
  26. package/icons/aws/app-runner.js +10 -10
  27. package/icons/aws/app-stream.js +10 -10
  28. package/icons/aws/app-sync.js +10 -10
  29. package/icons/aws/application-auto-scaling.js +10 -10
  30. package/icons/aws/application-composer.js +10 -10
  31. package/icons/aws/application-cost-profiler.js +10 -10
  32. package/icons/aws/application-discovery-service.js +10 -10
  33. package/icons/aws/application-migration-service.js +10 -10
  34. package/icons/aws/artifact.js +10 -10
  35. package/icons/aws/athena.js +10 -10
  36. package/icons/aws/audit-manager.js +10 -10
  37. package/icons/aws/augmented-ai-a2i.js +10 -10
  38. package/icons/aws/aurora.js +10 -10
  39. package/icons/aws/auto-scaling.js +10 -10
  40. package/icons/aws/backint-agent.js +10 -10
  41. package/icons/aws/backup.js +10 -10
  42. package/icons/aws/batch.js +10 -10
  43. package/icons/aws/billing-conductor.js +10 -10
  44. package/icons/aws/bottlerocket.js +10 -10
  45. package/icons/aws/braket.js +10 -10
  46. package/icons/aws/budgets.js +10 -10
  47. package/icons/aws/certificate-manager.js +10 -10
  48. package/icons/aws/chatbot.js +10 -10
  49. package/icons/aws/chime-sdk.js +10 -10
  50. package/icons/aws/chime-voice-connector.js +10 -10
  51. package/icons/aws/chime.js +10 -10
  52. package/icons/aws/clean-rooms.js +10 -10
  53. package/icons/aws/client-vpn.js +10 -10
  54. package/icons/aws/cloud-control-api.js +10 -10
  55. package/icons/aws/cloud-development-kit.js +10 -10
  56. package/icons/aws/cloud-directory.js +10 -10
  57. package/icons/aws/cloud-formation.js +10 -10
  58. package/icons/aws/cloud-front.js +10 -10
  59. package/icons/aws/cloud-hsm.js +10 -10
  60. package/icons/aws/cloud-map.js +10 -10
  61. package/icons/aws/cloud-search.js +10 -10
  62. package/icons/aws/cloud-shell.js +10 -10
  63. package/icons/aws/cloud-trail.js +10 -10
  64. package/icons/aws/cloud-wan.js +10 -10
  65. package/icons/aws/cloud-watch.js +10 -10
  66. package/icons/aws/cloud9.js +10 -10
  67. package/icons/aws/code-artifact.js +10 -10
  68. package/icons/aws/code-build.js +10 -10
  69. package/icons/aws/code-catalyst.js +10 -10
  70. package/icons/aws/code-commit.js +10 -10
  71. package/icons/aws/code-deploy.js +10 -10
  72. package/icons/aws/code-guru.js +10 -10
  73. package/icons/aws/code-pipeline.js +10 -10
  74. package/icons/aws/code-star.js +10 -10
  75. package/icons/aws/code-whisperer.js +10 -10
  76. package/icons/aws/cognito.js +10 -10
  77. package/icons/aws/command-line-interface.js +10 -10
  78. package/icons/aws/comprehend-medical.js +10 -10
  79. package/icons/aws/comprehend.js +10 -10
  80. package/icons/aws/compute-optimizer.js +10 -10
  81. package/icons/aws/config.js +10 -10
  82. package/icons/aws/connect.js +10 -10
  83. package/icons/aws/console-mobile-application.js +10 -10
  84. package/icons/aws/control-tower.js +10 -10
  85. package/icons/aws/corretto.js +10 -10
  86. package/icons/aws/cost-and-usage-report.js +10 -10
  87. package/icons/aws/cost-explorer.js +10 -10
  88. package/icons/aws/data-exchange.js +10 -10
  89. package/icons/aws/data-pipeline.js +10 -10
  90. package/icons/aws/data-sync.js +10 -10
  91. package/icons/aws/data-zone.js +10 -10
  92. package/icons/aws/database-migration-service.js +10 -10
  93. package/icons/aws/deep-composer.js +10 -10
  94. package/icons/aws/deep-learning-amis.js +10 -10
  95. package/icons/aws/deep-learning-containers.js +10 -10
  96. package/icons/aws/deep-lens.js +10 -10
  97. package/icons/aws/deep-racer.js +10 -10
  98. package/icons/aws/detective.js +10 -10
  99. package/icons/aws/dev-ops-guru.js +10 -10
  100. package/icons/aws/device-farm.js +10 -10
  101. package/icons/aws/direct-connect.js +10 -10
  102. package/icons/aws/directory-service.js +10 -10
  103. package/icons/aws/distro-for-open-telemetry.js +10 -10
  104. package/icons/aws/document-db.js +10 -10
  105. package/icons/aws/dynamo-db.js +10 -10
  106. package/icons/aws/ec2-auto-scaling.js +10 -10
  107. package/icons/aws/ec2-image-builder.js +10 -10
  108. package/icons/aws/ec2.js +10 -10
  109. package/icons/aws/ecs-anywhere.js +10 -10
  110. package/icons/aws/efs.js +10 -10
  111. package/icons/aws/eks-anywhere.js +10 -10
  112. package/icons/aws/eks-cloud.js +10 -10
  113. package/icons/aws/eks-distro.js +10 -10
  114. package/icons/aws/elasti-cache.js +10 -10
  115. package/icons/aws/elastic-beanstalk.js +10 -10
  116. package/icons/aws/elastic-block-store.js +10 -10
  117. package/icons/aws/elastic-container-registry.js +10 -10
  118. package/icons/aws/elastic-container-service.js +10 -10
  119. package/icons/aws/elastic-disaster-recovery.js +10 -10
  120. package/icons/aws/elastic-fabric-adapter.js +10 -10
  121. package/icons/aws/elastic-inference.js +10 -10
  122. package/icons/aws/elastic-kubernetes-service.js +10 -10
  123. package/icons/aws/elastic-load-balancing.js +10 -10
  124. package/icons/aws/elastic-transcoder.js +10 -10
  125. package/icons/aws/elemental-appliances-software.js +10 -10
  126. package/icons/aws/elemental-conductor.js +10 -10
  127. package/icons/aws/elemental-delta.js +10 -10
  128. package/icons/aws/elemental-link.js +10 -10
  129. package/icons/aws/elemental-live.js +10 -10
  130. package/icons/aws/elemental-media-connect.js +10 -10
  131. package/icons/aws/elemental-media-convert.js +10 -10
  132. package/icons/aws/elemental-media-live.js +10 -10
  133. package/icons/aws/elemental-media-package.js +10 -10
  134. package/icons/aws/elemental-media-store.js +10 -10
  135. package/icons/aws/elemental-media-tailor.js +10 -10
  136. package/icons/aws/elemental-server.js +10 -10
  137. package/icons/aws/emr.js +10 -10
  138. package/icons/aws/event-bridge.js +10 -10
  139. package/icons/aws/express-workflows.js +10 -10
  140. package/icons/aws/fargate.js +10 -10
  141. package/icons/aws/fault-injection-simulator.js +10 -10
  142. package/icons/aws/file-cache.js +10 -10
  143. package/icons/aws/fin-space.js +10 -10
  144. package/icons/aws/firewall-manager.js +10 -10
  145. package/icons/aws/forecast.js +10 -10
  146. package/icons/aws/fraud-detector.js +10 -10
  147. package/icons/aws/free-rtos.js +10 -10
  148. package/icons/aws/fsx-for-lustre.js +10 -10
  149. package/icons/aws/fsx-for-net-app-ontap.js +10 -10
  150. package/icons/aws/fsx-for-open-zfs.js +10 -10
  151. package/icons/aws/fsx-for-wfs.js +10 -10
  152. package/icons/aws/fsx.js +10 -10
  153. package/icons/aws/game-kit.js +10 -10
  154. package/icons/aws/game-lift.js +10 -10
  155. package/icons/aws/game-sparks.js +10 -10
  156. package/icons/aws/genomics-cli.js +10 -10
  157. package/icons/aws/global-accelerator.js +10 -10
  158. package/icons/aws/glue-data-brew.js +10 -10
  159. package/icons/aws/glue-elastic-views.js +10 -10
  160. package/icons/aws/glue.js +10 -10
  161. package/icons/aws/ground-station.js +10 -10
  162. package/icons/aws/guard-duty.js +10 -10
  163. package/icons/aws/health-lake.js +10 -10
  164. package/icons/aws/honeycode.js +10 -10
  165. package/icons/aws/iam-identity-center.js +10 -10
  166. package/icons/aws/identity-and-access-management.js +10 -10
  167. package/icons/aws/inspector.js +10 -10
  168. package/icons/aws/interactive-video-service.js +10 -10
  169. package/icons/aws/io-t-1-click.js +10 -10
  170. package/icons/aws/io-t-analytics.js +10 -10
  171. package/icons/aws/io-t-button.js +10 -10
  172. package/icons/aws/io-t-core.js +10 -10
  173. package/icons/aws/io-t-device-defender.js +10 -10
  174. package/icons/aws/io-t-device-management.js +10 -10
  175. package/icons/aws/io-t-edu-kit.js +10 -10
  176. package/icons/aws/io-t-events.js +10 -10
  177. package/icons/aws/io-t-express-link.js +10 -10
  178. package/icons/aws/io-t-fleet-wise.js +10 -10
  179. package/icons/aws/io-t-greengrass.js +10 -10
  180. package/icons/aws/io-t-robo-runner.js +10 -10
  181. package/icons/aws/io-t-site-wise.js +10 -10
  182. package/icons/aws/io-t-things-graph.js +10 -10
  183. package/icons/aws/io-t-twin-maker.js +9 -9
  184. package/icons/aws/iq.js +10 -10
  185. package/icons/aws/kendra.js +10 -10
  186. package/icons/aws/key-management-service.js +10 -10
  187. package/icons/aws/keyspaces.js +10 -10
  188. package/icons/aws/kinesis-data-analytics.js +10 -10
  189. package/icons/aws/kinesis-data-streams.js +10 -10
  190. package/icons/aws/kinesis-firehose.js +10 -10
  191. package/icons/aws/kinesis-video-streams.js +10 -10
  192. package/icons/aws/kinesis.js +10 -10
  193. package/icons/aws/lake-formation.js +10 -10
  194. package/icons/aws/lambda.js +10 -10
  195. package/icons/aws/launch-wizard.js +10 -10
  196. package/icons/aws/lex.js +10 -10
  197. package/icons/aws/license-manager.js +10 -10
  198. package/icons/aws/lightsail.js +10 -10
  199. package/icons/aws/local-zones.js +10 -10
  200. package/icons/aws/location-service.js +10 -10
  201. package/icons/aws/lookout-for-equipment.js +10 -10
  202. package/icons/aws/lookout-for-metrics.js +10 -10
  203. package/icons/aws/lookout-for-vision.js +10 -10
  204. package/icons/aws/lumberyard.js +10 -10
  205. package/icons/aws/macie.js +10 -10
  206. package/icons/aws/mainframe-modernization.js +10 -10
  207. package/icons/aws/managed-blockchain.js +10 -10
  208. package/icons/aws/managed-grafana.js +10 -10
  209. package/icons/aws/managed-service-for-prometheus.js +10 -10
  210. package/icons/aws/managed-services.js +10 -10
  211. package/icons/aws/managed-streaming-for-apache-kafka.js +10 -10
  212. package/icons/aws/managed-workflows-for-apache-airflow.js +10 -10
  213. package/icons/aws/management-console.js +10 -10
  214. package/icons/aws/marketplace-dark.js +6 -6
  215. package/icons/aws/marketplace-light.js +6 -6
  216. package/icons/aws/memory-db-for-redis.js +10 -10
  217. package/icons/aws/migration-evaluator.js +10 -10
  218. package/icons/aws/migration-hub.js +10 -10
  219. package/icons/aws/monitron.js +10 -10
  220. package/icons/aws/mq.js +10 -10
  221. package/icons/aws/neptune.js +10 -10
  222. package/icons/aws/network-firewall.js +10 -10
  223. package/icons/aws/neuron.js +10 -10
  224. package/icons/aws/nice-dcv.js +10 -10
  225. package/icons/aws/nice-engin-frame.js +10 -10
  226. package/icons/aws/nimble-studio.js +10 -10
  227. package/icons/aws/nitro-enclaves.js +10 -10
  228. package/icons/aws/omics.js +10 -10
  229. package/icons/aws/open-3d-engine.js +10 -10
  230. package/icons/aws/open-search-service.js +10 -10
  231. package/icons/aws/ops-works.js +10 -10
  232. package/icons/aws/organizations.js +10 -10
  233. package/icons/aws/outposts-family.js +10 -10
  234. package/icons/aws/outposts-rack.js +10 -10
  235. package/icons/aws/outposts-servers.js +10 -10
  236. package/icons/aws/panorama.js +10 -10
  237. package/icons/aws/parallel-cluster.js +10 -10
  238. package/icons/aws/personal-health-dashboard.js +10 -10
  239. package/icons/aws/personalize.js +10 -10
  240. package/icons/aws/pinpoint-apis.js +10 -10
  241. package/icons/aws/pinpoint.js +10 -10
  242. package/icons/aws/polly.js +10 -10
  243. package/icons/aws/private-5g.js +10 -10
  244. package/icons/aws/private-certificate-authority.js +12 -12
  245. package/icons/aws/private-link.js +10 -10
  246. package/icons/aws/professional-services.js +10 -10
  247. package/icons/aws/proton.js +10 -10
  248. package/icons/aws/quantum-ledger-database.js +10 -10
  249. package/icons/aws/quick-sight.js +10 -10
  250. package/icons/aws/rds-on-vmware.js +10 -10
  251. package/icons/aws/rds.js +10 -10
  252. package/icons/aws/re-post.js +10 -10
  253. package/icons/aws/red-hat-open-shift-service-on-aws.js +10 -10
  254. package/icons/aws/redshift.js +10 -10
  255. package/icons/aws/rekognition.js +10 -10
  256. package/icons/aws/reserved-instance-reporting.js +10 -10
  257. package/icons/aws/resilience-hub.js +10 -10
  258. package/icons/aws/resource-access-manager.js +10 -10
  259. package/icons/aws/resource-explorer.js +10 -10
  260. package/icons/aws/robo-maker.js +10 -10
  261. package/icons/aws/route-53.js +10 -10
  262. package/icons/aws/s3-on-outposts.js +10 -10
  263. package/icons/aws/sage-maker-ground-truth.js +10 -10
  264. package/icons/aws/sage-maker-studio-lab.js +10 -10
  265. package/icons/aws/sage-maker.js +10 -10
  266. package/icons/aws/savings-plans.js +10 -10
  267. package/icons/aws/secrets-manager.js +10 -10
  268. package/icons/aws/security-hub.js +10 -10
  269. package/icons/aws/security-lake.js +10 -10
  270. package/icons/aws/server-migration-service.js +10 -10
  271. package/icons/aws/serverless-application-repository.js +10 -10
  272. package/icons/aws/service-catalog.js +10 -10
  273. package/icons/aws/service-management-connector.js +12 -12
  274. package/icons/aws/shield.js +10 -10
  275. package/icons/aws/signer.js +10 -10
  276. package/icons/aws/sim-space-weaver.js +10 -10
  277. package/icons/aws/simple-email-service.js +10 -10
  278. package/icons/aws/simple-notification-service.js +10 -10
  279. package/icons/aws/simple-queue-service.js +10 -10
  280. package/icons/aws/simple-storage-service-glacier.js +10 -10
  281. package/icons/aws/simple-storage-service.js +10 -10
  282. package/icons/aws/site-to-site-vpn.js +10 -10
  283. package/icons/aws/snowball-edge.js +10 -10
  284. package/icons/aws/snowball.js +10 -10
  285. package/icons/aws/snowcone.js +10 -10
  286. package/icons/aws/snowmobile.js +10 -10
  287. package/icons/aws/step-functions.js +10 -10
  288. package/icons/aws/storage-gateway.js +10 -10
  289. package/icons/aws/sumerian.js +10 -10
  290. package/icons/aws/supply-chain.js +10 -10
  291. package/icons/aws/support.js +10 -10
  292. package/icons/aws/systems-manager.js +10 -10
  293. package/icons/aws/tensor-flow-on-aws.js +10 -10
  294. package/icons/aws/textract.js +10 -10
  295. package/icons/aws/thinkbox-deadline.js +10 -10
  296. package/icons/aws/thinkbox-frost.js +10 -10
  297. package/icons/aws/thinkbox-krakatoa.js +10 -10
  298. package/icons/aws/thinkbox-sequoia.js +10 -10
  299. package/icons/aws/thinkbox-stoke.js +10 -10
  300. package/icons/aws/thinkbox-xmesh.js +10 -10
  301. package/icons/aws/timestream.js +10 -10
  302. package/icons/aws/tools-and-sdks.js +10 -10
  303. package/icons/aws/torch-serve.js +10 -10
  304. package/icons/aws/training-certification.js +10 -10
  305. package/icons/aws/transcribe.js +10 -10
  306. package/icons/aws/transfer-family.js +10 -10
  307. package/icons/aws/transit-gateway.js +10 -10
  308. package/icons/aws/translate.js +10 -10
  309. package/icons/aws/trusted-advisor.js +10 -10
  310. package/icons/aws/verified-access.js +10 -10
  311. package/icons/aws/verified-permissions.js +10 -10
  312. package/icons/aws/virtual-private-cloud.js +10 -10
  313. package/icons/aws/vmware-cloud-on-aws.js +10 -10
  314. package/icons/aws/vpc-lattice.js +10 -10
  315. package/icons/aws/waf.js +10 -10
  316. package/icons/aws/wavelength.js +10 -10
  317. package/icons/aws/well-architected-tool.js +10 -10
  318. package/icons/aws/wickr.js +10 -10
  319. package/icons/aws/work-docs-sdk.js +10 -10
  320. package/icons/aws/work-docs.js +10 -10
  321. package/icons/aws/work-link.js +10 -10
  322. package/icons/aws/work-mail.js +10 -10
  323. package/icons/aws/work-spaces-family.js +10 -10
  324. package/icons/aws/x-ray.js +10 -10
  325. package/icons/gcp/access-context-manager.js +7 -7
  326. package/icons/gcp/administration.js +14 -14
  327. package/icons/gcp/advanced-agent-modeling.js +9 -9
  328. package/icons/gcp/advanced-solutions-lab.js +32 -32
  329. package/icons/gcp/agent-assist.js +4 -4
  330. package/icons/gcp/ai-hub.js +13 -13
  331. package/icons/gcp/ai-platform-unified.js +11 -11
  332. package/icons/gcp/ai-platform.js +6 -6
  333. package/icons/gcp/analytics-hub.js +7 -7
  334. package/icons/gcp/anthos-config-management.js +7 -7
  335. package/icons/gcp/anthos-service-mesh.js +4 -4
  336. package/icons/gcp/anthos.js +8 -8
  337. package/icons/gcp/api-analytics.js +10 -10
  338. package/icons/gcp/api-monetization.js +13 -13
  339. package/icons/gcp/api.js +9 -9
  340. package/icons/gcp/apigee-api-platform.js +9 -9
  341. package/icons/gcp/apigee-sense.js +7 -7
  342. package/icons/gcp/app-engine.js +10 -10
  343. package/icons/gcp/artifact-registry.js +19 -19
  344. package/icons/gcp/asset-inventory.js +9 -9
  345. package/icons/gcp/assured-workloads.js +11 -11
  346. package/icons/gcp/auto-ml-natural-language.js +6 -6
  347. package/icons/gcp/auto-ml-tables.js +9 -9
  348. package/icons/gcp/auto-ml-translation.js +9 -9
  349. package/icons/gcp/auto-ml-video-intelligence.js +9 -9
  350. package/icons/gcp/auto-ml-vision.js +8 -8
  351. package/icons/gcp/auto-ml.js +10 -10
  352. package/icons/gcp/bare-metal-solutions.js +7 -7
  353. package/icons/gcp/batch.js +4 -4
  354. package/icons/gcp/beyondcorp.js +4 -4
  355. package/icons/gcp/big-query.js +11 -11
  356. package/icons/gcp/bigtable.js +22 -22
  357. package/icons/gcp/billing.js +14 -14
  358. package/icons/gcp/binary-authorization.js +7 -7
  359. package/icons/gcp/catalog.js +10 -10
  360. package/icons/gcp/certificate-authority-service.js +8 -8
  361. package/icons/gcp/certificate-manager.js +7 -7
  362. package/icons/gcp/cloud-api-gateway.js +4 -4
  363. package/icons/gcp/cloud-apis.js +14 -14
  364. package/icons/gcp/cloud-armor.js +11 -11
  365. package/icons/gcp/cloud-asset-inventory.js +7 -7
  366. package/icons/gcp/cloud-audit-logs.js +14 -14
  367. package/icons/gcp/cloud-build.js +9 -9
  368. package/icons/gcp/cloud-cdn.js +18 -18
  369. package/icons/gcp/cloud-code.js +12 -12
  370. package/icons/gcp/cloud-composer.js +9 -9
  371. package/icons/gcp/cloud-data-fusion.js +11 -11
  372. package/icons/gcp/cloud-deploy.js +7 -7
  373. package/icons/gcp/cloud-deployment-manager.js +14 -14
  374. package/icons/gcp/cloud-dns.js +16 -16
  375. package/icons/gcp/cloud-domains.js +9 -9
  376. package/icons/gcp/cloud-ekm.js +4 -4
  377. package/icons/gcp/cloud-endpoints.js +13 -13
  378. package/icons/gcp/cloud-external-ip-addresses.js +6 -6
  379. package/icons/gcp/cloud-firewall-rules.js +6 -6
  380. package/icons/gcp/cloud-for-marketing.js +4 -4
  381. package/icons/gcp/cloud-functions.js +19 -19
  382. package/icons/gcp/cloud-generic.js +4 -4
  383. package/icons/gcp/cloud-gpu.js +8 -8
  384. package/icons/gcp/cloud-healthcare-api.js +15 -15
  385. package/icons/gcp/cloud-healthcare-marketplace.js +7 -7
  386. package/icons/gcp/cloud-hsm.js +10 -10
  387. package/icons/gcp/cloud-ids.js +9 -9
  388. package/icons/gcp/cloud-inference-api.js +12 -12
  389. package/icons/gcp/cloud-interconnect.js +11 -11
  390. package/icons/gcp/cloud-jobs-api.js +12 -12
  391. package/icons/gcp/cloud-load-balancing.js +16 -16
  392. package/icons/gcp/cloud-logging.js +14 -14
  393. package/icons/gcp/cloud-media-edge.js +20 -20
  394. package/icons/gcp/cloud-monitoring.js +10 -10
  395. package/icons/gcp/cloud-nat.js +9 -9
  396. package/icons/gcp/cloud-natural-language-api.js +13 -13
  397. package/icons/gcp/cloud-network.js +13 -13
  398. package/icons/gcp/cloud-ops.js +12 -12
  399. package/icons/gcp/cloud-optimization-ai-fleet-routing-api.js +7 -7
  400. package/icons/gcp/cloud-optimization-ai.js +7 -7
  401. package/icons/gcp/cloud-router.js +4 -4
  402. package/icons/gcp/cloud-routes.js +8 -8
  403. package/icons/gcp/cloud-run-for-anthos.js +6 -6
  404. package/icons/gcp/cloud-run.js +9 -9
  405. package/icons/gcp/cloud-scheduler.js +13 -13
  406. package/icons/gcp/cloud-security-scanner.js +12 -12
  407. package/icons/gcp/cloud-shell.js +7 -7
  408. package/icons/gcp/cloud-spanner.js +11 -11
  409. package/icons/gcp/cloud-sql.js +12 -12
  410. package/icons/gcp/cloud-storage.js +18 -18
  411. package/icons/gcp/cloud-tasks.js +21 -21
  412. package/icons/gcp/cloud-test-lab.js +11 -11
  413. package/icons/gcp/cloud-tpu.js +22 -22
  414. package/icons/gcp/cloud-translation-api.js +6 -6
  415. package/icons/gcp/cloud-vision-api.js +12 -12
  416. package/icons/gcp/cloud-vpn.js +13 -13
  417. package/icons/gcp/compute-engine.js +13 -13
  418. package/icons/gcp/configuration-management.js +7 -7
  419. package/icons/gcp/connectivity-test.js +4 -4
  420. package/icons/gcp/connectors.js +10 -10
  421. package/icons/gcp/contact-center-ai.js +4 -4
  422. package/icons/gcp/container-optimized-os.js +4 -4
  423. package/icons/gcp/container-registry.js +23 -23
  424. package/icons/gcp/data-catalog.js +9 -9
  425. package/icons/gcp/data-labeling.js +15 -15
  426. package/icons/gcp/data-layers.js +8 -8
  427. package/icons/gcp/data-loss-prevention-api.js +14 -14
  428. package/icons/gcp/data-qn-a.js +9 -9
  429. package/icons/gcp/data-studio.js +12 -12
  430. package/icons/gcp/data-transfer.js +8 -8
  431. package/icons/gcp/database-migration-service.js +7 -7
  432. package/icons/gcp/dataflow.js +16 -16
  433. package/icons/gcp/datalab.js +4 -4
  434. package/icons/gcp/dataplex.js +6 -6
  435. package/icons/gcp/datapol.js +17 -17
  436. package/icons/gcp/dataprep.js +9 -9
  437. package/icons/gcp/dataproc-metastore.js +4 -4
  438. package/icons/gcp/dataproc.js +15 -15
  439. package/icons/gcp/datashare.js +9 -9
  440. package/icons/gcp/datastore.js +35 -35
  441. package/icons/gcp/datastream.js +13 -13
  442. package/icons/gcp/debugger.js +11 -11
  443. package/icons/gcp/developer-portal.js +8 -8
  444. package/icons/gcp/dialogflow-cx.js +7 -7
  445. package/icons/gcp/dialogflow-insights.js +11 -11
  446. package/icons/gcp/dialogflow.js +6 -6
  447. package/icons/gcp/document-ai.js +11 -11
  448. package/icons/gcp/early-access-center.js +4 -4
  449. package/icons/gcp/error-reporting.js +10 -10
  450. package/icons/gcp/eventarc.js +8 -8
  451. package/icons/gcp/filestore.js +10 -10
  452. package/icons/gcp/financial-services-marketplace.js +12 -12
  453. package/icons/gcp/firestore.js +10 -10
  454. package/icons/gcp/fleet-engine.js +7 -7
  455. package/icons/gcp/free-trial.js +12 -12
  456. package/icons/gcp/game-servers.js +17 -17
  457. package/icons/gcp/gce-systems-management.js +4 -4
  458. package/icons/gcp/genomics.js +19 -19
  459. package/icons/gcp/gke-on-prem.js +9 -9
  460. package/icons/gcp/google-cloud-marketplace.js +11 -11
  461. package/icons/gcp/google-kubernetes-engine.js +13 -13
  462. package/icons/gcp/google-maps-platform.js +9 -9
  463. package/icons/gcp/healthcare-nlp-api.js +4 -4
  464. package/icons/gcp/home.js +11 -11
  465. package/icons/gcp/identity-and-access-management.js +6 -6
  466. package/icons/gcp/identity-aware-proxy.js +10 -10
  467. package/icons/gcp/identity-platform.js +10 -10
  468. package/icons/gcp/iot-core.js +6 -6
  469. package/icons/gcp/iot-edge.js +38 -38
  470. package/icons/gcp/key-access-justifications.js +14 -14
  471. package/icons/gcp/key-management-service.js +6 -6
  472. package/icons/gcp/kuberun.js +8 -8
  473. package/icons/gcp/launcher.js +15 -15
  474. package/icons/gcp/local-ssd.js +4 -4
  475. package/icons/gcp/looker.js +9 -9
  476. package/icons/gcp/managed-service-for-microsoft-active-directory.js +12 -12
  477. package/icons/gcp/media-translation-api.js +7 -7
  478. package/icons/gcp/memorystore.js +10 -10
  479. package/icons/gcp/migrate-for-anthos.js +4 -4
  480. package/icons/gcp/migrate-for-compute-engine.js +4 -4
  481. package/icons/gcp/my-cloud.js +9 -9
  482. package/icons/gcp/network-connectivity-center.js +26 -26
  483. package/icons/gcp/network-intelligence-center.js +4 -4
  484. package/icons/gcp/network-security.js +10 -10
  485. package/icons/gcp/network-tiers.js +13 -13
  486. package/icons/gcp/network-topology.js +4 -4
  487. package/icons/gcp/onboarding.js +12 -12
  488. package/icons/gcp/os-configuration-management.js +4 -4
  489. package/icons/gcp/os-inventory-management.js +6 -6
  490. package/icons/gcp/os-patch-management.js +4 -4
  491. package/icons/gcp/partner-interconnect.js +11 -11
  492. package/icons/gcp/partner-portal.js +8 -8
  493. package/icons/gcp/performance-dashboard.js +4 -4
  494. package/icons/gcp/permissions.js +9 -9
  495. package/icons/gcp/persistent-disk.js +7 -7
  496. package/icons/gcp/phishing-protection.js +13 -13
  497. package/icons/gcp/policy-analyzer.js +4 -4
  498. package/icons/gcp/premium-network-tier.js +9 -9
  499. package/icons/gcp/private-connectivity.js +9 -9
  500. package/icons/gcp/private-service-connect.js +12 -12
  501. package/icons/gcp/producer-portal.js +9 -9
  502. package/icons/gcp/profiler.js +11 -11
  503. package/icons/gcp/project.js +15 -15
  504. package/icons/gcp/pub-sub.js +22 -22
  505. package/icons/gcp/quantum-engine.js +10 -10
  506. package/icons/gcp/quotas.js +15 -15
  507. package/icons/gcp/real-world-insights.js +9 -9
  508. package/icons/gcp/recommendations-ai.js +19 -19
  509. package/icons/gcp/release-notes.js +4 -4
  510. package/icons/gcp/retail-api.js +7 -7
  511. package/icons/gcp/risk-manager.js +4 -4
  512. package/icons/gcp/runtime-config.js +15 -15
  513. package/icons/gcp/secret-manager.js +4 -4
  514. package/icons/gcp/security-command-center.js +8 -8
  515. package/icons/gcp/security-health-advisor.js +14 -14
  516. package/icons/gcp/security-key-enforcement.js +6 -6
  517. package/icons/gcp/security.js +8 -8
  518. package/icons/gcp/service-discovery.js +16 -16
  519. package/icons/gcp/speech-to-text.js +17 -17
  520. package/icons/gcp/stackdriver.js +7 -7
  521. package/icons/gcp/standard-network-tier.js +4 -4
  522. package/icons/gcp/stream-suite.js +7 -7
  523. package/icons/gcp/support.js +9 -9
  524. package/icons/gcp/tensorflow-enterprise.js +4 -4
  525. package/icons/gcp/text-to-speech.js +8 -8
  526. package/icons/gcp/tools-for-powershell.js +13 -13
  527. package/icons/gcp/trace.js +12 -12
  528. package/icons/gcp/traffic-director.js +14 -14
  529. package/icons/gcp/transfer-appliance.js +10 -10
  530. package/icons/gcp/transfer.js +4 -4
  531. package/icons/gcp/user-preferences.js +9 -9
  532. package/icons/gcp/vertex-ai.js +27 -27
  533. package/icons/gcp/video-intelligence-api.js +6 -6
  534. package/icons/gcp/virtual-private-cloud.js +15 -15
  535. package/icons/gcp/visual-inspection.js +7 -7
  536. package/icons/gcp/vmware-engine.js +4 -4
  537. package/icons/gcp/web-risk.js +14 -14
  538. package/icons/gcp/web-security-scanner.js +11 -11
  539. package/icons/gcp/workflows.js +15 -15
  540. package/icons/gcp/workload-identity-pool.js +8 -8
  541. package/icons/tech/aarch64.js +10 -10
  542. package/icons/tech/adobe-illustrator.js +4 -4
  543. package/icons/tech/adobe-photoshop.js +4 -4
  544. package/icons/tech/adobe-premiere-pro.js +7 -7
  545. package/icons/tech/adobe-xd.js +4 -4
  546. package/icons/tech/adonis-js.js +4 -4
  547. package/icons/tech/after-effects.js +7 -7
  548. package/icons/tech/airflow.js +13 -13
  549. package/icons/tech/akka.js +6 -6
  550. package/icons/tech/algolia.js +4 -4
  551. package/icons/tech/alpine-js.js +6 -6
  552. package/icons/tech/amazon-web-services.js +6 -6
  553. package/icons/tech/anaconda.js +4 -4
  554. package/icons/tech/android-studio.js +11 -11
  555. package/icons/tech/android.js +8 -8
  556. package/icons/tech/angular-js.js +9 -9
  557. package/icons/tech/angular.js +7 -7
  558. package/icons/tech/ansible.js +6 -6
  559. package/icons/tech/ant-design.js +24 -24
  560. package/icons/tech/apache.js +74 -74
  561. package/icons/tech/apl.js +6 -6
  562. package/icons/tech/appcelerator.js +4 -4
  563. package/icons/tech/apple-safari.js +13 -13
  564. package/icons/tech/apple.js +4 -4
  565. package/icons/tech/appwrite.js +6 -6
  566. package/icons/tech/arch-linux.js +6 -6
  567. package/icons/tech/arduino.js +6 -6
  568. package/icons/tech/argo-cd.js +34 -34
  569. package/icons/tech/astro.js +14 -14
  570. package/icons/tech/atom.js +4 -4
  571. package/icons/tech/autodesk-maya.js +44 -44
  572. package/icons/tech/autodesk-shot-grid.js +6 -6
  573. package/icons/tech/awk.js +18 -18
  574. package/icons/tech/azios.js +4 -4
  575. package/icons/tech/azure-devops.js +11 -11
  576. package/icons/tech/azure-sql-database.js +22 -22
  577. package/icons/tech/azure.js +21 -21
  578. package/icons/tech/babel.js +6 -6
  579. package/icons/tech/backbone-js.js +7 -7
  580. package/icons/tech/ballerina.js +4 -4
  581. package/icons/tech/bamboo.js +14 -14
  582. package/icons/tech/bash.js +7 -7
  583. package/icons/tech/behance.js +9 -9
  584. package/icons/tech/bitbucket.js +9 -9
  585. package/icons/tech/blender.js +6 -6
  586. package/icons/tech/bootstrap.js +21 -21
  587. package/icons/tech/bower.js +18 -18
  588. package/icons/tech/browserstack.js +14 -14
  589. package/icons/tech/bulma.js +4 -4
  590. package/icons/tech/bun.js +17 -17
  591. package/icons/tech/c.js +7 -7
  592. package/icons/tech/cairo-graphics.js +6 -6
  593. package/icons/tech/cake-php.js +4 -4
  594. package/icons/tech/canva.js +6 -6
  595. package/icons/tech/capacitor.js +10 -10
  596. package/icons/tech/cassandra.js +17 -17
  597. package/icons/tech/cent-os.js +13 -13
  598. package/icons/tech/chrome.js +38 -38
  599. package/icons/tech/circle-ci.js +4 -4
  600. package/icons/tech/clarity.js +8 -8
  601. package/icons/tech/clion.js +30 -30
  602. package/icons/tech/clojure-script.js +8 -8
  603. package/icons/tech/clojure.js +9 -9
  604. package/icons/tech/cloudflare-workers.js +37 -37
  605. package/icons/tech/cloudflare.js +7 -7
  606. package/icons/tech/cmake.js +8 -8
  607. package/icons/tech/code-igniter.js +4 -4
  608. package/icons/tech/code-pen.js +4 -4
  609. package/icons/tech/codeac.js +4 -4
  610. package/icons/tech/codecov.js +4 -4
  611. package/icons/tech/coffee-script.js +4 -4
  612. package/icons/tech/composer.js +35 -35
  613. package/icons/tech/confluence.js +15 -15
  614. package/icons/tech/consul.js +4 -4
  615. package/icons/tech/contao.js +4 -4
  616. package/icons/tech/corejs.js +4 -4
  617. package/icons/tech/cosmosdb.js +9 -9
  618. package/icons/tech/couchdb.js +4 -4
  619. package/icons/tech/cplusplus.js +8 -8
  620. package/icons/tech/crystal.js +4 -4
  621. package/icons/tech/csharp.js +7 -7
  622. package/icons/tech/css3.js +10 -10
  623. package/icons/tech/cucumber.js +4 -4
  624. package/icons/tech/cypress.js +6 -6
  625. package/icons/tech/d3js.js +28 -28
  626. package/icons/tech/dart.js +9 -9
  627. package/icons/tech/data-grip.js +34 -34
  628. package/icons/tech/data-spell.js +27 -27
  629. package/icons/tech/dbeaver.js +11 -11
  630. package/icons/tech/debian.js +4 -4
  631. package/icons/tech/deno.js +4 -4
  632. package/icons/tech/devicon.js +10 -10
  633. package/icons/tech/digital-ocean.js +6 -6
  634. package/icons/tech/discord-js.js +11 -11
  635. package/icons/tech/django-rest.js +8 -8
  636. package/icons/tech/django.js +6 -6
  637. package/icons/tech/docker.js +20 -20
  638. package/icons/tech/doctrine.js +6 -6
  639. package/icons/tech/dropwizard.js +22 -22
  640. package/icons/tech/drupal.js +11 -11
  641. package/icons/tech/eclipse-ceylon.js +10 -10
  642. package/icons/tech/eclipse-ide.js +20 -20
  643. package/icons/tech/eclipse-vert-x.js +6 -6
  644. package/icons/tech/elasticbeats.js +7 -7
  645. package/icons/tech/elasticsearch.js +7 -7
  646. package/icons/tech/electron.js +8 -8
  647. package/icons/tech/eleventy-11ty.js +6 -6
  648. package/icons/tech/elixir.js +35 -35
  649. package/icons/tech/elm.js +10 -10
  650. package/icons/tech/embedded-c.js +30 -30
  651. package/icons/tech/ember-js.js +6 -6
  652. package/icons/tech/envoy.js +7 -7
  653. package/icons/tech/erlang.js +4 -4
  654. package/icons/tech/eslint.js +6 -6
  655. package/icons/tech/express.js +4 -4
  656. package/icons/tech/facebook.js +6 -6
  657. package/icons/tech/fast-api.js +4 -4
  658. package/icons/tech/fastify.js +6 -6
  659. package/icons/tech/fauna.js +4 -4
  660. package/icons/tech/feathers.js +4 -4
  661. package/icons/tech/fedora.js +10 -10
  662. package/icons/tech/figma.js +9 -9
  663. package/icons/tech/file-zilla.js +8 -8
  664. package/icons/tech/firebase.js +4 -4
  665. package/icons/tech/firefox.js +335 -335
  666. package/icons/tech/flask.js +4 -4
  667. package/icons/tech/flutter.js +12 -12
  668. package/icons/tech/fortran.js +4 -4
  669. package/icons/tech/foundation.js +37 -37
  670. package/icons/tech/fsharp.js +7 -7
  671. package/icons/tech/gatling.js +4 -4
  672. package/icons/tech/gatsby.js +4 -4
  673. package/icons/tech/gazebo.js +8 -8
  674. package/icons/tech/gcc.js +11 -11
  675. package/icons/tech/gentoo.js +4 -4
  676. package/icons/tech/ghost.js +6 -6
  677. package/icons/tech/gimp.js +68 -68
  678. package/icons/tech/git.js +4 -4
  679. package/icons/tech/gitbook.js +4 -4
  680. package/icons/tech/github-actions.js +6 -6
  681. package/icons/tech/github-codespaces.js +18 -18
  682. package/icons/tech/github.js +6 -6
  683. package/icons/tech/gitlab.js +8 -8
  684. package/icons/tech/gitpod.js +8 -8
  685. package/icons/tech/gitter.js +4 -4
  686. package/icons/tech/gnu-emacs.js +4 -4
  687. package/icons/tech/go-land.js +33 -33
  688. package/icons/tech/go.js +39 -39
  689. package/icons/tech/godot-engine.js +11 -11
  690. package/icons/tech/google-cloud.js +8 -8
  691. package/icons/tech/google.js +9 -9
  692. package/icons/tech/gradle.js +4 -4
  693. package/icons/tech/grafana.js +8 -8
  694. package/icons/tech/grails.js +6 -6
  695. package/icons/tech/graphql.js +12 -12
  696. package/icons/tech/groovy.js +102 -102
  697. package/icons/tech/grunt-js.js +33 -33
  698. package/icons/tech/gulp-js.js +4 -4
  699. package/icons/tech/hadoop.js +9 -9
  700. package/icons/tech/handlebars.js +6 -6
  701. package/icons/tech/hardhat.js +26 -26
  702. package/icons/tech/harvester.js +7 -7
  703. package/icons/tech/hashicorp-vault.js +4 -4
  704. package/icons/tech/haskell.js +7 -7
  705. package/icons/tech/haxe.js +14 -14
  706. package/icons/tech/helm.js +4 -4
  707. package/icons/tech/heroku.js +4 -4
  708. package/icons/tech/hibernate.js +6 -6
  709. package/icons/tech/homebrew.js +9 -9
  710. package/icons/tech/html5.js +8 -8
  711. package/icons/tech/hugo.js +7 -7
  712. package/icons/tech/ibm-spss-statistics.js +6 -6
  713. package/icons/tech/ie10.js +4 -4
  714. package/icons/tech/ifttt.js +4 -4
  715. package/icons/tech/influxdb.js +4 -4
  716. package/icons/tech/inkscape.js +115 -115
  717. package/icons/tech/insomnia.js +10 -10
  718. package/icons/tech/intellij-idea.js +37 -37
  719. package/icons/tech/ionic.js +6 -6
  720. package/icons/tech/jaeger.js +21 -21
  721. package/icons/tech/jamstack.js +4 -4
  722. package/icons/tech/jasmine.js +7 -7
  723. package/icons/tech/java.js +9 -9
  724. package/icons/tech/javascript.js +6 -6
  725. package/icons/tech/jeet.js +32 -32
  726. package/icons/tech/jekyll.js +43 -43
  727. package/icons/tech/jenkins.js +21 -21
  728. package/icons/tech/jest.js +4 -4
  729. package/icons/tech/jetbrains.js +26 -26
  730. package/icons/tech/jira-align.js +15 -15
  731. package/icons/tech/jira.js +14 -14
  732. package/icons/tech/jquery.js +4 -4
  733. package/icons/tech/json.js +12 -12
  734. package/icons/tech/jule.js +4 -4
  735. package/icons/tech/julia.js +10 -10
  736. package/icons/tech/junit.js +6 -6
  737. package/icons/tech/jupyter.js +8 -8
  738. package/icons/tech/k3os.js +4 -4
  739. package/icons/tech/k3s.js +4 -4
  740. package/icons/tech/kafka.js +4 -4
  741. package/icons/tech/kaggle.js +4 -4
  742. package/icons/tech/karate.js +6 -6
  743. package/icons/tech/karma.js +6 -6
  744. package/icons/tech/keras.js +6 -6
  745. package/icons/tech/kibana.js +7 -7
  746. package/icons/tech/knex-js.js +4 -4
  747. package/icons/tech/knockout.js +4 -4
  748. package/icons/tech/kotlin.js +9 -9
  749. package/icons/tech/krakenjs.js +4 -4
  750. package/icons/tech/ktor.js +18 -18
  751. package/icons/tech/kubernetes.js +7 -7
  752. package/icons/tech/labview.js +7 -7
  753. package/icons/tech/laravel.js +4 -4
  754. package/icons/tech/latex.js +9 -9
  755. package/icons/tech/less-js.js +4 -4
  756. package/icons/tech/linkedin.js +6 -6
  757. package/icons/tech/linux.js +803 -803
  758. package/icons/tech/liquibase.js +4 -4
  759. package/icons/tech/livewire.js +12 -12
  760. package/icons/tech/llvm.js +9 -9
  761. package/icons/tech/logstash.js +7 -7
  762. package/icons/tech/lua.js +7 -7
  763. package/icons/tech/lumen.js +4 -4
  764. package/icons/tech/magento.js +4 -4
  765. package/icons/tech/markdown.js +6 -6
  766. package/icons/tech/material-ui.js +8 -8
  767. package/icons/tech/materialize.js +6 -6
  768. package/icons/tech/matlab.js +25 -25
  769. package/icons/tech/matplotlib.js +26 -26
  770. package/icons/tech/maven.js +141 -141
  771. package/icons/tech/meteor-js.js +4 -4
  772. package/icons/tech/microsoft-sql-server.js +4 -4
  773. package/icons/tech/minitab.js +11 -11
  774. package/icons/tech/mob-x.js +9 -9
  775. package/icons/tech/mocha.js +6 -6
  776. package/icons/tech/modx.js +8 -8
  777. package/icons/tech/moleculer.js +4 -4
  778. package/icons/tech/mongodb.js +20 -20
  779. package/icons/tech/mongoose-js.js +6 -6
  780. package/icons/tech/moodle.js +41 -41
  781. package/icons/tech/ms-dos.js +15 -15
  782. package/icons/tech/mysql.js +4 -4
  783. package/icons/tech/nano.js +4 -4
  784. package/icons/tech/nerog.js +27 -27
  785. package/icons/tech/nestjs.js +4 -4
  786. package/icons/tech/net-core.js +6 -6
  787. package/icons/tech/net.js +120 -120
  788. package/icons/tech/network-x.js +13 -13
  789. package/icons/tech/new4j.js +6 -6
  790. package/icons/tech/nextjs.js +4 -4
  791. package/icons/tech/nginx.js +4 -4
  792. package/icons/tech/nhibernate.js +6 -6
  793. package/icons/tech/nim.js +6 -6
  794. package/icons/tech/nimble.js +11 -11
  795. package/icons/tech/nix.js +6 -6
  796. package/icons/tech/nodejs.js +4 -4
  797. package/icons/tech/nodemon.js +6 -6
  798. package/icons/tech/nodewebkit.js +9 -9
  799. package/icons/tech/npm.js +4 -4
  800. package/icons/tech/nuget.js +4 -4
  801. package/icons/tech/num-py.js +6 -6
  802. package/icons/tech/nuxt-js.js +7 -7
  803. package/icons/tech/objective-c.js +6 -6
  804. package/icons/tech/ocaml.js +22 -22
  805. package/icons/tech/oh-my-zsh.js +8 -8
  806. package/icons/tech/okta.js +6 -6
  807. package/icons/tech/open-al.js +6 -6
  808. package/icons/tech/open-api.js +16 -16
  809. package/icons/tech/open-cl.js +9 -9
  810. package/icons/tech/open-cv.js +7 -7
  811. package/icons/tech/open-gl.js +8 -8
  812. package/icons/tech/open-stack.js +4 -4
  813. package/icons/tech/open-suse.js +6 -6
  814. package/icons/tech/open-telemetry.js +6 -6
  815. package/icons/tech/opera.js +14 -14
  816. package/icons/tech/oracle.js +4 -4
  817. package/icons/tech/p5js.js +4 -4
  818. package/icons/tech/packer.js +6 -6
  819. package/icons/tech/pandas.js +9 -9
  820. package/icons/tech/perl.js +6 -6
  821. package/icons/tech/pf-sense.js +4 -4
  822. package/icons/tech/phalcon.js +29 -29
  823. package/icons/tech/phoenix-framework.js +4 -4
  824. package/icons/tech/photon-engine.js +12 -12
  825. package/icons/tech/php-storm.js +31 -31
  826. package/icons/tech/php.js +17 -17
  827. package/icons/tech/playwrite.js +11 -11
  828. package/icons/tech/ploty.js +7 -7
  829. package/icons/tech/podman.js +27 -27
  830. package/icons/tech/polygon.js +6 -6
  831. package/icons/tech/portainer.js +9 -9
  832. package/icons/tech/postcss.js +7 -7
  833. package/icons/tech/postgresql.js +8 -8
  834. package/icons/tech/postman.js +7 -7
  835. package/icons/tech/powershell.js +17 -17
  836. package/icons/tech/processing.js +98 -98
  837. package/icons/tech/prometheus.js +4 -4
  838. package/icons/tech/protractor.js +4 -4
  839. package/icons/tech/purescript.js +4 -4
  840. package/icons/tech/putty.js +47 -47
  841. package/icons/tech/pycharm.js +55 -55
  842. package/icons/tech/pyscript.js +6 -6
  843. package/icons/tech/pytest.js +12 -12
  844. package/icons/tech/python-poetry.js +37 -37
  845. package/icons/tech/python.js +16 -16
  846. package/icons/tech/pytorch.js +6 -6
  847. package/icons/tech/qodana.js +22 -22
  848. package/icons/tech/qt.js +4 -4
  849. package/icons/tech/quarkus.js +14 -14
  850. package/icons/tech/quasar.js +6 -6
  851. package/icons/tech/qwik.js +7 -7
  852. package/icons/tech/r.js +13 -13
  853. package/icons/tech/rabbitmq.js +4 -4
  854. package/icons/tech/rancher.js +4 -4
  855. package/icons/tech/raspberrypi.js +7 -7
  856. package/icons/tech/reach.js +6 -6
  857. package/icons/tech/react-bootstrap.js +4 -4
  858. package/icons/tech/react.js +6 -6
  859. package/icons/tech/realm.js +12 -12
  860. package/icons/tech/red-cube-s-epic-compiler-thingy-programming-re-ct.js +8 -8
  861. package/icons/tech/redhat.js +7 -7
  862. package/icons/tech/redis.js +14 -14
  863. package/icons/tech/redux.js +4 -4
  864. package/icons/tech/ren-py.js +164 -164
  865. package/icons/tech/rider.js +20 -20
  866. package/icons/tech/robot-operating-system-ros.js +4 -4
  867. package/icons/tech/rocksdb.js +6 -6
  868. package/icons/tech/rollup-js.js +37 -37
  869. package/icons/tech/rspec.js +8 -8
  870. package/icons/tech/rstudio.js +7 -7
  871. package/icons/tech/ruby-mine.js +28 -28
  872. package/icons/tech/ruby-on-rails.js +4 -4
  873. package/icons/tech/ruby.js +120 -120
  874. package/icons/tech/rust.js +4 -4
  875. package/icons/tech/salesforce.js +7 -7
  876. package/icons/tech/sanity.js +7 -7
  877. package/icons/tech/sass.js +4 -4
  878. package/icons/tech/scala.js +6 -6
  879. package/icons/tech/scalingo.js +6 -6
  880. package/icons/tech/sdl.js +11 -11
  881. package/icons/tech/selenium.js +6 -6
  882. package/icons/tech/sema-software.js +4 -4
  883. package/icons/tech/sequelize.js +31 -31
  884. package/icons/tech/shopware.js +6 -6
  885. package/icons/tech/sketch.js +11 -11
  886. package/icons/tech/slack.js +8 -8
  887. package/icons/tech/socket-io.js +6 -6
  888. package/icons/tech/solid-js.js +27 -27
  889. package/icons/tech/solidity.js +10 -10
  890. package/icons/tech/sonarqube.js +4 -4
  891. package/icons/tech/sourcetree.js +4 -4
  892. package/icons/tech/spark.js +4 -4
  893. package/icons/tech/splunk.js +4 -4
  894. package/icons/tech/spring.js +4 -4
  895. package/icons/tech/sql-developer.js +10 -10
  896. package/icons/tech/sqlalchemy.js +6 -6
  897. package/icons/tech/sqlite.js +11 -11
  898. package/icons/tech/ssh.js +4 -4
  899. package/icons/tech/stackoverflow.js +6 -6
  900. package/icons/tech/stata.js +4 -4
  901. package/icons/tech/storybook.js +4 -4
  902. package/icons/tech/streamlit.js +7 -7
  903. package/icons/tech/stylus.js +6 -6
  904. package/icons/tech/subversion.js +4 -4
  905. package/icons/tech/svelte.js +6 -6
  906. package/icons/tech/swagger.js +6 -6
  907. package/icons/tech/swift.js +6 -6
  908. package/icons/tech/symfony.js +4 -4
  909. package/icons/tech/tailwind-css.js +4 -4
  910. package/icons/tech/tauri.js +8 -8
  911. package/icons/tech/tensorflow.js +4 -4
  912. package/icons/tech/terraform.js +7 -7
  913. package/icons/tech/tex.js +4 -4
  914. package/icons/tech/the-algorithms.js +4 -4
  915. package/icons/tech/three-js.js +8 -8
  916. package/icons/tech/titanium-sdk.js +4 -4
  917. package/icons/tech/tomcat.js +11 -11
  918. package/icons/tech/tortoise-git.js +9 -9
  919. package/icons/tech/tower.js +139 -139
  920. package/icons/tech/traefik-mesh.js +4 -4
  921. package/icons/tech/traefik-proxy.js +4 -4
  922. package/icons/tech/travis-ci.js +4 -4
  923. package/icons/tech/trello.js +4 -4
  924. package/icons/tech/twitter.js +4 -4
  925. package/icons/tech/typescript.js +6 -6
  926. package/icons/tech/typo3.js +4 -4
  927. package/icons/tech/ubuntu.js +4 -4
  928. package/icons/tech/uml.js +8 -8
  929. package/icons/tech/unity.js +7 -7
  930. package/icons/tech/unix.js +4 -4
  931. package/icons/tech/unreal-engine.js +6 -6
  932. package/icons/tech/uwsgi.js +11 -11
  933. package/icons/tech/v8.js +33 -33
  934. package/icons/tech/vagrant.js +6 -6
  935. package/icons/tech/vala.js +18 -18
  936. package/icons/tech/vercel.js +4 -4
  937. package/icons/tech/veutify.js +8 -8
  938. package/icons/tech/vim.js +37 -37
  939. package/icons/tech/visualstudio.js +4 -4
  940. package/icons/tech/vite.js +4 -4
  941. package/icons/tech/vitejs.js +14 -14
  942. package/icons/tech/vscode.js +31 -31
  943. package/icons/tech/vsphere.js +9 -9
  944. package/icons/tech/vue-storefront.js +7 -7
  945. package/icons/tech/vue.js +7 -7
  946. package/icons/tech/vyper.js +8 -8
  947. package/icons/tech/webassembly.js +4 -4
  948. package/icons/tech/webflow.js +4 -4
  949. package/icons/tech/weblate.js +17 -17
  950. package/icons/tech/webpack.js +6 -6
  951. package/icons/tech/webstorm.js +19 -19
  952. package/icons/tech/windows11.js +4 -4
  953. package/icons/tech/windows8.js +4 -4
  954. package/icons/tech/woo-commerce.js +7 -7
  955. package/icons/tech/wordpress.js +11 -11
  956. package/icons/tech/xamarin.js +4 -4
  957. package/icons/tech/xcode.js +251 -251
  958. package/icons/tech/xml.js +8 -8
  959. package/icons/tech/yaml.js +7 -7
  960. package/icons/tech/yarn.js +6 -6
  961. package/icons/tech/yii-framework.js +8 -8
  962. package/icons/tech/yuno-host.js +6 -6
  963. package/icons/tech/zend-framework.js +4 -4
  964. package/icons/tech/zig.js +13 -13
  965. package/package.json +33 -32
  966. package/react/index.d.ts +1400 -747
  967. package/react/index.mjs +4382 -2784
  968. package/react/style.css +1 -1
  969. package/dist/shared/likec4.BaYahRry.mjs +0 -1221
package/react/index.d.ts CHANGED
@@ -1,13 +1,62 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import { CSSProperties, HTMLAttributes, MouseEvent as ReactMouseEvent, ReactNode } from 'react';
3
+ import { CSSProperties, HTMLAttributes, MouseEvent as ReactMouseEvent, PropsWithChildren, ReactNode } from 'react';
4
+ import { LiteralUnion, OverrideProperties, PartialDeep, RequireExactlyOne, Tagged, UnwrapTagged } from 'type-fest';
4
5
 
6
+ declare const ThemeColors: readonly [
7
+ "amber",
8
+ "blue",
9
+ "gray",
10
+ "slate",
11
+ "green",
12
+ "indigo",
13
+ "muted",
14
+ "primary",
15
+ "red",
16
+ "secondary",
17
+ "sky"
18
+ ];
19
+ type ThemeColor = typeof ThemeColors[number];
20
+ type HexColorLiteral = `#${string}`;
21
+ type ColorLiteral = HexColorLiteral;
22
+ type Color = LiteralUnion<ThemeColor, string>;
23
+ interface ElementThemeColorValues {
24
+ fill: ColorLiteral;
25
+ stroke: ColorLiteral;
26
+ hiContrast: ColorLiteral;
27
+ loContrast: ColorLiteral;
28
+ }
29
+ interface RelationshipThemeColorValues {
30
+ lineColor: ColorLiteral;
31
+ labelBgColor: ColorLiteral;
32
+ labelColor: ColorLiteral;
33
+ }
34
+ interface ThemeColorValues {
35
+ elements: ElementThemeColorValues;
36
+ relationships: RelationshipThemeColorValues;
37
+ }
38
+ type NonEmptyArray<T> = [
39
+ T,
40
+ ...T[]
41
+ ];
42
+ type IconUrl = Tagged<string, "IconUrl">;
43
+ type Point = readonly [
44
+ x: number,
45
+ y: number
46
+ ];
47
+ interface XYPoint {
48
+ x: number;
49
+ y: number;
50
+ }
51
+ type Fqn = Tagged<string, "Fqn">;
5
52
  declare const BorderStyles: readonly [
6
53
  "solid",
7
54
  "dashed",
8
55
  "dotted",
9
56
  "none"
10
57
  ];
58
+ type BorderStyle = typeof BorderStyles[number];
59
+ type ElementKind = Tagged<string, "ElementKind">;
11
60
  declare const ElementShapes: readonly [
12
61
  "rectangle",
13
62
  "person",
@@ -17,233 +66,107 @@ declare const ElementShapes: readonly [
17
66
  "storage",
18
67
  "queue"
19
68
  ];
20
- declare const ThemeColors: readonly [
21
- "amber",
22
- "blue",
23
- "gray",
24
- "slate",
25
- "green",
26
- "indigo",
27
- "muted",
28
- "primary",
29
- "red",
30
- "secondary",
31
- "sky"
32
- ];
33
- declare const tag: unique symbol;
34
- declare enum BackgroundVariant {
35
- Lines = "lines",
36
- Dots = "dots",
37
- Cross = "cross"
69
+ type ElementShape = typeof ElementShapes[number];
70
+ interface ElementStyle {
71
+ border?: BorderStyle;
72
+ opacity?: number;
38
73
  }
39
- declare namespace ViewChange {
40
- interface ChangeElementStyle {
41
- op: "change-element-style";
42
- style: {
43
- border?: BorderStyle;
44
- opacity?: number;
45
- shape?: ElementShape;
46
- color?: ThemeColor;
47
- };
48
- targets: NonEmptyArray<Fqn>;
49
- }
50
- interface SaveManualLayout {
51
- op: "save-manual-layout";
52
- layout: ViewManualLayout;
53
- }
54
- interface ChangeAutoLayout {
55
- op: "change-autolayout";
56
- layout: AutoLayoutDirection;
57
- }
74
+ type Tag = Tagged<string, "Tag">;
75
+ interface Link {
76
+ readonly title?: string;
77
+ readonly url: string;
78
+ readonly relative?: string;
58
79
  }
59
- export declare const BundledStyles: () => any;
60
- export declare const DefaultTheme: MantineThemeOverride;
61
- export declare function LikeC4Browser<ViewId extends string, Tag extends string, Kind extends string>({ className, colorScheme, view, injectFontCss, onNavigateTo, onClose, renderIcon, where, style, mantineTheme, background }: LikeC4BrowserProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
62
- export declare function LikeC4ViewEmbedded<ViewId extends string, Tag extends string, Kind extends string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, renderIcon, showDiagramTitle, showElementLinks, showNavigationButtons, enableFocusMode, showNotations, mantineTheme, where, style }: LikeC4ViewEmbeddedProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
63
- export declare function ReactLikeC4<ViewId extends string = ViewID, Tag extends string = Tag$1, Kind extends string = ElementKind>({ className, view, colorScheme: explicitColorScheme, injectFontCss, keepAspectRatio, showNotations, onNavigateTo, background, style, mantineTheme, ...props }: ReactLikeC4Props<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
64
- export declare function useBundledStyleSheet(injectFontCss?: boolean): CSSStyleSheet[];
65
- export declare function useColorScheme(explicit?: ColorScheme): ColorScheme;
66
- export declare namespace ReactLikeC4 {
67
- var displayName: string;
80
+ interface Element$1 {
81
+ readonly id: Fqn;
82
+ readonly kind: ElementKind;
83
+ readonly title: string;
84
+ readonly description: string | null;
85
+ readonly technology: string | null;
86
+ readonly tags: NonEmptyArray<Tag> | null;
87
+ readonly links: NonEmptyArray<Link> | null;
88
+ readonly icon?: IconUrl;
89
+ readonly shape?: ElementShape;
90
+ readonly color?: Color;
91
+ readonly style?: ElementStyle;
92
+ readonly notation?: string;
93
+ readonly metadata?: {
94
+ [key: string]: string;
95
+ };
68
96
  }
69
- export type LikeC4BrowserProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDialogElement>, "style" | "className"> & {
70
- view: ViewData<ViewId>;
71
- /**
72
- * By default determined by the user's system preferences.
73
- */
74
- colorScheme?: "light" | "dark";
75
- /**
76
- * LikeC4 views are using 'IBM Plex Sans' font.
77
- * By default, component injects the CSS to document head.
78
- * Set to false if you want to handle the font yourself.
79
- *
80
- * @default true
81
- */
82
- injectFontCss?: boolean | undefined;
83
- /**
84
- * Background pattern
85
- * @default 'dots'
86
- */
87
- background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
88
- onNavigateTo: (to: ViewId) => void;
89
- onClose: () => void;
90
- /**
91
- * Render custom icon for a node
92
- * By default, if icon is http:// or https://, it will be rendered as an image
93
- */
94
- renderIcon?: ElementIconRenderer | undefined;
95
- where?: WhereOperator<Tag, Kind> | undefined;
96
- mantineTheme?: MantineThemeOverride | undefined;
97
+ interface ElementKindSpecificationStyle {
98
+ shape?: ElementShape;
99
+ icon?: IconUrl;
100
+ color?: Color;
101
+ border?: BorderStyle;
102
+ opacity?: number;
103
+ }
104
+ interface ElementKindSpecification {
105
+ readonly technology?: string;
106
+ readonly notation?: string;
107
+ readonly style: ElementKindSpecificationStyle;
108
+ }
109
+ type EqualOperator<V> = {
110
+ eq: V;
111
+ neq?: never;
112
+ } | {
113
+ eq?: never;
114
+ neq: V;
97
115
  };
98
- export type LikeC4ViewEmbeddedProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDivElement>, "style" | "className"> & {
99
- view: ViewData<ViewId>;
100
- /**
101
- * By default determined by the user's system preferences.
102
- */
103
- colorScheme?: "light" | "dark";
104
- /**
105
- * LikeC4 views are using 'IBM Plex Sans' font.
106
- * By default, component injects the CSS to document head.
107
- * Set to false if you want to handle the font yourself.
108
- *
109
- * @default true
110
- */
111
- injectFontCss?: boolean | undefined;
112
- /**
113
- * Background pattern
114
- * @default 'transparent'
115
- */
116
- background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
117
- onNavigateTo?: ((to: ViewId) => void) | undefined;
118
- /**
119
- * Render custom icon for a node
120
- * By default, if icon is http:// or https://, it will be rendered as an image
121
- */
122
- renderIcon?: ElementIconRenderer | undefined;
123
- /**
124
- * Display hovercards with element links
125
- * @default true
126
- */
127
- showElementLinks?: boolean | undefined;
128
- /**
129
- * Display panel with diagram title / description
130
- * @default false
131
- */
132
- showDiagramTitle?: boolean | undefined;
133
- /**
134
- * Show back/forward navigation buttons
135
- * @default false
136
- */
137
- showNavigationButtons?: undefined | boolean;
138
- /**
139
- * Display notations of the view
140
- * @default false
141
- */
142
- showNotations?: boolean | undefined;
143
- /**
144
- * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
145
- * @default false
146
- */
147
- enableFocusMode?: boolean | undefined;
148
- where?: WhereOperator<Tag, Kind> | undefined;
149
- mantineTheme?: MantineThemeOverride | undefined;
116
+ type AllNever = {
117
+ not?: never;
118
+ and?: never;
119
+ or?: never;
120
+ tag?: never;
121
+ kind?: never;
150
122
  };
151
- export type LikeC4ViewProps<ViewId extends string, Tag extends string, Kind extends string> = {
152
- /**
153
- * View to display.
154
- */
155
- viewId: ViewId;
156
- /**
157
- * Background pattern
158
- * @default 'transparent'
159
- */
160
- background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
161
- /**
162
- * Background pattern for the browser view.
163
- * @default 'dots'
164
- */
165
- browserBackground?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
166
- /**
167
- * Click on the view opens a modal with browser.
168
- *
169
- * @default true
170
- */
171
- interactive?: boolean;
172
- /**
173
- * By default determined by the user's system preferences.
174
- */
175
- colorScheme?: "light" | "dark" | undefined;
176
- /**
177
- * LikeC4 views are using 'IBM Plex Sans' font.
178
- * By default, component injects the CSS to document head.
179
- * Set to false if you want to handle the font yourself.
180
- *
181
- * @default true
182
- */
183
- injectFontCss?: boolean | undefined;
184
- /**
185
- * Display hovercards with element links
186
- * @default true
187
- */
188
- showElementLinks?: boolean | undefined;
189
- /**
190
- * Display panel with diagram title / description
191
- * @default false
192
- */
193
- showDiagramTitle?: boolean | undefined;
194
- /**
195
- * Show back/forward navigation buttons
196
- * @default false
197
- */
198
- showNavigationButtons?: undefined | boolean;
199
- /**
200
- * Display notations of the view
201
- * @default false
202
- */
203
- showNotations?: boolean | undefined;
204
- /**
205
- * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
206
- * Conflicts with `interactive`
207
- *
208
- * @default false
209
- */
210
- enableFocusMode?: boolean | undefined;
211
- where?: WhereOperator<Tag, Kind> | undefined;
212
- className?: string | undefined;
213
- style?: CSSProperties | undefined;
214
- browserClassName?: string | undefined;
215
- browserStyle?: CSSProperties | undefined;
216
- mantineTheme?: MantineThemeOverride | undefined;
123
+ type TagEqual<Tag> = Omit<AllNever, "tag"> & {
124
+ tag: EqualOperator<Tag>;
217
125
  };
218
- export type ReactLikeC4Props<ViewId extends string = ViewID, Tag extends string = Tag$1, Kind extends string = ElementKind> = Omit<LikeC4DiagramProps, "view" | "where" | "onNavigateTo"> & {
219
- view: ViewData<ViewId>;
220
- /**
221
- * Keep aspect ratio of the diagram
222
- * Disable if you need to manage the viewport (use className)
223
- *
224
- * @default true
225
- */
226
- keepAspectRatio?: boolean | undefined;
227
- /**
228
- * By default determined by the user's system preferences.
229
- */
230
- colorScheme?: "light" | "dark" | undefined;
231
- /**
232
- * LikeC4 views are using 'IBM Plex Sans' font.
233
- * By default, component injects the CSS to document head.
234
- * Set to false if you want to handle the font yourself.
235
- *
236
- * @default true
237
- */
238
- injectFontCss?: boolean | undefined;
239
- style?: CSSProperties | undefined;
240
- where?: WhereOperator<Tag, Kind> | undefined;
241
- onNavigateTo?: OnNavigateTo<ViewId> | undefined;
242
- mantineTheme?: MantineThemeOverride | undefined;
126
+ type KindEqual<Kind> = Omit<AllNever, "kind"> & {
127
+ kind: EqualOperator<Kind>;
243
128
  };
244
- export type ViewData<ViewId extends string> = Omit<DiagramView, "id"> & {
245
- id: ViewId;
129
+ type NotOperator<Tag, Kind> = Omit<AllNever, "not"> & {
130
+ not: WhereOperator<Tag, Kind>;
131
+ };
132
+ type AndOperator<Tag, Kind> = Omit<AllNever, "and"> & {
133
+ and: NonEmptyArray<WhereOperator<Tag, Kind>>;
134
+ };
135
+ type OrOperator<Tag, Kind> = Omit<AllNever, "or"> & {
136
+ or: NonEmptyArray<WhereOperator<Tag, Kind>>;
246
137
  };
138
+ type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
139
+ type RelationID = Tagged<string, "RelationID">;
140
+ type RelationshipKind = Tagged<string, "RelationshipKind">;
141
+ type RelationshipLineType = "dashed" | "solid" | "dotted";
142
+ type RelationshipArrowType = "none" | "normal" | "onormal" | "dot" | "odot" | "diamond" | "odiamond" | "crow" | "open" | "vee";
143
+ interface Relation {
144
+ readonly id: RelationID;
145
+ readonly source: Fqn;
146
+ readonly target: Fqn;
147
+ readonly title: string;
148
+ readonly description?: string;
149
+ readonly technology?: string;
150
+ readonly tags?: NonEmptyArray<Tag>;
151
+ readonly kind?: RelationshipKind;
152
+ readonly color?: Color;
153
+ readonly line?: RelationshipLineType;
154
+ readonly head?: RelationshipArrowType;
155
+ readonly tail?: RelationshipArrowType;
156
+ readonly links?: NonEmptyArray<Link>;
157
+ readonly navigateTo?: ViewID;
158
+ readonly metadata?: {
159
+ [key: string]: string;
160
+ };
161
+ }
162
+ interface RelationshipKindSpecification {
163
+ readonly technology?: string;
164
+ readonly notation?: string;
165
+ readonly color?: Color;
166
+ readonly line?: RelationshipLineType;
167
+ readonly head?: RelationshipArrowType;
168
+ readonly tail?: RelationshipArrowType;
169
+ }
247
170
  interface BaseExpr {
248
171
  where?: never;
249
172
  element?: never;
@@ -261,111 +184,12 @@ interface BaseExpr {
261
184
  outgoing?: never;
262
185
  customRelation?: never;
263
186
  }
264
- interface BasicElementView extends BasicView<"element"> {
265
- readonly viewOf?: Fqn;
266
- readonly rules: ViewRule[];
267
- }
268
- interface BasicView<ViewType extends "element" | "dynamic"> {
269
- readonly __?: ViewType;
270
- readonly id: ViewID;
271
- readonly title: string | null;
272
- readonly description: string | null;
273
- readonly tags: NonEmptyArray<Tag$1> | null;
274
- readonly links: NonEmptyArray<Link> | null;
275
- /**
276
- * URI to the source file of this view.
277
- * Undefined if the view is auto-generated.
278
- */
279
- readonly docUri?: string;
280
- /**
281
- * For all views we find common ancestor path.
282
- * This is used to generate relative paths, i.e.:
283
- * - "/home/project/index.c4" becomes "index.c4"
284
- * - "/home/project/subdir/views.c4" becomes "subdir/views.c4"
285
- *
286
- * Undefined if the view is auto-generated.
287
- */
288
- readonly relativePath?: string;
289
- /**
290
- * If the view is changed manually this field contains the layout data.
291
- */
292
- readonly manualLayout?: ViewManualLayout | undefined;
293
- readonly customColorDefinitions: CustomColorDefinitions;
294
- }
295
- interface ComputedDynamicView extends Omit<DynamicView, "rules" | "steps" | "docUri">, ViewWithHash, ViewWithNotation {
296
- readonly autoLayout: ViewRuleAutoLayout["autoLayout"];
297
- readonly nodes: ComputedNode[];
298
- readonly edges: ComputedEdge[];
299
- steps?: never;
300
- rules?: never;
301
- docUri?: never;
302
- }
303
- interface ComputedEdge {
304
- id: EdgeId;
305
- parent: NodeId | null;
306
- source: NodeId;
307
- target: NodeId;
308
- label: string | null;
309
- description?: string;
310
- technology?: string;
311
- relations: RelationID[];
312
- kind?: RelationshipKind;
313
- notation?: string;
314
- notes?: string;
315
- color?: Color;
316
- line?: RelationshipLineType;
317
- head?: RelationshipArrowType;
318
- tail?: RelationshipArrowType;
319
- tags?: NonEmptyArray<Tag$1>;
320
- navigateTo?: ViewID;
321
- /**
322
- * If this edge is derived from custom relationship predicate
323
- */
324
- isCustomized?: boolean;
325
- /**
326
- * For layouting purposes
327
- * @default 'forward'
328
- */
329
- dir?: "forward" | "back";
330
- }
331
- interface ComputedElementView extends Omit<ElementView, "rules" | "docUri">, ViewWithHash, ViewWithNotation {
332
- readonly extends?: ViewID;
333
- readonly autoLayout: ViewRuleAutoLayout["autoLayout"];
334
- readonly nodes: ComputedNode[];
335
- readonly edges: ComputedEdge[];
336
- rules?: never;
337
- docUri?: never;
187
+ interface ElementRefExpr extends Omit<BaseExpr, "element" | "isDescedants"> {
188
+ element: Fqn;
189
+ isDescedants?: boolean;
338
190
  }
339
- interface ComputedNode {
340
- id: NodeId;
341
- kind: ElementKind;
342
- parent: NodeId | null;
343
- title: string;
344
- description: string | null;
345
- technology: string | null;
346
- notation?: string;
347
- tags: NonEmptyArray<Tag$1> | null;
348
- links: NonEmptyArray<Link> | null;
349
- children: NodeId[];
350
- inEdges: EdgeId[];
351
- outEdges: EdgeId[];
352
- shape: ElementShape;
353
- /**
354
- * @deprecated Use `style` instead
355
- */
356
- color: Color;
357
- /**
358
- * @deprecated Use `style` instead
359
- */
360
- icon?: IconUrl;
361
- style: ElementStyle;
362
- navigateTo?: ViewID;
363
- level: number;
364
- depth?: number;
365
- /**
366
- * If this node was customized in the view
367
- */
368
- isCustomized?: boolean;
191
+ interface ExpandedElementExpr extends Omit<BaseExpr, "expanded"> {
192
+ expanded: Fqn;
369
193
  }
370
194
  interface CustomElementExpr extends Omit<BaseExpr, "custom"> {
371
195
  custom: {
@@ -382,6 +206,46 @@ interface CustomElementExpr extends Omit<BaseExpr, "custom"> {
382
206
  navigateTo?: ViewID;
383
207
  };
384
208
  }
209
+ interface WildcardExpr extends Omit<BaseExpr, "wildcard"> {
210
+ wildcard: true;
211
+ }
212
+ interface ElementKindExpr extends Omit<BaseExpr, "elementKind" | "isEqual"> {
213
+ elementKind: ElementKind;
214
+ isEqual: boolean;
215
+ }
216
+ interface ElementTagExpr extends Omit<BaseExpr, "elementTag" | "isEqual"> {
217
+ elementTag: Tag;
218
+ isEqual: boolean;
219
+ }
220
+ type ElementExpression = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
221
+ interface ElementWhereExpr extends Omit<BaseExpr, "where"> {
222
+ where: {
223
+ expr: ElementExpression;
224
+ condition: WhereOperator<string, string>;
225
+ };
226
+ }
227
+ type ElementPredicateExpression = ElementExpression | ElementWhereExpr | CustomElementExpr;
228
+ interface RelationExpr extends Omit<BaseExpr, "source" | "target"> {
229
+ source: ElementExpression;
230
+ target: ElementExpression;
231
+ isBidirectional?: boolean;
232
+ }
233
+ interface InOutExpr extends Omit<BaseExpr, "inout"> {
234
+ inout: ElementExpression;
235
+ }
236
+ interface IncomingExpr extends Omit<BaseExpr, "incoming"> {
237
+ incoming: ElementExpression;
238
+ }
239
+ interface OutgoingExpr extends Omit<BaseExpr, "outgoing"> {
240
+ outgoing: ElementExpression;
241
+ }
242
+ type RelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
243
+ interface RelationWhereExpr extends Omit<BaseExpr, "where"> {
244
+ where: {
245
+ expr: RelationExpression;
246
+ condition: WhereOperator<string, string>;
247
+ };
248
+ }
385
249
  interface CustomRelationExpr extends Omit<BaseExpr, "customRelation"> {
386
250
  customRelation: {
387
251
  relation: RelationExpression | RelationWhereExpr;
@@ -397,37 +261,74 @@ interface CustomRelationExpr extends Omit<BaseExpr, "customRelation"> {
397
261
  tail?: RelationshipArrowType;
398
262
  };
399
263
  }
400
- interface DiagramEdge extends ComputedEdge {
401
- points: NonEmptyArray<Point>;
402
- controlPoints?: NonEmptyArray<XYPoint>;
403
- labelBBox?: BBox | null;
404
- dotpos?: string;
264
+ type RelationPredicateExpression = RelationExpression | RelationWhereExpr | CustomRelationExpr;
265
+ type Expression = ElementPredicateExpression | RelationPredicateExpression;
266
+ type ElementNotation = {
267
+ kinds: ElementKind[];
268
+ shape: ElementShape;
269
+ color: Color;
270
+ title: string;
271
+ };
272
+ type ViewID = Tagged<string, "ViewID">;
273
+ type ViewRulePredicate = {
274
+ include: Expression[];
275
+ exclude?: never;
276
+ } | {
277
+ include?: never;
278
+ exclude: Expression[];
279
+ };
280
+ interface ViewRuleStyle {
281
+ targets: ElementExpression[];
282
+ notation?: string;
283
+ style: ElementStyle & {
284
+ color?: Color;
285
+ shape?: ElementShape;
286
+ icon?: IconUrl;
287
+ };
405
288
  }
406
- interface DiagramNode extends ComputedNode {
407
- width: number;
408
- height: number;
409
- position: Point;
410
- labelBBox: BBox;
289
+ type AutoLayoutDirection = "TB" | "BT" | "LR" | "RL";
290
+ interface ViewRuleAutoLayout {
291
+ autoLayout: AutoLayoutDirection;
411
292
  }
412
- interface DiagramView extends Omit<ComputedView, "nodes" | "edges" | "manualLayout"> {
413
- readonly nodes: DiagramNode[];
414
- readonly edges: DiagramEdge[];
415
- readonly bounds: BBox;
293
+ type ViewRule = ViewRulePredicate | ViewRuleStyle | ViewRuleAutoLayout;
294
+ interface BasicView<ViewType extends "element" | "dynamic"> {
295
+ readonly __?: ViewType;
296
+ readonly id: ViewID;
297
+ readonly title: string | null;
298
+ readonly description: string | null;
299
+ readonly tags: NonEmptyArray<Tag> | null;
300
+ readonly links: NonEmptyArray<Link> | null;
416
301
  /**
417
- * If diagram has manual layout
418
- * But was changed and layout should be recalculated
302
+ * URI to the source file of this view.
303
+ * Undefined if the view is auto-generated.
419
304
  */
420
- hasLayoutDrift?: boolean;
421
- manualLayout?: never;
305
+ readonly docUri?: string;
306
+ /**
307
+ * For all views we find common ancestor path.
308
+ * This is used to generate relative paths, i.e.:
309
+ * - "/home/project/index.c4" becomes "index.c4"
310
+ * - "/home/project/subdir/views.c4" becomes "subdir/views.c4"
311
+ *
312
+ * Undefined if the view is auto-generated.
313
+ */
314
+ readonly relativePath?: string;
315
+ /**
316
+ * If the view is changed manually this field contains the layout data.
317
+ */
318
+ readonly manualLayout?: ViewManualLayout | undefined;
319
+ readonly customColorDefinitions: CustomColorDefinitions;
422
320
  }
423
- interface DynamicView extends BasicView<"dynamic"> {
424
- readonly __: "dynamic";
425
- readonly steps: DynamicViewStepOrParallel[];
426
- readonly rules: DynamicViewRule[];
321
+ interface BasicElementView extends BasicView<"element"> {
322
+ readonly viewOf?: Fqn;
323
+ readonly rules: ViewRule[];
427
324
  }
428
- interface DynamicViewParallelSteps {
429
- readonly __parallel: DynamicViewStep[];
325
+ interface ScopedElementView extends BasicElementView {
326
+ readonly viewOf: Fqn;
327
+ }
328
+ interface ExtendsElementView extends BasicElementView {
329
+ readonly extends: ViewID;
430
330
  }
331
+ type ElementView = ScopedElementView | ExtendsElementView | BasicElementView;
431
332
  interface DynamicViewStep {
432
333
  readonly source: Fqn;
433
334
  readonly target: Fqn;
@@ -444,178 +345,572 @@ interface DynamicViewStep {
444
345
  readonly navigateTo?: ViewID;
445
346
  __parallel?: never;
446
347
  }
447
- interface ElementKindExpr extends Omit<BaseExpr, "elementKind" | "isEqual"> {
448
- elementKind: ElementKind;
449
- isEqual: boolean;
348
+ interface DynamicViewParallelSteps {
349
+ readonly __parallel: DynamicViewStep[];
450
350
  }
451
- interface ElementRefExpr extends Omit<BaseExpr, "element" | "isDescedants"> {
452
- element: Fqn;
453
- isDescedants?: boolean;
351
+ type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
352
+ type DynamicViewIncludeRule = {
353
+ include: ElementPredicateExpression[];
354
+ };
355
+ type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
356
+ interface DynamicView extends BasicView<"dynamic"> {
357
+ readonly __: "dynamic";
358
+ readonly steps: DynamicViewStepOrParallel[];
359
+ readonly rules: DynamicViewRule[];
454
360
  }
455
- interface ElementStyle {
456
- border?: BorderStyle;
457
- opacity?: number;
361
+ type CustomColorDefinitions = {
362
+ [key: string]: ThemeColorValues;
363
+ };
364
+ type LikeC4View = ElementView | DynamicView;
365
+ type NodeId = Tagged<string, "Fqn">;
366
+ type EdgeId = Tagged<string, "EdgeId">;
367
+ interface ComputedNode {
368
+ id: NodeId;
369
+ kind: ElementKind;
370
+ parent: NodeId | null;
371
+ title: string;
372
+ description: string | null;
373
+ technology: string | null;
374
+ notation?: string;
375
+ tags: NonEmptyArray<Tag> | null;
376
+ links: NonEmptyArray<Link> | null;
377
+ children: NodeId[];
378
+ inEdges: EdgeId[];
379
+ outEdges: EdgeId[];
380
+ shape: ElementShape;
381
+ /**
382
+ * @deprecated Use `style` instead
383
+ */
384
+ color: Color;
385
+ /**
386
+ * @deprecated Use `style` instead
387
+ */
388
+ icon?: IconUrl;
389
+ style: ElementStyle;
390
+ navigateTo?: ViewID;
391
+ level: number;
392
+ depth?: number;
393
+ /**
394
+ * If this node was customized in the view
395
+ */
396
+ isCustomized?: boolean;
458
397
  }
459
- interface ElementTagExpr extends Omit<BaseExpr, "elementTag" | "isEqual"> {
460
- elementTag: Tag$1;
461
- isEqual: boolean;
398
+ interface ComputedEdge {
399
+ id: EdgeId;
400
+ parent: NodeId | null;
401
+ source: NodeId;
402
+ target: NodeId;
403
+ label: string | null;
404
+ description?: string;
405
+ technology?: string;
406
+ relations: RelationID[];
407
+ kind?: RelationshipKind;
408
+ notation?: string;
409
+ notes?: string;
410
+ color?: Color;
411
+ line?: RelationshipLineType;
412
+ head?: RelationshipArrowType;
413
+ tail?: RelationshipArrowType;
414
+ tags?: NonEmptyArray<Tag>;
415
+ navigateTo?: ViewID;
416
+ /**
417
+ * If this edge is derived from custom relationship predicate
418
+ */
419
+ isCustomized?: boolean;
420
+ /**
421
+ * For layouting purposes
422
+ * @default 'forward'
423
+ */
424
+ dir?: "forward" | "back";
462
425
  }
463
- interface ElementThemeColorValues {
464
- fill: ColorLiteral;
465
- stroke: ColorLiteral;
466
- hiContrast: ColorLiteral;
467
- loContrast: ColorLiteral;
426
+ interface ViewWithHash {
427
+ /**
428
+ * Hash of the view object.
429
+ * This is used to detect changes in layout
430
+ */
431
+ hash: string;
468
432
  }
469
- interface ElementWhereExpr extends Omit<BaseExpr, "where"> {
470
- where: {
471
- expr: ElementExpression;
472
- condition: WhereOperator<string, string>;
433
+ interface ViewWithNotation {
434
+ notation?: {
435
+ elements: ElementNotation[];
473
436
  };
474
437
  }
475
- interface ExpandedElementExpr extends Omit<BaseExpr, "expanded"> {
476
- expanded: Fqn;
438
+ interface ComputedElementView extends Omit<ElementView, "rules" | "docUri">, ViewWithHash, ViewWithNotation {
439
+ readonly extends?: ViewID;
440
+ readonly autoLayout: ViewRuleAutoLayout["autoLayout"];
441
+ readonly nodes: ComputedNode[];
442
+ readonly edges: ComputedEdge[];
443
+ rules?: never;
444
+ docUri?: never;
477
445
  }
478
- interface ExtendsElementView extends BasicElementView {
479
- readonly extends: ViewID;
446
+ interface ComputedDynamicView extends Omit<DynamicView, "rules" | "steps" | "docUri">, ViewWithHash, ViewWithNotation {
447
+ readonly autoLayout: ViewRuleAutoLayout["autoLayout"];
448
+ readonly nodes: ComputedNode[];
449
+ readonly edges: ComputedEdge[];
450
+ steps?: never;
451
+ rules?: never;
452
+ docUri?: never;
480
453
  }
481
- interface HeadingStyle {
482
- fontSize: string;
483
- fontWeight?: string;
484
- lineHeight: string;
454
+ type ComputedView = ComputedElementView | ComputedDynamicView;
455
+ type BBox = {
456
+ x: number;
457
+ y: number;
458
+ width: number;
459
+ height: number;
460
+ };
461
+ interface DiagramNode extends ComputedNode {
462
+ width: number;
463
+ height: number;
464
+ position: Point;
465
+ labelBBox: BBox;
485
466
  }
486
- interface InOutExpr extends Omit<BaseExpr, "inout"> {
487
- inout: ElementExpression;
467
+ interface DiagramEdge extends ComputedEdge {
468
+ points: NonEmptyArray<Point>;
469
+ controlPoints?: NonEmptyArray<XYPoint>;
470
+ labelBBox?: BBox | null;
471
+ dotpos?: string;
488
472
  }
489
- interface IncomingExpr extends Omit<BaseExpr, "incoming"> {
490
- incoming: ElementExpression;
473
+ interface DiagramView extends Omit<ComputedView, "nodes" | "edges" | "manualLayout"> {
474
+ readonly nodes: DiagramNode[];
475
+ readonly edges: DiagramEdge[];
476
+ readonly bounds: BBox;
477
+ /**
478
+ * If diagram has manual layout
479
+ * But was changed and layout should be recalculated
480
+ */
481
+ hasLayoutDrift?: boolean;
482
+ manualLayout?: never;
491
483
  }
492
- interface LikeC4DiagramEventHandlers {
493
- onChange?: OnChange | null | undefined;
494
- onNavigateTo?: OnNavigateTo | null | undefined;
495
- onNodeClick?: OnNodeClick | null | undefined;
496
- onNodeContextMenu?: OnNodeClick | null | undefined;
497
- onCanvasContextMenu?: OnCanvasClick | null | undefined;
498
- onEdgeClick?: OnEdgeClick | null | undefined;
499
- onEdgeContextMenu?: OnEdgeClick | null | undefined;
500
- onCanvasClick?: OnCanvasClick | null | undefined;
501
- onCanvasDblClick?: OnCanvasClick | null | undefined;
502
- onBurgerMenuClick?: null | undefined | (() => void);
503
- onOpenSourceView?: null | undefined | (() => void);
504
- onOpenSourceElement?: null | undefined | ((fqn: Fqn) => void);
505
- onOpenSourceRelation?: null | undefined | ((id: RelationID) => void);
484
+ type ViewManualLayout = {
485
+ readonly hash: string;
486
+ readonly x: number;
487
+ readonly y: number;
488
+ readonly width: number;
489
+ readonly height: number;
490
+ readonly autoLayout: AutoLayoutDirection;
491
+ readonly nodes: Record<string, {
492
+ isCompound: boolean;
493
+ x: number;
494
+ y: number;
495
+ width: number;
496
+ height: number;
497
+ }>;
498
+ readonly edges: Record<string, {
499
+ dotpos?: string;
500
+ points: NonEmptyArray<Point>;
501
+ controlPoints?: NonEmptyArray<XYPoint>;
502
+ labelBBox?: BBox;
503
+ }>;
504
+ };
505
+ interface ParsedLikeC4Model {
506
+ specification: {
507
+ tags: Tag[];
508
+ elements: Record<UnwrapTagged<ElementKind>, ElementKindSpecification>;
509
+ relationships: Record<UnwrapTagged<ElementKind>, RelationshipKindSpecification>;
510
+ };
511
+ elements: Record<Fqn, Element$1>;
512
+ relations: Record<RelationID, Relation>;
513
+ views: Record<ViewID, LikeC4View>;
506
514
  }
507
- interface LikeC4DiagramProperties {
508
- view: DiagramView;
509
- className?: string | undefined;
515
+ interface ComputedLikeC4Model extends Omit<ParsedLikeC4Model, "views"> {
516
+ __?: never;
517
+ views: Record<ViewID, ComputedView>;
518
+ }
519
+ interface LayoutedLikeC4Model extends Omit<ParsedLikeC4Model, "views"> {
520
+ __: "layouted";
521
+ views: Record<ViewID, DiagramView>;
522
+ }
523
+ type Fqn$1 = LiteralUnion<Fqn, string>;
524
+ type RelationID$1 = LiteralUnion<RelationID, string>;
525
+ type ViewID$1 = LiteralUnion<ViewID, string>;
526
+ type EdgeId$1 = LiteralUnion<EdgeId, string>;
527
+ type IncomingFilter = "all" | "direct" | "to-descendants";
528
+ type OutgoingFilter = "all" | "direct" | "from-descendants";
529
+ type ElementOrFqn = Fqn$1 | {
530
+ id: Fqn$1;
531
+ };
532
+ declare class LikeC4ViewModel {
533
+ readonly view: ComputedView;
534
+ readonly model: LikeC4Model<LikeC4ViewModel>;
535
+ private _rootElements;
536
+ private _elements;
537
+ private _connections;
538
+ constructor(view: ComputedView, model: LikeC4Model<LikeC4ViewModel>);
539
+ get id(): ViewID;
540
+ get title(): string;
541
+ get viewOf(): LikeC4Model.ElementModel<LikeC4ViewModel>;
542
+ get tags(): Tag[];
543
+ roots(): ReadonlyArray<LikeC4ViewModel.Element>;
544
+ elements(): ReadonlyArray<LikeC4ViewModel.Element>;
545
+ element(id: Fqn$1): LikeC4ViewModel.Element;
546
+ hasElement(id: Fqn$1): boolean;
547
+ connections(): ReadonlyArray<LikeC4ViewModel.Connection>;
548
+ connection(id: EdgeId$1): LikeC4ViewModel.Connection;
549
+ findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: "both" | "direct"): ReadonlyArray<LikeC4ViewModel.Connection>;
550
+ parent(element: ElementOrFqn): LikeC4ViewModel.Element | null;
551
+ children(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
552
+ siblings(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
510
553
  /**
511
- * Show/hide ReactFlow controls menu
512
- * @default false
554
+ * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
555
+ * (from closest to root)
513
556
  */
514
- controls?: boolean | undefined;
557
+ ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
558
+ descendants(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
559
+ incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
560
+ incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
515
561
  /**
516
- * Enable/disable panning
517
- * @default true
562
+ * Outgoing relationships from the element and its descendants
518
563
  */
519
- pannable?: boolean | undefined;
564
+ outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
565
+ outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
566
+ }
567
+ declare namespace LikeC4ViewModel {
520
568
  /**
521
- * Enable/disable zooming
522
- * @default true
569
+ * Represents an element in the view. (Diagram node)
570
+ * All methods are view-scoped, i.e. `children` returns only children of the element in the view.
523
571
  */
524
- zoomable?: boolean | undefined;
572
+ class Element {
573
+ readonly node: ComputedNode;
574
+ private viewmodel;
575
+ constructor(node: ComputedNode, viewmodel: LikeC4ViewModel);
576
+ get id(): NodeId;
577
+ get title(): string;
578
+ get kind(): ElementKind;
579
+ get isRoot(): boolean;
580
+ get hasNested(): boolean;
581
+ get shape(): ElementShape;
582
+ get color(): Color;
583
+ get tags(): Tag[];
584
+ model(): LikeC4Model.ElementModel<LikeC4ViewModel>;
585
+ parent(): LikeC4ViewModel.Element | null;
586
+ metadata(key: string): string | undefined;
587
+ metadata(key: string, defaultValue: string): string;
588
+ hasMetadata(key: string): boolean;
589
+ ancestors(): ReadonlyArray<LikeC4ViewModel.Element>;
590
+ siblings(): ReadonlyArray<LikeC4ViewModel.Element>;
591
+ descendants(): ReadonlyArray<LikeC4ViewModel.Element>;
592
+ children(): ReadonlyArray<LikeC4ViewModel.Element>;
593
+ incoming(filter?: "all" | "direct" | "to-descendants"): ReadonlyArray<LikeC4ViewModel.Connection>;
594
+ incomers(filter?: "all" | "direct" | "to-descendants"): ReadonlyArray<LikeC4ViewModel.Element>;
595
+ outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
596
+ outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
597
+ connectionsTo(target: Fqn$1 | LikeC4ViewModel.Element): ReadonlyArray<LikeC4ViewModel.Connection>;
598
+ }
525
599
  /**
526
- * Disable any editing (dragging still can be enabled with `nodesDraggable`)
527
- * @default true
600
+ * Represents a connection between two elements.
601
+ * May be source from multiple model relationships.
528
602
  */
529
- readonly?: boolean | undefined;
603
+ class Connection {
604
+ readonly edge: ComputedEdge;
605
+ private viewmodel;
606
+ constructor(edge: ComputedEdge, viewmodel: LikeC4ViewModel);
607
+ get id(): EdgeId;
608
+ get source(): LikeC4ViewModel.Element;
609
+ get target(): LikeC4ViewModel.Element;
610
+ get tags(): Tag[];
611
+ /**
612
+ * Model relationships
613
+ */
614
+ relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4ViewModel>>;
615
+ }
616
+ }
617
+ type PickBySource<Source> = Source extends LikeC4Model.Layouted.SourceModel ? LikeC4Model.Layouted : Source extends LikeC4Model.Computed.SourceModel ? LikeC4Model.Computed : never;
618
+ export declare class LikeC4Model<M extends LikeC4Model.ViewModel = LikeC4Model.ViewModel> {
619
+ readonly type: LikeC4Model.ModelType<M>;
620
+ readonly sourcemodel: LikeC4Model.SourceModel<M>;
621
+ private _elements;
622
+ private _parents;
623
+ private _children;
624
+ private _rootElements;
625
+ private _relations;
626
+ private _incoming;
627
+ private _outgoing;
628
+ private _internal;
629
+ private _cacheAscendingSiblings;
630
+ private _views;
631
+ static create(source: LikeC4Model.SourceModel): PickBySource<typeof source>;
632
+ static computed(source: ComputedLikeC4Model): LikeC4Model<LikeC4ViewModel>;
633
+ static layouted(source: LayoutedLikeC4Model): LikeC4Model<LikeC4DiagramModel>;
634
+ protected constructor(type: LikeC4Model.ModelType<M>, sourcemodel: LikeC4Model.SourceModel<M>, elements: Element$1[], relations: Relation[]);
530
635
  /**
531
- * If set, initial viewport will show all nodes & edges
532
- * @default true
636
+ * Returns the root elements of the model.
533
637
  */
534
- fitView?: boolean | undefined;
638
+ roots(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
535
639
  /**
536
- * Seems like this is percentage of the view size
537
- * @default 0
640
+ * Returns all elements in the model.
538
641
  */
539
- fitViewPadding?: number | undefined;
642
+ elements(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
540
643
  /**
541
- * @default false if readonly
644
+ * Returns a specific element by its FQN.
542
645
  */
543
- nodesSelectable?: boolean | undefined;
646
+ element(id: Fqn$1): LikeC4Model.ElementModel<M>;
544
647
  /**
545
- * @default false if readonly
648
+ * Returns all relationships in the model.
546
649
  */
547
- nodesDraggable?: boolean | undefined;
548
- initialWidth?: number | undefined;
549
- initialHeight?: number | undefined;
650
+ relationships(): ReadonlyArray<LikeC4Model.Relationship<M>>;
550
651
  /**
551
- * Keep aspect ratio of the diagram
552
- * @default false
652
+ * Returns a specific relationship by its ID.
553
653
  */
554
- keepAspectRatio?: boolean | undefined;
654
+ relationship(id: RelationID$1): LikeC4Model.Relationship<M>;
555
655
  /**
556
- * Background pattern
557
- * @default 'dots'
656
+ * Returns all views in the model.
558
657
  */
559
- background?: "transparent" | "solid" | XYBackground | undefined;
658
+ views(): ReadonlyArray<M>;
560
659
  /**
561
- * Display hovercards with element links
562
- * @default true
660
+ * Returns a specific view by its ID.
563
661
  */
564
- showElementLinks?: boolean | undefined;
662
+ view(viewId: ViewID$1): M;
565
663
  /**
566
- * Display panel with diagram title / description
567
- * @default true
664
+ * Returns the parent element of given element.
665
+ * @see ancestors
568
666
  */
569
- showDiagramTitle?: boolean | undefined;
667
+ parent(element: ElementOrFqn): LikeC4Model.ElementModel<M> | null;
570
668
  /**
571
- * Show back/forward navigation buttons
572
- * @default true if `onNavigateTo` is set
669
+ * Get all children of the element (only direct children),
670
+ * @see descendants
573
671
  */
574
- showNavigationButtons?: undefined | boolean;
672
+ children(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
575
673
  /**
576
- * Display notations of the view
577
- * @default true
674
+ * Get all sibling (i.e. same parent)
578
675
  */
579
- showNotations?: boolean | undefined;
676
+ siblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
580
677
  /**
581
- * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
582
- * @default true
678
+ * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
679
+ * (from closest to root)
583
680
  */
584
- enableFocusMode?: boolean | undefined;
681
+ ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
585
682
  /**
586
- * If Walkthrough for dynamic views should be enabled
587
- * @default false
683
+ * Get all descendant elements (i.e. children, children’s children, etc.)
588
684
  */
589
- enableDynamicViewWalkthrough?: boolean | undefined;
685
+ descendants(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
590
686
  /**
591
- * Experimental feature to enable edge editing
592
- * @default false
687
+ * Incoming relationships to the element and its descendants
688
+ * @see incomers
593
689
  */
594
- experimentalEdgeEditing?: boolean | undefined;
690
+ incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
595
691
  /**
596
- * Render icon for an element, bundled or remote
597
- * By default, if icon is http:// or https://, it will be rendered as an image
692
+ * Source elements of incoming relationships
598
693
  */
599
- renderIcon?: ElementIconRenderer$1 | undefined;
694
+ incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
600
695
  /**
601
- * Dynamic filter, applies both to nodes and edges
696
+ * Outgoing relationships from the element and its descendants
697
+ * @see outgoers
602
698
  */
603
- where?: WhereOperator<string, string> | undefined;
699
+ outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
700
+ /**
701
+ * Target elements of outgoing relationships
702
+ */
703
+ outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
704
+ /**
705
+ * Relationships inside the element, among descendants
706
+ */
707
+ internal(element: ElementOrFqn): ReadonlyArray<LikeC4Model.Relationship<M>>;
708
+ /**
709
+ * Resolve siblings of the element and siblings of ancestors
710
+ * (from closest to root)
711
+ */
712
+ ascendingSiblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
713
+ /**
714
+ * Resolve all views that contain the element
715
+ */
716
+ viewsWithElement(element: ElementOrFqn): ReadonlyArray<M>;
717
+ private addElement;
718
+ private addRelation;
719
+ private _childrenOf;
720
+ private _incomingTo;
721
+ private _outgoingFrom;
722
+ private _internalOf;
604
723
  }
605
- interface Link {
606
- readonly title?: string;
607
- readonly url: string;
608
- readonly relative?: string;
724
+ export declare namespace LikeC4Model {
725
+ function isModel(model: any): model is LikeC4Model;
726
+ type SourceModel<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? LayoutedLikeC4Model : ComputedLikeC4Model;
727
+ type ViewModel = LikeC4ViewModel | LikeC4DiagramModel;
728
+ namespace ViewModel {
729
+ type Relationship = LikeC4Model.Relationship<ViewModel>;
730
+ function isLayouted(model: ViewModel): model is LikeC4DiagramModel;
731
+ }
732
+ type Computed = LikeC4Model<LikeC4ViewModel>;
733
+ namespace Computed {
734
+ type ViewModel = LikeC4ViewModel;
735
+ type SourceModel = LikeC4Model.SourceModel<ViewModel>;
736
+ }
737
+ type Layouted = LikeC4Model<LikeC4DiagramModel>;
738
+ namespace Layouted {
739
+ type ViewModel = LikeC4DiagramModel;
740
+ type SourceModel = LikeC4Model.SourceModel<ViewModel>;
741
+ }
742
+ type ModelType<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? "layouted" : M extends LikeC4ViewModel ? "computed" : never;
743
+ function isLayouted(model: LikeC4Model): model is Layouted;
744
+ class Relationship<M extends ViewModel> {
745
+ readonly relationship: Relation;
746
+ private model;
747
+ constructor(relationship: Relation, model: LikeC4Model<M>);
748
+ get id(): RelationID;
749
+ get title(): string;
750
+ get kind(): RelationshipKind;
751
+ get tags(): Tag[];
752
+ get source(): ElementModel<M>;
753
+ get target(): ElementModel<M>;
754
+ metadata(key: string): string | undefined;
755
+ metadata(key: string, defaultValue: string): string;
756
+ hasMetadata(key: string): boolean;
757
+ }
758
+ class ElementModel<M extends ViewModel> {
759
+ readonly element: Element$1;
760
+ private model;
761
+ constructor(element: Element$1, model: LikeC4Model<M>);
762
+ get id(): Fqn;
763
+ get title(): string;
764
+ get kind(): ElementKind;
765
+ get isRoot(): boolean;
766
+ get hasNested(): boolean;
767
+ get shape(): ElementShape;
768
+ get color(): Color;
769
+ get tags(): Tag[];
770
+ parent(): ElementModel<M> | null;
771
+ metadata(key: string): string | undefined;
772
+ metadata(key: string, defaultValue: string): string;
773
+ hasMetadata(key: string): boolean;
774
+ ancestors(): readonly ElementModel<M>[];
775
+ siblings(): readonly ElementModel<M>[];
776
+ descendants(): readonly ElementModel<M>[];
777
+ children(): readonly ElementModel<M>[];
778
+ /**
779
+ * Views that contain this element
780
+ */
781
+ views(): readonly M[];
782
+ incoming(filter?: IncomingFilter): readonly Relationship<M>[];
783
+ incomers(filter?: IncomingFilter): readonly ElementModel<M>[];
784
+ outgoing(filter?: OutgoingFilter): readonly Relationship<M>[];
785
+ outgoers(filter?: OutgoingFilter): readonly ElementModel<M>[];
786
+ internal(): readonly Relationship<M>[];
787
+ }
609
788
  }
610
- interface MantineGradient {
611
- from: string;
612
- to: string;
613
- deg?: number;
789
+ declare class LikeC4DiagramModel {
790
+ readonly view: DiagramView;
791
+ readonly model: LikeC4Model.Layouted;
792
+ private _rootElements;
793
+ private _elements;
794
+ private _connections;
795
+ constructor(view: DiagramView, model: LikeC4Model.Layouted);
796
+ get isDynamic(): boolean;
797
+ get id(): ViewID;
798
+ get title(): string;
799
+ get viewOf(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
800
+ get tags(): Tag[];
801
+ roots(): ReadonlyArray<LikeC4DiagramModel.Element>;
802
+ elements(): ReadonlyArray<LikeC4DiagramModel.Element>;
803
+ element(id: Fqn$1): LikeC4DiagramModel.Element;
804
+ hasElement(id: Fqn$1): boolean;
805
+ connections(): ReadonlyArray<LikeC4DiagramModel.Connection>;
806
+ connection(id: EdgeId$1): LikeC4DiagramModel.Connection;
807
+ findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: "both" | "direct"): ReadonlyArray<LikeC4DiagramModel.Connection>;
808
+ parent(element: ElementOrFqn): LikeC4DiagramModel.Element | null;
809
+ children(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
810
+ siblings(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
811
+ /**
812
+ * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
813
+ * (from closest to root)
814
+ */
815
+ ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
816
+ descendants(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
817
+ incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
818
+ incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
819
+ /**
820
+ * Outgoing relationships from the element and its descendants
821
+ */
822
+ outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
823
+ outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
614
824
  }
615
- interface MantinePrimaryShade {
616
- light: MantineColorShade;
617
- dark: MantineColorShade;
825
+ declare namespace LikeC4DiagramModel {
826
+ /**
827
+ * Represents an element in the view. (Diagram node)
828
+ * All methods are view-scoped, i.e. `children` returns only children of the element in the view.
829
+ */
830
+ class Element {
831
+ readonly node: DiagramNode;
832
+ private view;
833
+ constructor(node: DiagramNode, view: LikeC4DiagramModel);
834
+ get id(): NodeId;
835
+ get title(): string;
836
+ get kind(): ElementKind;
837
+ get isRoot(): boolean;
838
+ get hasNested(): boolean;
839
+ get shape(): ElementShape;
840
+ get color(): Color;
841
+ get tags(): Tag[];
842
+ get level(): number;
843
+ get depth(): number;
844
+ model(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
845
+ parent(): LikeC4DiagramModel.Element | null;
846
+ metadata(key: string): string | undefined;
847
+ metadata(key: string, defaultValue: string): string;
848
+ hasMetadata(key: string): boolean;
849
+ ancestors(): ReadonlyArray<LikeC4DiagramModel.Element>;
850
+ siblings(): ReadonlyArray<LikeC4DiagramModel.Element>;
851
+ descendants(): ReadonlyArray<LikeC4DiagramModel.Element>;
852
+ children(): ReadonlyArray<LikeC4DiagramModel.Element>;
853
+ incoming(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
854
+ incomers(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
855
+ outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
856
+ outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
857
+ connectionsTo(target: Fqn$1 | LikeC4DiagramModel.Element): ReadonlyArray<LikeC4DiagramModel.Connection>;
858
+ }
859
+ /**
860
+ * Represents a connection between two elements.
861
+ * May be source from multiple model relationships.
862
+ */
863
+ class Connection {
864
+ readonly edge: DiagramEdge;
865
+ private view;
866
+ constructor(edge: DiagramEdge, view: LikeC4DiagramModel);
867
+ get id(): EdgeId;
868
+ get source(): LikeC4DiagramModel.Element;
869
+ get target(): LikeC4DiagramModel.Element;
870
+ get tags(): Tag[];
871
+ get color(): Color;
872
+ /**
873
+ * Model relationships
874
+ */
875
+ relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4DiagramModel>>;
876
+ }
877
+ }
878
+ declare namespace ViewChange {
879
+ interface ChangeElementStyle {
880
+ op: "change-element-style";
881
+ style: {
882
+ border?: BorderStyle;
883
+ opacity?: number;
884
+ shape?: ElementShape;
885
+ color?: ThemeColor;
886
+ };
887
+ targets: NonEmptyArray<Fqn>;
888
+ }
889
+ interface SaveManualLayout {
890
+ op: "save-manual-layout";
891
+ layout: ViewManualLayout;
892
+ }
893
+ interface ChangeAutoLayout {
894
+ op: "change-autolayout";
895
+ layout: AutoLayoutDirection;
896
+ }
897
+ }
898
+ type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
899
+ interface VariantColorsResolverInput {
900
+ color: MantineColor | undefined;
901
+ theme: MantineTheme;
902
+ variant: string;
903
+ gradient?: MantineGradient;
904
+ autoContrast?: boolean;
905
+ }
906
+ interface VariantColorResolverResult {
907
+ background: string;
908
+ hover: string;
909
+ color: string;
910
+ border: string;
911
+ hoverColor?: string;
618
912
  }
913
+ type VariantColorsResolver = (input: VariantColorsResolverInput) => VariantColorResolverResult;
619
914
  interface MantineTheme {
620
915
  /** Controls focus ring styles. Supports the following options:
621
916
  * - `auto` – focus ring is displayed only when the user navigates with keyboard (default value)
@@ -719,111 +1014,243 @@ interface MantineTheme {
719
1014
  /** Any other properties that you want to access with the theme objects */
720
1015
  other: MantineThemeOther;
721
1016
  }
722
- interface MantineThemeColorsOverride {
723
- }
1017
+ type MantineThemeOverride = PartialDeep<MantineTheme>;
724
1018
  interface MantineThemeComponent {
725
1019
  classNames?: any;
726
1020
  styles?: any;
727
1021
  vars?: any;
728
1022
  defaultProps?: any;
729
1023
  }
1024
+ type MantineThemeComponents = Record<string, MantineThemeComponent>;
1025
+ interface HeadingStyle {
1026
+ fontSize: string;
1027
+ fontWeight?: string;
1028
+ lineHeight: string;
1029
+ }
1030
+ type MantineSize = "xs" | "sm" | "md" | "lg" | "xl";
1031
+ type MantineBreakpointsValues = Record<MantineSize | (string & {}), string>;
1032
+ type MantineFontSizesValues = Record<MantineSize | (string & {}), string>;
1033
+ type MantineRadiusValues = Record<MantineSize | (string & {}), string>;
1034
+ type MantineSpacingValues = Record<MantineSize | (string & {}), string>;
1035
+ type MantineShadowsValues = Record<MantineSize | (string & {}), string>;
1036
+ type MantineLineHeightValues = Record<MantineSize | (string & {}), string>;
1037
+ type MantineRadius = keyof MantineRadiusValues | (string & {}) | number;
730
1038
  interface MantineThemeOther {
731
1039
  [key: string]: any;
732
1040
  }
733
- interface OutgoingExpr extends Omit<BaseExpr, "outgoing"> {
734
- outgoing: ElementExpression;
735
- }
736
- interface RelationExpr extends Omit<BaseExpr, "source" | "target"> {
737
- source: ElementExpression;
738
- target: ElementExpression;
739
- isBidirectional?: boolean;
740
- }
741
- interface RelationWhereExpr extends Omit<BaseExpr, "where"> {
742
- where: {
743
- expr: RelationExpression;
744
- condition: WhereOperator<string, string>;
745
- };
746
- }
747
- interface RelationshipThemeColorValues {
748
- lineColor: ColorLiteral;
749
- labelBgColor: ColorLiteral;
750
- labelColor: ColorLiteral;
751
- }
752
- interface ScopedElementView extends BasicElementView {
753
- readonly viewOf: Fqn;
754
- }
755
- interface ThemeColorValues {
756
- elements: ElementThemeColorValues;
757
- relationships: RelationshipThemeColorValues;
758
- }
759
- interface VariantColorResolverResult {
760
- background: string;
761
- hover: string;
762
- color: string;
763
- border: string;
764
- hoverColor?: string;
1041
+ interface MantineGradient {
1042
+ from: string;
1043
+ to: string;
1044
+ deg?: number;
765
1045
  }
766
- interface VariantColorsResolverInput {
767
- color: MantineColor | undefined;
768
- theme: MantineTheme;
769
- variant: string;
770
- gradient?: MantineGradient;
771
- autoContrast?: boolean;
1046
+ type MantineColorsTuple = readonly [
1047
+ string,
1048
+ string,
1049
+ string,
1050
+ string,
1051
+ string,
1052
+ string,
1053
+ string,
1054
+ string,
1055
+ string,
1056
+ string,
1057
+ ...string[]
1058
+ ];
1059
+ type MantineColorShade = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
1060
+ interface MantinePrimaryShade {
1061
+ light: MantineColorShade;
1062
+ dark: MantineColorShade;
772
1063
  }
773
- interface ViewRuleAutoLayout {
774
- autoLayout: AutoLayoutDirection;
1064
+ type DefaultMantineColor = "dark" | "gray" | "red" | "pink" | "grape" | "violet" | "indigo" | "blue" | "cyan" | "green" | "lime" | "yellow" | "orange" | "teal" | (string & {});
1065
+ interface MantineThemeColorsOverride {
775
1066
  }
776
- interface ViewRuleStyle {
777
- targets: ElementExpression[];
778
- notation?: string;
779
- style: ElementStyle & {
780
- color?: Color;
781
- shape?: ElementShape;
782
- icon?: IconUrl;
1067
+ type MantineThemeColors = MantineThemeColorsOverride extends {
1068
+ colors: Record<infer CustomColors, MantineColorsTuple>;
1069
+ } ? Record<CustomColors, MantineColorsTuple> : Record<DefaultMantineColor, MantineColorsTuple>;
1070
+ type MantineColor = keyof MantineThemeColors;
1071
+ export type ViewData<ViewId extends string> = Omit<DiagramView, "id"> & {
1072
+ id: ViewId;
1073
+ };
1074
+ type ElementIconRendererProps = {
1075
+ node: {
1076
+ id: string;
1077
+ title: string;
1078
+ icon?: string | undefined;
783
1079
  };
784
- }
785
- interface ViewWithHash {
1080
+ };
1081
+ export type ElementIconRenderer = (props: ElementIconRendererProps) => ReactNode;
1082
+ export type LikeC4ViewProps<ViewId extends string, Tag extends string, Kind extends string> = {
786
1083
  /**
787
- * Hash of the view object.
788
- * This is used to detect changes in layout
1084
+ * View to display.
789
1085
  */
790
- hash: string;
791
- }
792
- interface ViewWithNotation {
793
- notation?: {
794
- elements: ElementNotation[];
795
- };
796
- }
797
- interface WildcardExpr extends Omit<BaseExpr, "wildcard"> {
798
- wildcard: true;
799
- }
800
- interface XYPoint {
801
- x: number;
802
- y: number;
803
- }
804
- type AllNever = {
805
- not?: never;
806
- and?: never;
807
- or?: never;
808
- tag?: never;
809
- kind?: never;
810
- };
811
- type AndOperator<Tag, Kind> = Omit<AllNever, "and"> & {
812
- and: NonEmptyArray<WhereOperator<Tag, Kind>>;
813
- };
814
- type AutoLayoutDirection = "TB" | "BT" | "LR" | "RL";
815
- type BBox = {
816
- x: number;
817
- y: number;
818
- width: number;
819
- height: number;
820
- };
821
- type BackgroundProps = {
822
- id?: string;
823
- /** Color of the pattern */
824
- color?: string;
825
- /** Color of the background */
826
- bgColor?: string;
1086
+ viewId: ViewId;
1087
+ /**
1088
+ * Background pattern
1089
+ * @default 'transparent'
1090
+ */
1091
+ background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
1092
+ /**
1093
+ * Background pattern for the browser view.
1094
+ * @default 'dots'
1095
+ */
1096
+ browserBackground?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
1097
+ /**
1098
+ * Click on the view opens a modal with browser.
1099
+ *
1100
+ * @default true
1101
+ */
1102
+ interactive?: boolean;
1103
+ /**
1104
+ * By default determined by the user's system preferences.
1105
+ */
1106
+ colorScheme?: "light" | "dark" | undefined;
1107
+ /**
1108
+ * LikeC4 views are using 'IBM Plex Sans' font.
1109
+ * By default, component injects the CSS to document head.
1110
+ * Set to false if you want to handle the font yourself.
1111
+ *
1112
+ * @default true
1113
+ */
1114
+ injectFontCss?: boolean | undefined;
1115
+ /**
1116
+ * Display hovercards with element links
1117
+ * @default true
1118
+ */
1119
+ showElementLinks?: boolean | undefined;
1120
+ /**
1121
+ * Display webview with diagram title / description
1122
+ * @default false
1123
+ */
1124
+ showDiagramTitle?: boolean | undefined;
1125
+ /**
1126
+ * Show back/forward navigation buttons
1127
+ * @default false
1128
+ */
1129
+ showNavigationButtons?: undefined | boolean;
1130
+ /**
1131
+ * Display notations of the view
1132
+ * @default false
1133
+ */
1134
+ showNotations?: boolean | undefined;
1135
+ /**
1136
+ * Display dropdown with details on relationship's label click
1137
+ * @default false
1138
+ */
1139
+ showRelationshipDetails?: boolean | undefined;
1140
+ /**
1141
+ * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
1142
+ * Conflicts with `interactive`
1143
+ *
1144
+ * @default false
1145
+ */
1146
+ enableFocusMode?: boolean | undefined;
1147
+ where?: WhereOperator<Tag, Kind> | undefined;
1148
+ className?: string | undefined;
1149
+ style?: CSSProperties | undefined;
1150
+ browserClassName?: string | undefined;
1151
+ browserStyle?: CSSProperties | undefined;
1152
+ mantineTheme?: MantineThemeOverride | undefined;
1153
+ };
1154
+ export type LikeC4BrowserProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDialogElement>, "style" | "className"> & {
1155
+ view: ViewData<ViewId>;
1156
+ /**
1157
+ * By default determined by the user's system preferences.
1158
+ */
1159
+ colorScheme?: "light" | "dark";
1160
+ /**
1161
+ * LikeC4 views are using 'IBM Plex Sans' font.
1162
+ * By default, component injects the CSS to document head.
1163
+ * Set to false if you want to handle the font yourself.
1164
+ *
1165
+ * @default true
1166
+ */
1167
+ injectFontCss?: boolean | undefined;
1168
+ /**
1169
+ * Background pattern
1170
+ * @default 'dots'
1171
+ */
1172
+ background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
1173
+ onNavigateTo: (to: ViewId) => void;
1174
+ onClose: () => void;
1175
+ /**
1176
+ * Render custom icon for a node
1177
+ * By default, if icon is http:// or https://, it will be rendered as an image
1178
+ */
1179
+ renderIcon?: ElementIconRenderer | undefined;
1180
+ where?: WhereOperator<Tag, Kind> | undefined;
1181
+ mantineTheme?: MantineThemeOverride | undefined;
1182
+ };
1183
+ export declare function LikeC4Browser<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ className, colorScheme, view, injectFontCss, onNavigateTo, onClose, renderIcon, where, style, mantineTheme, background }: LikeC4BrowserProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
1184
+ export type LikeC4ViewEmbeddedProps<ViewId extends string, Tag extends string, Kind extends string> = Pick<HTMLAttributes<HTMLDivElement>, "style" | "className"> & {
1185
+ view: ViewData<ViewId>;
1186
+ /**
1187
+ * By default determined by the user's system preferences.
1188
+ */
1189
+ colorScheme?: "light" | "dark";
1190
+ /**
1191
+ * LikeC4 views are using 'IBM Plex Sans' font.
1192
+ * By default, component injects the CSS to document head.
1193
+ * Set to false if you want to handle the font yourself.
1194
+ *
1195
+ * @default true
1196
+ */
1197
+ injectFontCss?: boolean | undefined;
1198
+ /**
1199
+ * Background pattern
1200
+ * @default 'transparent'
1201
+ */
1202
+ background?: "dots" | "lines" | "cross" | "transparent" | "solid" | undefined;
1203
+ onNavigateTo?: ((to: ViewId) => void) | undefined;
1204
+ /**
1205
+ * Render custom icon for a node
1206
+ * By default, if icon is http:// or https://, it will be rendered as an image
1207
+ */
1208
+ renderIcon?: ElementIconRenderer | undefined;
1209
+ /**
1210
+ * Display hovercards with element links
1211
+ * @default true
1212
+ */
1213
+ showElementLinks?: boolean | undefined;
1214
+ /**
1215
+ * Display webview with diagram title / description
1216
+ * @default false
1217
+ */
1218
+ showDiagramTitle?: boolean | undefined;
1219
+ /**
1220
+ * Show back/forward navigation buttons
1221
+ * @default false
1222
+ */
1223
+ showNavigationButtons?: undefined | boolean;
1224
+ /**
1225
+ * Display notations of the view
1226
+ * @default false
1227
+ */
1228
+ showNotations?: boolean | undefined;
1229
+ /**
1230
+ * Display dropdown with details on relationship's label click
1231
+ * @default false
1232
+ */
1233
+ showRelationshipDetails?: boolean | undefined;
1234
+ /**
1235
+ * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
1236
+ * @default false
1237
+ */
1238
+ enableFocusMode?: boolean | undefined;
1239
+ where?: WhereOperator<Tag, Kind> | undefined;
1240
+ mantineTheme?: MantineThemeOverride | undefined;
1241
+ };
1242
+ export declare function LikeC4ViewEmbedded<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ onNavigateTo: _onNavigateTo, className, view, injectFontCss, colorScheme, background, renderIcon, showDiagramTitle, showElementLinks, showNavigationButtons, enableFocusMode, showNotations, showRelationshipDetails, mantineTheme, where, style }: LikeC4ViewEmbeddedProps<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
1243
+ declare enum BackgroundVariant {
1244
+ Lines = "lines",
1245
+ Dots = "dots",
1246
+ Cross = "cross"
1247
+ }
1248
+ type BackgroundProps = {
1249
+ id?: string;
1250
+ /** Color of the pattern */
1251
+ color?: string;
1252
+ /** Color of the background */
1253
+ bgColor?: string;
827
1254
  /** Class applied to the container */
828
1255
  className?: string;
829
1256
  /** Class applied to the pattern */
@@ -850,215 +1277,441 @@ type BackgroundProps = {
850
1277
  /** Style applied to the container */
851
1278
  style?: CSSProperties;
852
1279
  };
853
- type BorderStyle = typeof BorderStyles[number];
854
- type BuiltIns = Primitive | void | Date | RegExp;
855
- type ChangeEvent = {
856
- change: ViewChange;
857
- };
858
- type Color = LiteralUnion<ThemeColor, string>;
859
- type ColorLiteral = HexColorLiteral;
860
- type ColorScheme = "light" | "dark";
861
- type ComputedView = ComputedElementView | ComputedDynamicView;
862
- type CustomColorDefinitions = {
863
- [key: string]: ThemeColorValues;
864
- };
865
- type DefaultMantineColor = "dark" | "gray" | "red" | "pink" | "grape" | "violet" | "indigo" | "blue" | "cyan" | "green" | "lime" | "yellow" | "orange" | "teal" | (string & {});
1280
+ type XYBackgroundVariant = "dots" | "lines" | "cross";
1281
+ type XYBackground = XYBackgroundVariant | OverrideProperties<BackgroundProps, {
1282
+ variant: XYBackgroundVariant;
1283
+ }>;
866
1284
  type DiagramNodeWithNavigate<ID extends string = ViewID> = Omit<DiagramNode, "navigateTo"> & {
867
1285
  navigateTo: ID;
868
1286
  };
869
- type DynamicViewIncludeRule = {
870
- include: ElementPredicateExpression[];
871
- };
872
- type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
873
- type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
874
- type EdgeId = Tagged<string, "EdgeId">;
875
- type ElementExpression = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
876
1287
  type ElementIconNodeProps = {
877
1288
  id: string;
878
1289
  title: string;
879
1290
  icon?: string | undefined;
880
1291
  };
881
- type ElementIconRenderer = (props: ElementIconRendererProps) => ReactNode;
882
1292
  type ElementIconRenderer$1 = (props: {
883
1293
  node: ElementIconNodeProps;
884
1294
  }) => ReactNode;
885
- type ElementIconRendererProps = {
886
- node: {
887
- id: string;
888
- title: string;
889
- icon?: string | undefined;
890
- };
891
- };
892
- type ElementKind = Tagged<string, "ElementKind">;
893
- type ElementNotation = {
894
- kinds: ElementKind[];
895
- shape: ElementShape;
896
- color: Color;
897
- title: string;
898
- };
899
- type ElementPredicateExpression = ElementExpression | ElementWhereExpr | CustomElementExpr;
900
- type ElementShape = typeof ElementShapes[number];
901
- type ElementView = ScopedElementView | ExtendsElementView | BasicElementView;
902
- type EqualOperator<V> = {
903
- eq: V;
904
- neq?: never;
905
- } | {
906
- eq?: never;
907
- neq: V;
908
- };
909
- type Expression = ElementPredicateExpression | RelationPredicateExpression;
910
- type Fqn = Tagged<string, "Fqn">;
911
- type HexColorLiteral = `#${string}`;
912
- type IconUrl = Tagged<string, "IconUrl">;
913
- type KindEqual<Kind> = Omit<AllNever, "kind"> & {
914
- kind: EqualOperator<Kind>;
915
- };
916
- type LikeC4DiagramProps = LikeC4DiagramProperties & LikeC4DiagramEventHandlers;
917
- type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
918
- type MantineBreakpointsValues = Record<MantineSize | (string & {}), string>;
919
- type MantineColor = keyof MantineThemeColors;
920
- type MantineColorShade = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
921
- type MantineColorsTuple = readonly [
922
- string,
923
- string,
924
- string,
925
- string,
926
- string,
927
- string,
928
- string,
929
- string,
930
- string,
931
- string,
932
- ...string[]
933
- ];
934
- type MantineFontSizesValues = Record<MantineSize | (string & {}), string>;
935
- type MantineLineHeightValues = Record<MantineSize | (string & {}), string>;
936
- type MantineRadius = keyof MantineRadiusValues | (string & {}) | number;
937
- type MantineRadiusValues = Record<MantineSize | (string & {}), string>;
938
- type MantineShadowsValues = Record<MantineSize | (string & {}), string>;
939
- type MantineSize = "xs" | "sm" | "md" | "lg" | "xl";
940
- type MantineSpacingValues = Record<MantineSize | (string & {}), string>;
941
- type MantineThemeColors = MantineThemeColorsOverride extends {
942
- colors: Record<infer CustomColors, MantineColorsTuple>;
943
- } ? Record<CustomColors, MantineColorsTuple> : Record<DefaultMantineColor, MantineColorsTuple>;
944
- type MantineThemeComponents = Record<string, MantineThemeComponent>;
945
- type MantineThemeOverride = PartialDeep<MantineTheme>;
946
- type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
947
- type NodeId = Tagged<string, "Fqn">;
948
- type NonEmptyArray<T> = [
949
- T,
950
- ...T[]
951
- ];
952
- type NotOperator<Tag, Kind> = Omit<AllNever, "not"> & {
953
- not: WhereOperator<Tag, Kind>;
954
- };
955
- type OmitIndexSignature<ObjectType> = {
956
- [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType];
957
- };
958
- type OnCanvasClick = (event: ReactMouseEvent) => void;
959
- type OnChange = (event: ChangeEvent) => void;
960
- type OnEdgeClick = (edge: DiagramEdge, event: ReactMouseEvent) => void;
961
1295
  type OnNavigateTo<ID extends string = ViewID> = (to: ID, event?: ReactMouseEvent, element?: DiagramNodeWithNavigate<ID>) => void;
962
1296
  type OnNodeClick = (node: DiagramNode, event: ReactMouseEvent) => void;
963
- type OrOperator<Tag, Kind> = Omit<AllNever, "or"> & {
964
- or: NonEmptyArray<WhereOperator<Tag, Kind>>;
965
- };
966
- type OverrideProperties<TOriginal,
967
- // This first bit where we use `Partial` is to enable autocomplete
968
- // and the second bit with the mapped type is what enforces that we don't try
969
- // to override properties that doesn't exist in the original type.
970
- TOverride extends Partial<Record<keyof TOriginal, unknown>> & {
971
- [Key in keyof TOverride]: Key extends keyof TOriginal ? TOverride[Key] : never;
972
- }> = Merge<TOriginal, TOverride>;
973
- type PartialDeep<T, Options extends PartialDeepOptions = {}> = T extends BuiltIns | (((...arguments_: any[]) => unknown)) | (new (...arguments_: any[]) => unknown) ? T : T extends Map<infer KeyType, infer ValueType> ? PartialMapDeep<KeyType, ValueType, Options> : T extends Set<infer ItemType> ? PartialSetDeep<ItemType, Options> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? PartialReadonlyMapDeep<KeyType, ValueType, Options> : T extends ReadonlySet<infer ItemType> ? PartialReadonlySetDeep<ItemType, Options> : T extends object ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
974
- ? Options["recurseIntoArrays"] extends true ? ItemType[] extends T // Test for arrays (non-tuples) specifically
975
- ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
976
- ? ReadonlyArray<PartialDeep<ItemType | undefined, Options>> : Array<PartialDeep<ItemType | undefined, Options>> : PartialObjectDeep<T, Options> // Tuples behave properly
977
- : T // If they don't opt into array testing, just use the original type
978
- : PartialObjectDeep<T, Options> : unknown;
979
- type PartialDeepOptions = {
980
- /**
981
- Whether to affect the individual elements of arrays and tuples.
982
-
983
- @default false
984
- */
985
- readonly recurseIntoArrays?: boolean;
986
- };
987
- type PartialMapDeep<KeyType, ValueType, Options extends PartialDeepOptions> = {} & Map<PartialDeep<KeyType, Options>, PartialDeep<ValueType, Options>>;
988
- type PartialObjectDeep<ObjectType extends object, Options extends PartialDeepOptions> = {
989
- [KeyType in keyof ObjectType]?: PartialDeep<ObjectType[KeyType], Options>;
990
- };
991
- type PartialReadonlyMapDeep<KeyType, ValueType, Options extends PartialDeepOptions> = {} & ReadonlyMap<PartialDeep<KeyType, Options>, PartialDeep<ValueType, Options>>;
992
- type PartialReadonlySetDeep<T, Options extends PartialDeepOptions> = {} & ReadonlySet<PartialDeep<T, Options>>;
993
- type PartialSetDeep<T, Options extends PartialDeepOptions> = {} & Set<PartialDeep<T, Options>>;
994
- type PickIndexSignature<ObjectType> = {
995
- [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType];
1297
+ type OnEdgeClick = (edge: DiagramEdge, event: ReactMouseEvent) => void;
1298
+ type OnCanvasClick = (event: ReactMouseEvent) => void;
1299
+ type ChangeEvent = {
1300
+ change: ViewChange;
996
1301
  };
997
- type Point = readonly [
998
- x: number,
999
- y: number
1000
- ];
1001
- type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1002
- type RelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
1003
- type RelationID = Tagged<string, "RelationID">;
1004
- type RelationPredicateExpression = RelationExpression | RelationWhereExpr | CustomRelationExpr;
1005
- type RelationshipArrowType = "none" | "normal" | "onormal" | "dot" | "odot" | "diamond" | "odiamond" | "crow" | "open" | "vee";
1006
- type RelationshipKind = Tagged<string, "RelationshipKind">;
1007
- type RelationshipLineType = "dashed" | "solid" | "dotted";
1008
- type SimpleMerge<Destination, Source> = {
1009
- [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key];
1010
- } & Source;
1011
- type Simplify<T> = {
1012
- [KeyType in keyof T]: T[KeyType];
1013
- } & {};
1014
- type Tag$1 = Tagged<string, "Tag">;
1015
- type Tag<Token extends PropertyKey, TagMetadata> = TagContainer<{
1016
- [K in Token]: TagMetadata;
1017
- }>;
1018
- type TagContainer<Token> = {
1019
- readonly [tag]: Token;
1302
+ type OnChange = (event: ChangeEvent) => void;
1303
+ interface LikeC4DiagramProperties {
1304
+ view: DiagramView;
1305
+ className?: string | undefined;
1306
+ /**
1307
+ * Show/hide ReactFlow controls menu
1308
+ * @default false
1309
+ */
1310
+ controls?: boolean | undefined;
1311
+ /**
1312
+ * Enable/disable panning
1313
+ * @default true
1314
+ */
1315
+ pannable?: boolean | undefined;
1316
+ /**
1317
+ * Enable/disable zooming
1318
+ * @default true
1319
+ */
1320
+ zoomable?: boolean | undefined;
1321
+ /**
1322
+ * Disable any editing (dragging still can be enabled with `nodesDraggable`)
1323
+ * @default true
1324
+ */
1325
+ readonly?: boolean | undefined;
1326
+ /**
1327
+ * If set, initial viewport will show all nodes & edges
1328
+ * @default true
1329
+ */
1330
+ fitView?: boolean | undefined;
1331
+ /**
1332
+ * Seems like this is percentage of the view size
1333
+ * @default 0
1334
+ */
1335
+ fitViewPadding?: number | undefined;
1336
+ /**
1337
+ * @default false if readonly
1338
+ */
1339
+ nodesSelectable?: boolean | undefined;
1340
+ /**
1341
+ * @default false if readonly
1342
+ */
1343
+ nodesDraggable?: boolean | undefined;
1344
+ initialWidth?: number | undefined;
1345
+ initialHeight?: number | undefined;
1346
+ /**
1347
+ * Keep aspect ratio of the diagram
1348
+ * @default false
1349
+ */
1350
+ keepAspectRatio?: boolean | undefined;
1351
+ /**
1352
+ * Background pattern
1353
+ * @default 'dots'
1354
+ */
1355
+ background?: "transparent" | "solid" | XYBackground | undefined;
1356
+ /**
1357
+ * Display hovercards with element links
1358
+ * @default true
1359
+ */
1360
+ showElementLinks?: boolean | undefined;
1361
+ /**
1362
+ * Display webview with diagram title / description
1363
+ * @default true
1364
+ */
1365
+ showDiagramTitle?: boolean | undefined;
1366
+ /**
1367
+ * Show back/forward navigation buttons
1368
+ * @default true if `onNavigateTo` is set
1369
+ */
1370
+ showNavigationButtons?: undefined | boolean;
1371
+ /**
1372
+ * Display notations of the view
1373
+ * @default true
1374
+ */
1375
+ showNotations?: boolean | undefined;
1376
+ /**
1377
+ * Display dropdown with details on relationship's label click
1378
+ * @default true
1379
+ */
1380
+ showRelationshipDetails?: boolean | undefined;
1381
+ /**
1382
+ * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
1383
+ * @default true
1384
+ */
1385
+ enableFocusMode?: boolean | undefined;
1386
+ /**
1387
+ * If Walkthrough for dynamic views should be enabled
1388
+ * @default false
1389
+ */
1390
+ enableDynamicViewWalkthrough?: boolean | undefined;
1391
+ /**
1392
+ * Experimental feature to enable edge editing
1393
+ * @default false
1394
+ */
1395
+ experimentalEdgeEditing?: boolean | undefined;
1396
+ /**
1397
+ * Render icon for an element, bundled or remote
1398
+ * By default, if icon is http:// or https://, it will be rendered as an image
1399
+ */
1400
+ renderIcon?: ElementIconRenderer$1 | undefined;
1401
+ /**
1402
+ * Dynamic filter, applies both to nodes and edges
1403
+ */
1404
+ where?: WhereOperator<string, string> | undefined;
1405
+ }
1406
+ interface LikeC4DiagramEventHandlers {
1407
+ onChange?: OnChange | null | undefined;
1408
+ onNavigateTo?: OnNavigateTo | null | undefined;
1409
+ onNodeClick?: OnNodeClick | null | undefined;
1410
+ onNodeContextMenu?: OnNodeClick | null | undefined;
1411
+ onCanvasContextMenu?: OnCanvasClick | null | undefined;
1412
+ onEdgeClick?: OnEdgeClick | null | undefined;
1413
+ onEdgeContextMenu?: OnEdgeClick | null | undefined;
1414
+ onCanvasClick?: OnCanvasClick | null | undefined;
1415
+ onCanvasDblClick?: OnCanvasClick | null | undefined;
1416
+ onBurgerMenuClick?: null | undefined | (() => void);
1417
+ onOpenSourceView?: null | undefined | (() => void);
1418
+ onOpenSourceElement?: null | undefined | ((fqn: Fqn) => void);
1419
+ onOpenSourceRelation?: null | undefined | ((id: RelationID) => void);
1420
+ }
1421
+ type LikeC4DiagramProps = LikeC4DiagramProperties & LikeC4DiagramEventHandlers;
1422
+ export declare function useLikeC4Model(): LikeC4Model | null;
1423
+ export declare function useLikeC4Model(strict: true): LikeC4Model;
1424
+ export declare function useLikeC4Model(strict: boolean): LikeC4Model | null;
1425
+ export declare function useLikeC4Model(strict: true, type: "layouted"): LikeC4Model.Layouted;
1426
+ export declare function useLikeC4Model(strict: true, type: "computed"): LikeC4Model.Computed;
1427
+ export declare function useLikeC4Model(strict: true, type: LikeC4Model["type"] | undefined): LikeC4Model;
1428
+ export declare function useLikeC4Model(strict: boolean, type: "layouted"): LikeC4Model.Layouted | null;
1429
+ export declare function useLikeC4Model(strict: boolean, type: "computed"): LikeC4Model.Computed | null;
1430
+ export declare function useLikeC4Model(strict: boolean, type: LikeC4Model["type"] | undefined): LikeC4Model | null;
1431
+ export declare function useLikeC4Views(): LikeC4Model.SourceModel["views"];
1432
+ export declare function useLikeC4ViewModel(viewId: LiteralUnion<ViewID, string>): LikeC4Model.ViewModel;
1433
+ export declare function useLikeC4View(viewId: LiteralUnion<ViewID, string>): ComputedView | DiagramView | null;
1434
+ export declare function useLikeC4DiagramView(viewId: LiteralUnion<ViewID, string>): DiagramView | null;
1435
+ type LikeC4ModelProviderProps = PropsWithChildren<RequireExactlyOne<{
1436
+ likec4model: LikeC4Model;
1437
+ layouted: LikeC4Model.Layouted.SourceModel;
1438
+ computed: LikeC4Model.Computed.SourceModel;
1439
+ }>>;
1440
+ /**
1441
+ * Ensures LikeC4Model context
1442
+ */
1443
+ export declare function LikeC4ModelProvider({ children, ...props }: LikeC4ModelProviderProps): import("react/jsx-runtime").JSX.Element;
1444
+ export type ReactLikeC4Props<ViewId extends string, Tag extends string, Kind extends string> = Omit<LikeC4DiagramProps, "view" | "where" | "onNavigateTo"> & {
1445
+ view: ViewData<ViewId>;
1446
+ /**
1447
+ * Keep aspect ratio of the diagram
1448
+ * Disable if you need to manage the viewport (use className)
1449
+ *
1450
+ * @default true
1451
+ */
1452
+ keepAspectRatio?: boolean | undefined;
1453
+ /**
1454
+ * By default determined by the user's system preferences.
1455
+ */
1456
+ colorScheme?: "light" | "dark" | undefined;
1457
+ /**
1458
+ * LikeC4 views are using 'IBM Plex Sans' font.
1459
+ * By default, component injects the CSS to document head.
1460
+ * Set to false if you want to handle the font yourself.
1461
+ *
1462
+ * @default true
1463
+ */
1464
+ injectFontCss?: boolean | undefined;
1465
+ style?: CSSProperties | undefined;
1466
+ where?: WhereOperator<Tag, Kind> | undefined;
1467
+ onNavigateTo?: OnNavigateTo<ViewId> | undefined;
1468
+ mantineTheme?: MantineThemeOverride | undefined;
1020
1469
  };
1021
- type TagEqual<Tag> = Omit<AllNever, "tag"> & {
1022
- tag: EqualOperator<Tag>;
1470
+ export declare function ReactLikeC4<ViewId extends string = string, Tag extends string = string, Kind extends string = string>({ className, view, colorScheme: explicitColorScheme, injectFontCss, keepAspectRatio, showNotations, onNavigateTo, background, style, mantineTheme, ...props }: ReactLikeC4Props<ViewId, Tag, Kind>): import("react/jsx-runtime").JSX.Element;
1471
+ export declare namespace ReactLikeC4 {
1472
+ var displayName: string;
1473
+ }
1474
+ type AllKeys<T> = T extends any ? keyof T : never;
1475
+ type Primitive = boolean | number | string;
1476
+ type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends (...args: any) => any ? Value : Value extends Primitive ? Value : Value extends object ? Readonly<Value> : Value;
1477
+ interface ReadableAtom<Value = any> {
1478
+ /**
1479
+ * Get store value.
1480
+ *
1481
+ * In contrast with {@link ReadableAtom#value} this value will be always
1482
+ * initialized even if store had no listeners.
1483
+ *
1484
+ * ```js
1485
+ * $store.get()
1486
+ * ```
1487
+ *
1488
+ * @returns Store value.
1489
+ */
1490
+ get(): Value;
1491
+ /**
1492
+ * Listeners count.
1493
+ */
1494
+ readonly lc: number;
1495
+ /**
1496
+ * Subscribe to store changes.
1497
+ *
1498
+ * In contrast with {@link Store#subscribe} it do not call listener
1499
+ * immediately.
1500
+ *
1501
+ * @param listener Callback with store value and old value.
1502
+ * @returns Function to remove listener.
1503
+ */
1504
+ listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value>) => void): () => void;
1505
+ /**
1506
+ * Low-level method to notify listeners about changes in the store.
1507
+ *
1508
+ * Can cause unexpected behaviour when combined with frontend frameworks
1509
+ * that perform equality checks for values, such as React.
1510
+ */
1511
+ notify(oldValue?: ReadonlyIfObject<Value>): void;
1512
+ /**
1513
+ * Unbind all listeners.
1514
+ */
1515
+ off(): void;
1516
+ /**
1517
+ * Subscribe to store changes and call listener immediately.
1518
+ *
1519
+ * ```
1520
+ * import { $router } from '../store'
1521
+ *
1522
+ * $router.subscribe(page => {
1523
+ * console.log(page)
1524
+ * })
1525
+ * ```
1526
+ *
1527
+ * @param listener Callback with store value and old value.
1528
+ * @returns Function to remove listener.
1529
+ */
1530
+ subscribe(listener: (value: ReadonlyIfObject<Value>, oldValue?: ReadonlyIfObject<Value>) => void): () => void;
1531
+ /**
1532
+ * Low-level method to read store’s value without calling `onStart`.
1533
+ *
1534
+ * Try to use only {@link ReadableAtom#get}.
1535
+ * Without subscribers, value can be undefined.
1536
+ */
1537
+ readonly value: undefined | Value;
1538
+ }
1539
+ interface WritableAtom<Value = any> extends ReadableAtom<Value> {
1540
+ /**
1541
+ * Change store value.
1542
+ *
1543
+ * ```js
1544
+ * $router.set({ path: location.pathname, page: parse(location.pathname) })
1545
+ * ```
1546
+ *
1547
+ * @param newValue New store value.
1548
+ */
1549
+ set(newValue: Value): void;
1550
+ }
1551
+ interface PreinitializedWritableAtom<Value extends any> extends WritableAtom<Value> {
1552
+ readonly value: Value;
1553
+ }
1554
+ declare function atom<Value, StoreExt = {}>(...args: undefined extends Value ? [
1555
+ ] | [
1556
+ Value
1557
+ ] : [
1558
+ Value
1559
+ ]): PreinitializedWritableAtom<Value> & StoreExt;
1560
+ type KeyofBase = keyof any;
1561
+ type Get<T, K extends KeyofBase> = Extract<T, {
1562
+ [K1 in K]: any;
1563
+ }>[K];
1564
+ type WritableStore<Value = any> = (Value extends object ? MapStore<Value> : never) | WritableAtom<Value>;
1565
+ type Store<Value = any> = ReadableAtom<Value> | WritableStore<Value>;
1566
+ type AnyStore<Value = any> = {
1567
+ get(): Value;
1568
+ readonly value: undefined | Value;
1023
1569
  };
1024
- type Tagged<Type, TagName extends PropertyKey, TagMetadata = never> = Type & Tag<TagName, TagMetadata>;
1025
- type ThemeColor = typeof ThemeColors[number];
1026
- type VariantColorsResolver = (input: VariantColorsResolverInput) => VariantColorResolverResult;
1027
- type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
1028
- type ViewID = Tagged<string, "ViewID">;
1029
- type ViewManualLayout = {
1030
- readonly hash: string;
1031
- readonly x: number;
1032
- readonly y: number;
1033
- readonly width: number;
1034
- readonly height: number;
1035
- readonly autoLayout: AutoLayoutDirection;
1036
- readonly nodes: Record<string, {
1037
- isCompound: boolean;
1038
- x: number;
1039
- y: number;
1040
- width: number;
1041
- height: number;
1042
- }>;
1043
- readonly edges: Record<string, {
1044
- dotpos?: string;
1045
- points: NonEmptyArray<Point>;
1046
- controlPoints?: NonEmptyArray<XYPoint>;
1047
- labelBBox?: BBox;
1048
- }>;
1570
+ type StoreValue<SomeStore> = SomeStore extends {
1571
+ get(): infer Value;
1572
+ } ? Value : any;
1573
+ interface MapStore<Value extends object = any> extends WritableAtom<Value> {
1574
+ /**
1575
+ * Subscribe to store changes.
1576
+ *
1577
+ * In contrast with {@link Store#subscribe} it do not call listener
1578
+ * immediately.
1579
+ *
1580
+ * @param listener Callback with store value and old value.
1581
+ * @param changedKey Key that was changed. Will present only if `setKey`
1582
+ * has been used to change a store.
1583
+ * @returns Function to remove listener.
1584
+ */
1585
+ listen(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value>, changedKey: AllKeys<Value>) => void): () => void;
1586
+ /**
1587
+ * Low-level method to notify listeners about changes in the store.
1588
+ *
1589
+ * Can cause unexpected behaviour when combined with frontend frameworks
1590
+ * that perform equality checks for values, such as React.
1591
+ */
1592
+ notify(oldValue?: ReadonlyIfObject<Value>, changedKey?: AllKeys<Value>): void;
1593
+ /**
1594
+ * Change store value.
1595
+ *
1596
+ * ```js
1597
+ * $settings.set({ theme: 'dark' })
1598
+ * ```
1599
+ *
1600
+ * Operation is atomic, subscribers will be notified once with the new value.
1601
+ * `changedKey` will be undefined
1602
+ *
1603
+ * @param newValue New store value.
1604
+ */
1605
+ set(newValue: Value): void;
1606
+ /**
1607
+ * Change key in store value.
1608
+ *
1609
+ * ```js
1610
+ * $settings.setKey('theme', 'dark')
1611
+ * ```
1612
+ *
1613
+ * To delete key set `undefined`.
1614
+ *
1615
+ * ```js
1616
+ * $settings.setKey('theme', undefined)
1617
+ * ```
1618
+ *
1619
+ * @param key The key name.
1620
+ * @param value New value.
1621
+ */
1622
+ setKey<Key extends AllKeys<Value>>(key: Key, value: Get<Value, Key> | Value[Key]): void;
1623
+ /**
1624
+ * Subscribe to store changes and call listener immediately.
1625
+ *
1626
+ * ```
1627
+ * import { $router } from '../store'
1628
+ *
1629
+ * $router.subscribe(page => {
1630
+ * console.log(page)
1631
+ * })
1632
+ * ```
1633
+ *
1634
+ * @param listener Callback with store value and old value.
1635
+ * @param changedKey Key that was changed. Will present only
1636
+ * if `setKey` has been used to change a store.
1637
+ * @returns Function to remove listener.
1638
+ */
1639
+ subscribe(listener: (value: ReadonlyIfObject<Value>, oldValue: ReadonlyIfObject<Value> | undefined, changedKey: AllKeys<Value> | undefined) => void): () => void;
1640
+ }
1641
+ interface PreinitializedMapStore<Value extends object = any> extends MapStore<Value> {
1642
+ readonly value: Value;
1643
+ }
1644
+ declare function map<Value extends object, StoreExt extends object = {}>(value?: Value): PreinitializedMapStore<Value> & StoreExt;
1645
+ interface Task<Value> extends Promise<Value> {
1646
+ t: true;
1647
+ }
1648
+ type StoreValues<Stores extends AnyStore[]> = {
1649
+ [Index in keyof Stores]: StoreValue<Stores[Index]>;
1049
1650
  };
1050
- type ViewRule = ViewRulePredicate | ViewRuleStyle | ViewRuleAutoLayout;
1051
- type ViewRulePredicate = {
1052
- include: Expression[];
1053
- exclude?: never;
1054
- } | {
1055
- include?: never;
1056
- exclude: Expression[];
1651
+ interface Computed {
1652
+ <Value extends any, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Task<Value>): ReadableAtom<undefined | Value>;
1653
+ <Value extends any, OriginStores extends AnyStore[]>(stores: [
1654
+ ...OriginStores
1655
+ ], cb: (...values: StoreValues<OriginStores>) => Task<Value>): ReadableAtom<undefined | Value>;
1656
+ <Value extends any, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Value): ReadableAtom<Value>;
1657
+ /**
1658
+ * Create derived store, which use generates value from another stores.
1659
+ *
1660
+ * ```js
1661
+ * import { computed } from 'nanostores'
1662
+ *
1663
+ * import { $users } from './users.js'
1664
+ *
1665
+ * export const $admins = computed($users, users => {
1666
+ * return users.filter(user => user.isAdmin)
1667
+ * })
1668
+ * ```
1669
+ *
1670
+ * An async function can be evaluated by using {@link task}.
1671
+ *
1672
+ * ```js
1673
+ * import { computed, task } from 'nanostores'
1674
+ *
1675
+ * import { $userId } from './users.js'
1676
+ *
1677
+ * export const $user = computed($userId, userId => task(async () => {
1678
+ * const response = await fetch(`https://my-api/users/${userId}`)
1679
+ * return response.json()
1680
+ * }))
1681
+ * ```
1682
+ */
1683
+ <Value extends any, OriginStores extends AnyStore[]>(stores: [
1684
+ ...OriginStores
1685
+ ], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
1686
+ }
1687
+ declare const computed: Computed;
1688
+ type StoreKeys<T> = T extends {
1689
+ setKey: (k: infer K, v: any) => unknown;
1690
+ } ? K : never;
1691
+ interface UseStoreOptions<SomeStore> {
1692
+ /**
1693
+ * Will re-render components only on specific key changes.
1694
+ */
1695
+ keys?: StoreKeys<SomeStore>[];
1696
+ }
1697
+ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
1698
+ export declare const DefaultTheme: MantineThemeOverride;
1699
+ export declare const BundledStyles: () => any;
1700
+ export declare function useBundledStyleSheet(injectFontCss?: boolean): CSSStyleSheet[];
1701
+ type ColorScheme = "light" | "dark";
1702
+ export declare function useColorScheme(explicit?: ColorScheme): ColorScheme;
1703
+ /**
1704
+ * We need this function to bundle LikeC4Model with `likec4/react'
1705
+ * Used by vite plugin to generate `virtual:likec4/model`
1706
+ */
1707
+ export declare function createLikeC4Model(model: LayoutedLikeC4Model): LikeC4Model.Layouted;
1708
+
1709
+ declare namespace nano {
1710
+ export { atom, computed, map, useStore };
1711
+ }
1712
+
1713
+ export {
1714
+ nano,
1057
1715
  };
1058
- type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
1059
- type XYBackground = XYBackgroundVariant | OverrideProperties<BackgroundProps, {
1060
- variant: XYBackgroundVariant;
1061
- }>;
1062
- type XYBackgroundVariant = "dots" | "lines" | "cross";
1063
1716
 
1064
1717
  export {};