comfyui-workflow-builder 1.0.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/README.md +130 -0
- package/dist/docs/assets/hierarchy.d.ts +1 -0
- package/dist/docs/assets/hierarchy.js +2 -0
- package/dist/docs/assets/icons.d.ts +1 -0
- package/dist/docs/assets/icons.js +20 -0
- package/dist/docs/assets/main.d.ts +1 -0
- package/dist/docs/assets/main.js +747 -0
- package/dist/docs/assets/navigation.d.ts +1 -0
- package/dist/docs/assets/navigation.js +2 -0
- package/dist/docs/assets/search.d.ts +1 -0
- package/dist/docs/assets/search.js +2 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/index.js +20 -0
- package/dist/src/nodes/BaseNode.d.ts +32 -0
- package/dist/src/nodes/BaseNode.js +33 -0
- package/dist/src/nodes/ClipTextEncode.d.ts +28 -0
- package/dist/src/nodes/ClipTextEncode.js +32 -0
- package/dist/src/nodes/EmptyLatentImage.d.ts +27 -0
- package/dist/src/nodes/EmptyLatentImage.js +27 -0
- package/dist/src/nodes/KSamplerNode.d.ts +52 -0
- package/dist/src/nodes/KSamplerNode.js +57 -0
- package/dist/src/nodes/LoadCheckpoint.d.ts +29 -0
- package/dist/src/nodes/LoadCheckpoint.js +35 -0
- package/dist/src/nodes/LoadImageNode.d.ts +25 -0
- package/dist/src/nodes/LoadImageNode.js +27 -0
- package/dist/src/nodes/SaveImageNode.d.ts +26 -0
- package/dist/src/nodes/SaveImageNode.js +28 -0
- package/dist/src/nodes/VAEDecodeNode.d.ts +28 -0
- package/dist/src/nodes/VAEDecodeNode.js +35 -0
- package/dist/src/nodes/VAEEncodeNode.d.ts +29 -0
- package/dist/src/nodes/VAEEncodeNode.js +35 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/EasyApplyLoraStackNode.d.ts +34 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/EasyApplyLoraStackNode.js +47 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/EasyLoraStackNode.d.ts +40 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/EasyLoraStackNode.js +52 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/outputs.d.ts +7 -0
- package/dist/src/nodes/custom_nodes/comfyui-easy-use/outputs.js +1 -0
- package/dist/src/nodes/outputs/Providers.d.ts +37 -0
- package/dist/src/nodes/outputs/Providers.js +1 -0
- package/dist/src/workflows/BaseWorkflow.d.ts +15 -0
- package/dist/src/workflows/BaseWorkflow.js +29 -0
- package/dist/src/workflows/ImageGenerationWorkflow.d.ts +15 -0
- package/dist/src/workflows/ImageGenerationWorkflow.js +93 -0
- package/dist/src/workflows/types.d.ts +20 -0
- package/dist/src/workflows/types.js +1 -0
- package/package.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# ComfyUI Workflow Builder
|
|
2
|
+
|
|
3
|
+
A TypeScript library for programmatically building ComfyUI workflow JSONs. This library provides a type-safe, builder-pattern interface to create complex ComfyUI workflows.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Type-Safe Node Creation**: Define nodes with typed inputs to prevent configuration errors.
|
|
8
|
+
- **Builder Pattern**: Easily chain and connect nodes to build complex workflows.
|
|
9
|
+
- **Pre-built Templates**: Includes helpers for common workflows like Basic Image Generation.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install comfyui-workflow-builder
|
|
15
|
+
# or
|
|
16
|
+
bun add comfyui-workflow-builder
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### 1. Building a Workflow Manually
|
|
22
|
+
|
|
23
|
+
You can build a workflow by instantiating nodes and connecting them.
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import {
|
|
27
|
+
BaseWorkflow,
|
|
28
|
+
LoadCheckpointNode,
|
|
29
|
+
EmptyLatentImageNode,
|
|
30
|
+
ClipTextEncodeNode,
|
|
31
|
+
KSamplerNode,
|
|
32
|
+
VAEDecodeNode,
|
|
33
|
+
SaveImageNode
|
|
34
|
+
} from 'comfyui-workflow-builder';
|
|
35
|
+
|
|
36
|
+
// 1. Create a new workflow container
|
|
37
|
+
const workflow = new BaseWorkflow();
|
|
38
|
+
|
|
39
|
+
// 2. Create Nodes
|
|
40
|
+
const checkpoint = new LoadCheckpointNode({
|
|
41
|
+
checkpoint_name: "v1-5-pruned-emaonly.ckpt"
|
|
42
|
+
});
|
|
43
|
+
workflow.addNode(checkpoint);
|
|
44
|
+
|
|
45
|
+
const emptyLatent = new EmptyLatentImageNode({
|
|
46
|
+
width: 512,
|
|
47
|
+
height: 512,
|
|
48
|
+
batch_size: 1
|
|
49
|
+
});
|
|
50
|
+
workflow.addNode(emptyLatent);
|
|
51
|
+
|
|
52
|
+
const positivePrompt = new ClipTextEncodeNode({
|
|
53
|
+
text: "A beautiful landscape, 8k, high quality",
|
|
54
|
+
clipProvider: checkpoint // Connects to the CLIP output of the checkpoint node
|
|
55
|
+
});
|
|
56
|
+
workflow.addNode(positivePrompt);
|
|
57
|
+
|
|
58
|
+
const negativePrompt = new ClipTextEncodeNode({
|
|
59
|
+
text: "blur, low quality, watermark",
|
|
60
|
+
clipProvider: checkpoint
|
|
61
|
+
});
|
|
62
|
+
workflow.addNode(negativePrompt);
|
|
63
|
+
|
|
64
|
+
const kSampler = new KSamplerNode({
|
|
65
|
+
seed: 123456789,
|
|
66
|
+
steps: 20,
|
|
67
|
+
cfg: 8,
|
|
68
|
+
samplerName: "euler",
|
|
69
|
+
scheduler: "normal",
|
|
70
|
+
denoise: 1,
|
|
71
|
+
model: checkpoint,
|
|
72
|
+
positiveConditioning: positivePrompt,
|
|
73
|
+
negativeConditioning: negativePrompt,
|
|
74
|
+
latentImage: emptyLatent
|
|
75
|
+
});
|
|
76
|
+
workflow.addNode(kSampler);
|
|
77
|
+
|
|
78
|
+
const vaeDecode = new VAEDecodeNode({
|
|
79
|
+
samples: kSampler,
|
|
80
|
+
vae: checkpoint
|
|
81
|
+
});
|
|
82
|
+
workflow.addNode(vaeDecode);
|
|
83
|
+
|
|
84
|
+
const saveImage = new SaveImageNode({
|
|
85
|
+
image: vaeDecode
|
|
86
|
+
});
|
|
87
|
+
workflow.addNode(saveImage);
|
|
88
|
+
|
|
89
|
+
// 3. Export to JSON
|
|
90
|
+
const workflowJson = workflow.workflow();
|
|
91
|
+
console.log(JSON.stringify(workflowJson, null, 2));
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 2. Using Pre-built Workflows
|
|
95
|
+
|
|
96
|
+
For common tasks, you can use the provided workflow factories.
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { basicImageGenerationWorkflow } from 'comfyui-workflow-builder/workflows/ImageGenerationWorkflow';
|
|
100
|
+
|
|
101
|
+
const workflow = basicImageGenerationWorkflow({
|
|
102
|
+
positivePromptText: "A cute cat",
|
|
103
|
+
negativePromptText: "ugly, blurry",
|
|
104
|
+
checkpointName: "v1-5-pruned.safetensors",
|
|
105
|
+
seed: 67,
|
|
106
|
+
steps: 20
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Get the JSON to send to the API
|
|
110
|
+
const json = workflow.workflow();
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Project Structure
|
|
114
|
+
|
|
115
|
+
- `src/nodes/`: Contains definitions for ComfyUI nodes (e.g., `KSamplerNode`, `LoadCheckpointNode`).
|
|
116
|
+
- `src/workflows/`: Contains workflow builders and templates.
|
|
117
|
+
|
|
118
|
+
## Docs
|
|
119
|
+
|
|
120
|
+
You can generate docs using `bun run docs` and view them using `npx http-server docs`.
|
|
121
|
+
|
|
122
|
+
## Contributing
|
|
123
|
+
|
|
124
|
+
Contributions are welcome! This project is still early and only contains very basic nodes for image generation. Please feel free to submit a Pull Request to add more nodes and functionality. Custom nodes are also supported in the `src/nodes/custom_nodes` directory.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/nickawrist/comfyui-workflow-builder.git
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Clone the repository and run `bun install` to install dependencies. You can then run `bun run build` to build the project.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
window.hierarchyData = "eJyd1cFuozAQBuB3mfN0ywAxhlu3m0PV7PaQqpcqBwvcBgVshJ3VRhXvXtGolUmysumFg/Vb3y9rNLxBr7U1UDwzJB4j5RFSzpHyFCnjG4RevjSytLVWBoo3YONHiVZCAT+FkX90JQFhV6sKCoo5wr5voICyEcZIc/2Z+bG1bQN4PIcCrKmuxktXxwOEcls3VS8VFM+UYUKYMmQceYYURUhESPECKcmRWLwZEChzqtw2dfco/9mlKnXlLXWe9tQbEBJyuGXb2cNKWKnsXSteveClvJ9M3ce+X4u2a2Tvo9ycn2DcIVZaVLdbWe46XSvrg87Tfo5nJ1zQ602CfoSiyFHW4q8MUibBAIXcgXi6Wf6SIaM3CQYo8WKqhA34JBigJLk73MIcbrquOax0L9ZWlDvveF+8EeCy+MSdRc7VMnfYH/a221vzW1ey+YLiBfuEamVl/yJKaa7d6H+Zr/zJLkvyj2XF43N7XENh9Jj8hoyMf+B5dAHXqqrHtV6r18ASzo3ZZbJjkfS8iLMWw3o4F+bWSNn4FzlWuTAMM0p8i+fZZhiGd9+fcE4=";
|
|
2
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
addIcons();
|
|
3
|
+
function addIcons() {
|
|
4
|
+
if (document.readyState === "loading")
|
|
5
|
+
return document.addEventListener("DOMContentLoaded", addIcons);
|
|
6
|
+
const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
|
|
7
|
+
svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
|
|
8
|
+
svg.style.display = "none";
|
|
9
|
+
if (location.protocol === "file:")
|
|
10
|
+
updateUseElements();
|
|
11
|
+
}
|
|
12
|
+
function updateUseElements() {
|
|
13
|
+
document.querySelectorAll("use").forEach(el => {
|
|
14
|
+
if (el.getAttribute("href").includes("#icon-")) {
|
|
15
|
+
el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|