likec4 1.60.0 → 1.61.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 +2 -0
- package/__app__/codegen/react.mjs +4 -10
- package/__app__/codegen/webcomponent.mjs +5 -208
- package/__app__/index.html +15 -15
- package/__app__/src/aichat/index.mjs +1 -2
- package/__app__/src/chunks/AIChat.mjs +292 -117
- package/__app__/src/chunks/ErrorComponent.mjs +444 -0
- package/__app__/src/chunks/Header.mjs +269 -0
- package/__app__/src/chunks/ViewReact.mjs +438 -0
- package/__app__/src/chunks/find.mjs +38 -0
- package/__app__/src/chunks/hooks.mjs +18 -541
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +11101 -1797
- package/__app__/src/chunks/libs/@tanstack.mjs +4563 -3083
- package/__app__/src/chunks/libs/fast-equals.mjs +140 -71
- package/__app__/src/chunks/{es.mjs → libs/html-to-image.mjs} +16 -22
- package/__app__/src/chunks/libs/nanostores.mjs +4 -8
- package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
- package/__app__/src/chunks/react.mjs +22 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +3 -32
- package/__app__/src/chunks/router.mjs +106 -0
- package/__app__/src/chunks/scope.mjs +106 -0
- package/__app__/src/chunks/searchParams.mjs +29 -0
- package/__app__/src/chunks/single-index.mjs +465 -0
- package/__app__/src/chunks/styled-system.mjs +1916 -2946
- package/__app__/src/chunks/useAsync.mjs +69 -0
- package/__app__/src/chunks/useSyncedRef.mjs +16 -0
- package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
- package/__app__/src/components/CopyToClipboard.mjs +53 -0
- package/__app__/src/components/ErrorComponent.mjs +1 -0
- package/__app__/src/components/NavigationPanel.mjs +63 -0
- package/__app__/src/components/NotFound.mjs +155 -0
- package/__app__/src/components/ViewOutlet.mjs +9 -0
- package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
- package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
- package/__app__/src/components/model-diff/compare-model.mjs +76 -0
- package/__app__/src/components/model-diff/state.mjs +45 -0
- package/__app__/src/components/search/OverviewSearch.mjs +92 -0
- package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
- package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
- package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
- package/__app__/src/components/sidebar/Drawer.mjs +178 -0
- package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
- package/__app__/src/components/sidebar/data.mjs +94 -0
- package/__app__/src/components/sidebar/state.mjs +16 -0
- package/__app__/src/components/view-page/Header.mjs +1 -0
- package/__app__/src/components/view-page/SelectProject.mjs +258 -0
- package/__app__/src/components/view-page/ShareModal.mjs +111 -0
- package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
- package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
- package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
- package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
- package/__app__/src/components/view-page/state.mjs +17 -0
- package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
- package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
- package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
- package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
- package/__app__/src/context/ModelDiffsContext.mjs +33 -0
- package/__app__/src/context/safeCtx.mjs +14 -0
- package/__app__/src/hooks.mjs +1 -0
- package/__app__/src/main.mjs +4 -48126
- package/__app__/src/pages/EmbedPage.mjs +93 -0
- package/__app__/src/pages/ExportPage.mjs +691 -0
- package/__app__/src/pages/ProjectsOverview.mjs +23 -0
- package/__app__/src/pages/ViewAsD2.mjs +105 -0
- package/__app__/src/pages/ViewAsDot.mjs +65 -0
- package/__app__/src/pages/ViewAsMmd.mjs +109 -0
- package/__app__/src/pages/ViewAsPuml.mjs +105 -0
- package/__app__/src/pages/ViewEditor.mjs +220 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/pages/export-layout.mjs +95 -0
- package/__app__/src/pages/export-page-params.mjs +9 -0
- package/__app__/src/pages/styles.css.mjs +23 -0
- package/__app__/src/routeTree.gen.mjs +105 -0
- package/__app__/src/router.mjs +1 -0
- package/__app__/src/routes/__root.mjs +65 -0
- package/__app__/src/routes/index.css.mjs +29 -0
- package/__app__/src/routes/index.mjs +32 -0
- package/__app__/src/routes/project._projectId/-components.mjs +100 -0
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
- package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
- package/__app__/src/routes/project._projectId/index.mjs +14 -0
- package/__app__/src/routes/project._projectId/route.mjs +93 -0
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
- package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
- package/__app__/src/routes/projects.mjs +36 -0
- package/__app__/src/routes/single-index.mjs +1 -0
- package/__app__/src/routes/webcomponent._.mjs +94 -0
- package/__app__/src/style.css +1156 -1147
- package/config/schema.json +26 -2
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +375 -393
- package/dist/chunks/filenames.mjs +26 -20
- package/dist/chunks/generate-likec4.mjs +4 -4
- package/dist/chunks/index.d.mts +16 -15
- package/dist/chunks/index2.d.mts +7041 -3293
- package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -5
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
- package/dist/chunks/libs/chevrotain.mjs +19 -19
- package/dist/chunks/libs/clone.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/fast-equals.mjs +1 -0
- package/dist/chunks/libs/fontkit.mjs +1 -0
- package/dist/chunks/libs/langium.d.mts +80 -2933
- package/dist/chunks/libs/langium.mjs +6 -6
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/pathe.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/node.mjs +110 -77
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +183 -164
- package/dist/cli/index.mjs +157 -101
- package/dist/config/index.d.mts +65 -4
- package/dist/config/index.mjs +1 -1
- package/dist/generators/likec4.d.mts +16 -64
- package/dist/index.d.mts +2 -4
- package/dist/model/index.d.mts +0 -10
- package/dist/vite-plugin/index.d.mts +83 -61
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -2
- package/dist/vite-plugin/internal/index.d.mts +91 -17
- package/dist/vite-plugin/internal/index.mjs +156 -110
- package/package.json +60 -55
- package/react/index.d.mts +3010 -4014
- package/react/index.mjs +170 -171
- package/react/rolldown-runtime-CfRud99p.js +1 -0
- package/skills/likec4-dsl/SKILL.md +71 -25
- package/skills/likec4-dsl/evals/evals-public.json +5 -0
- package/skills/likec4-dsl/evals/grading-spec.json +15 -1
- package/skills/likec4-dsl/references/cli.md +39 -10
- package/skills/likec4-dsl/references/configuration.md +5 -5
- package/skills/likec4-dsl/references/diffs.md +52 -0
- package/skills/likec4-dsl/references/examples.md +2 -2
- package/skills/likec4-dsl/references/identifier-validity.md +31 -31
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +16 -15
- package/skills/likec4-dsl/references/model.md +42 -11
- package/skills/likec4-dsl/references/specification.md +11 -7
- package/skills/likec4-dsl/references/troubleshooting.md +47 -42
- package/skills/likec4-dsl/references/views.md +2 -2
- package/vite-plugin-modules.d.ts +126 -51
- package/__app__/src/chunks/LikeC4Styles.mjs +0 -4522
- package/__app__/src/chunks/ProjectsOverview.mjs +0 -827
- package/__app__/src/chunks/libs/@floating-ui.mjs +0 -3286
- package/__app__/src/chunks/libs/@mantine.mjs +0 -17731
- package/__app__/src/chunks/libs/@xstate/react.mjs +0 -3471
- package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -7927
- package/__app__/src/chunks/libs/bezier-js.mjs +0 -1593
- package/__app__/src/chunks/libs/d3.mjs +0 -4531
- package/__app__/src/chunks/libs/framer.mjs +0 -11331
- package/__app__/src/chunks/libs/zod.mjs +0 -5404
- package/dist/chunks/libs/@chevrotain/types.d.mts +0 -111
- package/react/rolldown-runtime-DnkiqaRY.js +0 -1
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import "../rolldown-runtime.mjs";
|
|
2
|
-
|
|
3
|
-
var { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
2
|
+
// ../../node_modules/.pnpm/fast-equals@6.2.2/node_modules/fast-equals/dist/es/index.mjs
|
|
3
|
+
var { getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
4
4
|
var { hasOwnProperty, toString: toString$1 } = Object.prototype;
|
|
5
5
|
var OBJECT_TAG = "[object Object]";
|
|
6
6
|
/**
|
|
7
|
+
* Whether the own properties from `end` onward are equal with strict property checking, where the
|
|
8
|
+
* caller has already verified that both objects have the same number of own properties.
|
|
9
|
+
*/
|
|
10
|
+
function areStrictPropertiesEqual(a, b, state, properties, end) {
|
|
11
|
+
let index = properties.length;
|
|
12
|
+
let property;
|
|
13
|
+
let descriptorA;
|
|
14
|
+
let descriptorB;
|
|
15
|
+
while (index-- > end) {
|
|
16
|
+
property = properties[index];
|
|
17
|
+
if (!isReactProperty(a, b, property) && (!hasOwn(b, property) || !state.equals(a[property], b[property], property, property, a, b, state))) return false;
|
|
18
|
+
descriptorA = getOwnPropertyDescriptor(a, property);
|
|
19
|
+
descriptorB = getOwnPropertyDescriptor(b, property);
|
|
20
|
+
if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
7
25
|
* Combine two comparators into a single comparators.
|
|
8
26
|
*/
|
|
9
27
|
function combineComparators(comparatorA, comparatorB) {
|
|
@@ -40,6 +58,10 @@ function getStrictProperties(object) {
|
|
|
40
58
|
return symbols.length ? getOwnPropertyNames(object).concat(symbols) : getOwnPropertyNames(object);
|
|
41
59
|
}
|
|
42
60
|
/**
|
|
61
|
+
* Identify the element type of TypedArrays across realms and subclasses.
|
|
62
|
+
*/
|
|
63
|
+
var getTypedArrayTag = getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype), Symbol.toStringTag).get;
|
|
64
|
+
/**
|
|
43
65
|
* Whether the object contains the property passed as an own property.
|
|
44
66
|
*/
|
|
45
67
|
var hasOwn = Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property));
|
|
@@ -55,14 +77,32 @@ function isNullPrototypeComparable(a, b) {
|
|
|
55
77
|
if (bConstructor == null) return aConstructor === Object || toString$1.call(a) === OBJECT_TAG;
|
|
56
78
|
return false;
|
|
57
79
|
}
|
|
58
|
-
var PREACT_VNODE = "__v";
|
|
59
|
-
var PREACT_OWNER = "__o";
|
|
60
|
-
var REACT_OWNER = "_owner";
|
|
61
|
-
var { getOwnPropertyDescriptor, keys } = Object;
|
|
62
80
|
/**
|
|
63
|
-
*
|
|
81
|
+
* Whether the property passed is a property specific to React/Preact elements. These are ignored in comparison, as they
|
|
82
|
+
* are deeply circular and will return frequent false negatives for the comparison that matters, which is often the
|
|
83
|
+
* React element's aspects (`props`, `type`, etc.).
|
|
64
84
|
*/
|
|
65
|
-
|
|
85
|
+
function isReactProperty(a, b, property) {
|
|
86
|
+
return (property === "_owner" || property === "__o" || property === "__v") && !!(a.$$typeof || b.$$typeof);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Reorder a serialized query string so that params holding the same pairs compare as equal
|
|
90
|
+
* regardless of the order they appear in.
|
|
91
|
+
*
|
|
92
|
+
* @note
|
|
93
|
+
* The serializer percent-encodes `&` and `=` wherever they appear inside a name or a value, so
|
|
94
|
+
* splitting on `&` recovers exactly the pairs and nothing else.
|
|
95
|
+
*/
|
|
96
|
+
function sortSearchParams(serialized) {
|
|
97
|
+
return serialized.split("&").sort().join("&");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Above this many keys, out-of-position keys are checked with `propertyIsEnumerable` rather than by
|
|
101
|
+
* scanning the other object's keys. Measured in V8: scanning wins up to 50 keys and loses from 100.
|
|
102
|
+
*/
|
|
103
|
+
var MAX_SCANNED_PROPERTIES = 64;
|
|
104
|
+
var { keys } = Object;
|
|
105
|
+
var { propertyIsEnumerable } = Object.prototype;
|
|
66
106
|
/**
|
|
67
107
|
* Whether the values passed are equal based on a [SameValue](https://262.ecma-international.org/7.0/#sec-samevalue) basis.
|
|
68
108
|
* Simplified, this maps to if the two values are referentially equal to one another (`a === b`) or both are `NaN`.
|
|
@@ -118,13 +158,49 @@ function areDatesEqual(a, b) {
|
|
|
118
158
|
*
|
|
119
159
|
* @note
|
|
120
160
|
* `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
|
|
121
|
-
* explicitly. `cause`
|
|
122
|
-
* nested value in the comparison is treated.
|
|
123
|
-
*
|
|
124
|
-
*
|
|
161
|
+
* explicitly. `cause` and `errors` are compared by value rather than by reference, matching how
|
|
162
|
+
* every other nested value in the comparison is treated. They are compared exactly once, regardless
|
|
163
|
+
* of whether they were assigned (enumerable) or set by the constructor (non-enumerable). Other own
|
|
164
|
+
* enumerable properties (which custom `Error` subclasses commonly add) are compared afterward.
|
|
165
|
+
*
|
|
166
|
+
* The own property comparison is inlined rather than extracted, which measured faster in V8 when
|
|
167
|
+
* recursing through `cause`. Keep the bytecode under V8's 460-byte TurboFan inlining limit (383 bytes
|
|
168
|
+
* at time of writing; check with `node --print-bytecode --print-bytecode-filter=areErrorsEqual`), or
|
|
169
|
+
* this stops being inlined into its callers.
|
|
125
170
|
*/
|
|
126
171
|
function areErrorsEqual(a, b, state) {
|
|
127
|
-
|
|
172
|
+
if (a.name !== b.name || a.message !== b.message || a.stack !== b.stack) return false;
|
|
173
|
+
const causeA = a.cause;
|
|
174
|
+
const causeB = b.cause;
|
|
175
|
+
if (causeA !== causeB && !state.equals(causeA, causeB, "cause", "cause", a, b, state)) return false;
|
|
176
|
+
const errorsA = a.errors;
|
|
177
|
+
const errorsB = b.errors;
|
|
178
|
+
if (errorsA !== errorsB && !state.equals(errorsA, errorsB, "errors", "errors", a, b, state)) return false;
|
|
179
|
+
const propertiesA = keys(a);
|
|
180
|
+
const propertiesB = keys(b);
|
|
181
|
+
let index = propertiesA.length;
|
|
182
|
+
if (!index && !propertiesB.length) return true;
|
|
183
|
+
let compared = 0;
|
|
184
|
+
let property;
|
|
185
|
+
while (index-- > 0) {
|
|
186
|
+
property = propertiesA[index];
|
|
187
|
+
if (property === "cause" || property === "errors") continue;
|
|
188
|
+
if (property !== propertiesB[index] && !propertyIsEnumerable.call(b, property) || !state.equals(a[property], b[property], property, property, a, b, state)) return false;
|
|
189
|
+
++compared;
|
|
190
|
+
}
|
|
191
|
+
const remaining = propertiesB.length - compared;
|
|
192
|
+
return !remaining || remaining === (propertyIsEnumerable.call(b, "cause") ? 1 : 0) + (propertyIsEnumerable.call(b, "errors") ? 1 : 0);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Whether the errors passed are equal in value.
|
|
196
|
+
*
|
|
197
|
+
* @note
|
|
198
|
+
* `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
|
|
199
|
+
* explicitly. `cause` and `errors` are own properties, so `areObjectsEqualStrict` compares them along
|
|
200
|
+
* with every other own property; they are not compared explicitly to avoid comparing them twice.
|
|
201
|
+
*/
|
|
202
|
+
function areErrorsEqualStrict(a, b, state) {
|
|
203
|
+
return a.name === b.name && a.message === b.message && a.stack === b.stack && areObjectsEqualStrict(a, b, state);
|
|
128
204
|
}
|
|
129
205
|
/**
|
|
130
206
|
* Whether the `Map`s are equal in value.
|
|
@@ -133,7 +209,7 @@ function areMapsEqual(a, b, state) {
|
|
|
133
209
|
const size = a.size;
|
|
134
210
|
if (size !== b.size) return false;
|
|
135
211
|
if (!size) return true;
|
|
136
|
-
const matchedIndices = new
|
|
212
|
+
const matchedIndices = new Array(size);
|
|
137
213
|
const aIterable = a.entries();
|
|
138
214
|
let aResult;
|
|
139
215
|
let bResult;
|
|
@@ -141,7 +217,7 @@ function areMapsEqual(a, b, state) {
|
|
|
141
217
|
while (aResult = aIterable.next()) {
|
|
142
218
|
if (aResult.done) break;
|
|
143
219
|
const bIterable = b.entries();
|
|
144
|
-
let hasMatch =
|
|
220
|
+
let hasMatch = false;
|
|
145
221
|
let matchIndex = 0;
|
|
146
222
|
while (bResult = bIterable.next()) {
|
|
147
223
|
if (bResult.done) break;
|
|
@@ -152,7 +228,7 @@ function areMapsEqual(a, b, state) {
|
|
|
152
228
|
const aEntry = aResult.value;
|
|
153
229
|
const bEntry = bResult.value;
|
|
154
230
|
if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
|
|
155
|
-
hasMatch = matchedIndices[matchIndex] =
|
|
231
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
156
232
|
break;
|
|
157
233
|
}
|
|
158
234
|
matchIndex++;
|
|
@@ -167,9 +243,16 @@ function areMapsEqual(a, b, state) {
|
|
|
167
243
|
*/
|
|
168
244
|
function areObjectsEqual(a, b, state) {
|
|
169
245
|
const properties = keys(a);
|
|
246
|
+
const propertiesB = keys(b);
|
|
170
247
|
let index = properties.length;
|
|
171
|
-
if (
|
|
172
|
-
|
|
248
|
+
if (propertiesB.length !== index) return false;
|
|
249
|
+
const isScannable = index <= MAX_SCANNED_PROPERTIES;
|
|
250
|
+
let property;
|
|
251
|
+
while (index-- > 0) {
|
|
252
|
+
property = properties[index];
|
|
253
|
+
if (isReactProperty(a, b, property)) continue;
|
|
254
|
+
if (property !== propertiesB[index] && !(isScannable ? propertiesB.includes(property) : propertyIsEnumerable.call(b, property)) || !state.equals(a[property], b[property], property, property, a, b, state)) return false;
|
|
255
|
+
}
|
|
173
256
|
return true;
|
|
174
257
|
}
|
|
175
258
|
/**
|
|
@@ -177,19 +260,7 @@ function areObjectsEqual(a, b, state) {
|
|
|
177
260
|
*/
|
|
178
261
|
function areObjectsEqualStrict(a, b, state) {
|
|
179
262
|
const properties = getStrictProperties(a);
|
|
180
|
-
|
|
181
|
-
if (getStrictProperties(b).length !== index) return false;
|
|
182
|
-
let property;
|
|
183
|
-
let descriptorA;
|
|
184
|
-
let descriptorB;
|
|
185
|
-
while (index-- > 0) {
|
|
186
|
-
property = properties[index];
|
|
187
|
-
if (!isPropertyEqual(a, b, state, property)) return false;
|
|
188
|
-
descriptorA = getOwnPropertyDescriptor(a, property);
|
|
189
|
-
descriptorB = getOwnPropertyDescriptor(b, property);
|
|
190
|
-
if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) return false;
|
|
191
|
-
}
|
|
192
|
-
return true;
|
|
263
|
+
return getStrictProperties(b).length === properties.length && areStrictPropertiesEqual(a, b, state, properties, 0);
|
|
193
264
|
}
|
|
194
265
|
/**
|
|
195
266
|
* Whether the primitive wrappers passed are equal in value.
|
|
@@ -204,25 +275,38 @@ function areRegExpsEqual(a, b) {
|
|
|
204
275
|
return a.source === b.source && a.flags === b.flags;
|
|
205
276
|
}
|
|
206
277
|
/**
|
|
278
|
+
* Whether the search params passed are equal in value.
|
|
279
|
+
*
|
|
280
|
+
* @note
|
|
281
|
+
* Order is not significant, matching how the other unordered collections in the library are
|
|
282
|
+
* compared. Repeated keys are, so this is a comparison of multisets rather than of sets:
|
|
283
|
+
* `a=1&a=2` is equal to `a=2&a=1`, but not to `a=1&a=1`.
|
|
284
|
+
*/
|
|
285
|
+
function areSearchParamsEqual(a, b) {
|
|
286
|
+
const serializedA = a.toString();
|
|
287
|
+
const serializedB = b.toString();
|
|
288
|
+
return serializedA === serializedB || sortSearchParams(serializedA) === sortSearchParams(serializedB);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
207
291
|
* Whether the `Set`s are equal in value.
|
|
208
292
|
*/
|
|
209
293
|
function areSetsEqual(a, b, state) {
|
|
210
294
|
const size = a.size;
|
|
211
295
|
if (size !== b.size) return false;
|
|
212
296
|
if (!size) return true;
|
|
213
|
-
const matchedIndices = new
|
|
297
|
+
const matchedIndices = new Array(size);
|
|
214
298
|
const aIterable = a.values();
|
|
215
299
|
let aResult;
|
|
216
300
|
let bResult;
|
|
217
301
|
while (aResult = aIterable.next()) {
|
|
218
302
|
if (aResult.done) break;
|
|
219
303
|
const bIterable = b.values();
|
|
220
|
-
let hasMatch =
|
|
304
|
+
let hasMatch = false;
|
|
221
305
|
let matchIndex = 0;
|
|
222
306
|
while (bResult = bIterable.next()) {
|
|
223
307
|
if (bResult.done) break;
|
|
224
308
|
if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
|
|
225
|
-
hasMatch = matchedIndices[matchIndex] =
|
|
309
|
+
hasMatch = matchedIndices[matchIndex] = true;
|
|
226
310
|
break;
|
|
227
311
|
}
|
|
228
312
|
matchIndex++;
|
|
@@ -246,39 +330,24 @@ function areTypedArraysEqual(a, b) {
|
|
|
246
330
|
return true;
|
|
247
331
|
}
|
|
248
332
|
/**
|
|
249
|
-
* Whether the
|
|
250
|
-
*/
|
|
251
|
-
function areUrlsEqual(a, b) {
|
|
252
|
-
if (a.href === b.href) return true;
|
|
253
|
-
return a.protocol === b.protocol && a.username === b.username && a.password === b.password && a.host === b.host && a.pathname === b.pathname && a.hash === b.hash && areSearchParamsEqual(a.searchParams, b.searchParams);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Whether the search params passed are equal in value.
|
|
333
|
+
* Whether the TypedArray instances are equal in value with strict property checking.
|
|
257
334
|
*
|
|
258
335
|
* @note
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
336
|
+
* Indexed elements are also own properties, listed first and in order, with descriptors fixed by the
|
|
337
|
+
* spec. They are compared once by `areTypedArraysEqual`, so only the own properties after them
|
|
338
|
+
* (including symbols) are compared with strict property checking.
|
|
262
339
|
*/
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
return
|
|
340
|
+
function areTypedArraysEqualStrict(a, b, state) {
|
|
341
|
+
if (!areTypedArraysEqual(a, b)) return false;
|
|
342
|
+
const properties = getStrictProperties(a);
|
|
343
|
+
return getStrictProperties(b).length === properties.length && areStrictPropertiesEqual(a, b, state, properties, a.length);
|
|
267
344
|
}
|
|
268
345
|
/**
|
|
269
|
-
*
|
|
270
|
-
* regardless of the order they appear in.
|
|
271
|
-
*
|
|
272
|
-
* @note
|
|
273
|
-
* The serializer percent-encodes `&` and `=` wherever they appear inside a name or a value, so
|
|
274
|
-
* splitting on `&` recovers exactly the pairs and nothing else.
|
|
346
|
+
* Whether the URL instances are equal in value.
|
|
275
347
|
*/
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
function isPropertyEqual(a, b, state, property) {
|
|
280
|
-
if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) return true;
|
|
281
|
-
return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
|
|
348
|
+
function areUrlsEqual(a, b) {
|
|
349
|
+
if (a.href === b.href) return true;
|
|
350
|
+
return a.protocol === b.protocol && a.username === b.username && a.password === b.password && a.host === b.host && a.pathname === b.pathname && a.hash === b.hash && areSearchParamsEqual(a.searchParams, b.searchParams);
|
|
282
351
|
}
|
|
283
352
|
var { toString } = Object.prototype;
|
|
284
353
|
/**
|
|
@@ -347,8 +416,8 @@ function createEqualityComparatorConfig({ circular, createCustomConfig, strict,
|
|
|
347
416
|
areArrayBuffersEqual,
|
|
348
417
|
areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
|
|
349
418
|
areDataViewsEqual,
|
|
350
|
-
areDatesEqual,
|
|
351
|
-
areErrorsEqual: strict ?
|
|
419
|
+
areDatesEqual: strict ? combineComparators(areDatesEqual, areObjectsEqualStrict) : areDatesEqual,
|
|
420
|
+
areErrorsEqual: strict ? areErrorsEqualStrict : areErrorsEqual,
|
|
352
421
|
areFunctionsEqual: strictEqual,
|
|
353
422
|
areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
|
|
354
423
|
areNumbersEqual: sameValueEqual,
|
|
@@ -356,7 +425,7 @@ function createEqualityComparatorConfig({ circular, createCustomConfig, strict,
|
|
|
356
425
|
arePrimitiveWrappersEqual,
|
|
357
426
|
areRegExpsEqual,
|
|
358
427
|
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
|
|
359
|
-
areTypedArraysEqual: strict ?
|
|
428
|
+
areTypedArraysEqual: strict ? areTypedArraysEqualStrict : areTypedArraysEqual,
|
|
360
429
|
areUrlsEqual,
|
|
361
430
|
getUnsupportedCustomComparator: void 0,
|
|
362
431
|
strictNullPrototypeComparison
|
|
@@ -364,16 +433,20 @@ function createEqualityComparatorConfig({ circular, createCustomConfig, strict,
|
|
|
364
433
|
if (createCustomConfig) config = Object.assign({}, config, createCustomConfig(config));
|
|
365
434
|
if (circular) {
|
|
366
435
|
const areArraysEqual = createIsCircular(config.areArraysEqual);
|
|
436
|
+
const areDatesEqual = strict ? createIsCircular(config.areDatesEqual) : config.areDatesEqual;
|
|
367
437
|
const areErrorsEqual = createIsCircular(config.areErrorsEqual);
|
|
368
438
|
const areMapsEqual = createIsCircular(config.areMapsEqual);
|
|
369
439
|
const areObjectsEqual = createIsCircular(config.areObjectsEqual);
|
|
370
440
|
const areSetsEqual = createIsCircular(config.areSetsEqual);
|
|
441
|
+
const areTypedArraysEqual = strict ? createIsCircular(config.areTypedArraysEqual) : config.areTypedArraysEqual;
|
|
371
442
|
config = Object.assign({}, config, {
|
|
372
443
|
areArraysEqual,
|
|
444
|
+
areDatesEqual,
|
|
373
445
|
areErrorsEqual,
|
|
374
446
|
areMapsEqual,
|
|
375
447
|
areObjectsEqual,
|
|
376
|
-
areSetsEqual
|
|
448
|
+
areSetsEqual,
|
|
449
|
+
areTypedArraysEqual
|
|
377
450
|
});
|
|
378
451
|
}
|
|
379
452
|
return config;
|
|
@@ -465,10 +538,7 @@ createCustomEqual({
|
|
|
465
538
|
circular: true,
|
|
466
539
|
strict: true
|
|
467
540
|
});
|
|
468
|
-
|
|
469
|
-
* Whether the items passed are shallowly-equal in value.
|
|
470
|
-
*/
|
|
471
|
-
var shallowEqual = createCustomEqual({ createInternalComparator: () => sameValueEqual });
|
|
541
|
+
createCustomEqual({ createInternalComparator: () => sameValueEqual });
|
|
472
542
|
createCustomEqual({
|
|
473
543
|
strict: true,
|
|
474
544
|
createInternalComparator: () => sameValueEqual
|
|
@@ -501,5 +571,4 @@ function createCustomEqual(options = {}) {
|
|
|
501
571
|
strict
|
|
502
572
|
});
|
|
503
573
|
}
|
|
504
|
-
|
|
505
|
-
export { shallowEqual as n, deepEqual as t };
|
|
574
|
+
export { deepEqual as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
1
|
+
import { n as __exportAll } from "../rolldown-runtime.mjs";
|
|
2
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/util.js
|
|
3
3
|
function resolveUrl(url, baseUrl) {
|
|
4
4
|
if (url.match(/^[a-z]+:\/\//i)) return url;
|
|
5
5
|
if (url.match(/^\/\//)) return window.location.protocol + url;
|
|
@@ -127,8 +127,7 @@ var isInstanceOfElement = (node, instance) => {
|
|
|
127
127
|
if (nodePrototype === null) return false;
|
|
128
128
|
return nodePrototype.constructor.name === instance.name || isInstanceOfElement(nodePrototype, instance);
|
|
129
129
|
};
|
|
130
|
-
|
|
131
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/clone-pseudos.js
|
|
130
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/clone-pseudos.js
|
|
132
131
|
function formatCSSText(style) {
|
|
133
132
|
const content = style.getPropertyValue("content");
|
|
134
133
|
return `${style.cssText} content: '${content.replace(/'|"/g, "")}';`;
|
|
@@ -161,8 +160,7 @@ function clonePseudoElements(nativeNode, clonedNode) {
|
|
|
161
160
|
clonePseudoElement(nativeNode, clonedNode, ":before");
|
|
162
161
|
clonePseudoElement(nativeNode, clonedNode, ":after");
|
|
163
162
|
}
|
|
164
|
-
|
|
165
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/mimes.js
|
|
163
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/mimes.js
|
|
166
164
|
var WOFF = "application/font-woff";
|
|
167
165
|
var JPEG = "image/jpeg";
|
|
168
166
|
var mimes = {
|
|
@@ -185,8 +183,7 @@ function getExtension(url) {
|
|
|
185
183
|
function getMimeType(url) {
|
|
186
184
|
return mimes[getExtension(url).toLowerCase()] || "";
|
|
187
185
|
}
|
|
188
|
-
|
|
189
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/dataurl.js
|
|
186
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/dataurl.js
|
|
190
187
|
function getContentFromDataUrl(dataURL) {
|
|
191
188
|
return dataURL.split(/,/)[1];
|
|
192
189
|
}
|
|
@@ -242,8 +239,7 @@ async function resourceToDataURL(resourceUrl, contentType, options) {
|
|
|
242
239
|
cache[cacheKey] = dataURL;
|
|
243
240
|
return dataURL;
|
|
244
241
|
}
|
|
245
|
-
|
|
246
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/clone-node.js
|
|
242
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/clone-node.js
|
|
247
243
|
async function cloneCanvasElement(canvas) {
|
|
248
244
|
const dataURL = canvas.toDataURL();
|
|
249
245
|
if (dataURL === "data:,") return canvas.cloneNode(false);
|
|
@@ -356,8 +352,7 @@ async function cloneNode(node, options, isRoot) {
|
|
|
356
352
|
if (!isRoot && options.filter && !options.filter(node)) return null;
|
|
357
353
|
return Promise.resolve(node).then((clonedNode) => cloneSingleNode(clonedNode, options)).then((clonedNode) => cloneChildren(node, clonedNode, options)).then((clonedNode) => decorate(node, clonedNode)).then((clonedNode) => ensureSVGSymbols(clonedNode, options));
|
|
358
354
|
}
|
|
359
|
-
|
|
360
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-resources.js
|
|
355
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-resources.js
|
|
361
356
|
var URL_REGEX = /url\((['"]?)([^'"]+?)\1\)/g;
|
|
362
357
|
var URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g;
|
|
363
358
|
var FONT_SRC_REGEX = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
@@ -401,8 +396,7 @@ async function embedResources(cssText, baseUrl, options) {
|
|
|
401
396
|
const filteredCSSText = filterPreferredFontFormat(cssText, options);
|
|
402
397
|
return parseURLs(filteredCSSText).reduce((deferred, url) => deferred.then((css) => embed(css, url, baseUrl, options)), Promise.resolve(filteredCSSText));
|
|
403
398
|
}
|
|
404
|
-
|
|
405
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-images.js
|
|
399
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-images.js
|
|
406
400
|
async function embedProp(propName, node, options) {
|
|
407
401
|
var _a;
|
|
408
402
|
const propValue = (_a = node.style) === null || _a === void 0 ? void 0 : _a.getPropertyValue(propName);
|
|
@@ -445,8 +439,7 @@ async function embedImages(clonedNode, options) {
|
|
|
445
439
|
await embedChildren(clonedNode, options);
|
|
446
440
|
}
|
|
447
441
|
}
|
|
448
|
-
|
|
449
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/apply-style.js
|
|
442
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/apply-style.js
|
|
450
443
|
function applyStyle(node, options) {
|
|
451
444
|
const { style } = node;
|
|
452
445
|
if (options.backgroundColor) style.backgroundColor = options.backgroundColor;
|
|
@@ -458,8 +451,7 @@ function applyStyle(node, options) {
|
|
|
458
451
|
});
|
|
459
452
|
return node;
|
|
460
453
|
}
|
|
461
|
-
|
|
462
|
-
//#region ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-webfonts.js
|
|
454
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/embed-webfonts.js
|
|
463
455
|
var cssFetchCache = {};
|
|
464
456
|
async function fetchCSS(url) {
|
|
465
457
|
let cache = cssFetchCache[url];
|
|
@@ -579,8 +571,11 @@ async function embedWebFonts(clonedNode, options) {
|
|
|
579
571
|
else clonedNode.appendChild(styleNode);
|
|
580
572
|
}
|
|
581
573
|
}
|
|
582
|
-
|
|
583
|
-
|
|
574
|
+
// ../../node_modules/.pnpm/html-to-image@1.11.11/node_modules/html-to-image/es/index.js
|
|
575
|
+
var es_exports = /* @__PURE__ */ __exportAll({
|
|
576
|
+
toBlob: () => toBlob,
|
|
577
|
+
toJpeg: () => toJpeg
|
|
578
|
+
});
|
|
584
579
|
async function toSvg(node, options = {}) {
|
|
585
580
|
const { width, height } = getImageSize(node, options);
|
|
586
581
|
const clonedNode = await cloneNode(node, options, true);
|
|
@@ -615,5 +610,4 @@ async function toJpeg(node, options = {}) {
|
|
|
615
610
|
async function toBlob(node, options = {}) {
|
|
616
611
|
return await canvasToBlob(await toCanvas(node, options));
|
|
617
612
|
}
|
|
618
|
-
|
|
619
|
-
export { toBlob, toJpeg };
|
|
613
|
+
export { es_exports as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../rolldown-runtime.mjs";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/atom/index.js
|
|
3
3
|
var listenerQueue = [];
|
|
4
4
|
var lqIndex = 0;
|
|
5
5
|
var batchSeen = null;
|
|
@@ -79,8 +79,7 @@ var atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
79
79
|
};
|
|
80
80
|
return $atom;
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/lifecycle/index.js
|
|
82
|
+
// ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/lifecycle/index.js
|
|
84
83
|
var MOUNT = 5;
|
|
85
84
|
var UNMOUNT = 6;
|
|
86
85
|
var REVERT_MUTATION = 10;
|
|
@@ -139,8 +138,7 @@ var onMount = ($store, initialize) => {
|
|
|
139
138
|
};
|
|
140
139
|
});
|
|
141
140
|
};
|
|
142
|
-
|
|
143
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/deep-map/path.js
|
|
141
|
+
// ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/deep-map/path.js
|
|
144
142
|
function getPath(obj, path) {
|
|
145
143
|
let allKeys = getAllKeysFromPath(path);
|
|
146
144
|
let res = obj;
|
|
@@ -161,8 +159,7 @@ function getKeyAndIndicesFromKey(key) {
|
|
|
161
159
|
}
|
|
162
160
|
return [key];
|
|
163
161
|
}
|
|
164
|
-
|
|
165
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/listen-keys/index.js
|
|
162
|
+
// ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/listen-keys/index.js
|
|
166
163
|
function listenKeys($store, keys, listener) {
|
|
167
164
|
let keysSet = new Set(keys);
|
|
168
165
|
return $store.listen((value, oldValue, changed) => {
|
|
@@ -170,5 +167,4 @@ function listenKeys($store, keys, listener) {
|
|
|
170
167
|
if (changed === void 0 ? keys.some((key) => oldValue === void 0 || ($store.eqKey ? !$store.eqKey(oldValue[key], value[key], key) : pathChanged(key))) : keysSet.has(changed) || typeof changed === "string" && (keysSet.has(changed.split(/\.|\[/)[0]) || !$store.eqKey && oldValue !== void 0 && keys.some(pathChanged))) listener(value, oldValue, changed);
|
|
171
168
|
});
|
|
172
169
|
}
|
|
173
|
-
//#endregion
|
|
174
170
|
export { nanostoresGlobal as i, onMount as n, atom as r, listenKeys as t };
|