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.
- package/dist/__app__/react/likec4.tsx +44 -17
- package/dist/__app__/src/chunks/{-index-overview-DZ3H7kDb.js → -index-overview-B8AbCuYt.js} +6 -6
- package/dist/__app__/src/chunks/{likec4-BqIZe8Y0.js → likec4-DOemzWvz.js} +167 -120
- package/dist/__app__/src/chunks/{main-KEhBGhZ8.js → main-OEl3ruxE.js} +6509 -5309
- package/dist/__app__/src/chunks/{mantine-BnwtT_Nz.js → mantine-BqgMLMPH.js} +64 -58
- package/dist/__app__/src/chunks/{tanstack-router-Bc_WYOzY.js → tanstack-router-Mzh8n5Lx.js} +1 -1
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +5218 -3791
- package/dist/chunks/prompt.mjs +45 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.mjs +213 -161
- package/dist/index.d.mts +1205 -1748
- package/dist/index.d.ts +16953 -0
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.Cjx4es-x.mjs +1224 -0
- package/icons/all.js +1 -1
- package/icons/aws/activate.js +10 -10
- package/icons/aws/alexa-for-business.js +10 -10
- package/icons/aws/amplify.js +10 -10
- package/icons/aws/apache-mxnet-on-aws.js +10 -10
- package/icons/aws/api-gateway.js +10 -10
- package/icons/aws/app-config.js +10 -10
- package/icons/aws/app-flow.js +10 -10
- package/icons/aws/app-mesh.js +10 -10
- package/icons/aws/app-runner.js +10 -10
- package/icons/aws/app-stream.js +10 -10
- package/icons/aws/app-sync.js +10 -10
- package/icons/aws/application-auto-scaling.js +10 -10
- package/icons/aws/application-composer.js +10 -10
- package/icons/aws/application-cost-profiler.js +10 -10
- package/icons/aws/application-discovery-service.js +10 -10
- package/icons/aws/application-migration-service.js +10 -10
- package/icons/aws/artifact.js +10 -10
- package/icons/aws/athena.js +10 -10
- package/icons/aws/audit-manager.js +10 -10
- package/icons/aws/augmented-ai-a2i.js +10 -10
- package/icons/aws/aurora.js +10 -10
- package/icons/aws/auto-scaling.js +10 -10
- package/icons/aws/backint-agent.js +10 -10
- package/icons/aws/backup.js +10 -10
- package/icons/aws/batch.js +10 -10
- package/icons/aws/billing-conductor.js +10 -10
- package/icons/aws/bottlerocket.js +10 -10
- package/icons/aws/braket.js +10 -10
- package/icons/aws/budgets.js +10 -10
- package/icons/aws/certificate-manager.js +10 -10
- package/icons/aws/chatbot.js +10 -10
- package/icons/aws/chime-sdk.js +10 -10
- package/icons/aws/chime-voice-connector.js +10 -10
- package/icons/aws/chime.js +10 -10
- package/icons/aws/clean-rooms.js +10 -10
- package/icons/aws/client-vpn.js +10 -10
- package/icons/aws/cloud-control-api.js +10 -10
- package/icons/aws/cloud-development-kit.js +10 -10
- package/icons/aws/cloud-directory.js +10 -10
- package/icons/aws/cloud-formation.js +10 -10
- package/icons/aws/cloud-front.js +10 -10
- package/icons/aws/cloud-hsm.js +10 -10
- package/icons/aws/cloud-map.js +10 -10
- package/icons/aws/cloud-search.js +10 -10
- package/icons/aws/cloud-shell.js +10 -10
- package/icons/aws/cloud-trail.js +10 -10
- package/icons/aws/cloud-wan.js +10 -10
- package/icons/aws/cloud-watch.js +10 -10
- package/icons/aws/cloud9.js +10 -10
- package/icons/aws/code-artifact.js +10 -10
- package/icons/aws/code-build.js +10 -10
- package/icons/aws/code-catalyst.js +10 -10
- package/icons/aws/code-commit.js +10 -10
- package/icons/aws/code-deploy.js +10 -10
- package/icons/aws/code-guru.js +10 -10
- package/icons/aws/code-pipeline.js +10 -10
- package/icons/aws/code-star.js +10 -10
- package/icons/aws/code-whisperer.js +10 -10
- package/icons/aws/cognito.js +10 -10
- package/icons/aws/command-line-interface.js +10 -10
- package/icons/aws/comprehend-medical.js +10 -10
- package/icons/aws/comprehend.js +10 -10
- package/icons/aws/compute-optimizer.js +10 -10
- package/icons/aws/config.js +10 -10
- package/icons/aws/connect.js +10 -10
- package/icons/aws/console-mobile-application.js +10 -10
- package/icons/aws/control-tower.js +10 -10
- package/icons/aws/corretto.js +10 -10
- package/icons/aws/cost-and-usage-report.js +10 -10
- package/icons/aws/cost-explorer.js +10 -10
- package/icons/aws/data-exchange.js +10 -10
- package/icons/aws/data-pipeline.js +10 -10
- package/icons/aws/data-sync.js +10 -10
- package/icons/aws/data-zone.js +10 -10
- package/icons/aws/database-migration-service.js +10 -10
- package/icons/aws/deep-composer.js +10 -10
- package/icons/aws/deep-learning-amis.js +10 -10
- package/icons/aws/deep-learning-containers.js +10 -10
- package/icons/aws/deep-lens.js +10 -10
- package/icons/aws/deep-racer.js +10 -10
- package/icons/aws/detective.js +10 -10
- package/icons/aws/dev-ops-guru.js +10 -10
- package/icons/aws/device-farm.js +10 -10
- package/icons/aws/direct-connect.js +10 -10
- package/icons/aws/directory-service.js +10 -10
- package/icons/aws/distro-for-open-telemetry.js +10 -10
- package/icons/aws/document-db.js +10 -10
- package/icons/aws/dynamo-db.js +10 -10
- package/icons/aws/ec2-auto-scaling.js +10 -10
- package/icons/aws/ec2-image-builder.js +10 -10
- package/icons/aws/ec2.js +10 -10
- package/icons/aws/ecs-anywhere.js +10 -10
- package/icons/aws/efs.js +10 -10
- package/icons/aws/eks-anywhere.js +10 -10
- package/icons/aws/eks-cloud.js +10 -10
- package/icons/aws/eks-distro.js +10 -10
- package/icons/aws/elasti-cache.js +10 -10
- package/icons/aws/elastic-beanstalk.js +10 -10
- package/icons/aws/elastic-block-store.js +10 -10
- package/icons/aws/elastic-container-registry.js +10 -10
- package/icons/aws/elastic-container-service.js +10 -10
- package/icons/aws/elastic-disaster-recovery.js +10 -10
- package/icons/aws/elastic-fabric-adapter.js +10 -10
- package/icons/aws/elastic-inference.js +10 -10
- package/icons/aws/elastic-kubernetes-service.js +10 -10
- package/icons/aws/elastic-load-balancing.js +10 -10
- package/icons/aws/elastic-transcoder.js +10 -10
- package/icons/aws/elemental-appliances-software.js +10 -10
- package/icons/aws/elemental-conductor.js +10 -10
- package/icons/aws/elemental-delta.js +10 -10
- package/icons/aws/elemental-link.js +10 -10
- package/icons/aws/elemental-live.js +10 -10
- package/icons/aws/elemental-media-connect.js +10 -10
- package/icons/aws/elemental-media-convert.js +10 -10
- package/icons/aws/elemental-media-live.js +10 -10
- package/icons/aws/elemental-media-package.js +10 -10
- package/icons/aws/elemental-media-store.js +10 -10
- package/icons/aws/elemental-media-tailor.js +10 -10
- package/icons/aws/elemental-server.js +10 -10
- package/icons/aws/emr.js +10 -10
- package/icons/aws/event-bridge.js +10 -10
- package/icons/aws/express-workflows.js +10 -10
- package/icons/aws/fargate.js +10 -10
- package/icons/aws/fault-injection-simulator.js +10 -10
- package/icons/aws/file-cache.js +10 -10
- package/icons/aws/fin-space.js +10 -10
- package/icons/aws/firewall-manager.js +10 -10
- package/icons/aws/forecast.js +10 -10
- package/icons/aws/fraud-detector.js +10 -10
- package/icons/aws/free-rtos.js +10 -10
- package/icons/aws/fsx-for-lustre.js +10 -10
- package/icons/aws/fsx-for-net-app-ontap.js +10 -10
- package/icons/aws/fsx-for-open-zfs.js +10 -10
- package/icons/aws/fsx-for-wfs.js +10 -10
- package/icons/aws/fsx.js +10 -10
- package/icons/aws/game-kit.js +10 -10
- package/icons/aws/game-lift.js +10 -10
- package/icons/aws/game-sparks.js +10 -10
- package/icons/aws/genomics-cli.js +10 -10
- package/icons/aws/global-accelerator.js +10 -10
- package/icons/aws/glue-data-brew.js +10 -10
- package/icons/aws/glue-elastic-views.js +10 -10
- package/icons/aws/glue.js +10 -10
- package/icons/aws/ground-station.js +10 -10
- package/icons/aws/guard-duty.js +10 -10
- package/icons/aws/health-lake.js +10 -10
- package/icons/aws/honeycode.js +10 -10
- package/icons/aws/iam-identity-center.js +10 -10
- package/icons/aws/identity-and-access-management.js +10 -10
- package/icons/aws/inspector.js +10 -10
- package/icons/aws/interactive-video-service.js +10 -10
- package/icons/aws/io-t-1-click.js +10 -10
- package/icons/aws/io-t-analytics.js +10 -10
- package/icons/aws/io-t-button.js +10 -10
- package/icons/aws/io-t-core.js +10 -10
- package/icons/aws/io-t-device-defender.js +10 -10
- package/icons/aws/io-t-device-management.js +10 -10
- package/icons/aws/io-t-edu-kit.js +10 -10
- package/icons/aws/io-t-events.js +10 -10
- package/icons/aws/io-t-express-link.js +10 -10
- package/icons/aws/io-t-fleet-wise.js +10 -10
- package/icons/aws/io-t-greengrass.js +10 -10
- package/icons/aws/io-t-robo-runner.js +10 -10
- package/icons/aws/io-t-site-wise.js +10 -10
- package/icons/aws/io-t-things-graph.js +10 -10
- package/icons/aws/io-t-twin-maker.js +9 -9
- package/icons/aws/iq.js +10 -10
- package/icons/aws/kendra.js +10 -10
- package/icons/aws/key-management-service.js +10 -10
- package/icons/aws/keyspaces.js +10 -10
- package/icons/aws/kinesis-data-analytics.js +10 -10
- package/icons/aws/kinesis-data-streams.js +10 -10
- package/icons/aws/kinesis-firehose.js +10 -10
- package/icons/aws/kinesis-video-streams.js +10 -10
- package/icons/aws/kinesis.js +10 -10
- package/icons/aws/lake-formation.js +10 -10
- package/icons/aws/lambda.js +10 -10
- package/icons/aws/launch-wizard.js +10 -10
- package/icons/aws/lex.js +10 -10
- package/icons/aws/license-manager.js +10 -10
- package/icons/aws/lightsail.js +10 -10
- package/icons/aws/local-zones.js +10 -10
- package/icons/aws/location-service.js +10 -10
- package/icons/aws/lookout-for-equipment.js +10 -10
- package/icons/aws/lookout-for-metrics.js +10 -10
- package/icons/aws/lookout-for-vision.js +10 -10
- package/icons/aws/lumberyard.js +10 -10
- package/icons/aws/macie.js +10 -10
- package/icons/aws/mainframe-modernization.js +10 -10
- package/icons/aws/managed-blockchain.js +10 -10
- package/icons/aws/managed-grafana.js +10 -10
- package/icons/aws/managed-service-for-prometheus.js +10 -10
- package/icons/aws/managed-services.js +10 -10
- package/icons/aws/managed-streaming-for-apache-kafka.js +10 -10
- package/icons/aws/managed-workflows-for-apache-airflow.js +10 -10
- package/icons/aws/management-console.js +10 -10
- package/icons/aws/marketplace-dark.js +6 -6
- package/icons/aws/marketplace-light.js +6 -6
- package/icons/aws/memory-db-for-redis.js +10 -10
- package/icons/aws/migration-evaluator.js +10 -10
- package/icons/aws/migration-hub.js +10 -10
- package/icons/aws/monitron.js +10 -10
- package/icons/aws/mq.js +10 -10
- package/icons/aws/neptune.js +10 -10
- package/icons/aws/network-firewall.js +10 -10
- package/icons/aws/neuron.js +10 -10
- package/icons/aws/nice-dcv.js +10 -10
- package/icons/aws/nice-engin-frame.js +10 -10
- package/icons/aws/nimble-studio.js +10 -10
- package/icons/aws/nitro-enclaves.js +10 -10
- package/icons/aws/omics.js +10 -10
- package/icons/aws/open-3d-engine.js +10 -10
- package/icons/aws/open-search-service.js +10 -10
- package/icons/aws/ops-works.js +10 -10
- package/icons/aws/organizations.js +10 -10
- package/icons/aws/outposts-family.js +10 -10
- package/icons/aws/outposts-rack.js +10 -10
- package/icons/aws/outposts-servers.js +10 -10
- package/icons/aws/panorama.js +10 -10
- package/icons/aws/parallel-cluster.js +10 -10
- package/icons/aws/personal-health-dashboard.js +10 -10
- package/icons/aws/personalize.js +10 -10
- package/icons/aws/pinpoint-apis.js +10 -10
- package/icons/aws/pinpoint.js +10 -10
- package/icons/aws/polly.js +10 -10
- package/icons/aws/private-5g.js +10 -10
- package/icons/aws/private-certificate-authority.js +12 -12
- package/icons/aws/private-link.js +10 -10
- package/icons/aws/professional-services.js +10 -10
- package/icons/aws/proton.js +10 -10
- package/icons/aws/quantum-ledger-database.js +10 -10
- package/icons/aws/quick-sight.js +10 -10
- package/icons/aws/rds-on-vmware.js +10 -10
- package/icons/aws/rds.js +10 -10
- package/icons/aws/re-post.js +10 -10
- package/icons/aws/red-hat-open-shift-service-on-aws.js +10 -10
- package/icons/aws/redshift.js +10 -10
- package/icons/aws/rekognition.js +10 -10
- package/icons/aws/reserved-instance-reporting.js +10 -10
- package/icons/aws/resilience-hub.js +10 -10
- package/icons/aws/resource-access-manager.js +10 -10
- package/icons/aws/resource-explorer.js +10 -10
- package/icons/aws/robo-maker.js +10 -10
- package/icons/aws/route-53.js +10 -10
- package/icons/aws/s3-on-outposts.js +10 -10
- package/icons/aws/sage-maker-ground-truth.js +10 -10
- package/icons/aws/sage-maker-studio-lab.js +10 -10
- package/icons/aws/sage-maker.js +10 -10
- package/icons/aws/savings-plans.js +10 -10
- package/icons/aws/secrets-manager.js +10 -10
- package/icons/aws/security-hub.js +10 -10
- package/icons/aws/security-lake.js +10 -10
- package/icons/aws/server-migration-service.js +10 -10
- package/icons/aws/serverless-application-repository.js +10 -10
- package/icons/aws/service-catalog.js +10 -10
- package/icons/aws/service-management-connector.js +12 -12
- package/icons/aws/shield.js +10 -10
- package/icons/aws/signer.js +10 -10
- package/icons/aws/sim-space-weaver.js +10 -10
- package/icons/aws/simple-email-service.js +10 -10
- package/icons/aws/simple-notification-service.js +10 -10
- package/icons/aws/simple-queue-service.js +10 -10
- package/icons/aws/simple-storage-service-glacier.js +10 -10
- package/icons/aws/simple-storage-service.js +10 -10
- package/icons/aws/site-to-site-vpn.js +10 -10
- package/icons/aws/snowball-edge.js +10 -10
- package/icons/aws/snowball.js +10 -10
- package/icons/aws/snowcone.js +10 -10
- package/icons/aws/snowmobile.js +10 -10
- package/icons/aws/step-functions.js +10 -10
- package/icons/aws/storage-gateway.js +10 -10
- package/icons/aws/sumerian.js +10 -10
- package/icons/aws/supply-chain.js +10 -10
- package/icons/aws/support.js +10 -10
- package/icons/aws/systems-manager.js +10 -10
- package/icons/aws/tensor-flow-on-aws.js +10 -10
- package/icons/aws/textract.js +10 -10
- package/icons/aws/thinkbox-deadline.js +10 -10
- package/icons/aws/thinkbox-frost.js +10 -10
- package/icons/aws/thinkbox-krakatoa.js +10 -10
- package/icons/aws/thinkbox-sequoia.js +10 -10
- package/icons/aws/thinkbox-stoke.js +10 -10
- package/icons/aws/thinkbox-xmesh.js +10 -10
- package/icons/aws/timestream.js +10 -10
- package/icons/aws/tools-and-sdks.js +10 -10
- package/icons/aws/torch-serve.js +10 -10
- package/icons/aws/training-certification.js +10 -10
- package/icons/aws/transcribe.js +10 -10
- package/icons/aws/transfer-family.js +10 -10
- package/icons/aws/transit-gateway.js +10 -10
- package/icons/aws/translate.js +10 -10
- package/icons/aws/trusted-advisor.js +10 -10
- package/icons/aws/verified-access.js +10 -10
- package/icons/aws/verified-permissions.js +10 -10
- package/icons/aws/virtual-private-cloud.js +10 -10
- package/icons/aws/vmware-cloud-on-aws.js +10 -10
- package/icons/aws/vpc-lattice.js +10 -10
- package/icons/aws/waf.js +10 -10
- package/icons/aws/wavelength.js +10 -10
- package/icons/aws/well-architected-tool.js +10 -10
- package/icons/aws/wickr.js +10 -10
- package/icons/aws/work-docs-sdk.js +10 -10
- package/icons/aws/work-docs.js +10 -10
- package/icons/aws/work-link.js +10 -10
- package/icons/aws/work-mail.js +10 -10
- package/icons/aws/work-spaces-family.js +10 -10
- package/icons/aws/x-ray.js +10 -10
- package/icons/gcp/access-context-manager.js +7 -7
- package/icons/gcp/administration.js +14 -14
- package/icons/gcp/advanced-agent-modeling.js +9 -9
- package/icons/gcp/advanced-solutions-lab.js +32 -32
- package/icons/gcp/agent-assist.js +4 -4
- package/icons/gcp/ai-hub.js +13 -13
- package/icons/gcp/ai-platform-unified.js +11 -11
- package/icons/gcp/ai-platform.js +6 -6
- package/icons/gcp/analytics-hub.js +7 -7
- package/icons/gcp/anthos-config-management.js +7 -7
- package/icons/gcp/anthos-service-mesh.js +4 -4
- package/icons/gcp/anthos.js +8 -8
- package/icons/gcp/api-analytics.js +10 -10
- package/icons/gcp/api-monetization.js +13 -13
- package/icons/gcp/api.js +9 -9
- package/icons/gcp/apigee-api-platform.js +9 -9
- package/icons/gcp/apigee-sense.js +7 -7
- package/icons/gcp/app-engine.js +10 -10
- package/icons/gcp/artifact-registry.js +19 -19
- package/icons/gcp/asset-inventory.js +9 -9
- package/icons/gcp/assured-workloads.js +11 -11
- package/icons/gcp/auto-ml-natural-language.js +6 -6
- package/icons/gcp/auto-ml-tables.js +9 -9
- package/icons/gcp/auto-ml-translation.js +9 -9
- package/icons/gcp/auto-ml-video-intelligence.js +9 -9
- package/icons/gcp/auto-ml-vision.js +8 -8
- package/icons/gcp/auto-ml.js +10 -10
- package/icons/gcp/bare-metal-solutions.js +7 -7
- package/icons/gcp/batch.js +4 -4
- package/icons/gcp/beyondcorp.js +4 -4
- package/icons/gcp/big-query.js +11 -11
- package/icons/gcp/bigtable.js +22 -22
- package/icons/gcp/billing.js +14 -14
- package/icons/gcp/binary-authorization.js +7 -7
- package/icons/gcp/catalog.js +10 -10
- package/icons/gcp/certificate-authority-service.js +8 -8
- package/icons/gcp/certificate-manager.js +7 -7
- package/icons/gcp/cloud-api-gateway.js +4 -4
- package/icons/gcp/cloud-apis.js +14 -14
- package/icons/gcp/cloud-armor.js +11 -11
- package/icons/gcp/cloud-asset-inventory.js +7 -7
- package/icons/gcp/cloud-audit-logs.js +14 -14
- package/icons/gcp/cloud-build.js +9 -9
- package/icons/gcp/cloud-cdn.js +18 -18
- package/icons/gcp/cloud-code.js +12 -12
- package/icons/gcp/cloud-composer.js +9 -9
- package/icons/gcp/cloud-data-fusion.js +11 -11
- package/icons/gcp/cloud-deploy.js +7 -7
- package/icons/gcp/cloud-deployment-manager.js +14 -14
- package/icons/gcp/cloud-dns.js +16 -16
- package/icons/gcp/cloud-domains.js +9 -9
- package/icons/gcp/cloud-ekm.js +4 -4
- package/icons/gcp/cloud-endpoints.js +13 -13
- package/icons/gcp/cloud-external-ip-addresses.js +6 -6
- package/icons/gcp/cloud-firewall-rules.js +6 -6
- package/icons/gcp/cloud-for-marketing.js +4 -4
- package/icons/gcp/cloud-functions.js +19 -19
- package/icons/gcp/cloud-generic.js +4 -4
- package/icons/gcp/cloud-gpu.js +8 -8
- package/icons/gcp/cloud-healthcare-api.js +15 -15
- package/icons/gcp/cloud-healthcare-marketplace.js +7 -7
- package/icons/gcp/cloud-hsm.js +10 -10
- package/icons/gcp/cloud-ids.js +9 -9
- package/icons/gcp/cloud-inference-api.js +12 -12
- package/icons/gcp/cloud-interconnect.js +11 -11
- package/icons/gcp/cloud-jobs-api.js +12 -12
- package/icons/gcp/cloud-load-balancing.js +16 -16
- package/icons/gcp/cloud-logging.js +14 -14
- package/icons/gcp/cloud-media-edge.js +20 -20
- package/icons/gcp/cloud-monitoring.js +10 -10
- package/icons/gcp/cloud-nat.js +9 -9
- package/icons/gcp/cloud-natural-language-api.js +13 -13
- package/icons/gcp/cloud-network.js +13 -13
- package/icons/gcp/cloud-ops.js +12 -12
- package/icons/gcp/cloud-optimization-ai-fleet-routing-api.js +7 -7
- package/icons/gcp/cloud-optimization-ai.js +7 -7
- package/icons/gcp/cloud-router.js +4 -4
- package/icons/gcp/cloud-routes.js +8 -8
- package/icons/gcp/cloud-run-for-anthos.js +6 -6
- package/icons/gcp/cloud-run.js +9 -9
- package/icons/gcp/cloud-scheduler.js +13 -13
- package/icons/gcp/cloud-security-scanner.js +12 -12
- package/icons/gcp/cloud-shell.js +7 -7
- package/icons/gcp/cloud-spanner.js +11 -11
- package/icons/gcp/cloud-sql.js +12 -12
- package/icons/gcp/cloud-storage.js +18 -18
- package/icons/gcp/cloud-tasks.js +21 -21
- package/icons/gcp/cloud-test-lab.js +11 -11
- package/icons/gcp/cloud-tpu.js +22 -22
- package/icons/gcp/cloud-translation-api.js +6 -6
- package/icons/gcp/cloud-vision-api.js +12 -12
- package/icons/gcp/cloud-vpn.js +13 -13
- package/icons/gcp/compute-engine.js +13 -13
- package/icons/gcp/configuration-management.js +7 -7
- package/icons/gcp/connectivity-test.js +4 -4
- package/icons/gcp/connectors.js +10 -10
- package/icons/gcp/contact-center-ai.js +4 -4
- package/icons/gcp/container-optimized-os.js +4 -4
- package/icons/gcp/container-registry.js +23 -23
- package/icons/gcp/data-catalog.js +9 -9
- package/icons/gcp/data-labeling.js +15 -15
- package/icons/gcp/data-layers.js +8 -8
- package/icons/gcp/data-loss-prevention-api.js +14 -14
- package/icons/gcp/data-qn-a.js +9 -9
- package/icons/gcp/data-studio.js +12 -12
- package/icons/gcp/data-transfer.js +8 -8
- package/icons/gcp/database-migration-service.js +7 -7
- package/icons/gcp/dataflow.js +16 -16
- package/icons/gcp/datalab.js +4 -4
- package/icons/gcp/dataplex.js +6 -6
- package/icons/gcp/datapol.js +17 -17
- package/icons/gcp/dataprep.js +9 -9
- package/icons/gcp/dataproc-metastore.js +4 -4
- package/icons/gcp/dataproc.js +15 -15
- package/icons/gcp/datashare.js +9 -9
- package/icons/gcp/datastore.js +35 -35
- package/icons/gcp/datastream.js +13 -13
- package/icons/gcp/debugger.js +11 -11
- package/icons/gcp/developer-portal.js +8 -8
- package/icons/gcp/dialogflow-cx.js +7 -7
- package/icons/gcp/dialogflow-insights.js +11 -11
- package/icons/gcp/dialogflow.js +6 -6
- package/icons/gcp/document-ai.js +11 -11
- package/icons/gcp/early-access-center.js +4 -4
- package/icons/gcp/error-reporting.js +10 -10
- package/icons/gcp/eventarc.js +8 -8
- package/icons/gcp/filestore.js +10 -10
- package/icons/gcp/financial-services-marketplace.js +12 -12
- package/icons/gcp/firestore.js +10 -10
- package/icons/gcp/fleet-engine.js +7 -7
- package/icons/gcp/free-trial.js +12 -12
- package/icons/gcp/game-servers.js +17 -17
- package/icons/gcp/gce-systems-management.js +4 -4
- package/icons/gcp/genomics.js +19 -19
- package/icons/gcp/gke-on-prem.js +9 -9
- package/icons/gcp/google-cloud-marketplace.js +11 -11
- package/icons/gcp/google-kubernetes-engine.js +13 -13
- package/icons/gcp/google-maps-platform.js +9 -9
- package/icons/gcp/healthcare-nlp-api.js +4 -4
- package/icons/gcp/home.js +11 -11
- package/icons/gcp/identity-and-access-management.js +6 -6
- package/icons/gcp/identity-aware-proxy.js +10 -10
- package/icons/gcp/identity-platform.js +10 -10
- package/icons/gcp/iot-core.js +6 -6
- package/icons/gcp/iot-edge.js +38 -38
- package/icons/gcp/key-access-justifications.js +14 -14
- package/icons/gcp/key-management-service.js +6 -6
- package/icons/gcp/kuberun.js +8 -8
- package/icons/gcp/launcher.js +15 -15
- package/icons/gcp/local-ssd.js +4 -4
- package/icons/gcp/looker.js +9 -9
- package/icons/gcp/managed-service-for-microsoft-active-directory.js +12 -12
- package/icons/gcp/media-translation-api.js +7 -7
- package/icons/gcp/memorystore.js +10 -10
- package/icons/gcp/migrate-for-anthos.js +4 -4
- package/icons/gcp/migrate-for-compute-engine.js +4 -4
- package/icons/gcp/my-cloud.js +9 -9
- package/icons/gcp/network-connectivity-center.js +26 -26
- package/icons/gcp/network-intelligence-center.js +4 -4
- package/icons/gcp/network-security.js +10 -10
- package/icons/gcp/network-tiers.js +13 -13
- package/icons/gcp/network-topology.js +4 -4
- package/icons/gcp/onboarding.js +12 -12
- package/icons/gcp/os-configuration-management.js +4 -4
- package/icons/gcp/os-inventory-management.js +6 -6
- package/icons/gcp/os-patch-management.js +4 -4
- package/icons/gcp/partner-interconnect.js +11 -11
- package/icons/gcp/partner-portal.js +8 -8
- package/icons/gcp/performance-dashboard.js +4 -4
- package/icons/gcp/permissions.js +9 -9
- package/icons/gcp/persistent-disk.js +7 -7
- package/icons/gcp/phishing-protection.js +13 -13
- package/icons/gcp/policy-analyzer.js +4 -4
- package/icons/gcp/premium-network-tier.js +9 -9
- package/icons/gcp/private-connectivity.js +9 -9
- package/icons/gcp/private-service-connect.js +12 -12
- package/icons/gcp/producer-portal.js +9 -9
- package/icons/gcp/profiler.js +11 -11
- package/icons/gcp/project.js +15 -15
- package/icons/gcp/pub-sub.js +22 -22
- package/icons/gcp/quantum-engine.js +10 -10
- package/icons/gcp/quotas.js +15 -15
- package/icons/gcp/real-world-insights.js +9 -9
- package/icons/gcp/recommendations-ai.js +19 -19
- package/icons/gcp/release-notes.js +4 -4
- package/icons/gcp/retail-api.js +7 -7
- package/icons/gcp/risk-manager.js +4 -4
- package/icons/gcp/runtime-config.js +15 -15
- package/icons/gcp/secret-manager.js +4 -4
- package/icons/gcp/security-command-center.js +8 -8
- package/icons/gcp/security-health-advisor.js +14 -14
- package/icons/gcp/security-key-enforcement.js +6 -6
- package/icons/gcp/security.js +8 -8
- package/icons/gcp/service-discovery.js +16 -16
- package/icons/gcp/speech-to-text.js +17 -17
- package/icons/gcp/stackdriver.js +7 -7
- package/icons/gcp/standard-network-tier.js +4 -4
- package/icons/gcp/stream-suite.js +7 -7
- package/icons/gcp/support.js +9 -9
- package/icons/gcp/tensorflow-enterprise.js +4 -4
- package/icons/gcp/text-to-speech.js +8 -8
- package/icons/gcp/tools-for-powershell.js +13 -13
- package/icons/gcp/trace.js +12 -12
- package/icons/gcp/traffic-director.js +14 -14
- package/icons/gcp/transfer-appliance.js +10 -10
- package/icons/gcp/transfer.js +4 -4
- package/icons/gcp/user-preferences.js +9 -9
- package/icons/gcp/vertex-ai.js +27 -27
- package/icons/gcp/video-intelligence-api.js +6 -6
- package/icons/gcp/virtual-private-cloud.js +15 -15
- package/icons/gcp/visual-inspection.js +7 -7
- package/icons/gcp/vmware-engine.js +4 -4
- package/icons/gcp/web-risk.js +14 -14
- package/icons/gcp/web-security-scanner.js +11 -11
- package/icons/gcp/workflows.js +15 -15
- package/icons/gcp/workload-identity-pool.js +8 -8
- package/icons/tech/aarch64.js +10 -10
- package/icons/tech/adobe-illustrator.js +4 -4
- package/icons/tech/adobe-photoshop.js +4 -4
- package/icons/tech/adobe-premiere-pro.js +7 -7
- package/icons/tech/adobe-xd.js +4 -4
- package/icons/tech/adonis-js.js +4 -4
- package/icons/tech/after-effects.js +7 -7
- package/icons/tech/airflow.js +13 -13
- package/icons/tech/akka.js +6 -6
- package/icons/tech/algolia.js +4 -4
- package/icons/tech/alpine-js.js +6 -6
- package/icons/tech/amazon-web-services.js +6 -6
- package/icons/tech/anaconda.js +4 -4
- package/icons/tech/android-studio.js +11 -11
- package/icons/tech/android.js +8 -8
- package/icons/tech/angular-js.js +9 -9
- package/icons/tech/angular.js +7 -7
- package/icons/tech/ansible.js +6 -6
- package/icons/tech/ant-design.js +24 -24
- package/icons/tech/apache.js +74 -74
- package/icons/tech/apl.js +6 -6
- package/icons/tech/appcelerator.js +4 -4
- package/icons/tech/apple-safari.js +13 -13
- package/icons/tech/apple.js +4 -4
- package/icons/tech/appwrite.js +6 -6
- package/icons/tech/arch-linux.js +6 -6
- package/icons/tech/arduino.js +6 -6
- package/icons/tech/argo-cd.js +34 -34
- package/icons/tech/astro.js +14 -14
- package/icons/tech/atom.js +4 -4
- package/icons/tech/autodesk-maya.js +44 -44
- package/icons/tech/autodesk-shot-grid.js +6 -6
- package/icons/tech/awk.js +18 -18
- package/icons/tech/azios.js +4 -4
- package/icons/tech/azure-devops.js +11 -11
- package/icons/tech/azure-sql-database.js +22 -22
- package/icons/tech/azure.js +21 -21
- package/icons/tech/babel.js +6 -6
- package/icons/tech/backbone-js.js +7 -7
- package/icons/tech/ballerina.js +4 -4
- package/icons/tech/bamboo.js +14 -14
- package/icons/tech/bash.js +7 -7
- package/icons/tech/behance.js +9 -9
- package/icons/tech/bitbucket.js +9 -9
- package/icons/tech/blender.js +6 -6
- package/icons/tech/bootstrap.js +21 -21
- package/icons/tech/bower.js +18 -18
- package/icons/tech/browserstack.js +14 -14
- package/icons/tech/bulma.js +4 -4
- package/icons/tech/bun.js +17 -17
- package/icons/tech/c.js +7 -7
- package/icons/tech/cairo-graphics.js +6 -6
- package/icons/tech/cake-php.js +4 -4
- package/icons/tech/canva.js +6 -6
- package/icons/tech/capacitor.js +10 -10
- package/icons/tech/cassandra.js +17 -17
- package/icons/tech/cent-os.js +13 -13
- package/icons/tech/chrome.js +38 -38
- package/icons/tech/circle-ci.js +4 -4
- package/icons/tech/clarity.js +8 -8
- package/icons/tech/clion.js +30 -30
- package/icons/tech/clojure-script.js +8 -8
- package/icons/tech/clojure.js +9 -9
- package/icons/tech/cloudflare-workers.js +37 -37
- package/icons/tech/cloudflare.js +7 -7
- package/icons/tech/cmake.js +8 -8
- package/icons/tech/code-igniter.js +4 -4
- package/icons/tech/code-pen.js +4 -4
- package/icons/tech/codeac.js +4 -4
- package/icons/tech/codecov.js +4 -4
- package/icons/tech/coffee-script.js +4 -4
- package/icons/tech/composer.js +35 -35
- package/icons/tech/confluence.js +15 -15
- package/icons/tech/consul.js +4 -4
- package/icons/tech/contao.js +4 -4
- package/icons/tech/corejs.js +4 -4
- package/icons/tech/cosmosdb.js +9 -9
- package/icons/tech/couchdb.js +4 -4
- package/icons/tech/cplusplus.js +8 -8
- package/icons/tech/crystal.js +4 -4
- package/icons/tech/csharp.js +7 -7
- package/icons/tech/css3.js +10 -10
- package/icons/tech/cucumber.js +4 -4
- package/icons/tech/cypress.js +6 -6
- package/icons/tech/d3js.js +28 -28
- package/icons/tech/dart.js +9 -9
- package/icons/tech/data-grip.js +34 -34
- package/icons/tech/data-spell.js +27 -27
- package/icons/tech/dbeaver.js +11 -11
- package/icons/tech/debian.js +4 -4
- package/icons/tech/deno.js +4 -4
- package/icons/tech/devicon.js +10 -10
- package/icons/tech/digital-ocean.js +6 -6
- package/icons/tech/discord-js.js +11 -11
- package/icons/tech/django-rest.js +8 -8
- package/icons/tech/django.js +6 -6
- package/icons/tech/docker.js +20 -20
- package/icons/tech/doctrine.js +6 -6
- package/icons/tech/dropwizard.js +22 -22
- package/icons/tech/drupal.js +11 -11
- package/icons/tech/eclipse-ceylon.js +10 -10
- package/icons/tech/eclipse-ide.js +20 -20
- package/icons/tech/eclipse-vert-x.js +6 -6
- package/icons/tech/elasticbeats.js +7 -7
- package/icons/tech/elasticsearch.js +7 -7
- package/icons/tech/electron.js +8 -8
- package/icons/tech/eleventy-11ty.js +6 -6
- package/icons/tech/elixir.js +35 -35
- package/icons/tech/elm.js +10 -10
- package/icons/tech/embedded-c.js +30 -30
- package/icons/tech/ember-js.js +6 -6
- package/icons/tech/envoy.js +7 -7
- package/icons/tech/erlang.js +4 -4
- package/icons/tech/eslint.js +6 -6
- package/icons/tech/express.js +4 -4
- package/icons/tech/facebook.js +6 -6
- package/icons/tech/fast-api.js +4 -4
- package/icons/tech/fastify.js +6 -6
- package/icons/tech/fauna.js +4 -4
- package/icons/tech/feathers.js +4 -4
- package/icons/tech/fedora.js +10 -10
- package/icons/tech/figma.js +9 -9
- package/icons/tech/file-zilla.js +8 -8
- package/icons/tech/firebase.js +4 -4
- package/icons/tech/firefox.js +335 -335
- package/icons/tech/flask.js +4 -4
- package/icons/tech/flutter.js +12 -12
- package/icons/tech/fortran.js +4 -4
- package/icons/tech/foundation.js +37 -37
- package/icons/tech/fsharp.js +7 -7
- package/icons/tech/gatling.js +4 -4
- package/icons/tech/gatsby.js +4 -4
- package/icons/tech/gazebo.js +8 -8
- package/icons/tech/gcc.js +11 -11
- package/icons/tech/gentoo.js +4 -4
- package/icons/tech/ghost.js +6 -6
- package/icons/tech/gimp.js +68 -68
- package/icons/tech/git.js +4 -4
- package/icons/tech/gitbook.js +4 -4
- package/icons/tech/github-actions.js +6 -6
- package/icons/tech/github-codespaces.js +18 -18
- package/icons/tech/github.js +6 -6
- package/icons/tech/gitlab.js +8 -8
- package/icons/tech/gitpod.js +8 -8
- package/icons/tech/gitter.js +4 -4
- package/icons/tech/gnu-emacs.js +4 -4
- package/icons/tech/go-land.js +33 -33
- package/icons/tech/go.js +39 -39
- package/icons/tech/godot-engine.js +11 -11
- package/icons/tech/google-cloud.js +8 -8
- package/icons/tech/google.js +9 -9
- package/icons/tech/gradle.js +4 -4
- package/icons/tech/grafana.js +8 -8
- package/icons/tech/grails.js +6 -6
- package/icons/tech/graphql.js +12 -12
- package/icons/tech/groovy.js +102 -102
- package/icons/tech/grunt-js.js +33 -33
- package/icons/tech/gulp-js.js +4 -4
- package/icons/tech/hadoop.js +9 -9
- package/icons/tech/handlebars.js +6 -6
- package/icons/tech/hardhat.js +26 -26
- package/icons/tech/harvester.js +7 -7
- package/icons/tech/hashicorp-vault.js +4 -4
- package/icons/tech/haskell.js +7 -7
- package/icons/tech/haxe.js +14 -14
- package/icons/tech/helm.js +4 -4
- package/icons/tech/heroku.js +4 -4
- package/icons/tech/hibernate.js +6 -6
- package/icons/tech/homebrew.js +9 -9
- package/icons/tech/html5.js +8 -8
- package/icons/tech/hugo.js +7 -7
- package/icons/tech/ibm-spss-statistics.js +6 -6
- package/icons/tech/ie10.js +4 -4
- package/icons/tech/ifttt.js +4 -4
- package/icons/tech/influxdb.js +4 -4
- package/icons/tech/inkscape.js +115 -115
- package/icons/tech/insomnia.js +10 -10
- package/icons/tech/intellij-idea.js +37 -37
- package/icons/tech/ionic.js +6 -6
- package/icons/tech/jaeger.js +21 -21
- package/icons/tech/jamstack.js +4 -4
- package/icons/tech/jasmine.js +7 -7
- package/icons/tech/java.js +9 -9
- package/icons/tech/javascript.js +6 -6
- package/icons/tech/jeet.js +32 -32
- package/icons/tech/jekyll.js +43 -43
- package/icons/tech/jenkins.js +21 -21
- package/icons/tech/jest.js +4 -4
- package/icons/tech/jetbrains.js +26 -26
- package/icons/tech/jira-align.js +15 -15
- package/icons/tech/jira.js +14 -14
- package/icons/tech/jquery.js +4 -4
- package/icons/tech/json.js +12 -12
- package/icons/tech/jule.js +4 -4
- package/icons/tech/julia.js +10 -10
- package/icons/tech/junit.js +6 -6
- package/icons/tech/jupyter.js +8 -8
- package/icons/tech/k3os.js +4 -4
- package/icons/tech/k3s.js +4 -4
- package/icons/tech/kafka.js +4 -4
- package/icons/tech/kaggle.js +4 -4
- package/icons/tech/karate.js +6 -6
- package/icons/tech/karma.js +6 -6
- package/icons/tech/keras.js +6 -6
- package/icons/tech/kibana.js +7 -7
- package/icons/tech/knex-js.js +4 -4
- package/icons/tech/knockout.js +4 -4
- package/icons/tech/kotlin.js +9 -9
- package/icons/tech/krakenjs.js +4 -4
- package/icons/tech/ktor.js +18 -18
- package/icons/tech/kubernetes.js +7 -7
- package/icons/tech/labview.js +7 -7
- package/icons/tech/laravel.js +4 -4
- package/icons/tech/latex.js +9 -9
- package/icons/tech/less-js.js +4 -4
- package/icons/tech/linkedin.js +6 -6
- package/icons/tech/linux.js +803 -803
- package/icons/tech/liquibase.js +4 -4
- package/icons/tech/livewire.js +12 -12
- package/icons/tech/llvm.js +9 -9
- package/icons/tech/logstash.js +7 -7
- package/icons/tech/lua.js +7 -7
- package/icons/tech/lumen.js +4 -4
- package/icons/tech/magento.js +4 -4
- package/icons/tech/markdown.js +6 -6
- package/icons/tech/material-ui.js +8 -8
- package/icons/tech/materialize.js +6 -6
- package/icons/tech/matlab.js +25 -25
- package/icons/tech/matplotlib.js +26 -26
- package/icons/tech/maven.js +141 -141
- package/icons/tech/meteor-js.js +4 -4
- package/icons/tech/microsoft-sql-server.js +4 -4
- package/icons/tech/minitab.js +11 -11
- package/icons/tech/mob-x.js +9 -9
- package/icons/tech/mocha.js +6 -6
- package/icons/tech/modx.js +8 -8
- package/icons/tech/moleculer.js +4 -4
- package/icons/tech/mongodb.js +20 -20
- package/icons/tech/mongoose-js.js +6 -6
- package/icons/tech/moodle.js +41 -41
- package/icons/tech/ms-dos.js +15 -15
- package/icons/tech/mysql.js +4 -4
- package/icons/tech/nano.js +4 -4
- package/icons/tech/nerog.js +27 -27
- package/icons/tech/nestjs.js +4 -4
- package/icons/tech/net-core.js +6 -6
- package/icons/tech/net.js +120 -120
- package/icons/tech/network-x.js +13 -13
- package/icons/tech/new4j.js +6 -6
- package/icons/tech/nextjs.js +4 -4
- package/icons/tech/nginx.js +4 -4
- package/icons/tech/nhibernate.js +6 -6
- package/icons/tech/nim.js +6 -6
- package/icons/tech/nimble.js +11 -11
- package/icons/tech/nix.js +6 -6
- package/icons/tech/nodejs.js +4 -4
- package/icons/tech/nodemon.js +6 -6
- package/icons/tech/nodewebkit.js +9 -9
- package/icons/tech/npm.js +4 -4
- package/icons/tech/nuget.js +4 -4
- package/icons/tech/num-py.js +6 -6
- package/icons/tech/nuxt-js.js +7 -7
- package/icons/tech/objective-c.js +6 -6
- package/icons/tech/ocaml.js +22 -22
- package/icons/tech/oh-my-zsh.js +8 -8
- package/icons/tech/okta.js +6 -6
- package/icons/tech/open-al.js +6 -6
- package/icons/tech/open-api.js +16 -16
- package/icons/tech/open-cl.js +9 -9
- package/icons/tech/open-cv.js +7 -7
- package/icons/tech/open-gl.js +8 -8
- package/icons/tech/open-stack.js +4 -4
- package/icons/tech/open-suse.js +6 -6
- package/icons/tech/open-telemetry.js +6 -6
- package/icons/tech/opera.js +14 -14
- package/icons/tech/oracle.js +4 -4
- package/icons/tech/p5js.js +4 -4
- package/icons/tech/packer.js +6 -6
- package/icons/tech/pandas.js +9 -9
- package/icons/tech/perl.js +6 -6
- package/icons/tech/pf-sense.js +4 -4
- package/icons/tech/phalcon.js +29 -29
- package/icons/tech/phoenix-framework.js +4 -4
- package/icons/tech/photon-engine.js +12 -12
- package/icons/tech/php-storm.js +31 -31
- package/icons/tech/php.js +17 -17
- package/icons/tech/playwrite.js +11 -11
- package/icons/tech/ploty.js +7 -7
- package/icons/tech/podman.js +27 -27
- package/icons/tech/polygon.js +6 -6
- package/icons/tech/portainer.js +9 -9
- package/icons/tech/postcss.js +7 -7
- package/icons/tech/postgresql.js +8 -8
- package/icons/tech/postman.js +7 -7
- package/icons/tech/powershell.js +17 -17
- package/icons/tech/processing.js +98 -98
- package/icons/tech/prometheus.js +4 -4
- package/icons/tech/protractor.js +4 -4
- package/icons/tech/purescript.js +4 -4
- package/icons/tech/putty.js +47 -47
- package/icons/tech/pycharm.js +55 -55
- package/icons/tech/pyscript.js +6 -6
- package/icons/tech/pytest.js +12 -12
- package/icons/tech/python-poetry.js +37 -37
- package/icons/tech/python.js +16 -16
- package/icons/tech/pytorch.js +6 -6
- package/icons/tech/qodana.js +22 -22
- package/icons/tech/qt.js +4 -4
- package/icons/tech/quarkus.js +14 -14
- package/icons/tech/quasar.js +6 -6
- package/icons/tech/qwik.js +7 -7
- package/icons/tech/r.js +13 -13
- package/icons/tech/rabbitmq.js +4 -4
- package/icons/tech/rancher.js +4 -4
- package/icons/tech/raspberrypi.js +7 -7
- package/icons/tech/reach.js +6 -6
- package/icons/tech/react-bootstrap.js +4 -4
- package/icons/tech/react.js +6 -6
- package/icons/tech/realm.js +12 -12
- package/icons/tech/red-cube-s-epic-compiler-thingy-programming-re-ct.js +8 -8
- package/icons/tech/redhat.js +7 -7
- package/icons/tech/redis.js +14 -14
- package/icons/tech/redux.js +4 -4
- package/icons/tech/ren-py.js +164 -164
- package/icons/tech/rider.js +20 -20
- package/icons/tech/robot-operating-system-ros.js +4 -4
- package/icons/tech/rocksdb.js +6 -6
- package/icons/tech/rollup-js.js +37 -37
- package/icons/tech/rspec.js +8 -8
- package/icons/tech/rstudio.js +7 -7
- package/icons/tech/ruby-mine.js +28 -28
- package/icons/tech/ruby-on-rails.js +4 -4
- package/icons/tech/ruby.js +120 -120
- package/icons/tech/rust.js +4 -4
- package/icons/tech/salesforce.js +7 -7
- package/icons/tech/sanity.js +7 -7
- package/icons/tech/sass.js +4 -4
- package/icons/tech/scala.js +6 -6
- package/icons/tech/scalingo.js +6 -6
- package/icons/tech/sdl.js +11 -11
- package/icons/tech/selenium.js +6 -6
- package/icons/tech/sema-software.js +4 -4
- package/icons/tech/sequelize.js +31 -31
- package/icons/tech/shopware.js +6 -6
- package/icons/tech/sketch.js +11 -11
- package/icons/tech/slack.js +8 -8
- package/icons/tech/socket-io.js +6 -6
- package/icons/tech/solid-js.js +27 -27
- package/icons/tech/solidity.js +10 -10
- package/icons/tech/sonarqube.js +4 -4
- package/icons/tech/sourcetree.js +4 -4
- package/icons/tech/spark.js +4 -4
- package/icons/tech/splunk.js +4 -4
- package/icons/tech/spring.js +4 -4
- package/icons/tech/sql-developer.js +10 -10
- package/icons/tech/sqlalchemy.js +6 -6
- package/icons/tech/sqlite.js +11 -11
- package/icons/tech/ssh.js +4 -4
- package/icons/tech/stackoverflow.js +6 -6
- package/icons/tech/stata.js +4 -4
- package/icons/tech/storybook.js +4 -4
- package/icons/tech/streamlit.js +7 -7
- package/icons/tech/stylus.js +6 -6
- package/icons/tech/subversion.js +4 -4
- package/icons/tech/svelte.js +6 -6
- package/icons/tech/swagger.js +6 -6
- package/icons/tech/swift.js +6 -6
- package/icons/tech/symfony.js +4 -4
- package/icons/tech/tailwind-css.js +4 -4
- package/icons/tech/tauri.js +8 -8
- package/icons/tech/tensorflow.js +4 -4
- package/icons/tech/terraform.js +7 -7
- package/icons/tech/tex.js +4 -4
- package/icons/tech/the-algorithms.js +4 -4
- package/icons/tech/three-js.js +8 -8
- package/icons/tech/titanium-sdk.js +4 -4
- package/icons/tech/tomcat.js +11 -11
- package/icons/tech/tortoise-git.js +9 -9
- package/icons/tech/tower.js +139 -139
- package/icons/tech/traefik-mesh.js +4 -4
- package/icons/tech/traefik-proxy.js +4 -4
- package/icons/tech/travis-ci.js +4 -4
- package/icons/tech/trello.js +4 -4
- package/icons/tech/twitter.js +4 -4
- package/icons/tech/typescript.js +6 -6
- package/icons/tech/typo3.js +4 -4
- package/icons/tech/ubuntu.js +4 -4
- package/icons/tech/uml.js +8 -8
- package/icons/tech/unity.js +7 -7
- package/icons/tech/unix.js +4 -4
- package/icons/tech/unreal-engine.js +6 -6
- package/icons/tech/uwsgi.js +11 -11
- package/icons/tech/v8.js +33 -33
- package/icons/tech/vagrant.js +6 -6
- package/icons/tech/vala.js +18 -18
- package/icons/tech/vercel.js +4 -4
- package/icons/tech/veutify.js +8 -8
- package/icons/tech/vim.js +37 -37
- package/icons/tech/visualstudio.js +4 -4
- package/icons/tech/vite.js +4 -4
- package/icons/tech/vitejs.js +14 -14
- package/icons/tech/vscode.js +31 -31
- package/icons/tech/vsphere.js +9 -9
- package/icons/tech/vue-storefront.js +7 -7
- package/icons/tech/vue.js +7 -7
- package/icons/tech/vyper.js +8 -8
- package/icons/tech/webassembly.js +4 -4
- package/icons/tech/webflow.js +4 -4
- package/icons/tech/weblate.js +17 -17
- package/icons/tech/webpack.js +6 -6
- package/icons/tech/webstorm.js +19 -19
- package/icons/tech/windows11.js +4 -4
- package/icons/tech/windows8.js +4 -4
- package/icons/tech/woo-commerce.js +7 -7
- package/icons/tech/wordpress.js +11 -11
- package/icons/tech/xamarin.js +4 -4
- package/icons/tech/xcode.js +251 -251
- package/icons/tech/xml.js +8 -8
- package/icons/tech/yaml.js +7 -7
- package/icons/tech/yarn.js +6 -6
- package/icons/tech/yii-framework.js +8 -8
- package/icons/tech/yuno-host.js +6 -6
- package/icons/tech/zend-framework.js +4 -4
- package/icons/tech/zig.js +13 -13
- package/package.json +33 -32
- package/react/index.d.ts +1400 -747
- package/react/index.mjs +4382 -2784
- package/react/style.css +1 -1
- package/dist/shared/likec4.BaYahRry.mjs +0 -1221
package/dist/index.d.mts
CHANGED
|
@@ -1,168 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
3
|
-
|
|
4
|
-
@category Type
|
|
5
|
-
*/
|
|
6
|
-
type Primitive =
|
|
7
|
-
| null
|
|
8
|
-
| undefined
|
|
9
|
-
| string
|
|
10
|
-
| number
|
|
11
|
-
| boolean
|
|
12
|
-
| symbol
|
|
13
|
-
| bigint;
|
|
14
|
-
|
|
15
|
-
declare global {
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
17
|
-
interface SymbolConstructor {
|
|
18
|
-
readonly observable: symbol;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
|
|
24
|
-
|
|
25
|
-
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
|
|
26
|
-
|
|
27
|
-
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
|
|
28
|
-
|
|
29
|
-
@example
|
|
30
|
-
```
|
|
31
|
-
import type {LiteralUnion} from 'type-fest';
|
|
32
|
-
|
|
33
|
-
// Before
|
|
34
|
-
|
|
35
|
-
type Pet = 'dog' | 'cat' | string;
|
|
36
|
-
|
|
37
|
-
const pet: Pet = '';
|
|
38
|
-
// Start typing in your TypeScript-enabled IDE.
|
|
39
|
-
// You **will not** get auto-completion for `dog` and `cat` literals.
|
|
40
|
-
|
|
41
|
-
// After
|
|
42
|
-
|
|
43
|
-
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
|
|
44
|
-
|
|
45
|
-
const pet: Pet2 = '';
|
|
46
|
-
// You **will** get auto-completion for `dog` and `cat` literals.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
@category Type
|
|
50
|
-
*/
|
|
51
|
-
type LiteralUnion<
|
|
52
|
-
LiteralType,
|
|
53
|
-
BaseType extends Primitive,
|
|
54
|
-
> = LiteralType | (BaseType & Record<never, never>);
|
|
55
|
-
|
|
56
|
-
declare const tag$1: unique symbol;
|
|
57
|
-
|
|
58
|
-
type TagContainer$1<Token> = {
|
|
59
|
-
readonly [tag$1]: Token;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
type Tag$1$1<Token extends PropertyKey, TagMetadata> = TagContainer$1<{[K in Token]: TagMetadata}>;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
Attach a "tag" to an arbitrary type. This allows you to create distinct types, that aren't assignable to one another, for distinct concepts in your program that should not be interchangeable, even if their runtime values have the same type. (See examples.)
|
|
66
|
-
|
|
67
|
-
A type returned by `Tagged` can be passed to `Tagged` again, to create a type with multiple tags.
|
|
68
|
-
|
|
69
|
-
[Read more about tagged types.](https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d)
|
|
70
|
-
|
|
71
|
-
A tag's name is usually a string (and must be a string, number, or symbol), but each application of a tag can also contain an arbitrary type as its "metadata". See {@link GetTagMetadata} for examples and explanation.
|
|
72
|
-
|
|
73
|
-
A type `A` returned by `Tagged` is assignable to another type `B` returned by `Tagged` if and only if:
|
|
74
|
-
- the underlying (untagged) type of `A` is assignable to the underlying type of `B`;
|
|
75
|
-
- `A` contains at least all the tags `B` has;
|
|
76
|
-
- and the metadata type for each of `A`'s tags is assignable to the metadata type of `B`'s corresponding tag.
|
|
77
|
-
|
|
78
|
-
There have been several discussions about adding similar features to TypeScript. Unfortunately, nothing has (yet) moved forward:
|
|
79
|
-
- [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202)
|
|
80
|
-
- [Microsoft/TypeScript#4895](https://github.com/microsoft/TypeScript/issues/4895)
|
|
81
|
-
- [Microsoft/TypeScript#33290](https://github.com/microsoft/TypeScript/pull/33290)
|
|
82
|
-
|
|
83
|
-
@example
|
|
84
|
-
```
|
|
85
|
-
import type {Tagged} from 'type-fest';
|
|
86
|
-
|
|
87
|
-
type AccountNumber = Tagged<number, 'AccountNumber'>;
|
|
88
|
-
type AccountBalance = Tagged<number, 'AccountBalance'>;
|
|
89
|
-
|
|
90
|
-
function createAccountNumber(): AccountNumber {
|
|
91
|
-
// As you can see, casting from a `number` (the underlying type being tagged) is allowed.
|
|
92
|
-
return 2 as AccountNumber;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance {
|
|
96
|
-
return 4 as AccountBalance;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// This will compile successfully.
|
|
100
|
-
getMoneyForAccount(createAccountNumber());
|
|
101
|
-
|
|
102
|
-
// But this won't, because it has to be explicitly passed as an `AccountNumber` type!
|
|
103
|
-
// Critically, you could not accidentally use an `AccountBalance` as an `AccountNumber`.
|
|
104
|
-
getMoneyForAccount(2);
|
|
105
|
-
|
|
106
|
-
// You can also use tagged values like their underlying, untagged type.
|
|
107
|
-
// I.e., this will compile successfully because an `AccountNumber` can be used as a regular `number`.
|
|
108
|
-
// In this sense, the underlying base type is not hidden, which differentiates tagged types from opaque types in other languages.
|
|
109
|
-
const accountNumber = createAccountNumber() + 2;
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
@example
|
|
113
|
-
```
|
|
114
|
-
import type {Tagged} from 'type-fest';
|
|
115
|
-
|
|
116
|
-
// You can apply multiple tags to a type by using `Tagged` repeatedly.
|
|
117
|
-
type Url = Tagged<string, 'URL'>;
|
|
118
|
-
type SpecialCacheKey = Tagged<Url, 'SpecialCacheKey'>;
|
|
119
|
-
|
|
120
|
-
// You can also pass a union of tag names, so this is equivalent to the above, although it doesn't give you the ability to assign distinct metadata to each tag.
|
|
121
|
-
type SpecialCacheKey2 = Tagged<string, 'URL' | 'SpecialCacheKey'>;
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
@category Type
|
|
125
|
-
*/
|
|
126
|
-
type Tagged$1<Type, TagName extends PropertyKey, TagMetadata = never> = Type & Tag$1$1<TagName, TagMetadata>;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
Revert a tagged type back to its original type by removing all tags.
|
|
130
|
-
|
|
131
|
-
Why is this necessary?
|
|
132
|
-
|
|
133
|
-
1. Use a `Tagged` type as object keys
|
|
134
|
-
2. Prevent TS4058 error: "Return type of exported function has or is using name X from external module Y but cannot be named"
|
|
135
|
-
|
|
136
|
-
@example
|
|
137
|
-
```
|
|
138
|
-
import type {Tagged, UnwrapTagged} from 'type-fest';
|
|
139
|
-
|
|
140
|
-
type AccountType = Tagged<'SAVINGS' | 'CHECKING', 'AccountType'>;
|
|
141
|
-
|
|
142
|
-
const moneyByAccountType: Record<UnwrapTagged<AccountType>, number> = {
|
|
143
|
-
SAVINGS: 99,
|
|
144
|
-
CHECKING: 0.1
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
// Without UnwrapTagged, the following expression would throw a type error.
|
|
148
|
-
const money = moneyByAccountType.SAVINGS; // TS error: Property 'SAVINGS' does not exist
|
|
149
|
-
|
|
150
|
-
// Attempting to pass an non-Tagged type to UnwrapTagged will raise a type error.
|
|
151
|
-
type WontWork = UnwrapTagged<string>;
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
@category Type
|
|
155
|
-
*/
|
|
156
|
-
type UnwrapTagged<TaggedType extends Tag$1$1<PropertyKey, any>> =
|
|
157
|
-
RemoveAllTags<TaggedType>;
|
|
158
|
-
|
|
159
|
-
type RemoveAllTags<T> = T extends Tag$1$1<PropertyKey, any>
|
|
160
|
-
? {
|
|
161
|
-
[ThisTag in keyof T[typeof tag$1]]: T extends Tagged$1<infer Type, ThisTag, T[typeof tag$1][ThisTag]>
|
|
162
|
-
? RemoveAllTags<Type>
|
|
163
|
-
: never
|
|
164
|
-
}[keyof T[typeof tag$1]]
|
|
165
|
-
: T;
|
|
1
|
+
import { LiteralUnion, Tagged, UnwrapTagged, IsNumericLiteral, SetRequired, ValueOf, ConditionalPick } from 'type-fest';
|
|
166
2
|
|
|
167
3
|
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
168
4
|
type ThemeColor$1 = typeof ThemeColors[number];
|
|
@@ -186,7 +22,7 @@ interface ThemeColorValues {
|
|
|
186
22
|
}
|
|
187
23
|
|
|
188
24
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
189
|
-
type IconUrl = Tagged
|
|
25
|
+
type IconUrl = Tagged<string, 'IconUrl'>;
|
|
190
26
|
type CustomColor$1 = string;
|
|
191
27
|
type Point = readonly [x: number, y: number];
|
|
192
28
|
interface XYPoint {
|
|
@@ -194,17 +30,17 @@ interface XYPoint {
|
|
|
194
30
|
y: number;
|
|
195
31
|
}
|
|
196
32
|
|
|
197
|
-
type Fqn$1 = Tagged
|
|
33
|
+
type Fqn$1 = Tagged<string, 'Fqn'>;
|
|
198
34
|
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
199
35
|
type BorderStyle = typeof BorderStyles[number];
|
|
200
|
-
type ElementKind$1 = Tagged
|
|
36
|
+
type ElementKind$1 = Tagged<string, 'ElementKind'>;
|
|
201
37
|
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
|
|
202
38
|
type ElementShape$1 = typeof ElementShapes[number];
|
|
203
39
|
interface ElementStyle {
|
|
204
40
|
border?: BorderStyle;
|
|
205
41
|
opacity?: number;
|
|
206
42
|
}
|
|
207
|
-
type Tag$
|
|
43
|
+
type Tag$1 = Tagged<string, 'Tag'>;
|
|
208
44
|
interface Link {
|
|
209
45
|
readonly title?: string;
|
|
210
46
|
readonly url: string;
|
|
@@ -216,7 +52,7 @@ interface Element$1 {
|
|
|
216
52
|
readonly title: string;
|
|
217
53
|
readonly description: string | null;
|
|
218
54
|
readonly technology: string | null;
|
|
219
|
-
readonly tags: NonEmptyArray<Tag$
|
|
55
|
+
readonly tags: NonEmptyArray<Tag$1> | null;
|
|
220
56
|
readonly links: NonEmptyArray<Link> | null;
|
|
221
57
|
readonly icon?: IconUrl;
|
|
222
58
|
readonly shape?: ElementShape$1;
|
|
@@ -271,6 +107,135 @@ type OrOperator<Tag, Kind> = Omit<AllNever, 'or'> & {
|
|
|
271
107
|
};
|
|
272
108
|
type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
|
|
273
109
|
|
|
110
|
+
type RelationID$1 = Tagged<string, 'RelationID'>;
|
|
111
|
+
type RelationshipKind$1 = Tagged<string, 'RelationshipKind'>;
|
|
112
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
113
|
+
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
114
|
+
interface Relation$1 {
|
|
115
|
+
readonly id: RelationID$1;
|
|
116
|
+
readonly source: Fqn$1;
|
|
117
|
+
readonly target: Fqn$1;
|
|
118
|
+
readonly title: string;
|
|
119
|
+
readonly description?: string;
|
|
120
|
+
readonly technology?: string;
|
|
121
|
+
readonly tags?: NonEmptyArray<Tag$1>;
|
|
122
|
+
readonly kind?: RelationshipKind$1;
|
|
123
|
+
readonly color?: Color$1;
|
|
124
|
+
readonly line?: RelationshipLineType;
|
|
125
|
+
readonly head?: RelationshipArrowType;
|
|
126
|
+
readonly tail?: RelationshipArrowType;
|
|
127
|
+
readonly links?: NonEmptyArray<Link>;
|
|
128
|
+
readonly navigateTo?: ViewID$1;
|
|
129
|
+
readonly metadata?: {
|
|
130
|
+
[key: string]: string;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
interface RelationshipKindSpecification {
|
|
134
|
+
readonly technology?: string;
|
|
135
|
+
readonly notation?: string;
|
|
136
|
+
readonly color?: Color$1;
|
|
137
|
+
readonly line?: RelationshipLineType;
|
|
138
|
+
readonly head?: RelationshipArrowType;
|
|
139
|
+
readonly tail?: RelationshipArrowType;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface BaseExpr {
|
|
143
|
+
where?: never;
|
|
144
|
+
element?: never;
|
|
145
|
+
custom?: never;
|
|
146
|
+
expanded?: never;
|
|
147
|
+
elementKind?: never;
|
|
148
|
+
elementTag?: never;
|
|
149
|
+
isEqual?: never;
|
|
150
|
+
isDescedants?: never;
|
|
151
|
+
wildcard?: never;
|
|
152
|
+
source?: never;
|
|
153
|
+
target?: never;
|
|
154
|
+
inout?: never;
|
|
155
|
+
incoming?: never;
|
|
156
|
+
outgoing?: never;
|
|
157
|
+
customRelation?: never;
|
|
158
|
+
}
|
|
159
|
+
interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants'> {
|
|
160
|
+
element: Fqn$1;
|
|
161
|
+
isDescedants?: boolean;
|
|
162
|
+
}
|
|
163
|
+
interface ExpandedElementExpr extends Omit<BaseExpr, 'expanded'> {
|
|
164
|
+
expanded: Fqn$1;
|
|
165
|
+
}
|
|
166
|
+
interface CustomElementExpr extends Omit<BaseExpr, 'custom'> {
|
|
167
|
+
custom: {
|
|
168
|
+
expr: ElementExpression$1 | ElementWhereExpr;
|
|
169
|
+
title?: string;
|
|
170
|
+
description?: string;
|
|
171
|
+
technology?: string;
|
|
172
|
+
notation?: string;
|
|
173
|
+
shape?: ElementShape$1;
|
|
174
|
+
color?: Color$1;
|
|
175
|
+
icon?: IconUrl;
|
|
176
|
+
border?: BorderStyle;
|
|
177
|
+
opacity?: number;
|
|
178
|
+
navigateTo?: ViewID$1;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
|
|
182
|
+
wildcard: true;
|
|
183
|
+
}
|
|
184
|
+
interface ElementKindExpr extends Omit<BaseExpr, 'elementKind' | 'isEqual'> {
|
|
185
|
+
elementKind: ElementKind$1;
|
|
186
|
+
isEqual: boolean;
|
|
187
|
+
}
|
|
188
|
+
interface ElementTagExpr extends Omit<BaseExpr, 'elementTag' | 'isEqual'> {
|
|
189
|
+
elementTag: Tag$1;
|
|
190
|
+
isEqual: boolean;
|
|
191
|
+
}
|
|
192
|
+
type ElementExpression$1 = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
|
|
193
|
+
interface ElementWhereExpr extends Omit<BaseExpr, 'where'> {
|
|
194
|
+
where: {
|
|
195
|
+
expr: ElementExpression$1;
|
|
196
|
+
condition: WhereOperator<string, string>;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
type ElementPredicateExpression = ElementExpression$1 | ElementWhereExpr | CustomElementExpr;
|
|
200
|
+
interface RelationExpr extends Omit<BaseExpr, 'source' | 'target'> {
|
|
201
|
+
source: ElementExpression$1;
|
|
202
|
+
target: ElementExpression$1;
|
|
203
|
+
isBidirectional?: boolean;
|
|
204
|
+
}
|
|
205
|
+
interface InOutExpr extends Omit<BaseExpr, 'inout'> {
|
|
206
|
+
inout: ElementExpression$1;
|
|
207
|
+
}
|
|
208
|
+
interface IncomingExpr extends Omit<BaseExpr, 'incoming'> {
|
|
209
|
+
incoming: ElementExpression$1;
|
|
210
|
+
}
|
|
211
|
+
interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
212
|
+
outgoing: ElementExpression$1;
|
|
213
|
+
}
|
|
214
|
+
type RelationExpression$1 = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
215
|
+
interface RelationWhereExpr extends Omit<BaseExpr, 'where'> {
|
|
216
|
+
where: {
|
|
217
|
+
expr: RelationExpression$1;
|
|
218
|
+
condition: WhereOperator<string, string>;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
222
|
+
customRelation: {
|
|
223
|
+
relation: RelationExpression$1 | RelationWhereExpr;
|
|
224
|
+
title?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
technology?: string;
|
|
227
|
+
notation?: string;
|
|
228
|
+
navigateTo?: ViewID$1;
|
|
229
|
+
notes?: string;
|
|
230
|
+
color?: Color$1;
|
|
231
|
+
line?: RelationshipLineType;
|
|
232
|
+
head?: RelationshipArrowType;
|
|
233
|
+
tail?: RelationshipArrowType;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
type RelationPredicateExpression = RelationExpression$1 | RelationWhereExpr | CustomRelationExpr;
|
|
237
|
+
type Expression$1 = ElementPredicateExpression | RelationPredicateExpression;
|
|
238
|
+
|
|
274
239
|
type ElementNotation = {
|
|
275
240
|
kinds: ElementKind$1[];
|
|
276
241
|
shape: ElementShape$1;
|
|
@@ -278,7 +243,7 @@ type ElementNotation = {
|
|
|
278
243
|
title: string;
|
|
279
244
|
};
|
|
280
245
|
|
|
281
|
-
type ViewID$1 = Tagged
|
|
246
|
+
type ViewID$1 = Tagged<string, 'ViewID'>;
|
|
282
247
|
type ViewRulePredicate$1 = {
|
|
283
248
|
include: Expression$1[];
|
|
284
249
|
exclude?: never;
|
|
@@ -305,7 +270,7 @@ interface BasicView<ViewType extends 'element' | 'dynamic'> {
|
|
|
305
270
|
readonly id: ViewID$1;
|
|
306
271
|
readonly title: string | null;
|
|
307
272
|
readonly description: string | null;
|
|
308
|
-
readonly tags: NonEmptyArray<Tag$
|
|
273
|
+
readonly tags: NonEmptyArray<Tag$1> | null;
|
|
309
274
|
readonly links: NonEmptyArray<Link> | null;
|
|
310
275
|
/**
|
|
311
276
|
* URI to the source file of this view.
|
|
@@ -371,10 +336,10 @@ type CustomColorDefinitions = {
|
|
|
371
336
|
[key: string]: ThemeColorValues;
|
|
372
337
|
};
|
|
373
338
|
type LikeC4View$1 = ElementView$1 | DynamicView$1;
|
|
374
|
-
type NodeId = Tagged
|
|
375
|
-
type EdgeId$1 = Tagged
|
|
339
|
+
type NodeId = Tagged<string, 'Fqn'>;
|
|
340
|
+
type EdgeId$1 = Tagged<string, 'EdgeId'>;
|
|
376
341
|
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
377
|
-
type StepEdgeId = Tagged
|
|
342
|
+
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
378
343
|
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
379
344
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
380
345
|
declare function extractStep(id: EdgeId$1): number;
|
|
@@ -386,7 +351,7 @@ interface ComputedNode {
|
|
|
386
351
|
description: string | null;
|
|
387
352
|
technology: string | null;
|
|
388
353
|
notation?: string;
|
|
389
|
-
tags: NonEmptyArray<Tag$
|
|
354
|
+
tags: NonEmptyArray<Tag$1> | null;
|
|
390
355
|
links: NonEmptyArray<Link> | null;
|
|
391
356
|
children: NodeId[];
|
|
392
357
|
inEdges: EdgeId$1[];
|
|
@@ -425,7 +390,7 @@ interface ComputedEdge {
|
|
|
425
390
|
line?: RelationshipLineType;
|
|
426
391
|
head?: RelationshipArrowType;
|
|
427
392
|
tail?: RelationshipArrowType;
|
|
428
|
-
tags?: NonEmptyArray<Tag$
|
|
393
|
+
tags?: NonEmptyArray<Tag$1>;
|
|
429
394
|
navigateTo?: ViewID$1;
|
|
430
395
|
/**
|
|
431
396
|
* If this edge is derived from custom relationship predicate
|
|
@@ -518,153 +483,32 @@ type ViewManualLayout = {
|
|
|
518
483
|
}>;
|
|
519
484
|
};
|
|
520
485
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
readonly title: string;
|
|
530
|
-
readonly description?: string;
|
|
531
|
-
readonly technology?: string;
|
|
532
|
-
readonly tags?: NonEmptyArray<Tag$2>;
|
|
533
|
-
readonly kind?: RelationshipKind$1;
|
|
534
|
-
readonly color?: Color$1;
|
|
535
|
-
readonly line?: RelationshipLineType;
|
|
536
|
-
readonly head?: RelationshipArrowType;
|
|
537
|
-
readonly tail?: RelationshipArrowType;
|
|
538
|
-
readonly links?: NonEmptyArray<Link>;
|
|
539
|
-
readonly navigateTo?: ViewID$1;
|
|
540
|
-
readonly metadata?: {
|
|
541
|
-
[key: string]: string;
|
|
486
|
+
/**
|
|
487
|
+
* Parsed elements, relations, and views.
|
|
488
|
+
*/
|
|
489
|
+
interface ParsedLikeC4Model {
|
|
490
|
+
specification: {
|
|
491
|
+
tags: Tag$1[];
|
|
492
|
+
elements: Record<UnwrapTagged<ElementKind$1>, ElementKindSpecification>;
|
|
493
|
+
relationships: Record<UnwrapTagged<ElementKind$1>, RelationshipKindSpecification>;
|
|
542
494
|
};
|
|
495
|
+
elements: Record<Fqn$1, Element$1>;
|
|
496
|
+
relations: Record<RelationID$1, Relation$1>;
|
|
497
|
+
views: Record<ViewID$1, LikeC4View$1>;
|
|
543
498
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
readonly tail?: RelationshipArrowType;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
interface BaseExpr {
|
|
554
|
-
where?: never;
|
|
555
|
-
element?: never;
|
|
556
|
-
custom?: never;
|
|
557
|
-
expanded?: never;
|
|
558
|
-
elementKind?: never;
|
|
559
|
-
elementTag?: never;
|
|
560
|
-
isEqual?: never;
|
|
561
|
-
isDescedants?: never;
|
|
562
|
-
wildcard?: never;
|
|
563
|
-
source?: never;
|
|
564
|
-
target?: never;
|
|
565
|
-
inout?: never;
|
|
566
|
-
incoming?: never;
|
|
567
|
-
outgoing?: never;
|
|
568
|
-
customRelation?: never;
|
|
569
|
-
}
|
|
570
|
-
interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants'> {
|
|
571
|
-
element: Fqn$1;
|
|
572
|
-
isDescedants?: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Same as `ParsedLikeC4Model` but with computed views.
|
|
501
|
+
*/
|
|
502
|
+
interface ComputedLikeC4Model extends Omit<ParsedLikeC4Model, 'views'> {
|
|
503
|
+
__?: never;
|
|
504
|
+
views: Record<ViewID$1, ComputedView>;
|
|
573
505
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
interface
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
title?: string;
|
|
581
|
-
description?: string;
|
|
582
|
-
technology?: string;
|
|
583
|
-
notation?: string;
|
|
584
|
-
shape?: ElementShape$1;
|
|
585
|
-
color?: Color$1;
|
|
586
|
-
icon?: IconUrl;
|
|
587
|
-
border?: BorderStyle;
|
|
588
|
-
opacity?: number;
|
|
589
|
-
navigateTo?: ViewID$1;
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
|
|
593
|
-
wildcard: true;
|
|
594
|
-
}
|
|
595
|
-
interface ElementKindExpr extends Omit<BaseExpr, 'elementKind' | 'isEqual'> {
|
|
596
|
-
elementKind: ElementKind$1;
|
|
597
|
-
isEqual: boolean;
|
|
598
|
-
}
|
|
599
|
-
interface ElementTagExpr extends Omit<BaseExpr, 'elementTag' | 'isEqual'> {
|
|
600
|
-
elementTag: Tag$2;
|
|
601
|
-
isEqual: boolean;
|
|
602
|
-
}
|
|
603
|
-
type ElementExpression$1 = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
|
|
604
|
-
interface ElementWhereExpr extends Omit<BaseExpr, 'where'> {
|
|
605
|
-
where: {
|
|
606
|
-
expr: ElementExpression$1;
|
|
607
|
-
condition: WhereOperator<string, string>;
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
type ElementPredicateExpression = ElementExpression$1 | ElementWhereExpr | CustomElementExpr;
|
|
611
|
-
interface RelationExpr extends Omit<BaseExpr, 'source' | 'target'> {
|
|
612
|
-
source: ElementExpression$1;
|
|
613
|
-
target: ElementExpression$1;
|
|
614
|
-
isBidirectional?: boolean;
|
|
615
|
-
}
|
|
616
|
-
interface InOutExpr extends Omit<BaseExpr, 'inout'> {
|
|
617
|
-
inout: ElementExpression$1;
|
|
618
|
-
}
|
|
619
|
-
interface IncomingExpr extends Omit<BaseExpr, 'incoming'> {
|
|
620
|
-
incoming: ElementExpression$1;
|
|
621
|
-
}
|
|
622
|
-
interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
623
|
-
outgoing: ElementExpression$1;
|
|
624
|
-
}
|
|
625
|
-
type RelationExpression$1 = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
626
|
-
interface RelationWhereExpr extends Omit<BaseExpr, 'where'> {
|
|
627
|
-
where: {
|
|
628
|
-
expr: RelationExpression$1;
|
|
629
|
-
condition: WhereOperator<string, string>;
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
633
|
-
customRelation: {
|
|
634
|
-
relation: RelationExpression$1 | RelationWhereExpr;
|
|
635
|
-
title?: string;
|
|
636
|
-
description?: string;
|
|
637
|
-
technology?: string;
|
|
638
|
-
notation?: string;
|
|
639
|
-
navigateTo?: ViewID$1;
|
|
640
|
-
notes?: string;
|
|
641
|
-
color?: Color$1;
|
|
642
|
-
line?: RelationshipLineType;
|
|
643
|
-
head?: RelationshipArrowType;
|
|
644
|
-
tail?: RelationshipArrowType;
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
|
-
type RelationPredicateExpression = RelationExpression$1 | RelationWhereExpr | CustomRelationExpr;
|
|
648
|
-
type Expression$1 = ElementPredicateExpression | RelationPredicateExpression;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* Parsed elements, relations, and views.
|
|
652
|
-
*/
|
|
653
|
-
interface ParsedLikeC4Model {
|
|
654
|
-
specification: {
|
|
655
|
-
tags: Tag$2[];
|
|
656
|
-
elements: Record<UnwrapTagged<ElementKind$1>, ElementKindSpecification>;
|
|
657
|
-
relationships: Record<UnwrapTagged<ElementKind$1>, RelationshipKindSpecification>;
|
|
658
|
-
};
|
|
659
|
-
elements: Record<Fqn$1, Element$1>;
|
|
660
|
-
relations: Record<RelationID$1, Relation$1>;
|
|
661
|
-
views: Record<ViewID$1, LikeC4View$1>;
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Same as `ParsedLikeC4Model` but with computed views.
|
|
665
|
-
*/
|
|
666
|
-
interface ComputedLikeC4Model extends Omit<ParsedLikeC4Model, 'views'> {
|
|
667
|
-
views: Record<ViewID$1, ComputedView>;
|
|
506
|
+
/**
|
|
507
|
+
* Same as `ParsedLikeC4Model` but with layouted views (DiagramView)
|
|
508
|
+
*/
|
|
509
|
+
interface LayoutedLikeC4Model extends Omit<ParsedLikeC4Model, 'views'> {
|
|
510
|
+
__: 'layouted';
|
|
511
|
+
views: Record<ViewID$1, DiagramView>;
|
|
668
512
|
}
|
|
669
513
|
|
|
670
514
|
/**
|
|
@@ -728,158 +572,6 @@ declare namespace ViewChange {
|
|
|
728
572
|
}
|
|
729
573
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
730
574
|
|
|
731
|
-
type Numeric = number | bigint;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
Returns a boolean for whether the given type is `never`.
|
|
735
|
-
|
|
736
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
737
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
738
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
739
|
-
|
|
740
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
741
|
-
|
|
742
|
-
@example
|
|
743
|
-
```
|
|
744
|
-
import type {IsNever, And} from 'type-fest';
|
|
745
|
-
|
|
746
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
747
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
748
|
-
And<
|
|
749
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
750
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
751
|
-
>;
|
|
752
|
-
|
|
753
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
754
|
-
AreStringsEqual<I, O> extends true
|
|
755
|
-
? never
|
|
756
|
-
: void;
|
|
757
|
-
|
|
758
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
759
|
-
if (input === output) {
|
|
760
|
-
process.exit(0);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
endIfEqual('abc', 'abc');
|
|
765
|
-
//=> never
|
|
766
|
-
|
|
767
|
-
endIfEqual('abc', '123');
|
|
768
|
-
//=> void
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
@category Type Guard
|
|
772
|
-
@category Utilities
|
|
773
|
-
*/
|
|
774
|
-
type IsNever$1<T> = [T] extends [never] ? true : false;
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
Returns a boolean for whether the given type `T` is the specified `LiteralType`.
|
|
778
|
-
|
|
779
|
-
@link https://stackoverflow.com/a/52806744/10292952
|
|
780
|
-
|
|
781
|
-
@example
|
|
782
|
-
```
|
|
783
|
-
LiteralCheck<1, number>
|
|
784
|
-
//=> true
|
|
785
|
-
|
|
786
|
-
LiteralCheck<number, number>
|
|
787
|
-
//=> false
|
|
788
|
-
|
|
789
|
-
LiteralCheck<1, string>
|
|
790
|
-
//=> false
|
|
791
|
-
```
|
|
792
|
-
*/
|
|
793
|
-
type LiteralCheck<T, LiteralType extends Primitive> = (
|
|
794
|
-
IsNever$1<T> extends false // Must be wider than `never`
|
|
795
|
-
? [T] extends [LiteralType & infer U] // Remove any branding
|
|
796
|
-
? [U] extends [LiteralType] // Must be narrower than `LiteralType`
|
|
797
|
-
? [LiteralType] extends [U] // Cannot be wider than `LiteralType`
|
|
798
|
-
? false
|
|
799
|
-
: true
|
|
800
|
-
: false
|
|
801
|
-
: false
|
|
802
|
-
: false
|
|
803
|
-
);
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
Returns a boolean for whether the given type `T` is one of the specified literal types in `LiteralUnionType`.
|
|
807
|
-
|
|
808
|
-
@example
|
|
809
|
-
```
|
|
810
|
-
LiteralChecks<1, Numeric>
|
|
811
|
-
//=> true
|
|
812
|
-
|
|
813
|
-
LiteralChecks<1n, Numeric>
|
|
814
|
-
//=> true
|
|
815
|
-
|
|
816
|
-
LiteralChecks<bigint, Numeric>
|
|
817
|
-
//=> false
|
|
818
|
-
```
|
|
819
|
-
*/
|
|
820
|
-
type LiteralChecks<T, LiteralUnionType> = (
|
|
821
|
-
// Conditional type to force union distribution.
|
|
822
|
-
// If `T` is none of the literal types in the union `LiteralUnionType`, then `LiteralCheck<T, LiteralType>` will evaluate to `false` for the whole union.
|
|
823
|
-
// If `T` is one of the literal types in the union, it will evaluate to `boolean` (i.e. `true | false`)
|
|
824
|
-
IsNotFalse<LiteralUnionType extends Primitive
|
|
825
|
-
? LiteralCheck<T, LiteralUnionType>
|
|
826
|
-
: never
|
|
827
|
-
>
|
|
828
|
-
);
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
Returns a boolean for whether the given type is a `number` or `bigint` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
832
|
-
|
|
833
|
-
Useful for:
|
|
834
|
-
- providing strongly-typed functions when given literal arguments
|
|
835
|
-
- type utilities, such as when constructing parsers and ASTs
|
|
836
|
-
|
|
837
|
-
@example
|
|
838
|
-
```
|
|
839
|
-
import type {IsNumericLiteral} from 'type-fest';
|
|
840
|
-
|
|
841
|
-
// https://github.com/inocan-group/inferred-types/blob/master/src/types/boolean-logic/EndsWith.ts
|
|
842
|
-
type EndsWith<TValue, TEndsWith extends string> =
|
|
843
|
-
TValue extends string
|
|
844
|
-
? IsStringLiteral<TEndsWith> extends true
|
|
845
|
-
? IsStringLiteral<TValue> extends true
|
|
846
|
-
? TValue extends `${string}${TEndsWith}`
|
|
847
|
-
? true
|
|
848
|
-
: false
|
|
849
|
-
: boolean
|
|
850
|
-
: boolean
|
|
851
|
-
: TValue extends number
|
|
852
|
-
? IsNumericLiteral<TValue> extends true
|
|
853
|
-
? EndsWith<`${TValue}`, TEndsWith>
|
|
854
|
-
: false
|
|
855
|
-
: false;
|
|
856
|
-
|
|
857
|
-
function endsWith<Input extends string | number, End extends string>(input: Input, end: End) {
|
|
858
|
-
return `${input}`.endsWith(end) as EndsWith<Input, End>;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
endsWith('abc', 'c');
|
|
862
|
-
//=> true
|
|
863
|
-
|
|
864
|
-
endsWith(123456, '456');
|
|
865
|
-
//=> true
|
|
866
|
-
|
|
867
|
-
const end = '123' as string;
|
|
868
|
-
|
|
869
|
-
endsWith('abc123', end);
|
|
870
|
-
//=> boolean
|
|
871
|
-
```
|
|
872
|
-
|
|
873
|
-
@category Type Guard
|
|
874
|
-
@category Utilities
|
|
875
|
-
*/
|
|
876
|
-
type IsNumericLiteral<T> = LiteralChecks<T, Numeric>;
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
Returns a boolean for whether the given `boolean` is not `false`.
|
|
880
|
-
*/
|
|
881
|
-
type IsNotFalse<T extends boolean> = [T] extends [false] ? false : true;
|
|
882
|
-
|
|
883
575
|
declare const ElementColors: {
|
|
884
576
|
readonly primary: {
|
|
885
577
|
fill: "#3b82f6";
|
|
@@ -1145,43 +837,49 @@ type Fqn = LiteralUnion<Fqn$1, string>;
|
|
|
1145
837
|
type RelationID = LiteralUnion<RelationID$1, string>;
|
|
1146
838
|
type ViewID = LiteralUnion<ViewID$1, string>;
|
|
1147
839
|
type EdgeId = LiteralUnion<EdgeId$1, string>;
|
|
840
|
+
type IncomingFilter = 'all' | 'direct' | 'to-descendants';
|
|
841
|
+
type OutgoingFilter = 'all' | 'direct' | 'from-descendants';
|
|
842
|
+
type ElementOrFqn = Fqn | {
|
|
843
|
+
id: Fqn;
|
|
844
|
+
};
|
|
1148
845
|
|
|
1149
|
-
type ElementOrFqn$1 = Fqn | LikeC4ViewModel.Element;
|
|
1150
846
|
/**
|
|
1151
847
|
* All methods are view-scoped, i.e. only return elements and connections in the view.
|
|
1152
848
|
*/
|
|
1153
849
|
declare class LikeC4ViewModel {
|
|
1154
|
-
#private;
|
|
1155
850
|
readonly view: ComputedView;
|
|
1156
|
-
readonly model: LikeC4Model
|
|
1157
|
-
|
|
851
|
+
readonly model: LikeC4Model<LikeC4ViewModel>;
|
|
852
|
+
private _rootElements;
|
|
853
|
+
private _elements;
|
|
854
|
+
private _connections;
|
|
855
|
+
constructor(view: ComputedView, model: LikeC4Model<LikeC4ViewModel>);
|
|
1158
856
|
get id(): ViewID$1;
|
|
1159
857
|
get title(): string;
|
|
1160
|
-
get viewOf(): LikeC4Model.
|
|
1161
|
-
get tags(): Tag$
|
|
858
|
+
get viewOf(): LikeC4Model.ElementModel<LikeC4ViewModel>;
|
|
859
|
+
get tags(): Tag$1[];
|
|
1162
860
|
roots(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1163
861
|
elements(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1164
862
|
element(id: Fqn): LikeC4ViewModel.Element;
|
|
1165
863
|
hasElement(id: Fqn): boolean;
|
|
1166
864
|
connections(): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1167
865
|
connection(id: EdgeId): LikeC4ViewModel.Connection;
|
|
1168
|
-
findConnections(source: ElementOrFqn
|
|
1169
|
-
parent(element: ElementOrFqn
|
|
1170
|
-
children(element: ElementOrFqn
|
|
1171
|
-
siblings(element: ElementOrFqn
|
|
866
|
+
findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: 'both' | 'direct'): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
867
|
+
parent(element: ElementOrFqn): LikeC4ViewModel.Element | null;
|
|
868
|
+
children(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
869
|
+
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1172
870
|
/**
|
|
1173
871
|
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1174
872
|
* (from closest to root)
|
|
1175
873
|
*/
|
|
1176
|
-
ancestors(element: ElementOrFqn
|
|
1177
|
-
descendants(element: ElementOrFqn
|
|
1178
|
-
incoming(element: ElementOrFqn
|
|
1179
|
-
incomers(element: ElementOrFqn
|
|
874
|
+
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
875
|
+
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
876
|
+
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
877
|
+
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1180
878
|
/**
|
|
1181
879
|
* Outgoing relationships from the element and its descendants
|
|
1182
880
|
*/
|
|
1183
|
-
outgoing(element: ElementOrFqn
|
|
1184
|
-
outgoers(element: ElementOrFqn
|
|
881
|
+
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
882
|
+
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1185
883
|
}
|
|
1186
884
|
declare namespace LikeC4ViewModel {
|
|
1187
885
|
/**
|
|
@@ -1199,8 +897,8 @@ declare namespace LikeC4ViewModel {
|
|
|
1199
897
|
get hasNested(): boolean;
|
|
1200
898
|
get shape(): ElementShape$1;
|
|
1201
899
|
get color(): Color$1;
|
|
1202
|
-
get tags(): Tag$
|
|
1203
|
-
model(): LikeC4Model.
|
|
900
|
+
get tags(): Tag$1[];
|
|
901
|
+
model(): LikeC4Model.ElementModel<LikeC4ViewModel>;
|
|
1204
902
|
parent(): LikeC4ViewModel.Element | null;
|
|
1205
903
|
metadata(key: string): string | undefined;
|
|
1206
904
|
metadata(key: string, defaultValue: string): string;
|
|
@@ -1211,8 +909,8 @@ declare namespace LikeC4ViewModel {
|
|
|
1211
909
|
children(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1212
910
|
incoming(filter?: 'all' | 'direct' | 'to-descendants'): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1213
911
|
incomers(filter?: 'all' | 'direct' | 'to-descendants'): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1214
|
-
outgoing(filter?:
|
|
1215
|
-
outgoers(filter?:
|
|
912
|
+
outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
913
|
+
outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1216
914
|
connectionsTo(target: Fqn | LikeC4ViewModel.Element): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1217
915
|
}
|
|
1218
916
|
/**
|
|
@@ -1226,102 +924,114 @@ declare namespace LikeC4ViewModel {
|
|
|
1226
924
|
get id(): EdgeId$1;
|
|
1227
925
|
get source(): LikeC4ViewModel.Element;
|
|
1228
926
|
get target(): LikeC4ViewModel.Element;
|
|
1229
|
-
get tags(): Tag$
|
|
927
|
+
get tags(): Tag$1[];
|
|
1230
928
|
/**
|
|
1231
929
|
* Model relationships
|
|
1232
930
|
*/
|
|
1233
|
-
relationships(): ReadonlyArray<LikeC4Model.Relationship
|
|
931
|
+
relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4ViewModel>>;
|
|
1234
932
|
}
|
|
1235
933
|
}
|
|
1236
934
|
|
|
1237
|
-
type
|
|
1238
|
-
declare class LikeC4Model {
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
935
|
+
type PickBySource<Source> = Source extends LikeC4Model.Layouted.SourceModel ? LikeC4Model.Layouted : Source extends LikeC4Model.Computed.SourceModel ? LikeC4Model.Computed : never;
|
|
936
|
+
declare class LikeC4Model<M extends LikeC4Model.ViewModel = LikeC4Model.ViewModel> {
|
|
937
|
+
readonly type: LikeC4Model.ModelType<M>;
|
|
938
|
+
readonly sourcemodel: LikeC4Model.SourceModel<M>;
|
|
939
|
+
private _elements;
|
|
940
|
+
private _parents;
|
|
941
|
+
private _children;
|
|
942
|
+
private _rootElements;
|
|
943
|
+
private _relations;
|
|
944
|
+
private _incoming;
|
|
945
|
+
private _outgoing;
|
|
946
|
+
private _internal;
|
|
947
|
+
private _cacheAscendingSiblings;
|
|
948
|
+
private _views;
|
|
949
|
+
static create(source: LikeC4Model.SourceModel): PickBySource<typeof source>;
|
|
950
|
+
static computed(source: ComputedLikeC4Model): LikeC4Model<LikeC4ViewModel>;
|
|
951
|
+
static layouted(source: LayoutedLikeC4Model): LikeC4Model<LikeC4DiagramModel>;
|
|
952
|
+
protected constructor(type: LikeC4Model.ModelType<M>, sourcemodel: LikeC4Model.SourceModel<M>, elements: Element$1[], relations: Relation$1[]);
|
|
1243
953
|
/**
|
|
1244
954
|
* Returns the root elements of the model.
|
|
1245
955
|
*/
|
|
1246
|
-
roots(): ReadonlyArray<LikeC4Model.
|
|
956
|
+
roots(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1247
957
|
/**
|
|
1248
958
|
* Returns all elements in the model.
|
|
1249
959
|
*/
|
|
1250
|
-
elements(): ReadonlyArray<LikeC4Model.
|
|
960
|
+
elements(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1251
961
|
/**
|
|
1252
962
|
* Returns a specific element by its FQN.
|
|
1253
963
|
*/
|
|
1254
|
-
element(id: Fqn): LikeC4Model.
|
|
964
|
+
element(id: Fqn): LikeC4Model.ElementModel<M>;
|
|
1255
965
|
/**
|
|
1256
966
|
* Returns all relationships in the model.
|
|
1257
967
|
*/
|
|
1258
|
-
relationships(): ReadonlyArray<LikeC4Model.Relationship
|
|
968
|
+
relationships(): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1259
969
|
/**
|
|
1260
970
|
* Returns a specific relationship by its ID.
|
|
1261
971
|
*/
|
|
1262
|
-
relationship(id: RelationID): LikeC4Model.Relationship
|
|
972
|
+
relationship(id: RelationID): LikeC4Model.Relationship<M>;
|
|
1263
973
|
/**
|
|
1264
974
|
* Returns all views in the model.
|
|
1265
975
|
*/
|
|
1266
|
-
views(): ReadonlyArray<
|
|
976
|
+
views(): ReadonlyArray<M>;
|
|
1267
977
|
/**
|
|
1268
978
|
* Returns a specific view by its ID.
|
|
1269
979
|
*/
|
|
1270
|
-
view(viewId: ViewID):
|
|
980
|
+
view(viewId: ViewID): M;
|
|
1271
981
|
/**
|
|
1272
982
|
* Returns the parent element of given element.
|
|
1273
983
|
* @see ancestors
|
|
1274
984
|
*/
|
|
1275
|
-
parent(element: ElementOrFqn): LikeC4Model.
|
|
985
|
+
parent(element: ElementOrFqn): LikeC4Model.ElementModel<M> | null;
|
|
1276
986
|
/**
|
|
1277
987
|
* Get all children of the element (only direct children),
|
|
1278
988
|
* @see descendants
|
|
1279
989
|
*/
|
|
1280
|
-
children(element: ElementOrFqn): ReadonlyArray<LikeC4Model.
|
|
990
|
+
children(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1281
991
|
/**
|
|
1282
992
|
* Get all sibling (i.e. same parent)
|
|
1283
993
|
*/
|
|
1284
|
-
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.
|
|
994
|
+
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1285
995
|
/**
|
|
1286
996
|
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1287
997
|
* (from closest to root)
|
|
1288
998
|
*/
|
|
1289
|
-
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4Model.
|
|
999
|
+
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1290
1000
|
/**
|
|
1291
1001
|
* Get all descendant elements (i.e. children, children’s children, etc.)
|
|
1292
1002
|
*/
|
|
1293
|
-
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4Model.
|
|
1003
|
+
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1294
1004
|
/**
|
|
1295
1005
|
* Incoming relationships to the element and its descendants
|
|
1296
1006
|
* @see incomers
|
|
1297
1007
|
*/
|
|
1298
|
-
incoming(element: ElementOrFqn, filter?:
|
|
1008
|
+
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1299
1009
|
/**
|
|
1300
1010
|
* Source elements of incoming relationships
|
|
1301
1011
|
*/
|
|
1302
|
-
incomers(element: ElementOrFqn, filter?:
|
|
1012
|
+
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1303
1013
|
/**
|
|
1304
1014
|
* Outgoing relationships from the element and its descendants
|
|
1305
1015
|
* @see outgoers
|
|
1306
1016
|
*/
|
|
1307
|
-
outgoing(element: ElementOrFqn, filter?:
|
|
1017
|
+
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1308
1018
|
/**
|
|
1309
1019
|
* Target elements of outgoing relationships
|
|
1310
1020
|
*/
|
|
1311
|
-
outgoers(element: ElementOrFqn, filter?:
|
|
1021
|
+
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1312
1022
|
/**
|
|
1313
1023
|
* Relationships inside the element, among descendants
|
|
1314
1024
|
*/
|
|
1315
|
-
internal(element: ElementOrFqn): ReadonlyArray<LikeC4Model.Relationship
|
|
1025
|
+
internal(element: ElementOrFqn): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1316
1026
|
/**
|
|
1317
1027
|
* Resolve siblings of the element and siblings of ancestors
|
|
1318
1028
|
* (from closest to root)
|
|
1319
1029
|
*/
|
|
1320
|
-
ascendingSiblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.
|
|
1030
|
+
ascendingSiblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1321
1031
|
/**
|
|
1322
1032
|
* Resolve all views that contain the element
|
|
1323
1033
|
*/
|
|
1324
|
-
viewsWithElement(element: ElementOrFqn): ReadonlyArray<
|
|
1034
|
+
viewsWithElement(element: ElementOrFqn): ReadonlyArray<M>;
|
|
1325
1035
|
private addElement;
|
|
1326
1036
|
private addRelation;
|
|
1327
1037
|
private _childrenOf;
|
|
@@ -1330,10 +1040,43 @@ declare class LikeC4Model {
|
|
|
1330
1040
|
private _internalOf;
|
|
1331
1041
|
}
|
|
1332
1042
|
declare namespace LikeC4Model {
|
|
1333
|
-
|
|
1334
|
-
|
|
1043
|
+
function isModel(model: any): model is LikeC4Model;
|
|
1044
|
+
type SourceModel<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? LayoutedLikeC4Model : ComputedLikeC4Model;
|
|
1045
|
+
type ViewModel = LikeC4ViewModel | LikeC4DiagramModel;
|
|
1046
|
+
namespace ViewModel {
|
|
1047
|
+
type Relationship = LikeC4Model.Relationship<ViewModel>;
|
|
1048
|
+
function isLayouted(model: ViewModel): model is LikeC4DiagramModel;
|
|
1049
|
+
}
|
|
1050
|
+
type Computed = LikeC4Model<LikeC4ViewModel>;
|
|
1051
|
+
namespace Computed {
|
|
1052
|
+
type ViewModel = LikeC4ViewModel;
|
|
1053
|
+
type SourceModel = LikeC4Model.SourceModel<ViewModel>;
|
|
1054
|
+
}
|
|
1055
|
+
type Layouted = LikeC4Model<LikeC4DiagramModel>;
|
|
1056
|
+
namespace Layouted {
|
|
1057
|
+
type ViewModel = LikeC4DiagramModel;
|
|
1058
|
+
type SourceModel = LikeC4Model.SourceModel<ViewModel>;
|
|
1059
|
+
}
|
|
1060
|
+
type ModelType<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? 'layouted' : M extends LikeC4ViewModel ? 'computed' : never;
|
|
1061
|
+
function isLayouted(model: LikeC4Model): model is Layouted;
|
|
1062
|
+
class Relationship<M extends ViewModel> {
|
|
1063
|
+
readonly relationship: Relation$1;
|
|
1064
|
+
private model;
|
|
1065
|
+
constructor(relationship: Relation$1, model: LikeC4Model<M>);
|
|
1066
|
+
get id(): RelationID$1;
|
|
1067
|
+
get title(): string;
|
|
1068
|
+
get kind(): RelationshipKind$1;
|
|
1069
|
+
get tags(): Tag$1[];
|
|
1070
|
+
get source(): ElementModel<M>;
|
|
1071
|
+
get target(): ElementModel<M>;
|
|
1072
|
+
metadata(key: string): string | undefined;
|
|
1073
|
+
metadata(key: string, defaultValue: string): string;
|
|
1074
|
+
hasMetadata(key: string): boolean;
|
|
1075
|
+
}
|
|
1076
|
+
class ElementModel<M extends ViewModel> {
|
|
1077
|
+
readonly element: Element$1;
|
|
1335
1078
|
private model;
|
|
1336
|
-
constructor(element: Element, model: LikeC4Model);
|
|
1079
|
+
constructor(element: Element$1, model: LikeC4Model<M>);
|
|
1337
1080
|
get id(): Fqn$1;
|
|
1338
1081
|
get title(): string;
|
|
1339
1082
|
get kind(): ElementKind$1;
|
|
@@ -1341,38 +1084,117 @@ declare namespace LikeC4Model {
|
|
|
1341
1084
|
get hasNested(): boolean;
|
|
1342
1085
|
get shape(): ElementShape$1;
|
|
1343
1086
|
get color(): Color$1;
|
|
1344
|
-
get tags(): Tag$
|
|
1345
|
-
parent():
|
|
1087
|
+
get tags(): Tag$1[];
|
|
1088
|
+
parent(): ElementModel<M> | null;
|
|
1346
1089
|
metadata(key: string): string | undefined;
|
|
1347
1090
|
metadata(key: string, defaultValue: string): string;
|
|
1348
1091
|
hasMetadata(key: string): boolean;
|
|
1349
|
-
ancestors(): readonly
|
|
1350
|
-
siblings(): readonly
|
|
1351
|
-
descendants(): readonly
|
|
1352
|
-
children(): readonly
|
|
1092
|
+
ancestors(): readonly ElementModel<M>[];
|
|
1093
|
+
siblings(): readonly ElementModel<M>[];
|
|
1094
|
+
descendants(): readonly ElementModel<M>[];
|
|
1095
|
+
children(): readonly ElementModel<M>[];
|
|
1353
1096
|
/**
|
|
1354
1097
|
* Views that contain this element
|
|
1355
1098
|
*/
|
|
1356
|
-
views(): readonly
|
|
1357
|
-
incoming(filter?:
|
|
1358
|
-
incomers(filter?:
|
|
1359
|
-
outgoing(filter?:
|
|
1360
|
-
outgoers(filter?:
|
|
1361
|
-
internal(): readonly Relationship[];
|
|
1099
|
+
views(): readonly M[];
|
|
1100
|
+
incoming(filter?: IncomingFilter): readonly Relationship<M>[];
|
|
1101
|
+
incomers(filter?: IncomingFilter): readonly ElementModel<M>[];
|
|
1102
|
+
outgoing(filter?: OutgoingFilter): readonly Relationship<M>[];
|
|
1103
|
+
outgoers(filter?: OutgoingFilter): readonly ElementModel<M>[];
|
|
1104
|
+
internal(): readonly Relationship<M>[];
|
|
1362
1105
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* All methods are view-scoped, i.e. only return elements and connections in the view.
|
|
1110
|
+
*/
|
|
1111
|
+
declare class LikeC4DiagramModel {
|
|
1112
|
+
readonly view: DiagramView;
|
|
1113
|
+
readonly model: LikeC4Model.Layouted;
|
|
1114
|
+
private _rootElements;
|
|
1115
|
+
private _elements;
|
|
1116
|
+
private _connections;
|
|
1117
|
+
constructor(view: DiagramView, model: LikeC4Model.Layouted);
|
|
1118
|
+
get isDynamic(): boolean;
|
|
1119
|
+
get id(): ViewID$1;
|
|
1120
|
+
get title(): string;
|
|
1121
|
+
get viewOf(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
|
|
1122
|
+
get tags(): Tag$1[];
|
|
1123
|
+
roots(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1124
|
+
elements(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1125
|
+
element(id: Fqn): LikeC4DiagramModel.Element;
|
|
1126
|
+
hasElement(id: Fqn): boolean;
|
|
1127
|
+
connections(): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1128
|
+
connection(id: EdgeId): LikeC4DiagramModel.Connection;
|
|
1129
|
+
findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: 'both' | 'direct'): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1130
|
+
parent(element: ElementOrFqn): LikeC4DiagramModel.Element | null;
|
|
1131
|
+
children(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1132
|
+
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1135
|
+
* (from closest to root)
|
|
1136
|
+
*/
|
|
1137
|
+
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1138
|
+
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1139
|
+
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1140
|
+
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Outgoing relationships from the element and its descendants
|
|
1143
|
+
*/
|
|
1144
|
+
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1145
|
+
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1146
|
+
}
|
|
1147
|
+
declare namespace LikeC4DiagramModel {
|
|
1148
|
+
/**
|
|
1149
|
+
* Represents an element in the view. (Diagram node)
|
|
1150
|
+
* All methods are view-scoped, i.e. `children` returns only children of the element in the view.
|
|
1151
|
+
*/
|
|
1152
|
+
class Element {
|
|
1153
|
+
readonly node: DiagramNode;
|
|
1154
|
+
private view;
|
|
1155
|
+
constructor(node: DiagramNode, view: LikeC4DiagramModel);
|
|
1156
|
+
get id(): NodeId;
|
|
1368
1157
|
get title(): string;
|
|
1369
|
-
get kind():
|
|
1370
|
-
get
|
|
1371
|
-
get
|
|
1372
|
-
get
|
|
1158
|
+
get kind(): ElementKind$1;
|
|
1159
|
+
get isRoot(): boolean;
|
|
1160
|
+
get hasNested(): boolean;
|
|
1161
|
+
get shape(): ElementShape$1;
|
|
1162
|
+
get color(): Color$1;
|
|
1163
|
+
get tags(): Tag$1[];
|
|
1164
|
+
get level(): number;
|
|
1165
|
+
get depth(): number;
|
|
1166
|
+
model(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
|
|
1167
|
+
parent(): LikeC4DiagramModel.Element | null;
|
|
1373
1168
|
metadata(key: string): string | undefined;
|
|
1374
1169
|
metadata(key: string, defaultValue: string): string;
|
|
1375
1170
|
hasMetadata(key: string): boolean;
|
|
1171
|
+
ancestors(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1172
|
+
siblings(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1173
|
+
descendants(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1174
|
+
children(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1175
|
+
incoming(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1176
|
+
incomers(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1177
|
+
outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1178
|
+
outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1179
|
+
connectionsTo(target: Fqn | LikeC4DiagramModel.Element): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Represents a connection between two elements.
|
|
1183
|
+
* May be source from multiple model relationships.
|
|
1184
|
+
*/
|
|
1185
|
+
class Connection {
|
|
1186
|
+
readonly edge: DiagramEdge;
|
|
1187
|
+
private view;
|
|
1188
|
+
constructor(edge: DiagramEdge, view: LikeC4DiagramModel);
|
|
1189
|
+
get id(): EdgeId$1;
|
|
1190
|
+
get source(): LikeC4DiagramModel.Element;
|
|
1191
|
+
get target(): LikeC4DiagramModel.Element;
|
|
1192
|
+
get tags(): Tag$1[];
|
|
1193
|
+
get color(): Color$1;
|
|
1194
|
+
/**
|
|
1195
|
+
* Model relationships
|
|
1196
|
+
*/
|
|
1197
|
+
relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4DiagramModel>>;
|
|
1376
1198
|
}
|
|
1377
1199
|
}
|
|
1378
1200
|
declare function nameFromFqn(fqn: Fqn$1): string;
|
|
@@ -1385,7 +1207,6 @@ declare function isSameHierarchy<E extends {
|
|
|
1385
1207
|
declare function isDescendantOf<E extends {
|
|
1386
1208
|
id: Fqn$1;
|
|
1387
1209
|
}>(ancestors: E[]): (e: E) => boolean;
|
|
1388
|
-
declare function notDescendantOf(ancestors: Element$1[]): (e: Element$1) => boolean;
|
|
1389
1210
|
declare function commonAncestor(first: Fqn$1, second: Fqn$1): Fqn$1;
|
|
1390
1211
|
declare function parentFqn(fqn: Fqn$1): Fqn$1 | null;
|
|
1391
1212
|
/**
|
|
@@ -4286,638 +4107,91 @@ declare namespace WorkspaceFolder {
|
|
|
4286
4107
|
function is(value: any): value is WorkspaceFolder;
|
|
4287
4108
|
}
|
|
4288
4109
|
|
|
4289
|
-
|
|
4290
|
-
* @hidden
|
|
4291
|
-
*/
|
|
4292
|
-
type $keywords<T extends string> = {
|
|
4293
|
-
[key in T]: key;
|
|
4294
|
-
};
|
|
4295
|
-
|
|
4296
|
-
declare global {
|
|
4297
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4298
|
-
interface SymbolConstructor {
|
|
4299
|
-
readonly observable: symbol;
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
|
|
4303
|
-
/**
|
|
4304
|
-
Returns a boolean for whether the two given types are equal.
|
|
4305
|
-
|
|
4306
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
4307
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
4308
|
-
|
|
4309
|
-
Use-cases:
|
|
4310
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
4311
|
-
|
|
4312
|
-
@example
|
|
4313
|
-
```
|
|
4314
|
-
import type {IsEqual} from 'type-fest';
|
|
4315
|
-
|
|
4316
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
4317
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
4318
|
-
type Includes<Value extends readonly any[], Item> =
|
|
4319
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
4320
|
-
? IsEqual<Value[0], Item> extends true
|
|
4321
|
-
? true
|
|
4322
|
-
: Includes<rest, Item>
|
|
4323
|
-
: false;
|
|
4324
|
-
```
|
|
4325
|
-
|
|
4326
|
-
@category Type Guard
|
|
4327
|
-
@category Utilities
|
|
4328
|
-
*/
|
|
4329
|
-
type IsEqual<A, B> =
|
|
4330
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
4331
|
-
(<G>() => G extends B ? 1 : 2)
|
|
4332
|
-
? true
|
|
4333
|
-
: false;
|
|
4110
|
+
type ParserMethod<ARGS extends unknown[], R> = (...args: ARGS) => R;
|
|
4334
4111
|
|
|
4335
4112
|
/**
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4113
|
+
* This class does not actually exist nor is exposed at runtime.
|
|
4114
|
+
* This is just a helper to avoid duplications in the Type Definitions
|
|
4115
|
+
* Of `CstParser` and `EmbeddedActionsParser`
|
|
4116
|
+
*/
|
|
4117
|
+
declare abstract class BaseParser$1 {
|
|
4118
|
+
/**
|
|
4119
|
+
* This must be called at the end of a Parser constructor.
|
|
4120
|
+
* See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood
|
|
4121
|
+
*/
|
|
4122
|
+
protected performSelfAnalysis(): void;
|
|
4341
4123
|
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4124
|
+
/**
|
|
4125
|
+
* It is recommended to reuse the same Parser instance
|
|
4126
|
+
* by passing an empty array to the input argument
|
|
4127
|
+
* and only later setting the input by using the input property.
|
|
4128
|
+
* See: http://chevrotain.io/docs/FAQ.html#major-performance-benefits
|
|
4129
|
+
*
|
|
4130
|
+
* @param tokenVocabulary - A data structure containing all the Tokens used by the Parser.
|
|
4131
|
+
* @param config - The Parser's configuration.
|
|
4132
|
+
*/
|
|
4133
|
+
constructor(tokenVocabulary: TokenVocabulary, config?: IParserConfig);
|
|
4347
4134
|
|
|
4348
|
-
|
|
4349
|
-
```
|
|
4350
|
-
type Filtered = Filter<'bar', string>;
|
|
4351
|
-
//=> never
|
|
4352
|
-
```
|
|
4135
|
+
errors: IRecognitionException[];
|
|
4353
4136
|
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4137
|
+
/**
|
|
4138
|
+
* Flag indicating the Parser is at the recording phase.
|
|
4139
|
+
* Can be used to implement methods similar to {@link BaseParser.ACTION}
|
|
4140
|
+
* Or any other logic to requires knowledge of the recording phase.
|
|
4141
|
+
* See:
|
|
4142
|
+
* - https://chevrotain.io/docs/guide/internals.html#grammar-recording
|
|
4143
|
+
* to learn more on the recording phase and how Chevrotain works.
|
|
4144
|
+
*/
|
|
4145
|
+
RECORDING_PHASE: boolean;
|
|
4359
4146
|
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4147
|
+
/**
|
|
4148
|
+
* Resets the parser state, should be overridden for custom parsers which "carry" additional state.
|
|
4149
|
+
* When overriding, remember to also invoke the super implementation!
|
|
4150
|
+
*/
|
|
4151
|
+
reset(): void;
|
|
4363
4152
|
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4153
|
+
getBaseCstVisitorConstructor<IN = any, OUT = any>(): {
|
|
4154
|
+
new (...args: any[]): ICstVisitor<IN, OUT>;
|
|
4155
|
+
};
|
|
4367
4156
|
|
|
4368
|
-
|
|
4157
|
+
getBaseCstVisitorConstructorWithDefaults<IN = any, OUT = any>(): {
|
|
4158
|
+
new (...args: any[]): ICstVisitor<IN, OUT>;
|
|
4159
|
+
};
|
|
4369
4160
|
|
|
4370
|
-
|
|
4371
|
-
*/
|
|
4372
|
-
requireExactProps?: boolean;
|
|
4373
|
-
};
|
|
4161
|
+
getGAstProductions(): Record<string, Rule>;
|
|
4374
4162
|
|
|
4375
|
-
|
|
4376
|
-
Create a type from an object type without certain keys.
|
|
4163
|
+
getSerializedGastProductions(): ISerializedGast[];
|
|
4377
4164
|
|
|
4378
|
-
|
|
4165
|
+
/**
|
|
4166
|
+
* @param startRuleName
|
|
4167
|
+
* @param precedingInput - The token vector up to (not including) the content assist point
|
|
4168
|
+
*/
|
|
4169
|
+
computeContentAssist(
|
|
4170
|
+
startRuleName: string,
|
|
4171
|
+
precedingInput: IToken[],
|
|
4172
|
+
): ISyntacticContentAssistPath[];
|
|
4379
4173
|
|
|
4380
|
-
|
|
4174
|
+
/**
|
|
4175
|
+
* @param grammarRule - The rule to try and parse in backtracking mode.
|
|
4176
|
+
* @param args - argument to be passed to the grammar rule execution
|
|
4177
|
+
*
|
|
4178
|
+
* @return a lookahead function that will try to parse the given grammarRule and will return true if succeed.
|
|
4179
|
+
*/
|
|
4180
|
+
protected BACKTRACK<T>(
|
|
4181
|
+
grammarRule: (...args: any[]) => T,
|
|
4182
|
+
args?: any[],
|
|
4183
|
+
): () => boolean;
|
|
4381
4184
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
4394
|
-
//=> {b: string}
|
|
4395
|
-
|
|
4396
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
4397
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
4398
|
-
|
|
4399
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
4400
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
4401
|
-
|
|
4402
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
4403
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
4404
|
-
```
|
|
4405
|
-
|
|
4406
|
-
@category Object
|
|
4407
|
-
*/
|
|
4408
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
4409
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
4410
|
-
} & (Options['requireExactProps'] extends true
|
|
4411
|
-
? Partial<Record<KeysType, never>>
|
|
4412
|
-
: {});
|
|
4413
|
-
|
|
4414
|
-
/**
|
|
4415
|
-
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
4416
|
-
|
|
4417
|
-
@example
|
|
4418
|
-
```
|
|
4419
|
-
import type {Simplify} from 'type-fest';
|
|
4420
|
-
|
|
4421
|
-
type PositionProps = {
|
|
4422
|
-
top: number;
|
|
4423
|
-
left: number;
|
|
4424
|
-
};
|
|
4425
|
-
|
|
4426
|
-
type SizeProps = {
|
|
4427
|
-
width: number;
|
|
4428
|
-
height: number;
|
|
4429
|
-
};
|
|
4430
|
-
|
|
4431
|
-
// In your editor, hovering over `Props` will show a flattened object with all the properties.
|
|
4432
|
-
type Props = Simplify<PositionProps & SizeProps>;
|
|
4433
|
-
```
|
|
4434
|
-
|
|
4435
|
-
Sometimes it is desired to pass a value as a function argument that has a different type. At first inspection it may seem assignable, and then you discover it is not because the `value`'s type definition was defined as an interface. In the following example, `fn` requires an argument of type `Record<string, unknown>`. If the value is defined as a literal, then it is assignable. And if the `value` is defined as type using the `Simplify` utility the value is assignable. But if the `value` is defined as an interface, it is not assignable because the interface is not sealed and elsewhere a non-string property could be added to the interface.
|
|
4436
|
-
|
|
4437
|
-
If the type definition must be an interface (perhaps it was defined in a third-party npm package), then the `value` can be defined as `const value: Simplify<SomeInterface> = ...`. Then `value` will be assignable to the `fn` argument. Or the `value` can be cast as `Simplify<SomeInterface>` if you can't re-declare the `value`.
|
|
4438
|
-
|
|
4439
|
-
@example
|
|
4440
|
-
```
|
|
4441
|
-
import type {Simplify} from 'type-fest';
|
|
4442
|
-
|
|
4443
|
-
interface SomeInterface {
|
|
4444
|
-
foo: number;
|
|
4445
|
-
bar?: string;
|
|
4446
|
-
baz: number | undefined;
|
|
4447
|
-
}
|
|
4448
|
-
|
|
4449
|
-
type SomeType = {
|
|
4450
|
-
foo: number;
|
|
4451
|
-
bar?: string;
|
|
4452
|
-
baz: number | undefined;
|
|
4453
|
-
};
|
|
4454
|
-
|
|
4455
|
-
const literal = {foo: 123, bar: 'hello', baz: 456};
|
|
4456
|
-
const someType: SomeType = literal;
|
|
4457
|
-
const someInterface: SomeInterface = literal;
|
|
4458
|
-
|
|
4459
|
-
function fn(object: Record<string, unknown>): void {}
|
|
4460
|
-
|
|
4461
|
-
fn(literal); // Good: literal object type is sealed
|
|
4462
|
-
fn(someType); // Good: type is sealed
|
|
4463
|
-
fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
|
|
4464
|
-
fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
|
|
4465
|
-
```
|
|
4466
|
-
|
|
4467
|
-
@link https://github.com/microsoft/TypeScript/issues/15300
|
|
4468
|
-
@see SimplifyDeep
|
|
4469
|
-
@category Object
|
|
4470
|
-
*/
|
|
4471
|
-
type Simplify<T> = {[KeyType in keyof T]: T[KeyType]} & {};
|
|
4472
|
-
|
|
4473
|
-
/**
|
|
4474
|
-
Returns a boolean for whether the given type is `never`.
|
|
4475
|
-
|
|
4476
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
4477
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
4478
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
4479
|
-
|
|
4480
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
4481
|
-
|
|
4482
|
-
@example
|
|
4483
|
-
```
|
|
4484
|
-
import type {IsNever, And} from 'type-fest';
|
|
4485
|
-
|
|
4486
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
4487
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
4488
|
-
And<
|
|
4489
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
4490
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
4491
|
-
>;
|
|
4492
|
-
|
|
4493
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
4494
|
-
AreStringsEqual<I, O> extends true
|
|
4495
|
-
? never
|
|
4496
|
-
: void;
|
|
4497
|
-
|
|
4498
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
4499
|
-
if (input === output) {
|
|
4500
|
-
process.exit(0);
|
|
4501
|
-
}
|
|
4502
|
-
}
|
|
4503
|
-
|
|
4504
|
-
endIfEqual('abc', 'abc');
|
|
4505
|
-
//=> never
|
|
4506
|
-
|
|
4507
|
-
endIfEqual('abc', '123');
|
|
4508
|
-
//=> void
|
|
4509
|
-
```
|
|
4510
|
-
|
|
4511
|
-
@category Type Guard
|
|
4512
|
-
@category Utilities
|
|
4513
|
-
*/
|
|
4514
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
4515
|
-
|
|
4516
|
-
declare const tag: unique symbol;
|
|
4517
|
-
|
|
4518
|
-
type TagContainer<Token> = {
|
|
4519
|
-
readonly [tag]: Token;
|
|
4520
|
-
};
|
|
4521
|
-
|
|
4522
|
-
type Tag$1<Token extends PropertyKey, TagMetadata> = TagContainer<{[K in Token]: TagMetadata}>;
|
|
4523
|
-
|
|
4524
|
-
/**
|
|
4525
|
-
Attach a "tag" to an arbitrary type. This allows you to create distinct types, that aren't assignable to one another, for distinct concepts in your program that should not be interchangeable, even if their runtime values have the same type. (See examples.)
|
|
4526
|
-
|
|
4527
|
-
A type returned by `Tagged` can be passed to `Tagged` again, to create a type with multiple tags.
|
|
4528
|
-
|
|
4529
|
-
[Read more about tagged types.](https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d)
|
|
4530
|
-
|
|
4531
|
-
A tag's name is usually a string (and must be a string, number, or symbol), but each application of a tag can also contain an arbitrary type as its "metadata". See {@link GetTagMetadata} for examples and explanation.
|
|
4532
|
-
|
|
4533
|
-
A type `A` returned by `Tagged` is assignable to another type `B` returned by `Tagged` if and only if:
|
|
4534
|
-
- the underlying (untagged) type of `A` is assignable to the underlying type of `B`;
|
|
4535
|
-
- `A` contains at least all the tags `B` has;
|
|
4536
|
-
- and the metadata type for each of `A`'s tags is assignable to the metadata type of `B`'s corresponding tag.
|
|
4537
|
-
|
|
4538
|
-
There have been several discussions about adding similar features to TypeScript. Unfortunately, nothing has (yet) moved forward:
|
|
4539
|
-
- [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202)
|
|
4540
|
-
- [Microsoft/TypeScript#4895](https://github.com/microsoft/TypeScript/issues/4895)
|
|
4541
|
-
- [Microsoft/TypeScript#33290](https://github.com/microsoft/TypeScript/pull/33290)
|
|
4542
|
-
|
|
4543
|
-
@example
|
|
4544
|
-
```
|
|
4545
|
-
import type {Tagged} from 'type-fest';
|
|
4546
|
-
|
|
4547
|
-
type AccountNumber = Tagged<number, 'AccountNumber'>;
|
|
4548
|
-
type AccountBalance = Tagged<number, 'AccountBalance'>;
|
|
4549
|
-
|
|
4550
|
-
function createAccountNumber(): AccountNumber {
|
|
4551
|
-
// As you can see, casting from a `number` (the underlying type being tagged) is allowed.
|
|
4552
|
-
return 2 as AccountNumber;
|
|
4553
|
-
}
|
|
4554
|
-
|
|
4555
|
-
function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance {
|
|
4556
|
-
return 4 as AccountBalance;
|
|
4557
|
-
}
|
|
4558
|
-
|
|
4559
|
-
// This will compile successfully.
|
|
4560
|
-
getMoneyForAccount(createAccountNumber());
|
|
4561
|
-
|
|
4562
|
-
// But this won't, because it has to be explicitly passed as an `AccountNumber` type!
|
|
4563
|
-
// Critically, you could not accidentally use an `AccountBalance` as an `AccountNumber`.
|
|
4564
|
-
getMoneyForAccount(2);
|
|
4565
|
-
|
|
4566
|
-
// You can also use tagged values like their underlying, untagged type.
|
|
4567
|
-
// I.e., this will compile successfully because an `AccountNumber` can be used as a regular `number`.
|
|
4568
|
-
// In this sense, the underlying base type is not hidden, which differentiates tagged types from opaque types in other languages.
|
|
4569
|
-
const accountNumber = createAccountNumber() + 2;
|
|
4570
|
-
```
|
|
4571
|
-
|
|
4572
|
-
@example
|
|
4573
|
-
```
|
|
4574
|
-
import type {Tagged} from 'type-fest';
|
|
4575
|
-
|
|
4576
|
-
// You can apply multiple tags to a type by using `Tagged` repeatedly.
|
|
4577
|
-
type Url = Tagged<string, 'URL'>;
|
|
4578
|
-
type SpecialCacheKey = Tagged<Url, 'SpecialCacheKey'>;
|
|
4579
|
-
|
|
4580
|
-
// You can also pass a union of tag names, so this is equivalent to the above, although it doesn't give you the ability to assign distinct metadata to each tag.
|
|
4581
|
-
type SpecialCacheKey2 = Tagged<string, 'URL' | 'SpecialCacheKey'>;
|
|
4582
|
-
```
|
|
4583
|
-
|
|
4584
|
-
@category Type
|
|
4585
|
-
*/
|
|
4586
|
-
type Tagged<Type, TagName extends PropertyKey, TagMetadata = never> = Type & Tag$1<TagName, TagMetadata>;
|
|
4587
|
-
|
|
4588
|
-
/**
|
|
4589
|
-
Create a type that makes the given keys required. The remaining keys are kept as is. The sister of the `SetOptional` type.
|
|
4590
|
-
|
|
4591
|
-
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
|
|
4592
|
-
|
|
4593
|
-
@example
|
|
4594
|
-
```
|
|
4595
|
-
import type {SetRequired} from 'type-fest';
|
|
4596
|
-
|
|
4597
|
-
type Foo = {
|
|
4598
|
-
a?: number;
|
|
4599
|
-
b: string;
|
|
4600
|
-
c?: boolean;
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
type SomeRequired = SetRequired<Foo, 'b' | 'c'>;
|
|
4604
|
-
// type SomeRequired = {
|
|
4605
|
-
// a?: number;
|
|
4606
|
-
// b: string; // Was already required and still is.
|
|
4607
|
-
// c: boolean; // Is now required.
|
|
4608
|
-
// }
|
|
4609
|
-
```
|
|
4610
|
-
|
|
4611
|
-
@category Object
|
|
4612
|
-
*/
|
|
4613
|
-
type SetRequired<BaseType, Keys extends keyof BaseType> =
|
|
4614
|
-
// `extends unknown` is always going to be the case and is used to convert any
|
|
4615
|
-
// union into a [distributive conditional
|
|
4616
|
-
// type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
|
|
4617
|
-
BaseType extends unknown
|
|
4618
|
-
? Simplify<
|
|
4619
|
-
// Pick just the keys that are optional from the base type.
|
|
4620
|
-
Except<BaseType, Keys> &
|
|
4621
|
-
// Pick the keys that should be required from the base type and make them required.
|
|
4622
|
-
Required<Pick<BaseType, Keys>>
|
|
4623
|
-
>
|
|
4624
|
-
: never;
|
|
4625
|
-
|
|
4626
|
-
/**
|
|
4627
|
-
Create a union of the given object's values, and optionally specify which keys to get the values from.
|
|
4628
|
-
|
|
4629
|
-
Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/31438) if you want to have this type as a built-in in TypeScript.
|
|
4630
|
-
|
|
4631
|
-
@example
|
|
4632
|
-
```
|
|
4633
|
-
// data.json
|
|
4634
|
-
{
|
|
4635
|
-
'foo': 1,
|
|
4636
|
-
'bar': 2,
|
|
4637
|
-
'biz': 3
|
|
4638
|
-
}
|
|
4639
|
-
|
|
4640
|
-
// main.ts
|
|
4641
|
-
import type {ValueOf} from 'type-fest';
|
|
4642
|
-
import data = require('./data.json');
|
|
4643
|
-
|
|
4644
|
-
export function getData(name: string): ValueOf<typeof data> {
|
|
4645
|
-
return data[name];
|
|
4646
|
-
}
|
|
4647
|
-
|
|
4648
|
-
export function onlyBar(name: string): ValueOf<typeof data, 'bar'> {
|
|
4649
|
-
return data[name];
|
|
4650
|
-
}
|
|
4651
|
-
|
|
4652
|
-
// file.ts
|
|
4653
|
-
import {getData, onlyBar} from './main';
|
|
4654
|
-
|
|
4655
|
-
getData('foo');
|
|
4656
|
-
//=> 1
|
|
4657
|
-
|
|
4658
|
-
onlyBar('foo');
|
|
4659
|
-
//=> TypeError ...
|
|
4660
|
-
|
|
4661
|
-
onlyBar('bar');
|
|
4662
|
-
//=> 2
|
|
4663
|
-
```
|
|
4664
|
-
|
|
4665
|
-
@category Object
|
|
4666
|
-
*/
|
|
4667
|
-
type ValueOf<ObjectType, ValueType extends keyof ObjectType = keyof ObjectType> = ObjectType[ValueType];
|
|
4668
|
-
|
|
4669
|
-
/**
|
|
4670
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
4671
|
-
|
|
4672
|
-
@see {@link IsNever}
|
|
4673
|
-
|
|
4674
|
-
@example
|
|
4675
|
-
```
|
|
4676
|
-
import type {IfNever} from 'type-fest';
|
|
4677
|
-
|
|
4678
|
-
type ShouldBeTrue = IfNever<never>;
|
|
4679
|
-
//=> true
|
|
4680
|
-
|
|
4681
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
4682
|
-
//=> 'bar'
|
|
4683
|
-
```
|
|
4684
|
-
|
|
4685
|
-
@category Type Guard
|
|
4686
|
-
@category Utilities
|
|
4687
|
-
*/
|
|
4688
|
-
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
4689
|
-
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
4690
|
-
);
|
|
4691
|
-
|
|
4692
|
-
/**
|
|
4693
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
4694
|
-
|
|
4695
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
4696
|
-
|
|
4697
|
-
@example
|
|
4698
|
-
```
|
|
4699
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
4700
|
-
|
|
4701
|
-
interface Example {
|
|
4702
|
-
a: string;
|
|
4703
|
-
b: string | number;
|
|
4704
|
-
c?: string;
|
|
4705
|
-
d: {};
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
4709
|
-
//=> 'a'
|
|
4710
|
-
```
|
|
4711
|
-
|
|
4712
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
4713
|
-
|
|
4714
|
-
@example
|
|
4715
|
-
```
|
|
4716
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
4717
|
-
|
|
4718
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
4719
|
-
//=> 'a' | 'c'
|
|
4720
|
-
```
|
|
4721
|
-
|
|
4722
|
-
@category Object
|
|
4723
|
-
*/
|
|
4724
|
-
type ConditionalKeys<Base, Condition> =
|
|
4725
|
-
{
|
|
4726
|
-
// Map through all the keys of the given base type.
|
|
4727
|
-
[Key in keyof Base]-?:
|
|
4728
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
4729
|
-
Base[Key] extends Condition
|
|
4730
|
-
// Retain this key
|
|
4731
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
4732
|
-
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
4733
|
-
// Discard this key since the condition fails.
|
|
4734
|
-
: never;
|
|
4735
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
4736
|
-
}[keyof Base];
|
|
4737
|
-
|
|
4738
|
-
/**
|
|
4739
|
-
Pick keys from the shape that matches the given `Condition`.
|
|
4740
|
-
|
|
4741
|
-
This is useful when you want to create a new type from a specific subset of an existing type. For example, you might want to pick all the primitive properties from a class and form a new automatically derived type.
|
|
4742
|
-
|
|
4743
|
-
@example
|
|
4744
|
-
```
|
|
4745
|
-
import type {Primitive, ConditionalPick} from 'type-fest';
|
|
4746
|
-
|
|
4747
|
-
class Awesome {
|
|
4748
|
-
name: string;
|
|
4749
|
-
successes: number;
|
|
4750
|
-
failures: bigint;
|
|
4751
|
-
|
|
4752
|
-
run() {}
|
|
4753
|
-
}
|
|
4754
|
-
|
|
4755
|
-
type PickPrimitivesFromAwesome = ConditionalPick<Awesome, Primitive>;
|
|
4756
|
-
//=> {name: string; successes: number; failures: bigint}
|
|
4757
|
-
```
|
|
4758
|
-
|
|
4759
|
-
@example
|
|
4760
|
-
```
|
|
4761
|
-
import type {ConditionalPick} from 'type-fest';
|
|
4762
|
-
|
|
4763
|
-
interface Example {
|
|
4764
|
-
a: string;
|
|
4765
|
-
b: string | number;
|
|
4766
|
-
c: () => void;
|
|
4767
|
-
d: {};
|
|
4768
|
-
}
|
|
4769
|
-
|
|
4770
|
-
type StringKeysOnly = ConditionalPick<Example, string>;
|
|
4771
|
-
//=> {a: string}
|
|
4772
|
-
```
|
|
4773
|
-
|
|
4774
|
-
@category Object
|
|
4775
|
-
*/
|
|
4776
|
-
type ConditionalPick<Base, Condition> = Pick<
|
|
4777
|
-
Base,
|
|
4778
|
-
ConditionalKeys<Base, Condition>
|
|
4779
|
-
>;
|
|
4780
|
-
|
|
4781
|
-
declare module 'ts-graphviz' {
|
|
4782
|
-
namespace ClusterSubgraphAttributeKey {
|
|
4783
|
-
interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
|
|
4784
|
-
}
|
|
4785
|
-
}
|
|
4786
|
-
namespace NodeAttributeKey {
|
|
4787
|
-
interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level'> {
|
|
4788
|
-
}
|
|
4789
|
-
}
|
|
4790
|
-
namespace EdgeAttributeKey {
|
|
4791
|
-
interface $values extends $keywords<'likec4_id'> {
|
|
4792
|
-
}
|
|
4793
|
-
}
|
|
4794
|
-
namespace Attribute {
|
|
4795
|
-
interface $keys extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
|
|
4796
|
-
}
|
|
4797
|
-
interface $types {
|
|
4798
|
-
likec4_type: 'folder' | 'file' | 'view';
|
|
4799
|
-
likec4_path: string;
|
|
4800
|
-
likec4_id: string;
|
|
4801
|
-
likec4_level: number;
|
|
4802
|
-
likec4_depth: number;
|
|
4803
|
-
}
|
|
4804
|
-
}
|
|
4805
|
-
}
|
|
4806
|
-
type DotSource = Tagged<string, 'DotSource'>;
|
|
4807
|
-
type DotLayoutResult = {
|
|
4808
|
-
dot: DotSource;
|
|
4809
|
-
diagram: DiagramView;
|
|
4810
|
-
};
|
|
4811
|
-
|
|
4812
|
-
interface GraphvizPort {
|
|
4813
|
-
unflatten(dot: DotSource): Promise<DotSource>;
|
|
4814
|
-
acyclic(dot: DotSource): Promise<DotSource>;
|
|
4815
|
-
layoutJson(dot: DotSource): Promise<string>;
|
|
4816
|
-
svg(dot: DotSource): Promise<string>;
|
|
4817
|
-
}
|
|
4818
|
-
type LayoutResult = {
|
|
4819
|
-
dot: DotSource;
|
|
4820
|
-
diagram: DiagramView;
|
|
4821
|
-
};
|
|
4822
|
-
declare class GraphvizLayouter {
|
|
4823
|
-
private graphviz;
|
|
4824
|
-
constructor(graphviz: GraphvizPort);
|
|
4825
|
-
get port(): GraphvizPort;
|
|
4826
|
-
changePort(graphviz: GraphvizPort): void;
|
|
4827
|
-
layout(view: ComputedView): Promise<LayoutResult>;
|
|
4828
|
-
svg(view: ComputedView): Promise<{
|
|
4829
|
-
svg: string;
|
|
4830
|
-
dot: DotSource;
|
|
4831
|
-
}>;
|
|
4832
|
-
dot(computedView: ComputedView): Promise<DotSource>;
|
|
4833
|
-
layoutOverviewGraph(views: ComputedView[]): Promise<OverviewGraph>;
|
|
4834
|
-
}
|
|
4835
|
-
|
|
4836
|
-
type ParserMethod<ARGS extends unknown[], R> = (...args: ARGS) => R;
|
|
4837
|
-
|
|
4838
|
-
/**
|
|
4839
|
-
* This class does not actually exist nor is exposed at runtime.
|
|
4840
|
-
* This is just a helper to avoid duplications in the Type Definitions
|
|
4841
|
-
* Of `CstParser` and `EmbeddedActionsParser`
|
|
4842
|
-
*/
|
|
4843
|
-
declare abstract class BaseParser$1 {
|
|
4844
|
-
/**
|
|
4845
|
-
* This must be called at the end of a Parser constructor.
|
|
4846
|
-
* See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood
|
|
4847
|
-
*/
|
|
4848
|
-
protected performSelfAnalysis(): void;
|
|
4849
|
-
|
|
4850
|
-
/**
|
|
4851
|
-
* It is recommended to reuse the same Parser instance
|
|
4852
|
-
* by passing an empty array to the input argument
|
|
4853
|
-
* and only later setting the input by using the input property.
|
|
4854
|
-
* See: http://chevrotain.io/docs/FAQ.html#major-performance-benefits
|
|
4855
|
-
*
|
|
4856
|
-
* @param tokenVocabulary - A data structure containing all the Tokens used by the Parser.
|
|
4857
|
-
* @param config - The Parser's configuration.
|
|
4858
|
-
*/
|
|
4859
|
-
constructor(tokenVocabulary: TokenVocabulary, config?: IParserConfig);
|
|
4860
|
-
|
|
4861
|
-
errors: IRecognitionException[];
|
|
4862
|
-
|
|
4863
|
-
/**
|
|
4864
|
-
* Flag indicating the Parser is at the recording phase.
|
|
4865
|
-
* Can be used to implement methods similar to {@link BaseParser.ACTION}
|
|
4866
|
-
* Or any other logic to requires knowledge of the recording phase.
|
|
4867
|
-
* See:
|
|
4868
|
-
* - https://chevrotain.io/docs/guide/internals.html#grammar-recording
|
|
4869
|
-
* to learn more on the recording phase and how Chevrotain works.
|
|
4870
|
-
*/
|
|
4871
|
-
RECORDING_PHASE: boolean;
|
|
4872
|
-
|
|
4873
|
-
/**
|
|
4874
|
-
* Resets the parser state, should be overridden for custom parsers which "carry" additional state.
|
|
4875
|
-
* When overriding, remember to also invoke the super implementation!
|
|
4876
|
-
*/
|
|
4877
|
-
reset(): void;
|
|
4878
|
-
|
|
4879
|
-
getBaseCstVisitorConstructor<IN = any, OUT = any>(): {
|
|
4880
|
-
new (...args: any[]): ICstVisitor<IN, OUT>;
|
|
4881
|
-
};
|
|
4882
|
-
|
|
4883
|
-
getBaseCstVisitorConstructorWithDefaults<IN = any, OUT = any>(): {
|
|
4884
|
-
new (...args: any[]): ICstVisitor<IN, OUT>;
|
|
4885
|
-
};
|
|
4886
|
-
|
|
4887
|
-
getGAstProductions(): Record<string, Rule>;
|
|
4888
|
-
|
|
4889
|
-
getSerializedGastProductions(): ISerializedGast[];
|
|
4890
|
-
|
|
4891
|
-
/**
|
|
4892
|
-
* @param startRuleName
|
|
4893
|
-
* @param precedingInput - The token vector up to (not including) the content assist point
|
|
4894
|
-
*/
|
|
4895
|
-
computeContentAssist(
|
|
4896
|
-
startRuleName: string,
|
|
4897
|
-
precedingInput: IToken[],
|
|
4898
|
-
): ISyntacticContentAssistPath[];
|
|
4899
|
-
|
|
4900
|
-
/**
|
|
4901
|
-
* @param grammarRule - The rule to try and parse in backtracking mode.
|
|
4902
|
-
* @param args - argument to be passed to the grammar rule execution
|
|
4903
|
-
*
|
|
4904
|
-
* @return a lookahead function that will try to parse the given grammarRule and will return true if succeed.
|
|
4905
|
-
*/
|
|
4906
|
-
protected BACKTRACK<T>(
|
|
4907
|
-
grammarRule: (...args: any[]) => T,
|
|
4908
|
-
args?: any[],
|
|
4909
|
-
): () => boolean;
|
|
4910
|
-
|
|
4911
|
-
/**
|
|
4912
|
-
* The Semantic Actions wrapper.
|
|
4913
|
-
* Should be used to wrap semantic actions that either:
|
|
4914
|
-
* - May fail when executing in "recording phase".
|
|
4915
|
-
* - Have global side effects that should be avoided during "recording phase".
|
|
4916
|
-
*
|
|
4917
|
-
* For more information see:
|
|
4918
|
-
* - https://chevrotain.io/docs/guide/internals.html#grammar-recording
|
|
4919
|
-
*/
|
|
4920
|
-
protected ACTION<T>(impl: () => T): T;
|
|
4185
|
+
/**
|
|
4186
|
+
* The Semantic Actions wrapper.
|
|
4187
|
+
* Should be used to wrap semantic actions that either:
|
|
4188
|
+
* - May fail when executing in "recording phase".
|
|
4189
|
+
* - Have global side effects that should be avoided during "recording phase".
|
|
4190
|
+
*
|
|
4191
|
+
* For more information see:
|
|
4192
|
+
* - https://chevrotain.io/docs/guide/internals.html#grammar-recording
|
|
4193
|
+
*/
|
|
4194
|
+
protected ACTION<T>(impl: () => T): T;
|
|
4921
4195
|
|
|
4922
4196
|
/**
|
|
4923
4197
|
* Like `CONSUME` with the numerical suffix as a parameter, e.g:
|
|
@@ -6716,7 +5990,7 @@ interface UriComponents {
|
|
|
6716
5990
|
}
|
|
6717
5991
|
|
|
6718
5992
|
/******************************************************************************
|
|
6719
|
-
* This file was generated by langium-cli 3.
|
|
5993
|
+
* This file was generated by langium-cli 3.2.0.
|
|
6720
5994
|
* DO NOT EDIT MANUALLY!
|
|
6721
5995
|
******************************************************************************/
|
|
6722
5996
|
|
|
@@ -7137,35 +6411,286 @@ declare namespace TextDocument {
|
|
|
7137
6411
|
* @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
|
|
7138
6412
|
*
|
|
7139
6413
|
*/
|
|
7140
|
-
function update(document: TextDocument, changes: TextDocumentContentChangeEvent$1[], version: number): TextDocument;
|
|
7141
|
-
function applyEdits(document: TextDocument, edits: TextEdit[]): string;
|
|
6414
|
+
function update(document: TextDocument, changes: TextDocumentContentChangeEvent$1[], version: number): TextDocument;
|
|
6415
|
+
function applyEdits(document: TextDocument, edits: TextEdit[]): string;
|
|
6416
|
+
}
|
|
6417
|
+
|
|
6418
|
+
/******************************************************************************
|
|
6419
|
+
* Copyright 2022 TypeFox GmbH
|
|
6420
|
+
* This program and the accompanying materials are made available under the
|
|
6421
|
+
* terms of the MIT License, which is available in the project root.
|
|
6422
|
+
******************************************************************************/
|
|
6423
|
+
|
|
6424
|
+
interface FileSystemNode {
|
|
6425
|
+
readonly isFile: boolean;
|
|
6426
|
+
readonly isDirectory: boolean;
|
|
6427
|
+
readonly uri: URI;
|
|
6428
|
+
}
|
|
6429
|
+
/**
|
|
6430
|
+
* Provides methods to interact with an abstract file system. The default implementation is based on the node.js `fs` API.
|
|
6431
|
+
*/
|
|
6432
|
+
interface FileSystemProvider {
|
|
6433
|
+
/**
|
|
6434
|
+
* Reads a document asynchronously from a given URI.
|
|
6435
|
+
* @returns The string content of the file with the specified URI.
|
|
6436
|
+
*/
|
|
6437
|
+
readFile(uri: URI): Promise<string>;
|
|
6438
|
+
/**
|
|
6439
|
+
* Reads the directory information for the given URI.
|
|
6440
|
+
* @returns The list of file system entries that are contained within the specified directory.
|
|
6441
|
+
*/
|
|
6442
|
+
readDirectory(uri: URI): Promise<FileSystemNode[]>;
|
|
6443
|
+
}
|
|
6444
|
+
|
|
6445
|
+
/******************************************************************************
|
|
6446
|
+
* Copyright 2021 TypeFox GmbH
|
|
6447
|
+
* This program and the accompanying materials are made available under the
|
|
6448
|
+
* terms of the MIT License, which is available in the project root.
|
|
6449
|
+
******************************************************************************/
|
|
6450
|
+
/**
|
|
6451
|
+
* A stream is a read-only sequence of values. While the contents of an array can be accessed
|
|
6452
|
+
* both sequentially and randomly (via index), a stream allows only sequential access.
|
|
6453
|
+
*
|
|
6454
|
+
* The advantage of this is that a stream can be evaluated lazily, so it does not require
|
|
6455
|
+
* to store intermediate values. This can boost performance when a large sequence is
|
|
6456
|
+
* processed via filtering, mapping etc. and accessed at most once. However, lazy
|
|
6457
|
+
* evaluation means that all processing is repeated when you access the sequence multiple
|
|
6458
|
+
* times; in such a case, it may be better to store the resulting sequence into an array.
|
|
6459
|
+
*/
|
|
6460
|
+
interface Stream<T> extends Iterable<T> {
|
|
6461
|
+
/**
|
|
6462
|
+
* Returns an iterator for this stream. This is the same as calling the `Symbol.iterator` function property.
|
|
6463
|
+
*/
|
|
6464
|
+
iterator(): IterableIterator<T>;
|
|
6465
|
+
/**
|
|
6466
|
+
* Determines whether this stream contains no elements.
|
|
6467
|
+
*/
|
|
6468
|
+
isEmpty(): boolean;
|
|
6469
|
+
/**
|
|
6470
|
+
* Determines the number of elements in this stream.
|
|
6471
|
+
*/
|
|
6472
|
+
count(): number;
|
|
6473
|
+
/**
|
|
6474
|
+
* Collects all elements of this stream into an array.
|
|
6475
|
+
*/
|
|
6476
|
+
toArray(): T[];
|
|
6477
|
+
/**
|
|
6478
|
+
* Collects all elements of this stream into a Set.
|
|
6479
|
+
*/
|
|
6480
|
+
toSet(): Set<T>;
|
|
6481
|
+
/**
|
|
6482
|
+
* Collects all elements of this stream into a Map, applying the provided functions to determine keys and values.
|
|
6483
|
+
*
|
|
6484
|
+
* @param keyFn The function to derive map keys. If omitted, the stream elements are used as keys.
|
|
6485
|
+
* @param valueFn The function to derive map values. If omitted, the stream elements are used as values.
|
|
6486
|
+
*/
|
|
6487
|
+
toMap<K = T, V = T>(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map<K, V>;
|
|
6488
|
+
/**
|
|
6489
|
+
* Returns a string representation of a stream.
|
|
6490
|
+
*/
|
|
6491
|
+
toString(): string;
|
|
6492
|
+
/**
|
|
6493
|
+
* Combines two streams by returning a new stream that yields all elements of this stream and the other stream.
|
|
6494
|
+
*
|
|
6495
|
+
* @param other Stream to be concatenated with this one.
|
|
6496
|
+
*/
|
|
6497
|
+
concat<T2>(other: Iterable<T2>): Stream<T | T2>;
|
|
6498
|
+
/**
|
|
6499
|
+
* Adds all elements of the stream into a string, separated by the specified separator string.
|
|
6500
|
+
*
|
|
6501
|
+
* @param separator A string used to separate one element of the stream from the next in the resulting string.
|
|
6502
|
+
* If omitted, the steam elements are separated with a comma.
|
|
6503
|
+
*/
|
|
6504
|
+
join(separator?: string): string;
|
|
6505
|
+
/**
|
|
6506
|
+
* Returns the index of the first occurrence of a value in the stream, or -1 if it is not present.
|
|
6507
|
+
*
|
|
6508
|
+
* @param searchElement The value to locate in the array.
|
|
6509
|
+
* @param fromIndex The stream index at which to begin the search. If fromIndex is omitted, the search
|
|
6510
|
+
* starts at index 0.
|
|
6511
|
+
*/
|
|
6512
|
+
indexOf(searchElement: T, fromIndex?: number): number;
|
|
6513
|
+
/**
|
|
6514
|
+
* Determines whether all members of the stream satisfy the specified test.
|
|
6515
|
+
*
|
|
6516
|
+
* @param predicate This method calls the predicate function for each element in the stream until the
|
|
6517
|
+
* predicate returns a value which is coercible to the Boolean value `false`, or until the end
|
|
6518
|
+
* of the stream.
|
|
6519
|
+
*/
|
|
6520
|
+
every<S extends T>(predicate: (value: T) => value is S): this is Stream<S>;
|
|
6521
|
+
every(predicate: (value: T) => unknown): boolean;
|
|
6522
|
+
/**
|
|
6523
|
+
* Determines whether any member of the stream satisfies the specified test.
|
|
6524
|
+
*
|
|
6525
|
+
* @param predicate This method calls the predicate function for each element in the stream until the
|
|
6526
|
+
* predicate returns a value which is coercible to the Boolean value `true`, or until the end
|
|
6527
|
+
* of the stream.
|
|
6528
|
+
*/
|
|
6529
|
+
some(predicate: (value: T) => unknown): boolean;
|
|
6530
|
+
/**
|
|
6531
|
+
* Performs the specified action for each element in the stream.
|
|
6532
|
+
*
|
|
6533
|
+
* @param callbackfn Function called once for each element in the stream.
|
|
6534
|
+
*/
|
|
6535
|
+
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
6536
|
+
/**
|
|
6537
|
+
* Returns a stream that yields the results of calling the specified callback function on each element
|
|
6538
|
+
* of the stream. The function is called when the resulting stream elements are actually accessed, so
|
|
6539
|
+
* accessing the resulting stream multiple times means the function is also called multiple times for
|
|
6540
|
+
* each element of the stream.
|
|
6541
|
+
*
|
|
6542
|
+
* @param callbackfn Lazily evaluated function mapping stream elements.
|
|
6543
|
+
*/
|
|
6544
|
+
map<U>(callbackfn: (value: T) => U): Stream<U>;
|
|
6545
|
+
/**
|
|
6546
|
+
* Returns the elements of the stream that meet the condition specified in a callback function.
|
|
6547
|
+
* The function is called when the resulting stream elements are actually accessed, so accessing the
|
|
6548
|
+
* resulting stream multiple times means the function is also called multiple times for each element
|
|
6549
|
+
* of the stream.
|
|
6550
|
+
*
|
|
6551
|
+
* @param predicate Lazily evaluated function checking a condition on stream elements.
|
|
6552
|
+
*/
|
|
6553
|
+
filter<S extends T>(predicate: (value: T) => value is S): Stream<S>;
|
|
6554
|
+
filter(predicate: (value: T) => unknown): Stream<T>;
|
|
6555
|
+
/**
|
|
6556
|
+
* Returns the elements of the stream that are _non-nullable_, which means they are neither `undefined`
|
|
6557
|
+
* nor `null`.
|
|
6558
|
+
*/
|
|
6559
|
+
nonNullable(): Stream<NonNullable<T>>;
|
|
6560
|
+
/**
|
|
6561
|
+
* Calls the specified callback function for all elements in the stream. The return value of the
|
|
6562
|
+
* callback function is the accumulated result, and is provided as an argument in the next call to
|
|
6563
|
+
* the callback function.
|
|
6564
|
+
*
|
|
6565
|
+
* @param callbackfn This method calls the function once for each element in the stream, providing
|
|
6566
|
+
* the previous and current values of the reduction.
|
|
6567
|
+
* @param initialValue If specified, `initialValue` is used as the initial value to start the
|
|
6568
|
+
* accumulation. The first call to the function provides this value as an argument instead
|
|
6569
|
+
* of a stream value.
|
|
6570
|
+
*/
|
|
6571
|
+
reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
6572
|
+
reduce<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
6573
|
+
/**
|
|
6574
|
+
* Calls the specified callback function for all elements in the stream, in descending order.
|
|
6575
|
+
* The return value of the callback function is the accumulated result, and is provided as an
|
|
6576
|
+
* argument in the next call to the callback function.
|
|
6577
|
+
*
|
|
6578
|
+
* @param callbackfn This method calls the function once for each element in the stream, providing
|
|
6579
|
+
* the previous and current values of the reduction.
|
|
6580
|
+
* @param initialValue If specified, `initialValue` is used as the initial value to start the
|
|
6581
|
+
* accumulation. The first call to the function provides this value as an argument instead
|
|
6582
|
+
* of an array value.
|
|
6583
|
+
*/
|
|
6584
|
+
reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
6585
|
+
reduceRight<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
6586
|
+
/**
|
|
6587
|
+
* Returns the value of the first element in the stream that meets the condition, or `undefined`
|
|
6588
|
+
* if there is no such element.
|
|
6589
|
+
*
|
|
6590
|
+
* @param predicate This method calls `predicate` once for each element of the stream, in ascending
|
|
6591
|
+
* order, until it finds one where `predicate` returns a value which is coercible to the
|
|
6592
|
+
* Boolean value `true`.
|
|
6593
|
+
*/
|
|
6594
|
+
find<S extends T>(predicate: (value: T) => value is S): S | undefined;
|
|
6595
|
+
find(predicate: (value: T) => unknown): T | undefined;
|
|
6596
|
+
/**
|
|
6597
|
+
* Returns the index of the first element in the stream that meets the condition, or `-1`
|
|
6598
|
+
* if there is no such element.
|
|
6599
|
+
*
|
|
6600
|
+
* @param predicate This method calls `predicate` once for each element of the stream, in ascending
|
|
6601
|
+
* order, until it finds one where `predicate` returns a value which is coercible to the
|
|
6602
|
+
* Boolean value `true`.
|
|
6603
|
+
*/
|
|
6604
|
+
findIndex(predicate: (value: T) => unknown): number;
|
|
6605
|
+
/**
|
|
6606
|
+
* Determines whether the stream includes a certain element, returning `true` or `false` as appropriate.
|
|
6607
|
+
*
|
|
6608
|
+
* @param searchElement The element to search for.
|
|
6609
|
+
*/
|
|
6610
|
+
includes(searchElement: T): boolean;
|
|
6611
|
+
/**
|
|
6612
|
+
* Calls a defined callback function on each element of the stream and then flattens the result into
|
|
6613
|
+
* a new stream. This is identical to a `map` followed by `flat` with depth 1.
|
|
6614
|
+
*
|
|
6615
|
+
* @param callbackfn Lazily evaluated function mapping stream elements.
|
|
6616
|
+
*/
|
|
6617
|
+
flatMap<U>(callbackfn: (value: T) => U | Iterable<U>): Stream<U>;
|
|
6618
|
+
/**
|
|
6619
|
+
* Returns a new stream with all sub-stream or sub-array elements concatenated into it recursively up
|
|
6620
|
+
* to the specified depth.
|
|
6621
|
+
*
|
|
6622
|
+
* @param depth The maximum recursion depth. Defaults to 1.
|
|
6623
|
+
*/
|
|
6624
|
+
flat<D extends number = 1>(depth?: D): FlatStream<T, D>;
|
|
6625
|
+
/**
|
|
6626
|
+
* Returns the first element in the stream, or `undefined` if the stream is empty.
|
|
6627
|
+
*/
|
|
6628
|
+
head(): T | undefined;
|
|
6629
|
+
/**
|
|
6630
|
+
* Returns a stream that skips the first `skipCount` elements from this stream.
|
|
6631
|
+
*
|
|
6632
|
+
* @param skipCount The number of elements to skip. If this is larger than the number of elements in
|
|
6633
|
+
* the stream, an empty stream is returned. Defaults to 1.
|
|
6634
|
+
*/
|
|
6635
|
+
tail(skipCount?: number): Stream<T>;
|
|
6636
|
+
/**
|
|
6637
|
+
* Returns a stream consisting of the elements of this stream, truncated to be no longer than `maxSize`
|
|
6638
|
+
* in length.
|
|
6639
|
+
*
|
|
6640
|
+
* @param maxSize The number of elements the stream should be limited to
|
|
6641
|
+
*/
|
|
6642
|
+
limit(maxSize: number): Stream<T>;
|
|
6643
|
+
/**
|
|
6644
|
+
* Returns a stream containing only the distinct elements from this stream.
|
|
6645
|
+
* Equality is determined with the same rules as a standard `Set`.
|
|
6646
|
+
*
|
|
6647
|
+
* @param by A function returning the key used to check equality with a previous stream element.
|
|
6648
|
+
* If omitted, the stream elements themselves are used for comparison.
|
|
6649
|
+
*/
|
|
6650
|
+
distinct<Key = T>(by?: (element: T) => Key): Stream<T>;
|
|
6651
|
+
/**
|
|
6652
|
+
* Returns a stream that contains all elements that don't exist in the {@link other} iterable.
|
|
6653
|
+
* Equality is determined with the same rules as a standard `Set`.
|
|
6654
|
+
* @param other The elements that should be exluded from this stream.
|
|
6655
|
+
* @param key A function returning the key used to check quality.
|
|
6656
|
+
* If omitted, the stream elements themselves are used for comparison.
|
|
6657
|
+
*/
|
|
6658
|
+
exclude<Key = T>(other: Iterable<T>, key?: (element: T) => Key): Stream<T>;
|
|
7142
6659
|
}
|
|
6660
|
+
type FlatStream<T, Depth extends number> = {
|
|
6661
|
+
'done': Stream<T>;
|
|
6662
|
+
'recur': T extends Iterable<infer Content> ? FlatStream<Content, MinusOne<Depth>> : Stream<T>;
|
|
6663
|
+
}[Depth extends 0 ? 'done' : 'recur'];
|
|
6664
|
+
type MinusOne<N extends number> = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][N];
|
|
7143
6665
|
|
|
7144
6666
|
/******************************************************************************
|
|
7145
|
-
* Copyright
|
|
6667
|
+
* Copyright 2021 TypeFox GmbH
|
|
7146
6668
|
* This program and the accompanying materials are made available under the
|
|
7147
6669
|
* terms of the MIT License, which is available in the project root.
|
|
7148
6670
|
******************************************************************************/
|
|
7149
6671
|
|
|
7150
|
-
interface
|
|
7151
|
-
|
|
7152
|
-
readonly isDirectory: boolean;
|
|
7153
|
-
readonly uri: URI;
|
|
6672
|
+
interface TokenBuilderOptions {
|
|
6673
|
+
caseInsensitive?: boolean;
|
|
7154
6674
|
}
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
*/
|
|
7158
|
-
interface FileSystemProvider {
|
|
7159
|
-
/**
|
|
7160
|
-
* Reads a document asynchronously from a given URI.
|
|
7161
|
-
* @returns The string content of the file with the specified URI.
|
|
7162
|
-
*/
|
|
7163
|
-
readFile(uri: URI): Promise<string>;
|
|
6675
|
+
interface TokenBuilder {
|
|
6676
|
+
buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary;
|
|
7164
6677
|
/**
|
|
7165
|
-
*
|
|
7166
|
-
*
|
|
6678
|
+
* Produces a lexing report for the given text that was just tokenized using the tokens provided by this builder.
|
|
6679
|
+
*
|
|
6680
|
+
* @param text The text that was tokenized.
|
|
7167
6681
|
*/
|
|
7168
|
-
|
|
6682
|
+
flushLexingReport?(text: string): LexingReport;
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* A custom lexing report that can be produced by the token builder during the lexing process.
|
|
6686
|
+
* Adopters need to ensure that the any custom fields are serializable so they can be sent across worker threads.
|
|
6687
|
+
*/
|
|
6688
|
+
interface LexingReport {
|
|
6689
|
+
diagnostics: LexingDiagnostic[];
|
|
6690
|
+
}
|
|
6691
|
+
type LexingDiagnosticSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
6692
|
+
interface LexingDiagnostic extends ILexingError {
|
|
6693
|
+
severity?: LexingDiagnosticSeverity;
|
|
7169
6694
|
}
|
|
7170
6695
|
|
|
7171
6696
|
/******************************************************************************
|
|
@@ -7187,10 +6712,15 @@ interface LexerResult {
|
|
|
7187
6712
|
*/
|
|
7188
6713
|
hidden: IToken[];
|
|
7189
6714
|
errors: ILexingError[];
|
|
6715
|
+
report?: LexingReport;
|
|
6716
|
+
}
|
|
6717
|
+
type TokenizeMode = 'full' | 'partial';
|
|
6718
|
+
interface TokenizeOptions {
|
|
6719
|
+
mode?: TokenizeMode;
|
|
7190
6720
|
}
|
|
7191
6721
|
interface Lexer {
|
|
7192
6722
|
readonly definition: TokenTypeDictionary;
|
|
7193
|
-
tokenize(text: string): LexerResult;
|
|
6723
|
+
tokenize(text: string, options?: TokenizeOptions): LexerResult;
|
|
7194
6724
|
}
|
|
7195
6725
|
|
|
7196
6726
|
/******************************************************************************
|
|
@@ -7203,6 +6733,7 @@ type ParseResult<T = AstNode> = {
|
|
|
7203
6733
|
value: T;
|
|
7204
6734
|
parserErrors: IRecognitionException[];
|
|
7205
6735
|
lexerErrors: ILexingError[];
|
|
6736
|
+
lexerReport?: LexingReport;
|
|
7206
6737
|
};
|
|
7207
6738
|
type RuleResult = (args: Args) => any;
|
|
7208
6739
|
type Args = Record<string, boolean>;
|
|
@@ -7402,231 +6933,10 @@ interface ServiceRegistry {
|
|
|
7402
6933
|
*/
|
|
7403
6934
|
hasServices(uri: URI): boolean;
|
|
7404
6935
|
/**
|
|
7405
|
-
* The full set of registered language services.
|
|
7406
|
-
*/
|
|
7407
|
-
readonly all: readonly LangiumCoreServices[];
|
|
7408
|
-
}
|
|
7409
|
-
|
|
7410
|
-
/******************************************************************************
|
|
7411
|
-
* Copyright 2021 TypeFox GmbH
|
|
7412
|
-
* This program and the accompanying materials are made available under the
|
|
7413
|
-
* terms of the MIT License, which is available in the project root.
|
|
7414
|
-
******************************************************************************/
|
|
7415
|
-
/**
|
|
7416
|
-
* A stream is a read-only sequence of values. While the contents of an array can be accessed
|
|
7417
|
-
* both sequentially and randomly (via index), a stream allows only sequential access.
|
|
7418
|
-
*
|
|
7419
|
-
* The advantage of this is that a stream can be evaluated lazily, so it does not require
|
|
7420
|
-
* to store intermediate values. This can boost performance when a large sequence is
|
|
7421
|
-
* processed via filtering, mapping etc. and accessed at most once. However, lazy
|
|
7422
|
-
* evaluation means that all processing is repeated when you access the sequence multiple
|
|
7423
|
-
* times; in such a case, it may be better to store the resulting sequence into an array.
|
|
7424
|
-
*/
|
|
7425
|
-
interface Stream<T> extends Iterable<T> {
|
|
7426
|
-
/**
|
|
7427
|
-
* Returns an iterator for this stream. This is the same as calling the `Symbol.iterator` function property.
|
|
7428
|
-
*/
|
|
7429
|
-
iterator(): IterableIterator<T>;
|
|
7430
|
-
/**
|
|
7431
|
-
* Determines whether this stream contains no elements.
|
|
7432
|
-
*/
|
|
7433
|
-
isEmpty(): boolean;
|
|
7434
|
-
/**
|
|
7435
|
-
* Determines the number of elements in this stream.
|
|
7436
|
-
*/
|
|
7437
|
-
count(): number;
|
|
7438
|
-
/**
|
|
7439
|
-
* Collects all elements of this stream into an array.
|
|
7440
|
-
*/
|
|
7441
|
-
toArray(): T[];
|
|
7442
|
-
/**
|
|
7443
|
-
* Collects all elements of this stream into a Set.
|
|
7444
|
-
*/
|
|
7445
|
-
toSet(): Set<T>;
|
|
7446
|
-
/**
|
|
7447
|
-
* Collects all elements of this stream into a Map, applying the provided functions to determine keys and values.
|
|
7448
|
-
*
|
|
7449
|
-
* @param keyFn The function to derive map keys. If omitted, the stream elements are used as keys.
|
|
7450
|
-
* @param valueFn The function to derive map values. If omitted, the stream elements are used as values.
|
|
7451
|
-
*/
|
|
7452
|
-
toMap<K = T, V = T>(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map<K, V>;
|
|
7453
|
-
/**
|
|
7454
|
-
* Returns a string representation of a stream.
|
|
7455
|
-
*/
|
|
7456
|
-
toString(): string;
|
|
7457
|
-
/**
|
|
7458
|
-
* Combines two streams by returning a new stream that yields all elements of this stream and the other stream.
|
|
7459
|
-
*
|
|
7460
|
-
* @param other Stream to be concatenated with this one.
|
|
7461
|
-
*/
|
|
7462
|
-
concat<T2>(other: Iterable<T2>): Stream<T | T2>;
|
|
7463
|
-
/**
|
|
7464
|
-
* Adds all elements of the stream into a string, separated by the specified separator string.
|
|
7465
|
-
*
|
|
7466
|
-
* @param separator A string used to separate one element of the stream from the next in the resulting string.
|
|
7467
|
-
* If omitted, the steam elements are separated with a comma.
|
|
7468
|
-
*/
|
|
7469
|
-
join(separator?: string): string;
|
|
7470
|
-
/**
|
|
7471
|
-
* Returns the index of the first occurrence of a value in the stream, or -1 if it is not present.
|
|
7472
|
-
*
|
|
7473
|
-
* @param searchElement The value to locate in the array.
|
|
7474
|
-
* @param fromIndex The stream index at which to begin the search. If fromIndex is omitted, the search
|
|
7475
|
-
* starts at index 0.
|
|
7476
|
-
*/
|
|
7477
|
-
indexOf(searchElement: T, fromIndex?: number): number;
|
|
7478
|
-
/**
|
|
7479
|
-
* Determines whether all members of the stream satisfy the specified test.
|
|
7480
|
-
*
|
|
7481
|
-
* @param predicate This method calls the predicate function for each element in the stream until the
|
|
7482
|
-
* predicate returns a value which is coercible to the Boolean value `false`, or until the end
|
|
7483
|
-
* of the stream.
|
|
7484
|
-
*/
|
|
7485
|
-
every<S extends T>(predicate: (value: T) => value is S): this is Stream<S>;
|
|
7486
|
-
every(predicate: (value: T) => unknown): boolean;
|
|
7487
|
-
/**
|
|
7488
|
-
* Determines whether any member of the stream satisfies the specified test.
|
|
7489
|
-
*
|
|
7490
|
-
* @param predicate This method calls the predicate function for each element in the stream until the
|
|
7491
|
-
* predicate returns a value which is coercible to the Boolean value `true`, or until the end
|
|
7492
|
-
* of the stream.
|
|
7493
|
-
*/
|
|
7494
|
-
some(predicate: (value: T) => unknown): boolean;
|
|
7495
|
-
/**
|
|
7496
|
-
* Performs the specified action for each element in the stream.
|
|
7497
|
-
*
|
|
7498
|
-
* @param callbackfn Function called once for each element in the stream.
|
|
7499
|
-
*/
|
|
7500
|
-
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
7501
|
-
/**
|
|
7502
|
-
* Returns a stream that yields the results of calling the specified callback function on each element
|
|
7503
|
-
* of the stream. The function is called when the resulting stream elements are actually accessed, so
|
|
7504
|
-
* accessing the resulting stream multiple times means the function is also called multiple times for
|
|
7505
|
-
* each element of the stream.
|
|
7506
|
-
*
|
|
7507
|
-
* @param callbackfn Lazily evaluated function mapping stream elements.
|
|
7508
|
-
*/
|
|
7509
|
-
map<U>(callbackfn: (value: T) => U): Stream<U>;
|
|
7510
|
-
/**
|
|
7511
|
-
* Returns the elements of the stream that meet the condition specified in a callback function.
|
|
7512
|
-
* The function is called when the resulting stream elements are actually accessed, so accessing the
|
|
7513
|
-
* resulting stream multiple times means the function is also called multiple times for each element
|
|
7514
|
-
* of the stream.
|
|
7515
|
-
*
|
|
7516
|
-
* @param predicate Lazily evaluated function checking a condition on stream elements.
|
|
7517
|
-
*/
|
|
7518
|
-
filter<S extends T>(predicate: (value: T) => value is S): Stream<S>;
|
|
7519
|
-
filter(predicate: (value: T) => unknown): Stream<T>;
|
|
7520
|
-
/**
|
|
7521
|
-
* Returns the elements of the stream that are _non-nullable_, which means they are neither `undefined`
|
|
7522
|
-
* nor `null`.
|
|
7523
|
-
*/
|
|
7524
|
-
nonNullable(): Stream<NonNullable<T>>;
|
|
7525
|
-
/**
|
|
7526
|
-
* Calls the specified callback function for all elements in the stream. The return value of the
|
|
7527
|
-
* callback function is the accumulated result, and is provided as an argument in the next call to
|
|
7528
|
-
* the callback function.
|
|
7529
|
-
*
|
|
7530
|
-
* @param callbackfn This method calls the function once for each element in the stream, providing
|
|
7531
|
-
* the previous and current values of the reduction.
|
|
7532
|
-
* @param initialValue If specified, `initialValue` is used as the initial value to start the
|
|
7533
|
-
* accumulation. The first call to the function provides this value as an argument instead
|
|
7534
|
-
* of a stream value.
|
|
7535
|
-
*/
|
|
7536
|
-
reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
7537
|
-
reduce<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
7538
|
-
/**
|
|
7539
|
-
* Calls the specified callback function for all elements in the stream, in descending order.
|
|
7540
|
-
* The return value of the callback function is the accumulated result, and is provided as an
|
|
7541
|
-
* argument in the next call to the callback function.
|
|
7542
|
-
*
|
|
7543
|
-
* @param callbackfn This method calls the function once for each element in the stream, providing
|
|
7544
|
-
* the previous and current values of the reduction.
|
|
7545
|
-
* @param initialValue If specified, `initialValue` is used as the initial value to start the
|
|
7546
|
-
* accumulation. The first call to the function provides this value as an argument instead
|
|
7547
|
-
* of an array value.
|
|
7548
|
-
*/
|
|
7549
|
-
reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
7550
|
-
reduceRight<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
7551
|
-
/**
|
|
7552
|
-
* Returns the value of the first element in the stream that meets the condition, or `undefined`
|
|
7553
|
-
* if there is no such element.
|
|
7554
|
-
*
|
|
7555
|
-
* @param predicate This method calls `predicate` once for each element of the stream, in ascending
|
|
7556
|
-
* order, until it finds one where `predicate` returns a value which is coercible to the
|
|
7557
|
-
* Boolean value `true`.
|
|
7558
|
-
*/
|
|
7559
|
-
find<S extends T>(predicate: (value: T) => value is S): S | undefined;
|
|
7560
|
-
find(predicate: (value: T) => unknown): T | undefined;
|
|
7561
|
-
/**
|
|
7562
|
-
* Returns the index of the first element in the stream that meets the condition, or `-1`
|
|
7563
|
-
* if there is no such element.
|
|
7564
|
-
*
|
|
7565
|
-
* @param predicate This method calls `predicate` once for each element of the stream, in ascending
|
|
7566
|
-
* order, until it finds one where `predicate` returns a value which is coercible to the
|
|
7567
|
-
* Boolean value `true`.
|
|
7568
|
-
*/
|
|
7569
|
-
findIndex(predicate: (value: T) => unknown): number;
|
|
7570
|
-
/**
|
|
7571
|
-
* Determines whether the stream includes a certain element, returning `true` or `false` as appropriate.
|
|
7572
|
-
*
|
|
7573
|
-
* @param searchElement The element to search for.
|
|
7574
|
-
*/
|
|
7575
|
-
includes(searchElement: T): boolean;
|
|
7576
|
-
/**
|
|
7577
|
-
* Calls a defined callback function on each element of the stream and then flattens the result into
|
|
7578
|
-
* a new stream. This is identical to a `map` followed by `flat` with depth 1.
|
|
7579
|
-
*
|
|
7580
|
-
* @param callbackfn Lazily evaluated function mapping stream elements.
|
|
7581
|
-
*/
|
|
7582
|
-
flatMap<U>(callbackfn: (value: T) => U | Iterable<U>): Stream<U>;
|
|
7583
|
-
/**
|
|
7584
|
-
* Returns a new stream with all sub-stream or sub-array elements concatenated into it recursively up
|
|
7585
|
-
* to the specified depth.
|
|
7586
|
-
*
|
|
7587
|
-
* @param depth The maximum recursion depth. Defaults to 1.
|
|
7588
|
-
*/
|
|
7589
|
-
flat<D extends number = 1>(depth?: D): FlatStream<T, D>;
|
|
7590
|
-
/**
|
|
7591
|
-
* Returns the first element in the stream, or `undefined` if the stream is empty.
|
|
7592
|
-
*/
|
|
7593
|
-
head(): T | undefined;
|
|
7594
|
-
/**
|
|
7595
|
-
* Returns a stream that skips the first `skipCount` elements from this stream.
|
|
7596
|
-
*
|
|
7597
|
-
* @param skipCount The number of elements to skip. If this is larger than the number of elements in
|
|
7598
|
-
* the stream, an empty stream is returned. Defaults to 1.
|
|
7599
|
-
*/
|
|
7600
|
-
tail(skipCount?: number): Stream<T>;
|
|
7601
|
-
/**
|
|
7602
|
-
* Returns a stream consisting of the elements of this stream, truncated to be no longer than `maxSize`
|
|
7603
|
-
* in length.
|
|
7604
|
-
*
|
|
7605
|
-
* @param maxSize The number of elements the stream should be limited to
|
|
7606
|
-
*/
|
|
7607
|
-
limit(maxSize: number): Stream<T>;
|
|
7608
|
-
/**
|
|
7609
|
-
* Returns a stream containing only the distinct elements from this stream.
|
|
7610
|
-
* Equality is determined with the same rules as a standard `Set`.
|
|
7611
|
-
*
|
|
7612
|
-
* @param by A function returning the key used to check equality with a previous stream element.
|
|
7613
|
-
* If omitted, the stream elements themselves are used for comparison.
|
|
7614
|
-
*/
|
|
7615
|
-
distinct<Key = T>(by?: (element: T) => Key): Stream<T>;
|
|
7616
|
-
/**
|
|
7617
|
-
* Returns a stream that contains all elements that don't exist in the {@link other} iterable.
|
|
7618
|
-
* Equality is determined with the same rules as a standard `Set`.
|
|
7619
|
-
* @param other The elements that should be exluded from this stream.
|
|
7620
|
-
* @param key A function returning the key used to check quality.
|
|
7621
|
-
* If omitted, the stream elements themselves are used for comparison.
|
|
6936
|
+
* The full set of registered language services.
|
|
7622
6937
|
*/
|
|
7623
|
-
|
|
6938
|
+
readonly all: readonly LangiumCoreServices[];
|
|
7624
6939
|
}
|
|
7625
|
-
type FlatStream<T, Depth extends number> = {
|
|
7626
|
-
'done': Stream<T>;
|
|
7627
|
-
'recur': T extends Iterable<infer Content> ? FlatStream<Content, MinusOne<Depth>> : Stream<T>;
|
|
7628
|
-
}[Depth extends 0 ? 'done' : 'recur'];
|
|
7629
|
-
type MinusOne<N extends number> = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][N];
|
|
7630
6940
|
|
|
7631
6941
|
/******************************************************************************
|
|
7632
6942
|
* Copyright 2021 TypeFox GmbH
|
|
@@ -7849,7 +7159,7 @@ interface DocumentSegment {
|
|
|
7849
7159
|
* No implementation object is expected to be offered by `LangiumCoreServices`, but only by `LangiumLSPServices`.
|
|
7850
7160
|
*/
|
|
7851
7161
|
type TextDocumentProvider = {
|
|
7852
|
-
get(uri: string): TextDocument | undefined;
|
|
7162
|
+
get(uri: string | URI): TextDocument | undefined;
|
|
7853
7163
|
};
|
|
7854
7164
|
/**
|
|
7855
7165
|
* Shared service for creating `LangiumDocument` instances.
|
|
@@ -8465,6 +7775,8 @@ interface Linker {
|
|
|
8465
7775
|
*
|
|
8466
7776
|
* @param document A LangiumDocument that shall be linked.
|
|
8467
7777
|
* @param cancelToken A token for cancelling the operation.
|
|
7778
|
+
*
|
|
7779
|
+
* @throws `OperationCancelled` if a cancellation event is detected
|
|
8468
7780
|
*/
|
|
8469
7781
|
link(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
|
|
8470
7782
|
/**
|
|
@@ -8546,29 +7858,24 @@ declare class Deferred<T = void> {
|
|
|
8546
7858
|
******************************************************************************/
|
|
8547
7859
|
|
|
8548
7860
|
/**
|
|
8549
|
-
* Async parser that allows
|
|
8550
|
-
* The sync parser implementation is blocking the event loop, which can become quite problematic for large files.
|
|
7861
|
+
* Async parser that allows cancellation of the current parsing process.
|
|
8551
7862
|
*
|
|
8552
|
-
*
|
|
8553
|
-
* A real implementation would create worker threads or web workers to offload the parsing work.
|
|
7863
|
+
* @remark The sync parser implementation is blocking the event loop, which can become quite problematic for large files.
|
|
7864
|
+
* @remark The default implementation is not actually async. It just wraps the sync parser in a promise. A real implementation would create worker threads or web workers to offload the parsing work.
|
|
8554
7865
|
*/
|
|
8555
7866
|
interface AsyncParser {
|
|
7867
|
+
/**
|
|
7868
|
+
* Parses the given text and returns the parse result.
|
|
7869
|
+
*
|
|
7870
|
+
* @param text The text to parse.
|
|
7871
|
+
* @param cancelToken A cancellation token that can be used to cancel the parsing process.
|
|
7872
|
+
* @returns A promise that resolves to the parse result.
|
|
7873
|
+
*
|
|
7874
|
+
* @throw `OperationCancelled` if the parsing process is cancelled.
|
|
7875
|
+
*/
|
|
8556
7876
|
parse<T extends AstNode>(text: string, cancelToken: CancellationToken): Promise<ParseResult<T>>;
|
|
8557
7877
|
}
|
|
8558
7878
|
|
|
8559
|
-
/******************************************************************************
|
|
8560
|
-
* Copyright 2021 TypeFox GmbH
|
|
8561
|
-
* This program and the accompanying materials are made available under the
|
|
8562
|
-
* terms of the MIT License, which is available in the project root.
|
|
8563
|
-
******************************************************************************/
|
|
8564
|
-
|
|
8565
|
-
interface TokenBuilderOptions {
|
|
8566
|
-
caseInsensitive?: boolean;
|
|
8567
|
-
}
|
|
8568
|
-
interface TokenBuilder {
|
|
8569
|
-
buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary;
|
|
8570
|
-
}
|
|
8571
|
-
|
|
8572
7879
|
/******************************************************************************
|
|
8573
7880
|
* Copyright 2021 TypeFox GmbH
|
|
8574
7881
|
* This program and the accompanying materials are made available under the
|
|
@@ -8706,7 +8013,7 @@ declare class DefaultScopeComputation implements ScopeComputation {
|
|
|
8706
8013
|
* @param document The document containing the AST node to be exported.
|
|
8707
8014
|
* @param children A function called with {@link parentNode} as single argument and returning an {@link Iterable} supplying the children to be visited, which must be directly or transitively contained in {@link parentNode}.
|
|
8708
8015
|
* @param cancelToken Indicates when to cancel the current operation.
|
|
8709
|
-
* @throws `
|
|
8016
|
+
* @throws `OperationCancelled` if a user action occurs during execution.
|
|
8710
8017
|
* @returns A list of {@link AstNodeDescription AstNodeDescriptions} to be published to index.
|
|
8711
8018
|
*/
|
|
8712
8019
|
computeExportsForNode(parentNode: AstNode, document: LangiumDocument<AstNode>, children?: (root: AstNode) => Iterable<AstNode>, cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
@@ -8794,7 +8101,8 @@ type DiagnosticInfo<N extends AstNode, P extends string = Properties<N>> = {
|
|
|
8794
8101
|
/** A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. */
|
|
8795
8102
|
data?: unknown;
|
|
8796
8103
|
};
|
|
8797
|
-
type
|
|
8104
|
+
type ValidationSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
8105
|
+
type ValidationAcceptor = <N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N>) => void;
|
|
8798
8106
|
type ValidationCheck<T extends AstNode = AstNode> = (node: T, accept: ValidationAcceptor, cancelToken: CancellationToken) => MaybePromise<void>;
|
|
8799
8107
|
/**
|
|
8800
8108
|
* A utility type for associating non-primitive AST types to corresponding validation checks. For example:
|
|
@@ -8888,6 +8196,9 @@ interface DocumentValidator {
|
|
|
8888
8196
|
}
|
|
8889
8197
|
declare namespace DocumentValidator {
|
|
8890
8198
|
const LexingError = "lexing-error";
|
|
8199
|
+
const LexingWarning = "lexing-warning";
|
|
8200
|
+
const LexingInfo = "lexing-info";
|
|
8201
|
+
const LexingHint = "lexing-hint";
|
|
8891
8202
|
const ParsingError = "parsing-error";
|
|
8892
8203
|
const LinkingError = "linking-error";
|
|
8893
8204
|
}
|
|
@@ -13548,6 +12859,9 @@ interface WorkspaceManager {
|
|
|
13548
12859
|
* each language file and stores it locally.
|
|
13549
12860
|
*
|
|
13550
12861
|
* @param folders The set of workspace folders to be indexed.
|
|
12862
|
+
* @param cancelToken A cancellation token that can be used to cancel the operation.
|
|
12863
|
+
*
|
|
12864
|
+
* @throws OperationCancelled if a cancellation event has been detected
|
|
13551
12865
|
*/
|
|
13552
12866
|
initializeWorkspace(folders: WorkspaceFolder[], cancelToken?: CancellationToken): Promise<void>;
|
|
13553
12867
|
}
|
|
@@ -13604,51 +12918,51 @@ declare class DefaultWorkspaceManager implements WorkspaceManager {
|
|
|
13604
12918
|
* grammar definition and the language configuration.
|
|
13605
12919
|
*/
|
|
13606
12920
|
type LangiumGeneratedCoreServices = {
|
|
13607
|
-
Grammar: Grammar;
|
|
13608
|
-
LanguageMetaData: LanguageMetaData;
|
|
13609
|
-
parser: {
|
|
13610
|
-
ParserConfig?: IParserConfig;
|
|
12921
|
+
readonly Grammar: Grammar;
|
|
12922
|
+
readonly LanguageMetaData: LanguageMetaData;
|
|
12923
|
+
readonly parser: {
|
|
12924
|
+
readonly ParserConfig?: IParserConfig;
|
|
13611
12925
|
};
|
|
13612
12926
|
};
|
|
13613
12927
|
/**
|
|
13614
12928
|
* Core services for a specific language of which Langium provides default implementations.
|
|
13615
12929
|
*/
|
|
13616
12930
|
type LangiumDefaultCoreServices = {
|
|
13617
|
-
parser: {
|
|
13618
|
-
AsyncParser: AsyncParser;
|
|
13619
|
-
GrammarConfig: GrammarConfig;
|
|
13620
|
-
ValueConverter: ValueConverter;
|
|
13621
|
-
LangiumParser: LangiumParser;
|
|
13622
|
-
ParserErrorMessageProvider: IParserErrorMessageProvider;
|
|
13623
|
-
CompletionParser: LangiumCompletionParser;
|
|
13624
|
-
TokenBuilder: TokenBuilder;
|
|
13625
|
-
Lexer: Lexer;
|
|
12931
|
+
readonly parser: {
|
|
12932
|
+
readonly AsyncParser: AsyncParser;
|
|
12933
|
+
readonly GrammarConfig: GrammarConfig;
|
|
12934
|
+
readonly ValueConverter: ValueConverter;
|
|
12935
|
+
readonly LangiumParser: LangiumParser;
|
|
12936
|
+
readonly ParserErrorMessageProvider: IParserErrorMessageProvider;
|
|
12937
|
+
readonly CompletionParser: LangiumCompletionParser;
|
|
12938
|
+
readonly TokenBuilder: TokenBuilder;
|
|
12939
|
+
readonly Lexer: Lexer;
|
|
13626
12940
|
};
|
|
13627
|
-
documentation: {
|
|
13628
|
-
CommentProvider: CommentProvider;
|
|
13629
|
-
DocumentationProvider: DocumentationProvider;
|
|
12941
|
+
readonly documentation: {
|
|
12942
|
+
readonly CommentProvider: CommentProvider;
|
|
12943
|
+
readonly DocumentationProvider: DocumentationProvider;
|
|
13630
12944
|
};
|
|
13631
|
-
references: {
|
|
13632
|
-
Linker: Linker;
|
|
13633
|
-
NameProvider: NameProvider;
|
|
13634
|
-
References: References;
|
|
13635
|
-
ScopeProvider: ScopeProvider;
|
|
13636
|
-
ScopeComputation: ScopeComputation;
|
|
12945
|
+
readonly references: {
|
|
12946
|
+
readonly Linker: Linker;
|
|
12947
|
+
readonly NameProvider: NameProvider;
|
|
12948
|
+
readonly References: References;
|
|
12949
|
+
readonly ScopeProvider: ScopeProvider;
|
|
12950
|
+
readonly ScopeComputation: ScopeComputation;
|
|
13637
12951
|
};
|
|
13638
|
-
serializer: {
|
|
13639
|
-
Hydrator: Hydrator;
|
|
13640
|
-
JsonSerializer: JsonSerializer;
|
|
12952
|
+
readonly serializer: {
|
|
12953
|
+
readonly Hydrator: Hydrator;
|
|
12954
|
+
readonly JsonSerializer: JsonSerializer;
|
|
13641
12955
|
};
|
|
13642
|
-
validation: {
|
|
13643
|
-
DocumentValidator: DocumentValidator;
|
|
13644
|
-
ValidationRegistry: ValidationRegistry;
|
|
12956
|
+
readonly validation: {
|
|
12957
|
+
readonly DocumentValidator: DocumentValidator;
|
|
12958
|
+
readonly ValidationRegistry: ValidationRegistry;
|
|
13645
12959
|
};
|
|
13646
|
-
workspace: {
|
|
13647
|
-
AstNodeLocator: AstNodeLocator;
|
|
13648
|
-
AstNodeDescriptionProvider: AstNodeDescriptionProvider;
|
|
13649
|
-
ReferenceDescriptionProvider: ReferenceDescriptionProvider;
|
|
12960
|
+
readonly workspace: {
|
|
12961
|
+
readonly AstNodeLocator: AstNodeLocator;
|
|
12962
|
+
readonly AstNodeDescriptionProvider: AstNodeDescriptionProvider;
|
|
12963
|
+
readonly ReferenceDescriptionProvider: ReferenceDescriptionProvider;
|
|
13650
12964
|
};
|
|
13651
|
-
shared: LangiumSharedCoreServices;
|
|
12965
|
+
readonly shared: LangiumSharedCoreServices;
|
|
13652
12966
|
};
|
|
13653
12967
|
/**
|
|
13654
12968
|
* The core set of services available for a language. These are either generated by `langium-cli`
|
|
@@ -13660,23 +12974,23 @@ type LangiumCoreServices = LangiumGeneratedCoreServices & LangiumDefaultCoreServ
|
|
|
13660
12974
|
* derived from the grammar definition.
|
|
13661
12975
|
*/
|
|
13662
12976
|
type LangiumGeneratedSharedCoreServices = {
|
|
13663
|
-
AstReflection: AstReflection;
|
|
12977
|
+
readonly AstReflection: AstReflection;
|
|
13664
12978
|
};
|
|
13665
12979
|
/**
|
|
13666
12980
|
* Core services shared between multiple languages where Langium provides default implementations.
|
|
13667
12981
|
*/
|
|
13668
12982
|
type LangiumDefaultSharedCoreServices = {
|
|
13669
|
-
ServiceRegistry: ServiceRegistry;
|
|
13670
|
-
workspace: {
|
|
13671
|
-
ConfigurationProvider: ConfigurationProvider;
|
|
13672
|
-
DocumentBuilder: DocumentBuilder;
|
|
13673
|
-
FileSystemProvider: FileSystemProvider;
|
|
13674
|
-
IndexManager: IndexManager;
|
|
13675
|
-
LangiumDocuments: LangiumDocuments;
|
|
13676
|
-
LangiumDocumentFactory: LangiumDocumentFactory;
|
|
13677
|
-
TextDocuments?: TextDocumentProvider;
|
|
13678
|
-
WorkspaceLock: WorkspaceLock;
|
|
13679
|
-
WorkspaceManager: WorkspaceManager;
|
|
12983
|
+
readonly ServiceRegistry: ServiceRegistry;
|
|
12984
|
+
readonly workspace: {
|
|
12985
|
+
readonly ConfigurationProvider: ConfigurationProvider;
|
|
12986
|
+
readonly DocumentBuilder: DocumentBuilder;
|
|
12987
|
+
readonly FileSystemProvider: FileSystemProvider;
|
|
12988
|
+
readonly IndexManager: IndexManager;
|
|
12989
|
+
readonly LangiumDocuments: LangiumDocuments;
|
|
12990
|
+
readonly LangiumDocumentFactory: LangiumDocumentFactory;
|
|
12991
|
+
readonly TextDocuments?: TextDocumentProvider;
|
|
12992
|
+
readonly WorkspaceLock: WorkspaceLock;
|
|
12993
|
+
readonly WorkspaceManager: WorkspaceManager;
|
|
13680
12994
|
};
|
|
13681
12995
|
};
|
|
13682
12996
|
/**
|
|
@@ -13897,23 +13211,6 @@ interface DiagnosticFeatureShape {
|
|
|
13897
13211
|
};
|
|
13898
13212
|
}
|
|
13899
13213
|
|
|
13900
|
-
/**
|
|
13901
|
-
* We should use a mapped type to create this from Connection.
|
|
13902
|
-
*/
|
|
13903
|
-
interface TextDocumentConnection {
|
|
13904
|
-
onDidOpenTextDocument(handler: NotificationHandler<DidOpenTextDocumentParams>): Disposable$1;
|
|
13905
|
-
onDidChangeTextDocument(handler: NotificationHandler<DidChangeTextDocumentParams>): Disposable$1;
|
|
13906
|
-
onDidCloseTextDocument(handler: NotificationHandler<DidCloseTextDocumentParams>): Disposable$1;
|
|
13907
|
-
onWillSaveTextDocument(handler: NotificationHandler<WillSaveTextDocumentParams>): Disposable$1;
|
|
13908
|
-
onWillSaveTextDocumentWaitUntil(handler: RequestHandler<WillSaveTextDocumentParams, TextEdit$1[] | undefined | null, void>): Disposable$1;
|
|
13909
|
-
onDidSaveTextDocument(handler: NotificationHandler<DidSaveTextDocumentParams>): Disposable$1;
|
|
13910
|
-
}
|
|
13911
|
-
interface TextDocumentsConfiguration<T extends {
|
|
13912
|
-
uri: DocumentUri$1;
|
|
13913
|
-
}> {
|
|
13914
|
-
create(uri: DocumentUri$1, languageId: string, version: number, content: string): T;
|
|
13915
|
-
update(document: T, changes: TextDocumentContentChangeEvent[], version: number): T;
|
|
13916
|
-
}
|
|
13917
13214
|
/**
|
|
13918
13215
|
* Event to signal changes to a text document.
|
|
13919
13216
|
*/
|
|
@@ -13936,96 +13233,6 @@ interface TextDocumentWillSaveEvent<T> {
|
|
|
13936
13233
|
*/
|
|
13937
13234
|
reason: TextDocumentSaveReason;
|
|
13938
13235
|
}
|
|
13939
|
-
/**
|
|
13940
|
-
* A manager for simple text documents. The manager requires at a minimum that
|
|
13941
|
-
* the server registered for the following text document sync events in the
|
|
13942
|
-
* initialize handler or via dynamic registration:
|
|
13943
|
-
*
|
|
13944
|
-
* - open and close events.
|
|
13945
|
-
* - change events.
|
|
13946
|
-
*
|
|
13947
|
-
* Registering for save and will save events is optional.
|
|
13948
|
-
*/
|
|
13949
|
-
declare class TextDocuments<T extends {
|
|
13950
|
-
uri: DocumentUri$1;
|
|
13951
|
-
}> {
|
|
13952
|
-
private readonly _configuration;
|
|
13953
|
-
private readonly _syncedDocuments;
|
|
13954
|
-
private readonly _onDidChangeContent;
|
|
13955
|
-
private readonly _onDidOpen;
|
|
13956
|
-
private readonly _onDidClose;
|
|
13957
|
-
private readonly _onDidSave;
|
|
13958
|
-
private readonly _onWillSave;
|
|
13959
|
-
private _willSaveWaitUntil;
|
|
13960
|
-
/**
|
|
13961
|
-
* Create a new text document manager.
|
|
13962
|
-
*/
|
|
13963
|
-
constructor(configuration: TextDocumentsConfiguration<T>);
|
|
13964
|
-
/**
|
|
13965
|
-
* An event that fires when a text document managed by this manager
|
|
13966
|
-
* has been opened.
|
|
13967
|
-
*/
|
|
13968
|
-
get onDidOpen(): Event<TextDocumentChangeEvent<T>>;
|
|
13969
|
-
/**
|
|
13970
|
-
* An event that fires when a text document managed by this manager
|
|
13971
|
-
* has been opened or the content changes.
|
|
13972
|
-
*/
|
|
13973
|
-
get onDidChangeContent(): Event<TextDocumentChangeEvent<T>>;
|
|
13974
|
-
/**
|
|
13975
|
-
* An event that fires when a text document managed by this manager
|
|
13976
|
-
* will be saved.
|
|
13977
|
-
*/
|
|
13978
|
-
get onWillSave(): Event<TextDocumentWillSaveEvent<T>>;
|
|
13979
|
-
/**
|
|
13980
|
-
* Sets a handler that will be called if a participant wants to provide
|
|
13981
|
-
* edits during a text document save.
|
|
13982
|
-
*/
|
|
13983
|
-
onWillSaveWaitUntil(handler: RequestHandler<TextDocumentWillSaveEvent<T>, TextEdit$1[], void>): void;
|
|
13984
|
-
/**
|
|
13985
|
-
* An event that fires when a text document managed by this manager
|
|
13986
|
-
* has been saved.
|
|
13987
|
-
*/
|
|
13988
|
-
get onDidSave(): Event<TextDocumentChangeEvent<T>>;
|
|
13989
|
-
/**
|
|
13990
|
-
* An event that fires when a text document managed by this manager
|
|
13991
|
-
* has been closed.
|
|
13992
|
-
*/
|
|
13993
|
-
get onDidClose(): Event<TextDocumentChangeEvent<T>>;
|
|
13994
|
-
/**
|
|
13995
|
-
* Returns the document for the given URI. Returns undefined if
|
|
13996
|
-
* the document is not managed by this instance.
|
|
13997
|
-
*
|
|
13998
|
-
* @param uri The text document's URI to retrieve.
|
|
13999
|
-
* @return the text document or `undefined`.
|
|
14000
|
-
*/
|
|
14001
|
-
get(uri: string): T | undefined;
|
|
14002
|
-
/**
|
|
14003
|
-
* Returns all text documents managed by this instance.
|
|
14004
|
-
*
|
|
14005
|
-
* @return all text documents.
|
|
14006
|
-
*/
|
|
14007
|
-
all(): T[];
|
|
14008
|
-
/**
|
|
14009
|
-
* Returns the URIs of all text documents managed by this instance.
|
|
14010
|
-
*
|
|
14011
|
-
* @return the URI's of all text documents.
|
|
14012
|
-
*/
|
|
14013
|
-
keys(): string[];
|
|
14014
|
-
/**
|
|
14015
|
-
* Listens for `low level` notification on the given connection to
|
|
14016
|
-
* update the text documents managed by this instance.
|
|
14017
|
-
*
|
|
14018
|
-
* Please note that the connection only provides handlers not an event model. Therefore
|
|
14019
|
-
* listening on a connection will overwrite the following handlers on a connection:
|
|
14020
|
-
* `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
|
|
14021
|
-
* `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
|
|
14022
|
-
*
|
|
14023
|
-
* Use the corresponding events on the TextDocuments instance instead.
|
|
14024
|
-
*
|
|
14025
|
-
* @param connection The connection to listen on.
|
|
14026
|
-
*/
|
|
14027
|
-
listen(connection: TextDocumentConnection): Disposable$1;
|
|
14028
|
-
}
|
|
14029
13236
|
|
|
14030
13237
|
/**
|
|
14031
13238
|
* Shape of the notebooks feature
|
|
@@ -14819,6 +14026,11 @@ interface DefinitionProvider {
|
|
|
14819
14026
|
/**
|
|
14820
14027
|
* Handle a go to definition request.
|
|
14821
14028
|
*
|
|
14029
|
+
* @param document The document in which the request was triggered.
|
|
14030
|
+
* @param params The parameters of the request.
|
|
14031
|
+
* @param cancelToken A cancellation token that can be used to cancel the request.
|
|
14032
|
+
* @returns A list of location links to the definition(s) of the symbol at the given position.
|
|
14033
|
+
*
|
|
14822
14034
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
14823
14035
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
14824
14036
|
*/
|
|
@@ -14838,6 +14050,10 @@ interface DocumentHighlightProvider {
|
|
|
14838
14050
|
/**
|
|
14839
14051
|
* Handle a document highlight request.
|
|
14840
14052
|
*
|
|
14053
|
+
* @param document The document in which the request was received.
|
|
14054
|
+
* @param params The parameters of the document highlight request.
|
|
14055
|
+
* @param cancelToken A cancellation token that can be used to cancel the request.
|
|
14056
|
+
* @returns The document highlights or `undefined` if no highlights are available.
|
|
14841
14057
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
14842
14058
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
14843
14059
|
*/
|
|
@@ -14848,7 +14064,7 @@ declare class DefaultDocumentHighlightProvider implements DocumentHighlightProvi
|
|
|
14848
14064
|
protected readonly nameProvider: NameProvider;
|
|
14849
14065
|
protected readonly grammarConfig: GrammarConfig;
|
|
14850
14066
|
constructor(services: LangiumServices);
|
|
14851
|
-
getDocumentHighlight(document: LangiumDocument, params: DocumentHighlightParams): MaybePromise<DocumentHighlight[] | undefined>;
|
|
14067
|
+
getDocumentHighlight(document: LangiumDocument, params: DocumentHighlightParams, _cancelToken?: CancellationToken): MaybePromise<DocumentHighlight[] | undefined>;
|
|
14852
14068
|
/**
|
|
14853
14069
|
* Override this method to determine the highlight kind of the given reference.
|
|
14854
14070
|
*/
|
|
@@ -14911,6 +14127,11 @@ interface DocumentSymbolProvider {
|
|
|
14911
14127
|
/**
|
|
14912
14128
|
* Handle a document symbols request.
|
|
14913
14129
|
*
|
|
14130
|
+
* @param document The document in the workspace.
|
|
14131
|
+
* @param params The parameters of the request.
|
|
14132
|
+
* @param cancelToken A cancellation token that migh be used to cancel the request.
|
|
14133
|
+
* @returns The symbols for the given document.
|
|
14134
|
+
*
|
|
14914
14135
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
14915
14136
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
14916
14137
|
*/
|
|
@@ -14927,17 +14148,40 @@ interface DocumentSymbolProvider {
|
|
|
14927
14148
|
* Shared service for handling text document changes and watching relevant files.
|
|
14928
14149
|
*/
|
|
14929
14150
|
interface DocumentUpdateHandler {
|
|
14151
|
+
/**
|
|
14152
|
+
* A document open event was triggered by the `TextDocuments` service.
|
|
14153
|
+
* @param event The document change event.
|
|
14154
|
+
*/
|
|
14930
14155
|
didOpenDocument?(event: TextDocumentChangeEvent<TextDocument>): void;
|
|
14931
14156
|
/**
|
|
14932
14157
|
* A content change event was triggered by the `TextDocuments` service.
|
|
14158
|
+
* @param event The document change event.
|
|
14933
14159
|
*/
|
|
14934
14160
|
didChangeContent?(event: TextDocumentChangeEvent<TextDocument>): void;
|
|
14161
|
+
/**
|
|
14162
|
+
* A document save event (initiated) was triggered by the `TextDocuments` service.
|
|
14163
|
+
* @param event The document change event.
|
|
14164
|
+
*/
|
|
14935
14165
|
willSaveDocument?(event: TextDocumentWillSaveEvent<TextDocument>): void;
|
|
14166
|
+
/**
|
|
14167
|
+
* A document save event (initiated) was triggered by the `TextDocuments` service.
|
|
14168
|
+
* @param event The document change event.
|
|
14169
|
+
* @returns An array of text edits which will be applied to the document before it is saved.
|
|
14170
|
+
*/
|
|
14936
14171
|
willSaveDocumentWaitUntil?(event: TextDocumentWillSaveEvent<TextDocument>): MaybePromise<TextEdit$1[]>;
|
|
14172
|
+
/**
|
|
14173
|
+
* A document save event (completed) was triggered by the `TextDocuments` service.
|
|
14174
|
+
* @param event The document change event.
|
|
14175
|
+
*/
|
|
14937
14176
|
didSaveDocument?(event: TextDocumentChangeEvent<TextDocument>): void;
|
|
14177
|
+
/**
|
|
14178
|
+
* A document close event was triggered by the `TextDocuments` service.
|
|
14179
|
+
* @param event The document change event.
|
|
14180
|
+
*/
|
|
14938
14181
|
didCloseDocument?(event: TextDocumentChangeEvent<TextDocument>): void;
|
|
14939
14182
|
/**
|
|
14940
14183
|
* The client detected changes to files and folders watched by the language client.
|
|
14184
|
+
* @param params The files/folders change event.
|
|
14941
14185
|
*/
|
|
14942
14186
|
didChangeWatchedFiles?(params: DidChangeWatchedFilesParams): void;
|
|
14943
14187
|
}
|
|
@@ -15019,6 +14263,11 @@ interface FoldingRangeProvider {
|
|
|
15019
14263
|
/**
|
|
15020
14264
|
* Handle a folding range request.
|
|
15021
14265
|
*
|
|
14266
|
+
* @param document The document to compute folding ranges for
|
|
14267
|
+
* @param params The folding range parameters
|
|
14268
|
+
* @param cancelToken A cancellation token that can be used to cancel the request
|
|
14269
|
+
* @returns The computed folding ranges
|
|
14270
|
+
*
|
|
15022
14271
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15023
14272
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15024
14273
|
*/
|
|
@@ -15163,6 +14412,11 @@ interface ReferencesProvider {
|
|
|
15163
14412
|
/**
|
|
15164
14413
|
* Handle a find references request.
|
|
15165
14414
|
*
|
|
14415
|
+
* @param document The document in which to search for references.
|
|
14416
|
+
* @param params The parameters of the find references request.
|
|
14417
|
+
* @param cancelToken A cancellation token that can be used to cancel the request.
|
|
14418
|
+
* @returns The locations of the references.
|
|
14419
|
+
*
|
|
15166
14420
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15167
14421
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15168
14422
|
*/
|
|
@@ -15182,6 +14436,11 @@ interface RenameProvider {
|
|
|
15182
14436
|
/**
|
|
15183
14437
|
* Handle a rename request.
|
|
15184
14438
|
*
|
|
14439
|
+
* @param document The document in which the rename request was triggered.
|
|
14440
|
+
* @param params The rename parameters.
|
|
14441
|
+
* @param cancelToken A cancellation token that can be used to cancel the request.
|
|
14442
|
+
* @returns A workspace edit that describes the changes to be applied to the workspace.
|
|
14443
|
+
*
|
|
15185
14444
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15186
14445
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15187
14446
|
*/
|
|
@@ -15189,6 +14448,11 @@ interface RenameProvider {
|
|
|
15189
14448
|
/**
|
|
15190
14449
|
* Handle a prepare rename request.
|
|
15191
14450
|
*
|
|
14451
|
+
* @param document The document in which the prepare rename request was triggered.
|
|
14452
|
+
* @param params The prepare rename parameters.
|
|
14453
|
+
* @param cancelToken A cancellation token that can be used to cancel the request.
|
|
14454
|
+
* @returns A range that describes the range of the symbol to be renamed.
|
|
14455
|
+
*
|
|
15192
14456
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15193
14457
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15194
14458
|
*/
|
|
@@ -15205,6 +14469,9 @@ interface SemanticTokenProvider {
|
|
|
15205
14469
|
semanticHighlight(document: LangiumDocument, params: SemanticTokensParams, cancelToken?: CancellationToken): MaybePromise<SemanticTokens>;
|
|
15206
14470
|
semanticHighlightRange(document: LangiumDocument, params: SemanticTokensRangeParams, cancelToken?: CancellationToken): MaybePromise<SemanticTokens>;
|
|
15207
14471
|
semanticHighlightDelta(document: LangiumDocument, params: SemanticTokensDeltaParams, cancelToken?: CancellationToken): MaybePromise<SemanticTokens | SemanticTokensDelta>;
|
|
14472
|
+
readonly tokenTypes: Record<string, number>;
|
|
14473
|
+
readonly tokenModifiers: Record<string, number>;
|
|
14474
|
+
readonly semanticTokensOptions: SemanticTokensOptions;
|
|
15208
14475
|
}
|
|
15209
14476
|
type SemanticTokenAcceptorOptions<N extends AstNode = AstNode> = ({
|
|
15210
14477
|
line: number;
|
|
@@ -15280,6 +14547,9 @@ declare abstract class AbstractSemanticTokenProvider implements SemanticTokenPro
|
|
|
15280
14547
|
protected clientCapabilities?: SemanticTokensClientCapabilities;
|
|
15281
14548
|
constructor(services: LangiumServices);
|
|
15282
14549
|
initialize(clientCapabilities?: SemanticTokensClientCapabilities): void;
|
|
14550
|
+
get tokenTypes(): Record<string, number>;
|
|
14551
|
+
get tokenModifiers(): Record<string, number>;
|
|
14552
|
+
get semanticTokensOptions(): SemanticTokensOptions;
|
|
15283
14553
|
semanticHighlight(document: LangiumDocument, _params: SemanticTokensParams, cancelToken?: CancellationToken): Promise<SemanticTokens>;
|
|
15284
14554
|
semanticHighlightRange(document: LangiumDocument, params: SemanticTokensRangeParams, cancelToken?: CancellationToken): Promise<SemanticTokens>;
|
|
15285
14555
|
semanticHighlightDelta(document: LangiumDocument, params: SemanticTokensDeltaParams, cancelToken?: CancellationToken): Promise<SemanticTokens | SemanticTokensDelta>;
|
|
@@ -15360,6 +14630,10 @@ interface WorkspaceSymbolProvider$1 {
|
|
|
15360
14630
|
/**
|
|
15361
14631
|
* Handle a workspace symbols request.
|
|
15362
14632
|
*
|
|
14633
|
+
* @param params workspaces symbols request parameters
|
|
14634
|
+
* @param cancelToken a cancellation token tha can be used to cancel the request
|
|
14635
|
+
* @returns a list of workspace symbols
|
|
14636
|
+
*
|
|
15363
14637
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15364
14638
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15365
14639
|
*/
|
|
@@ -15367,6 +14641,10 @@ interface WorkspaceSymbolProvider$1 {
|
|
|
15367
14641
|
/**
|
|
15368
14642
|
* Handle a resolve request for a workspace symbol.
|
|
15369
14643
|
*
|
|
14644
|
+
* @param symbol the workspace symbol to resolve
|
|
14645
|
+
* @param cancelToken a cancellation token tha can be used to cancel the request
|
|
14646
|
+
* @returns the resolved workspace symbol
|
|
14647
|
+
*
|
|
15370
14648
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15371
14649
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15372
14650
|
*/
|
|
@@ -15381,6 +14659,96 @@ declare class DefaultWorkspaceSymbolProvider implements WorkspaceSymbolProvider$
|
|
|
15381
14659
|
protected getWorkspaceSymbol(astDescription: AstNodeDescription): WorkspaceSymbol | undefined;
|
|
15382
14660
|
}
|
|
15383
14661
|
|
|
14662
|
+
/******************************************************************************
|
|
14663
|
+
* Copyright 2024 TypeFox GmbH
|
|
14664
|
+
* This program and the accompanying materials are made available under the
|
|
14665
|
+
* terms of the MIT License, which is available in the project root.
|
|
14666
|
+
******************************************************************************/
|
|
14667
|
+
|
|
14668
|
+
/**
|
|
14669
|
+
* A manager service that keeps track of all currently opened text documents.
|
|
14670
|
+
*
|
|
14671
|
+
* Designed to be compatible with the `TextDocuments` class in the `vscode-languageserver` package.
|
|
14672
|
+
*/
|
|
14673
|
+
interface TextDocuments<T extends {
|
|
14674
|
+
uri: string;
|
|
14675
|
+
}> {
|
|
14676
|
+
/**
|
|
14677
|
+
* An event that fires when a text document managed by this manager
|
|
14678
|
+
* has been opened.
|
|
14679
|
+
*/
|
|
14680
|
+
readonly onDidOpen: Event<TextDocumentChangeEvent<T>>;
|
|
14681
|
+
/**
|
|
14682
|
+
* An event that fires when a text document managed by this manager
|
|
14683
|
+
* has been opened or the content changes.
|
|
14684
|
+
*/
|
|
14685
|
+
readonly onDidChangeContent: Event<TextDocumentChangeEvent<T>>;
|
|
14686
|
+
/**
|
|
14687
|
+
* An event that fires when a text document managed by this manager
|
|
14688
|
+
* will be saved.
|
|
14689
|
+
*/
|
|
14690
|
+
readonly onWillSave: Event<TextDocumentWillSaveEvent<T>>;
|
|
14691
|
+
/**
|
|
14692
|
+
* Sets a handler that will be called if a participant wants to provide
|
|
14693
|
+
* edits during a text document save.
|
|
14694
|
+
*/
|
|
14695
|
+
onWillSaveWaitUntil(handler: RequestHandler<TextDocumentWillSaveEvent<T>, TextEdit$1[], void>): void;
|
|
14696
|
+
/**
|
|
14697
|
+
* An event that fires when a text document managed by this manager
|
|
14698
|
+
* has been saved.
|
|
14699
|
+
*/
|
|
14700
|
+
readonly onDidSave: Event<TextDocumentChangeEvent<T>>;
|
|
14701
|
+
/**
|
|
14702
|
+
* An event that fires when a text document managed by this manager
|
|
14703
|
+
* has been closed.
|
|
14704
|
+
*/
|
|
14705
|
+
readonly onDidClose: Event<TextDocumentChangeEvent<T>>;
|
|
14706
|
+
/**
|
|
14707
|
+
* Returns the document for the given URI. Returns undefined if
|
|
14708
|
+
* the document is not managed by this instance.
|
|
14709
|
+
*
|
|
14710
|
+
* @param uri The text document's URI to retrieve.
|
|
14711
|
+
* @return the text document or `undefined`.
|
|
14712
|
+
*/
|
|
14713
|
+
get(uri: string | URI): T | undefined;
|
|
14714
|
+
/**
|
|
14715
|
+
* Sets the text document managed by this instance.
|
|
14716
|
+
* @param document The text document to add.
|
|
14717
|
+
* @returns `true` if the document didn't exist yet, `false` if it was already present.
|
|
14718
|
+
*/
|
|
14719
|
+
set(document: T): boolean;
|
|
14720
|
+
/**
|
|
14721
|
+
* Deletes a text document managed by this instance.
|
|
14722
|
+
*/
|
|
14723
|
+
delete(uri: string | URI | T): void;
|
|
14724
|
+
/**
|
|
14725
|
+
* Returns all text documents managed by this instance.
|
|
14726
|
+
*
|
|
14727
|
+
* @return all text documents.
|
|
14728
|
+
*/
|
|
14729
|
+
all(): T[];
|
|
14730
|
+
/**
|
|
14731
|
+
* Returns the URIs of all text documents managed by this instance.
|
|
14732
|
+
*
|
|
14733
|
+
* @return the URI's of all text documents.
|
|
14734
|
+
*/
|
|
14735
|
+
keys(): string[];
|
|
14736
|
+
/**
|
|
14737
|
+
* Listens for `low level` notification on the given connection to
|
|
14738
|
+
* update the text documents managed by this instance.
|
|
14739
|
+
*
|
|
14740
|
+
* Please note that the connection only provides handlers not an event model. Therefore
|
|
14741
|
+
* listening on a connection will overwrite the following handlers on a connection:
|
|
14742
|
+
* `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
|
|
14743
|
+
* `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
|
|
14744
|
+
*
|
|
14745
|
+
* Use the corresponding events on the TextDocuments instance instead.
|
|
14746
|
+
*
|
|
14747
|
+
* @param connection The connection to listen on.
|
|
14748
|
+
*/
|
|
14749
|
+
listen(connection: Connection): Disposable$1;
|
|
14750
|
+
}
|
|
14751
|
+
|
|
15384
14752
|
/******************************************************************************
|
|
15385
14753
|
* Copyright 2023 TypeFox GmbH
|
|
15386
14754
|
* This program and the accompanying materials are made available under the
|
|
@@ -15399,46 +14767,46 @@ type LangiumSharedServices = LangiumSharedCoreServices & LangiumSharedLSPService
|
|
|
15399
14767
|
* LSP services for a specific language of which Langium provides default implementations.
|
|
15400
14768
|
*/
|
|
15401
14769
|
type LangiumLSPServices = {
|
|
15402
|
-
lsp: {
|
|
15403
|
-
CompletionProvider?: CompletionProvider;
|
|
15404
|
-
DocumentHighlightProvider?: DocumentHighlightProvider;
|
|
15405
|
-
DocumentSymbolProvider?: DocumentSymbolProvider;
|
|
15406
|
-
HoverProvider?: HoverProvider;
|
|
15407
|
-
FoldingRangeProvider?: FoldingRangeProvider;
|
|
15408
|
-
DefinitionProvider?: DefinitionProvider;
|
|
15409
|
-
TypeProvider?: TypeDefinitionProvider;
|
|
15410
|
-
ImplementationProvider?: ImplementationProvider;
|
|
15411
|
-
ReferencesProvider?: ReferencesProvider;
|
|
15412
|
-
CodeActionProvider?: CodeActionProvider;
|
|
15413
|
-
SemanticTokenProvider?: SemanticTokenProvider;
|
|
15414
|
-
RenameProvider?: RenameProvider;
|
|
15415
|
-
Formatter?: Formatter;
|
|
15416
|
-
SignatureHelp?: SignatureHelpProvider;
|
|
15417
|
-
CallHierarchyProvider?: CallHierarchyProvider;
|
|
15418
|
-
TypeHierarchyProvider?: TypeHierarchyProvider;
|
|
15419
|
-
DeclarationProvider?: DeclarationProvider;
|
|
15420
|
-
InlayHintProvider?: InlayHintProvider;
|
|
15421
|
-
CodeLensProvider?: CodeLensProvider;
|
|
15422
|
-
DocumentLinkProvider?: DocumentLinkProvider;
|
|
14770
|
+
readonly lsp: {
|
|
14771
|
+
readonly CompletionProvider?: CompletionProvider;
|
|
14772
|
+
readonly DocumentHighlightProvider?: DocumentHighlightProvider;
|
|
14773
|
+
readonly DocumentSymbolProvider?: DocumentSymbolProvider;
|
|
14774
|
+
readonly HoverProvider?: HoverProvider;
|
|
14775
|
+
readonly FoldingRangeProvider?: FoldingRangeProvider;
|
|
14776
|
+
readonly DefinitionProvider?: DefinitionProvider;
|
|
14777
|
+
readonly TypeProvider?: TypeDefinitionProvider;
|
|
14778
|
+
readonly ImplementationProvider?: ImplementationProvider;
|
|
14779
|
+
readonly ReferencesProvider?: ReferencesProvider;
|
|
14780
|
+
readonly CodeActionProvider?: CodeActionProvider;
|
|
14781
|
+
readonly SemanticTokenProvider?: SemanticTokenProvider;
|
|
14782
|
+
readonly RenameProvider?: RenameProvider;
|
|
14783
|
+
readonly Formatter?: Formatter;
|
|
14784
|
+
readonly SignatureHelp?: SignatureHelpProvider;
|
|
14785
|
+
readonly CallHierarchyProvider?: CallHierarchyProvider;
|
|
14786
|
+
readonly TypeHierarchyProvider?: TypeHierarchyProvider;
|
|
14787
|
+
readonly DeclarationProvider?: DeclarationProvider;
|
|
14788
|
+
readonly InlayHintProvider?: InlayHintProvider;
|
|
14789
|
+
readonly CodeLensProvider?: CodeLensProvider;
|
|
14790
|
+
readonly DocumentLinkProvider?: DocumentLinkProvider;
|
|
15423
14791
|
};
|
|
15424
|
-
shared: LangiumSharedServices;
|
|
14792
|
+
readonly shared: LangiumSharedServices;
|
|
15425
14793
|
};
|
|
15426
14794
|
/**
|
|
15427
14795
|
* LSP services shared between multiple languages of which Langium provides default implementations.
|
|
15428
14796
|
*/
|
|
15429
14797
|
type LangiumSharedLSPServices = {
|
|
15430
|
-
lsp: {
|
|
15431
|
-
Connection?: Connection;
|
|
15432
|
-
DocumentUpdateHandler: DocumentUpdateHandler;
|
|
15433
|
-
ExecuteCommandHandler?: ExecuteCommandHandler;
|
|
15434
|
-
FileOperationHandler?: FileOperationHandler;
|
|
15435
|
-
FuzzyMatcher: FuzzyMatcher;
|
|
15436
|
-
LanguageServer: LanguageServer;
|
|
15437
|
-
NodeKindProvider: NodeKindProvider$1;
|
|
15438
|
-
WorkspaceSymbolProvider?: WorkspaceSymbolProvider$1;
|
|
14798
|
+
readonly lsp: {
|
|
14799
|
+
readonly Connection?: Connection;
|
|
14800
|
+
readonly DocumentUpdateHandler: DocumentUpdateHandler;
|
|
14801
|
+
readonly ExecuteCommandHandler?: ExecuteCommandHandler;
|
|
14802
|
+
readonly FileOperationHandler?: FileOperationHandler;
|
|
14803
|
+
readonly FuzzyMatcher: FuzzyMatcher;
|
|
14804
|
+
readonly LanguageServer: LanguageServer;
|
|
14805
|
+
readonly NodeKindProvider: NodeKindProvider$1;
|
|
14806
|
+
readonly WorkspaceSymbolProvider?: WorkspaceSymbolProvider$1;
|
|
15439
14807
|
};
|
|
15440
|
-
workspace: {
|
|
15441
|
-
TextDocuments: TextDocuments<TextDocument>;
|
|
14808
|
+
readonly workspace: {
|
|
14809
|
+
readonly TextDocuments: TextDocuments<TextDocument>;
|
|
15442
14810
|
};
|
|
15443
14811
|
};
|
|
15444
14812
|
|
|
@@ -15533,6 +14901,10 @@ interface CompletionProvider {
|
|
|
15533
14901
|
/**
|
|
15534
14902
|
* Handle a completion request.
|
|
15535
14903
|
*
|
|
14904
|
+
* @param document - the document for which the completion request was triggered
|
|
14905
|
+
* @param params - the completion parameters
|
|
14906
|
+
* @param cancelToken - a token that can be used to cancel the request
|
|
14907
|
+
*
|
|
15536
14908
|
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
15537
14909
|
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
15538
14910
|
*/
|
|
@@ -15555,8 +14927,9 @@ declare class DefaultCompletionProvider implements CompletionProvider {
|
|
|
15555
14927
|
protected readonly fuzzyMatcher: FuzzyMatcher;
|
|
15556
14928
|
protected readonly grammarConfig: GrammarConfig;
|
|
15557
14929
|
protected readonly astReflection: AstReflection;
|
|
14930
|
+
readonly completionOptions?: CompletionProviderOptions;
|
|
15558
14931
|
constructor(services: LangiumServices);
|
|
15559
|
-
getCompletion(document: LangiumDocument, params: CompletionParams): Promise<CompletionList | undefined>;
|
|
14932
|
+
getCompletion(document: LangiumDocument, params: CompletionParams, _cancelToken?: CancellationToken): Promise<CompletionList | undefined>;
|
|
15560
14933
|
/**
|
|
15561
14934
|
* The completion algorithm could yield the same reference/keyword multiple times.
|
|
15562
14935
|
*
|
|
@@ -15619,8 +14992,35 @@ interface ChangeViewRequestParams {
|
|
|
15619
14992
|
change: ViewChange;
|
|
15620
14993
|
}
|
|
15621
14994
|
|
|
14995
|
+
declare class LikeC4CodeLensProvider implements CodeLensProvider {
|
|
14996
|
+
private services;
|
|
14997
|
+
constructor(services: LikeC4Services);
|
|
14998
|
+
provideCodeLens(doc: LangiumDocument, _params: CodeLensParams, cancelToken?: CancellationToken): Promise<CodeLens[] | undefined>;
|
|
14999
|
+
}
|
|
15000
|
+
|
|
15001
|
+
declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
|
|
15002
|
+
readonly completionOptions: {
|
|
15003
|
+
triggerCharacters: string[];
|
|
15004
|
+
};
|
|
15005
|
+
}
|
|
15006
|
+
|
|
15007
|
+
declare class LikeC4DocumentHighlightProvider extends DefaultDocumentHighlightProvider {
|
|
15008
|
+
/**
|
|
15009
|
+
* Override this method to determine the highlight kind of the given reference.
|
|
15010
|
+
*/
|
|
15011
|
+
protected createDocumentHighlight(reference: ReferenceDescription): DocumentHighlight;
|
|
15012
|
+
}
|
|
15013
|
+
|
|
15014
|
+
declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
|
|
15015
|
+
private services;
|
|
15016
|
+
constructor(services: LikeC4Services);
|
|
15017
|
+
getDocumentLinks(doc: LangiumDocument, _params: DocumentLinkParams): MaybePromise<DocumentLink[]>;
|
|
15018
|
+
resolveLink(doc: LangiumDocument, link: string): string;
|
|
15019
|
+
relativeLink(doc: LangiumDocument, link: string): string | null;
|
|
15020
|
+
}
|
|
15021
|
+
|
|
15622
15022
|
/******************************************************************************
|
|
15623
|
-
* This file was generated by langium-cli 3.
|
|
15023
|
+
* This file was generated by langium-cli 3.2.0.
|
|
15624
15024
|
* DO NOT EDIT MANUALLY!
|
|
15625
15025
|
******************************************************************************/
|
|
15626
15026
|
|
|
@@ -16401,7 +15801,7 @@ type ParsedElementStyle = {
|
|
|
16401
15801
|
opacity?: number;
|
|
16402
15802
|
};
|
|
16403
15803
|
interface ParsedAstSpecification {
|
|
16404
|
-
tags: Set<Tag$
|
|
15804
|
+
tags: Set<Tag$1>;
|
|
16405
15805
|
elements: Record<ElementKind$1, {
|
|
16406
15806
|
technology?: string;
|
|
16407
15807
|
notation?: string;
|
|
@@ -16426,7 +15826,7 @@ interface ParsedAstElement {
|
|
|
16426
15826
|
title: string;
|
|
16427
15827
|
description?: string;
|
|
16428
15828
|
technology?: string;
|
|
16429
|
-
tags?: NonEmptyArray<Tag$
|
|
15829
|
+
tags?: NonEmptyArray<Tag$1>;
|
|
16430
15830
|
links?: NonEmptyArray<ParsedLink>;
|
|
16431
15831
|
style: ParsedElementStyle;
|
|
16432
15832
|
metadata?: {
|
|
@@ -16439,7 +15839,7 @@ interface ParsedAstRelation {
|
|
|
16439
15839
|
source: Fqn$1;
|
|
16440
15840
|
target: Fqn$1;
|
|
16441
15841
|
kind?: RelationshipKind$1;
|
|
16442
|
-
tags?: NonEmptyArray<Tag$
|
|
15842
|
+
tags?: NonEmptyArray<Tag$1>;
|
|
16443
15843
|
title: string;
|
|
16444
15844
|
description?: string;
|
|
16445
15845
|
technology?: string;
|
|
@@ -16461,7 +15861,7 @@ interface ParsedAstElementView {
|
|
|
16461
15861
|
astPath: string;
|
|
16462
15862
|
title: string | null;
|
|
16463
15863
|
description: string | null;
|
|
16464
|
-
tags: NonEmptyArray<Tag$
|
|
15864
|
+
tags: NonEmptyArray<Tag$1> | null;
|
|
16465
15865
|
links: NonEmptyArray<ParsedLink> | null;
|
|
16466
15866
|
rules: ViewRule$1[];
|
|
16467
15867
|
manualLayout?: ViewManualLayout;
|
|
@@ -16472,7 +15872,7 @@ interface ParsedAstDynamicView {
|
|
|
16472
15872
|
astPath: string;
|
|
16473
15873
|
title: string | null;
|
|
16474
15874
|
description: string | null;
|
|
16475
|
-
tags: NonEmptyArray<Tag$
|
|
15875
|
+
tags: NonEmptyArray<Tag$1> | null;
|
|
16476
15876
|
links: NonEmptyArray<ParsedLink> | null;
|
|
16477
15877
|
steps: DynamicViewStepOrParallel[];
|
|
16478
15878
|
rules: Array<DynamicViewRule$1>;
|
|
@@ -16496,38 +15896,11 @@ interface LikeC4DocumentProps {
|
|
|
16496
15896
|
c4Views?: ParsedAstView[];
|
|
16497
15897
|
c4fqnIndex?: MultiMap<Fqn$1, DocFqnIndexAstNodeDescription>;
|
|
16498
15898
|
}
|
|
16499
|
-
interface LikeC4LangiumDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, LikeC4DocumentProps {
|
|
16500
|
-
}
|
|
16501
|
-
interface FqnIndexedDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, SetRequired<LikeC4DocumentProps, 'c4fqnIndex'> {
|
|
16502
|
-
}
|
|
16503
|
-
interface ParsedLikeC4LangiumDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, Required<LikeC4DocumentProps> {
|
|
16504
|
-
}
|
|
16505
|
-
|
|
16506
|
-
declare class LikeC4CodeLensProvider implements CodeLensProvider {
|
|
16507
|
-
private services;
|
|
16508
|
-
constructor(services: LikeC4Services);
|
|
16509
|
-
provideCodeLens(doc: LangiumDocument, _params: CodeLensParams, cancelToken?: CancellationToken): Promise<CodeLens[] | undefined>;
|
|
16510
|
-
}
|
|
16511
|
-
|
|
16512
|
-
declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
|
|
16513
|
-
readonly completionOptions: {
|
|
16514
|
-
triggerCharacters: string[];
|
|
16515
|
-
};
|
|
16516
|
-
}
|
|
16517
|
-
|
|
16518
|
-
declare class LikeC4DocumentHighlightProvider extends DefaultDocumentHighlightProvider {
|
|
16519
|
-
/**
|
|
16520
|
-
* Override this method to determine the highlight kind of the given reference.
|
|
16521
|
-
*/
|
|
16522
|
-
protected createDocumentHighlight(reference: ReferenceDescription): DocumentHighlight;
|
|
15899
|
+
interface LikeC4LangiumDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, LikeC4DocumentProps {
|
|
16523
15900
|
}
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
constructor(services: LikeC4Services);
|
|
16528
|
-
getDocumentLinks(doc: LangiumDocument, _params: DocumentLinkParams): MaybePromise<DocumentLink[]>;
|
|
16529
|
-
resolveLink(doc: LangiumDocument, link: string): string;
|
|
16530
|
-
relativeLink(doc: LangiumDocument, link: string): string | null;
|
|
15901
|
+
interface FqnIndexedDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, SetRequired<LikeC4DocumentProps, 'c4fqnIndex'> {
|
|
15902
|
+
}
|
|
15903
|
+
interface ParsedLikeC4LangiumDocument extends Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>, Required<LikeC4DocumentProps> {
|
|
16531
15904
|
}
|
|
16532
15905
|
|
|
16533
15906
|
declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
@@ -16560,6 +15933,98 @@ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider
|
|
|
16560
15933
|
private highlightAstElement;
|
|
16561
15934
|
private highlightView;
|
|
16562
15935
|
}
|
|
15936
|
+
declare class FqnIndex {
|
|
15937
|
+
private services;
|
|
15938
|
+
protected langiumDocuments: LangiumDocuments;
|
|
15939
|
+
constructor(services: LikeC4Services);
|
|
15940
|
+
get documents(): Stream<FqnIndexedDocument>;
|
|
15941
|
+
private entries;
|
|
15942
|
+
getFqn(el: Element): Fqn$1 | null;
|
|
15943
|
+
byFqn(fqn: Fqn$1): Stream<AstNodeDescription>;
|
|
15944
|
+
directChildrenOf(parent: Fqn$1): Stream<AstNodeDescription>;
|
|
15945
|
+
/**
|
|
15946
|
+
* Returns descedant elements with unique names in the scope
|
|
15947
|
+
*/
|
|
15948
|
+
uniqueDescedants(parent: Fqn$1): Stream<AstNodeDescription>;
|
|
15949
|
+
}
|
|
15950
|
+
|
|
15951
|
+
type ModelParsedListener$1 = (docs: URI[]) => void;
|
|
15952
|
+
declare class LikeC4ModelBuilder {
|
|
15953
|
+
private services;
|
|
15954
|
+
private langiumDocuments;
|
|
15955
|
+
private listeners;
|
|
15956
|
+
constructor(services: LikeC4Services);
|
|
15957
|
+
/**
|
|
15958
|
+
* WARNING:
|
|
15959
|
+
* This method is internal and should to be called only when all documents are known to be parsed.
|
|
15960
|
+
* Otherwise, the model may be incomplete.
|
|
15961
|
+
*/
|
|
15962
|
+
unsafeSyncBuildModel(): ParsedLikeC4Model | null;
|
|
15963
|
+
buildModel(cancelToken?: CancellationToken): Promise<ParsedLikeC4Model | null>;
|
|
15964
|
+
private previousViews;
|
|
15965
|
+
/**
|
|
15966
|
+
* WARNING:
|
|
15967
|
+
* This method is internal and should to be called only when all documents are known to be parsed.
|
|
15968
|
+
* Otherwise, the model may be incomplete.
|
|
15969
|
+
*/
|
|
15970
|
+
unsafeSyncBuildComputedModel(model: ParsedLikeC4Model): ComputedLikeC4Model;
|
|
15971
|
+
buildComputedModel(cancelToken?: CancellationToken): Promise<ComputedLikeC4Model | null>;
|
|
15972
|
+
computeView(viewId: ViewID$1, cancelToken?: CancellationToken): Promise<ComputedView | null>;
|
|
15973
|
+
onModelParsed(callback: ModelParsedListener$1): Disposable;
|
|
15974
|
+
private documents;
|
|
15975
|
+
private notifyListeners;
|
|
15976
|
+
}
|
|
15977
|
+
|
|
15978
|
+
declare class LikeC4ModelLocator {
|
|
15979
|
+
private services;
|
|
15980
|
+
private fqnIndex;
|
|
15981
|
+
private langiumDocuments;
|
|
15982
|
+
constructor(services: LikeC4Services);
|
|
15983
|
+
private documents;
|
|
15984
|
+
getParsedElement(astNode: Element): ParsedAstElement | null;
|
|
15985
|
+
locateElement(fqn: Fqn$1, _prop?: string): Location | null;
|
|
15986
|
+
locateRelation(relationId: RelationID$1): Location | null;
|
|
15987
|
+
locateViewAst(viewId: ViewID$1): {
|
|
15988
|
+
doc: ParsedLikeC4LangiumDocument;
|
|
15989
|
+
view: ParsedAstView;
|
|
15990
|
+
viewAst: LikeC4View;
|
|
15991
|
+
};
|
|
15992
|
+
locateView(viewId: ViewID$1): Location | null;
|
|
15993
|
+
}
|
|
15994
|
+
declare class LikeC4ModelParser {
|
|
15995
|
+
private services;
|
|
15996
|
+
private fqnIndex;
|
|
15997
|
+
constructor(services: LikeC4Services);
|
|
15998
|
+
parse(doc: LangiumDocument | LangiumDocument[]): ParsedLikeC4LangiumDocument[];
|
|
15999
|
+
protected parseLikeC4Document(_doc: FqnIndexedDocument): ParsedLikeC4LangiumDocument;
|
|
16000
|
+
private parseSpecification;
|
|
16001
|
+
private parseModel;
|
|
16002
|
+
private parseElement;
|
|
16003
|
+
private parseRelation;
|
|
16004
|
+
private parseViews;
|
|
16005
|
+
private parseViewRulePredicate;
|
|
16006
|
+
private parsePredicate;
|
|
16007
|
+
private parseElementExpressionsIterator;
|
|
16008
|
+
private parseElementPredicate;
|
|
16009
|
+
private parseElementExpr;
|
|
16010
|
+
private parseElementPredicateWith;
|
|
16011
|
+
private parseElementPredicateWhere;
|
|
16012
|
+
private parseRelationPredicate;
|
|
16013
|
+
private parseRelationPredicateWhere;
|
|
16014
|
+
private parseRelationPredicateWith;
|
|
16015
|
+
private parseRelationExpr;
|
|
16016
|
+
private parseViewRule;
|
|
16017
|
+
private parseViewManualLaout;
|
|
16018
|
+
private parseDynamicParallelSteps;
|
|
16019
|
+
private parseDynamicStep;
|
|
16020
|
+
private parseElementView;
|
|
16021
|
+
private parseDynamicElementView;
|
|
16022
|
+
protected resolveFqn(node: Element | ExtendElement): Fqn$1;
|
|
16023
|
+
private getAstNodePath;
|
|
16024
|
+
private getMetadata;
|
|
16025
|
+
private convertTags;
|
|
16026
|
+
private convertLinks;
|
|
16027
|
+
}
|
|
16563
16028
|
|
|
16564
16029
|
declare class LikeC4ModelChanges {
|
|
16565
16030
|
private services;
|
|
@@ -16677,97 +16142,63 @@ interface LikeC4AddedServices {
|
|
|
16677
16142
|
shared?: LikeC4SharedServices;
|
|
16678
16143
|
}
|
|
16679
16144
|
type LikeC4Services = LangiumServices & LikeC4AddedServices;
|
|
16680
|
-
declare class FqnIndex {
|
|
16681
|
-
private services;
|
|
16682
|
-
protected langiumDocuments: LangiumDocuments;
|
|
16683
|
-
constructor(services: LikeC4Services);
|
|
16684
|
-
get documents(): Stream<FqnIndexedDocument>;
|
|
16685
|
-
private entries;
|
|
16686
|
-
getFqn(el: Element): Fqn$1 | null;
|
|
16687
|
-
byFqn(fqn: Fqn$1): Stream<AstNodeDescription>;
|
|
16688
|
-
directChildrenOf(parent: Fqn$1): Stream<AstNodeDescription>;
|
|
16689
|
-
/**
|
|
16690
|
-
* Returns descedant elements with unique names in the scope
|
|
16691
|
-
*/
|
|
16692
|
-
uniqueDescedants(parent: Fqn$1): Stream<AstNodeDescription>;
|
|
16693
|
-
}
|
|
16694
16145
|
|
|
16695
|
-
|
|
16696
|
-
|
|
16697
|
-
|
|
16698
|
-
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
16704
|
-
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16146
|
+
/**
|
|
16147
|
+
* @hidden
|
|
16148
|
+
*/
|
|
16149
|
+
type $keywords<T extends string> = {
|
|
16150
|
+
[key in T]: key;
|
|
16151
|
+
};
|
|
16152
|
+
|
|
16153
|
+
declare module 'ts-graphviz' {
|
|
16154
|
+
namespace ClusterSubgraphAttributeKey {
|
|
16155
|
+
interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
|
|
16156
|
+
}
|
|
16157
|
+
}
|
|
16158
|
+
namespace NodeAttributeKey {
|
|
16159
|
+
interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level'> {
|
|
16160
|
+
}
|
|
16161
|
+
}
|
|
16162
|
+
namespace EdgeAttributeKey {
|
|
16163
|
+
interface $values extends $keywords<'likec4_id'> {
|
|
16164
|
+
}
|
|
16165
|
+
}
|
|
16166
|
+
namespace Attribute {
|
|
16167
|
+
interface $keys extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
|
|
16168
|
+
}
|
|
16169
|
+
interface $types {
|
|
16170
|
+
likec4_type: 'folder' | 'file' | 'view';
|
|
16171
|
+
likec4_path: string;
|
|
16172
|
+
likec4_id: string;
|
|
16173
|
+
likec4_level: number;
|
|
16174
|
+
likec4_depth: number;
|
|
16175
|
+
}
|
|
16176
|
+
}
|
|
16720
16177
|
}
|
|
16178
|
+
type DotSource = Tagged<string, 'DotSource'>;
|
|
16721
16179
|
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
private documents;
|
|
16728
|
-
getParsedElement(astNode: Element): ParsedAstElement | null;
|
|
16729
|
-
locateElement(fqn: Fqn$1, _prop?: string): Location | null;
|
|
16730
|
-
locateRelation(relationId: RelationID$1): Location | null;
|
|
16731
|
-
locateViewAst(viewId: ViewID$1): {
|
|
16732
|
-
doc: ParsedLikeC4LangiumDocument;
|
|
16733
|
-
view: ParsedAstView;
|
|
16734
|
-
viewAst: LikeC4View;
|
|
16735
|
-
};
|
|
16736
|
-
locateView(viewId: ViewID$1): Location | null;
|
|
16180
|
+
interface GraphvizPort {
|
|
16181
|
+
unflatten(dot: DotSource): Promise<DotSource>;
|
|
16182
|
+
acyclic(dot: DotSource): Promise<DotSource>;
|
|
16183
|
+
layoutJson(dot: DotSource): Promise<string>;
|
|
16184
|
+
svg(dot: DotSource): Promise<string>;
|
|
16737
16185
|
}
|
|
16738
|
-
|
|
16739
|
-
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
-
|
|
16746
|
-
|
|
16747
|
-
|
|
16748
|
-
|
|
16749
|
-
|
|
16750
|
-
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
private parseElementPredicateWith;
|
|
16755
|
-
private parseElementPredicateWhere;
|
|
16756
|
-
private parseRelationPredicate;
|
|
16757
|
-
private parseRelationPredicateWhere;
|
|
16758
|
-
private parseRelationPredicateWith;
|
|
16759
|
-
private parseRelationExpr;
|
|
16760
|
-
private parseViewRule;
|
|
16761
|
-
private parseViewManualLaout;
|
|
16762
|
-
private parseDynamicParallelSteps;
|
|
16763
|
-
private parseDynamicStep;
|
|
16764
|
-
private parseElementView;
|
|
16765
|
-
private parseDynamicElementView;
|
|
16766
|
-
protected resolveFqn(node: Element | ExtendElement): Fqn$1;
|
|
16767
|
-
private getAstNodePath;
|
|
16768
|
-
private getMetadata;
|
|
16769
|
-
private convertTags;
|
|
16770
|
-
private convertLinks;
|
|
16186
|
+
type LayoutResult = {
|
|
16187
|
+
dot: DotSource;
|
|
16188
|
+
diagram: DiagramView;
|
|
16189
|
+
};
|
|
16190
|
+
declare class GraphvizLayouter {
|
|
16191
|
+
private graphviz;
|
|
16192
|
+
constructor(graphviz: GraphvizPort);
|
|
16193
|
+
get port(): GraphvizPort;
|
|
16194
|
+
changePort(graphviz: GraphvizPort): void;
|
|
16195
|
+
layout(view: ComputedView): Promise<LayoutResult>;
|
|
16196
|
+
svg(view: ComputedView): Promise<{
|
|
16197
|
+
svg: string;
|
|
16198
|
+
dot: DotSource;
|
|
16199
|
+
}>;
|
|
16200
|
+
dot(computedView: ComputedView): Promise<DotSource>;
|
|
16201
|
+
layoutOverviewGraph(views: ComputedView[]): Promise<OverviewGraph>;
|
|
16771
16202
|
}
|
|
16772
16203
|
|
|
16773
16204
|
// This definition file follows a somewhat unusual format. ESTree allows
|
|
@@ -17405,8 +16836,12 @@ type CliAddedServices = {
|
|
|
17405
16836
|
type CliServices = LikeC4Services & CliAddedServices;
|
|
17406
16837
|
|
|
17407
16838
|
type GraphvizOut = {
|
|
16839
|
+
dot: string;
|
|
16840
|
+
diagram: DiagramView;
|
|
16841
|
+
};
|
|
16842
|
+
type GraphvizSvgOut = {
|
|
17408
16843
|
id: ViewID$1;
|
|
17409
|
-
dot:
|
|
16844
|
+
dot: string;
|
|
17410
16845
|
svg: string;
|
|
17411
16846
|
};
|
|
17412
16847
|
declare class Views {
|
|
@@ -17418,9 +16853,9 @@ declare class Views {
|
|
|
17418
16853
|
constructor(services: CliServices);
|
|
17419
16854
|
private inflightRequest;
|
|
17420
16855
|
computedViews(): Promise<ComputedView[]>;
|
|
17421
|
-
layoutViews(): Promise<Array<Readonly<
|
|
16856
|
+
layoutViews(): Promise<Array<Readonly<GraphvizOut>>>;
|
|
17422
16857
|
diagrams(): Promise<Array<DiagramView>>;
|
|
17423
|
-
viewsAsGraphvizOut(): Promise<Array<
|
|
16858
|
+
viewsAsGraphvizOut(): Promise<Array<GraphvizSvgOut>>;
|
|
17424
16859
|
overviewGraph(): Promise<OverviewGraph>;
|
|
17425
16860
|
}
|
|
17426
16861
|
|
|
@@ -17440,9 +16875,10 @@ type LikeC4Options = {
|
|
|
17440
16875
|
throwIfInvalid?: boolean;
|
|
17441
16876
|
/**
|
|
17442
16877
|
* Logger to use for the language service.
|
|
16878
|
+
* false - no output
|
|
17443
16879
|
* @default 'default'
|
|
17444
16880
|
*/
|
|
17445
|
-
logger?: Logger | 'vite' | 'default';
|
|
16881
|
+
logger?: Logger | 'vite' | 'default' | false;
|
|
17446
16882
|
/**
|
|
17447
16883
|
* Whether to use the `dot` binary for layouting or the WebAssembly version.
|
|
17448
16884
|
* @default 'wasm'
|
|
@@ -17458,19 +16894,37 @@ declare class LikeC4 {
|
|
|
17458
16894
|
* Prevents multiple instances of LikeC4 for the same workspace
|
|
17459
16895
|
*/
|
|
17460
16896
|
private static likec4Instances;
|
|
17461
|
-
|
|
17462
|
-
|
|
16897
|
+
/**
|
|
16898
|
+
* Initializes a LikeC4 instance from the specified workspace path.
|
|
16899
|
+
* By default in current folder
|
|
16900
|
+
*/
|
|
16901
|
+
static fromWorkspace(path?: string, opts?: LikeC4Options): Promise<LikeC4>;
|
|
16902
|
+
private modelComputedRef;
|
|
16903
|
+
private modelLayoutedRef;
|
|
17463
16904
|
private logger;
|
|
17464
16905
|
private langiumDocuments;
|
|
17465
16906
|
readonly views: Views;
|
|
17466
16907
|
private constructor();
|
|
17467
|
-
computed(): Promise<ComputedLikeC4Model>;
|
|
17468
|
-
model(): LikeC4Model;
|
|
17469
16908
|
/**
|
|
17470
16909
|
* Diagram is a computed view, layouted using Graphviz
|
|
17471
16910
|
* Used in React components
|
|
17472
16911
|
*/
|
|
17473
16912
|
diagrams(): Promise<DiagramView[]>;
|
|
16913
|
+
/**
|
|
16914
|
+
* @deprecated use computedModel
|
|
16915
|
+
*/
|
|
16916
|
+
model(): LikeC4Model.Computed;
|
|
16917
|
+
/**
|
|
16918
|
+
* Synchronously builds architecture model
|
|
16919
|
+
* Only compute views predicates {@link ComputedView} - i.e. no layout
|
|
16920
|
+
* Not ready for rendering, but enough to traverse
|
|
16921
|
+
*/
|
|
16922
|
+
computedModel(): LikeC4Model.Computed;
|
|
16923
|
+
/**
|
|
16924
|
+
* Same as {@link computedModel()}, after applies layout
|
|
16925
|
+
* Ready for rendering
|
|
16926
|
+
*/
|
|
16927
|
+
layoutedModel(): Promise<LikeC4Model.Layouted>;
|
|
17474
16928
|
getErrors(): {
|
|
17475
16929
|
message: string;
|
|
17476
16930
|
line: number;
|
|
@@ -17489,8 +16943,11 @@ declare class LikeC4 {
|
|
|
17489
16943
|
changed?: string;
|
|
17490
16944
|
removed?: string;
|
|
17491
16945
|
}): Promise<boolean>;
|
|
16946
|
+
/**
|
|
16947
|
+
* @returns a function to dispose the listener
|
|
16948
|
+
*/
|
|
17492
16949
|
onModelUpdate(listener: () => void): () => void;
|
|
17493
16950
|
dispose(): void;
|
|
17494
16951
|
}
|
|
17495
16952
|
|
|
17496
|
-
export { type AutoLayoutDirection, type BBox, BorderStyles, type Color$1 as Color, type ComputedDynamicView, type ComputedEdge, type ComputedElementView, type ComputedLikeC4Model, type ComputedNode, type ComputedView, type DiagramEdge, type DiagramNode, type DiagramView, type DynamicView$1 as DynamicView, type EdgeId$1 as EdgeId, type Element$1 as Element, ElementColors, type ElementKind$1 as ElementKind, ElementShapes, type ElementView$1 as ElementView, type Fqn$1 as Fqn, type HexColorLiteral, LikeC4, LikeC4Model, type LikeC4View$1 as LikeC4View, LikeC4ViewModel, type NodeId, type ParsedLikeC4Model, type Point, type Relation$1 as Relation, type RelationExpr, type RelationID$1 as RelationID, RelationshipColors, StepEdgeId, type Tag$
|
|
16953
|
+
export { type AutoLayoutDirection, type BBox, BorderStyles, type Color$1 as Color, type ComputedDynamicView, type ComputedEdge, type ComputedElementView, type ComputedLikeC4Model, type ComputedNode, type ComputedView, type DiagramEdge, type DiagramNode, type DiagramView, type DynamicView$1 as DynamicView, type EdgeId$1 as EdgeId, type Element$1 as Element, ElementColors, type ElementKind$1 as ElementKind, ElementShapes, type ElementView$1 as ElementView, type Fqn$1 as Fqn, type HexColorLiteral, type LayoutedLikeC4Model, LikeC4, LikeC4DiagramModel, LikeC4Model, type LikeC4View$1 as LikeC4View, LikeC4ViewModel, type NodeId, type ParsedLikeC4Model, type Point, type Relation$1 as Relation, type RelationExpr, type RelationID$1 as RelationID, RelationshipColors, StepEdgeId, type Tag$1 as Tag, type ThemeColor$1 as ThemeColor, type ViewID$1 as ViewID, type XYPoint, ancestorsFqn, commonAncestor, compareByFqnHierarchically, compareFqnHierarchically, compareRelations, defaultTheme, extractStep, hasAtLeast, invariant, isAncestor, isComputedDynamicView, isDescendantOf, isSameHierarchy, isStepEdgeId, nameFromFqn, nonNullable, nonexhaustive, parentFqn };
|