likec4 1.59.3 → 1.60.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/__app__/codegen/react.mjs +6 -6
- package/__app__/codegen/webcomponent.mjs +147 -69
- package/__app__/src/aichat/index.mjs +10 -5
- package/__app__/src/chunks/AIChat.mjs +1134 -693
- package/__app__/src/chunks/LikeC4Styles.mjs +4101 -1737
- package/__app__/src/chunks/ProjectsOverview.mjs +624 -334
- package/__app__/src/chunks/es.mjs +515 -335
- package/__app__/src/chunks/hooks.mjs +578 -366
- package/__app__/src/chunks/libs/@floating-ui.mjs +2720 -1966
- package/__app__/src/chunks/libs/@mantine.mjs +14067 -9487
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +2266 -1146
- package/__app__/src/chunks/libs/@tanstack.mjs +3152 -1932
- package/__app__/src/chunks/libs/@xstate/react.mjs +2924 -1468
- package/__app__/src/chunks/libs/@xyflow/react.mjs +6627 -4067
- package/__app__/src/chunks/libs/bezier-js.mjs +1312 -726
- package/__app__/src/chunks/libs/d3.mjs +3218 -1509
- package/__app__/src/chunks/libs/fast-equals.mjs +437 -201
- package/__app__/src/chunks/libs/framer.mjs +9251 -3846
- package/__app__/src/chunks/libs/nanostores.mjs +174 -0
- package/__app__/src/chunks/libs/zod.mjs +4591 -2363
- package/__app__/src/chunks/rolldown-runtime.mjs +39 -23
- package/__app__/src/chunks/styled-system.mjs +3538 -756
- package/__app__/src/fonts.css +112 -1
- package/__app__/src/main.mjs +44398 -24039
- package/__app__/src/style.css +18488 -1
- package/config/schema.json +136 -97
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +506 -338
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +16 -14
- package/dist/chunks/generate-likec4.mjs +5 -0
- package/dist/chunks/index.d.mts +246 -180
- package/dist/chunks/index2.d.mts +2882 -1977
- package/dist/chunks/libs/@chevrotain/gast.mjs +27 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +81 -9
- package/dist/chunks/libs/@chevrotain/types.d.mts +111 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +87 -35
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/json5.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +9903 -5297
- package/dist/chunks/libs/langium.mjs +16 -24
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/node.mjs +60 -60
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +55 -52
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +208 -1300
- package/dist/config/index.d.mts +2 -2
- package/dist/generators/likec4.d.mts +6578 -0
- package/dist/generators/likec4.mjs +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/model/index.d.mts +8 -5
- package/dist/vite-plugin/index.d.mts +6 -3
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +9 -0
- package/dist/vite-plugin/internal/index.d.mts +16 -15
- package/dist/vite-plugin/internal/index.mjs +144 -46
- package/generators/likec4/package.json +4 -0
- package/package.json +117 -110
- package/react/index.d.mts +8500 -5399
- package/react/index.mjs +534 -58617
- package/react/rolldown-runtime-DnkiqaRY.js +1 -0
- package/skills/likec4-dsl/SKILL.md +428 -0
- package/skills/likec4-dsl/evals/evals-public.json +202 -0
- package/skills/likec4-dsl/evals/grading-spec.json +589 -0
- package/skills/likec4-dsl/references/bridge-leanix-drawio.md +42 -0
- package/skills/likec4-dsl/references/cli.md +139 -0
- package/skills/likec4-dsl/references/configuration.md +266 -0
- package/skills/likec4-dsl/references/deployment.md +160 -0
- package/skills/likec4-dsl/references/dynamic-views.md +455 -0
- package/skills/likec4-dsl/references/examples.md +370 -0
- package/skills/likec4-dsl/references/identifier-validity.md +90 -0
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +179 -0
- package/skills/likec4-dsl/references/model.md +151 -0
- package/skills/likec4-dsl/references/predicates.md +123 -0
- package/skills/likec4-dsl/references/relationships-bidirectional.md +176 -0
- package/skills/likec4-dsl/references/specification.md +75 -0
- package/skills/likec4-dsl/references/style-tokens-colors.md +150 -0
- package/skills/likec4-dsl/references/troubleshooting.md +96 -0
- package/skills/likec4-dsl/references/views.md +329 -0
- package/vite-plugin-modules.d.ts +4 -2
- package/dist/chunks/libs/picomatch.mjs +0 -1
- package/dist/chunks/libs/zod.d.mts +0 -2140
- package/dist/chunks/libs/zod.mjs +0 -65
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"../chunks/rolldown-runtime.mjs";import{A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,R as _,S as v,T as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,a as D,d as O,f as k,g as A,h as j,i as M,j as N,k as P,l as F,m as I,n as L,o as R,p as z,q as B,r as V,s as H,t as U,u as W,w as G,x as K,y as q,z as J}from"../chunks/generate-likec4.mjs";var Y=/* @__PURE__ */ e({base:()=>v,body:()=>r,deployment:()=>I,deploymentView:()=>D,deployments:()=>j,dynamicView:()=>R,eachOnFresh:()=>G,elementView:()=>H,eq:()=>y,expr:()=>E,expression:()=>A,foreach:()=>a,foreachNewLine:()=>i,guard:()=>h,indent:()=>P,inlineText:()=>t,join:()=>N,lazy:()=>p,likec4data:()=>M,lines:()=>m,markdown:()=>g,markdownOrString:()=>o,materialize:()=>l,merge:()=>f,model:()=>k,models:()=>z,newline:()=>_,noop:()=>J,print:()=>n,printProperty:()=>x,property:()=>c,props:()=>q,select:()=>b,separateComma:()=>S,separateNewLine:()=>s,separateWith:()=>d,space:()=>B,spaceBetween:()=>u,specification:()=>W,specifications:()=>O,text:()=>w,views:()=>F,when:()=>C,withctx:()=>T});export{U as generate,P as indent,l as materialize,Y as ops,L as print,V as printWithTabIndent,K as schemas,T as withctx};
|
package/dist/index.d.mts
CHANGED
|
@@ -38,8 +38,8 @@ type LikeC4Options = {
|
|
|
38
38
|
*/
|
|
39
39
|
logLevel?: 'trace' | 'debug' | 'info' | 'warning' | 'error' | undefined;
|
|
40
40
|
};
|
|
41
|
-
interface LikeC4 extends LikeC4$1 {}
|
|
42
|
-
declare namespace LikeC4 {
|
|
41
|
+
export interface LikeC4 extends LikeC4$1 {}
|
|
42
|
+
export declare namespace LikeC4 {
|
|
43
43
|
function fromSource(likec4SourceCode: string, _opts?: LikeC4Options): Promise<LikeC4>;
|
|
44
44
|
/**
|
|
45
45
|
* Initializes a LikeC4 instance from the specified workspace path.
|
|
@@ -48,4 +48,4 @@ declare namespace LikeC4 {
|
|
|
48
48
|
function fromWorkspace(path?: string, _opts?: LikeC4Options): Promise<LikeC4>;
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
|
-
export {
|
|
51
|
+
export { type LikeC4Options, type WriteDSLOptions, writeDSL };
|
package/dist/model/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { BBox, LayoutedDynamicView, NodeId, ViewId } from "@likec4/core/types";
|
|
|
4
4
|
import { Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, DeploymentElementModel, DeploymentNodeModel, DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, LikeC4DeploymentModel, LikeC4Model, LikeC4Model as LikeC4Model$1, LikeC4ViewModel, NodeModel, RelationshipModel, deploymentConnection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, isRelationModel, mergeConnections, modelConnection, sortConnectionsByBoundaryHierarchy, sortDeepestFirst } from "@likec4/core/model";
|
|
5
5
|
import { ComputedProjectEdge, ComputedProjectNode, ComputedProjectsView, LayoutedProjectEdge, LayoutedProjectNode, LayoutedProjectsView } from "@likec4/core/compute-view";
|
|
6
6
|
export type * from "@likec4/core/types";
|
|
7
|
-
//#region ../layouts/dist/sequence/
|
|
7
|
+
//#region ../layouts/dist/sequence/_types.d.mts
|
|
8
8
|
//#region src/sequence/_types.d.ts
|
|
9
9
|
interface SequenceActorStepPort {
|
|
10
10
|
id: string;
|
|
@@ -47,14 +47,17 @@ interface SequenceViewLayout {
|
|
|
47
47
|
bounds: BBox;
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../layouts/dist/sequence/sequence-view.d.mts
|
|
50
52
|
//#region src/sequence/sequence-view.d.ts
|
|
51
|
-
declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
|
|
53
|
+
export declare function calcSequenceLayout(view: LayoutedDynamicView): LayoutedDynamicView.Sequence.Layout;
|
|
54
|
+
//#endregion
|
|
52
55
|
//#endregion
|
|
53
56
|
//#region src/model/index.d.ts
|
|
54
|
-
type UnknownLayouted = types.UnknownLayouted;
|
|
57
|
+
export type UnknownLayouted = types.UnknownLayouted;
|
|
55
58
|
/**
|
|
56
59
|
* Used by vite plugin to generate `virtual:likec4/model`
|
|
57
60
|
*/
|
|
58
|
-
declare function createLikeC4Model(model: any): LikeC4Model$1<UnknownLayouted>;
|
|
61
|
+
export declare function createLikeC4Model(model: any): LikeC4Model$1<UnknownLayouted>;
|
|
59
62
|
//#endregion
|
|
60
|
-
export { type ComputedProjectEdge, type ComputedProjectNode, type ComputedProjectsView, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, type DeploymentElementModel, DeploymentNodeModel, type DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, type LayoutedProjectEdge, type LayoutedProjectNode, type LayoutedProjectsView, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, NodeModel, RelationshipModel, type SequenceViewLayout,
|
|
63
|
+
export { type ComputedProjectEdge, type ComputedProjectNode, type ComputedProjectsView, Connection, ConnectionModel, DeployedInstanceModel, DeploymentConnectionModel, type DeploymentElementModel, DeploymentNodeModel, type DeploymentRelationEndpoint, DeploymentRelationModel, EdgeModel, ElementModel, type LayoutedProjectEdge, type LayoutedProjectNode, type LayoutedProjectsView, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel, NodeModel, RelationshipModel, type SequenceViewLayout, deploymentConnection, differenceConnections, findAscendingConnections, findDeepestNestedConnection, findDescendantConnections, hasSameSource, hasSameSourceTarget, hasSameTarget, isAnyInOut, isDeployedInstanceModel, isDeploymentElementModel, isDeploymentNodeModel, isDeploymentRelationModel, isEdgeModel, isElementModel, isIncoming, isLikeC4ViewModel, isNestedConnection, isNestedElementOfDeployedInstanceModel, isNodeModel, isOutgoing, isRelationModel, mergeConnections, modelConnection, sortConnectionsByBoundaryHierarchy, sortDeepestFirst, type types };
|
|
@@ -4,7 +4,7 @@ import { i as LikeC4LanguageServices } from "../chunks/index2.mjs";
|
|
|
4
4
|
import "@likec4/core";
|
|
5
5
|
import { PluginOption } from "vite";
|
|
6
6
|
import { AnyTextAdapter } from "@tanstack/ai";
|
|
7
|
-
//#region ../vite-plugin/dist/
|
|
7
|
+
//#region ../vite-plugin/dist/virtuals/app-config.d.mts
|
|
8
8
|
//#region src/virtuals/app-config.d.ts
|
|
9
9
|
interface AppConfig {
|
|
10
10
|
/**
|
|
@@ -29,6 +29,8 @@ interface AppConfig {
|
|
|
29
29
|
theme?: 'light' | 'dark' | undefined;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../vite-plugin/dist/plugin.d.mts
|
|
32
34
|
//#region src/plugin.d.ts
|
|
33
35
|
interface AIOptions<TAdapter extends AnyTextAdapter = AnyTextAdapter> {
|
|
34
36
|
/**
|
|
@@ -138,6 +140,7 @@ type LikeC4VitePluginOptions = SharedOptions & ({
|
|
|
138
140
|
watch?: never;
|
|
139
141
|
logLevel?: never;
|
|
140
142
|
});
|
|
141
|
-
declare function LikeC4VitePlugin({ environments, appConfig, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
|
|
143
|
+
export declare function LikeC4VitePlugin({ environments, appConfig, ai: _ai, ...pluginOpts }: LikeC4VitePluginOptions): PluginOption;
|
|
144
|
+
//#endregion
|
|
142
145
|
//#endregion
|
|
143
|
-
export {
|
|
146
|
+
export type { LikeC4VitePluginOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as LikeC4VitePlugin}from"../chunks/vite-plugin.mjs";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { t as __name } from "./chunks/rolldown-runtime.mjs";
|
|
1
2
|
import { LikeC4Model } from "@likec4/core/model";
|
|
2
3
|
import { DependencyList } from "react";
|
|
3
4
|
import { LayoutedElementView, LayoutedLikeC4ModelData, LayoutedView, ProjectId, ViewChange, ViewId } from "@likec4/core/types";
|
|
4
5
|
import { AdhocViewPredicate } from "@likec4/core/compute-view";
|
|
5
6
|
//#region ../vite-plugin/dist/internal/index.d.mts
|
|
6
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
7
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/atom/index.d.ts
|
|
7
8
|
type AllKeys<T> = T extends any ? keyof T : never;
|
|
8
9
|
type Primitive = boolean | number | string;
|
|
9
10
|
type ReadonlyIfObject<Value> = Value extends undefined ? Value : Value extends ((...args: any) => any) ? Value : Value extends Primitive ? Value : Value extends object ? Readonly<Value> : Value;
|
|
@@ -141,9 +142,9 @@ type Atom<Value = any> = ReadableAtom<Value> | WritableAtom<Value>;
|
|
|
141
142
|
* @param initialValue Initial value of the store.
|
|
142
143
|
* @returns The store object with methods to subscribe.
|
|
143
144
|
*/
|
|
144
|
-
declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
|
|
145
|
+
export declare function atom<Value, StoreExt = object>(...args: undefined extends Value ? [] | [Value] : [Value]): PreinitializedWritableAtom<Value> & StoreExt;
|
|
145
146
|
//#endregion
|
|
146
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
147
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/map/index.d.ts
|
|
147
148
|
type KeyofBase = keyof any;
|
|
148
149
|
type Get<T, K extends KeyofBase> = T extends any ? K extends keyof T ? T[K] : never : never;
|
|
149
150
|
type HasIndexSignature<T> = string extends keyof T ? true : false;
|
|
@@ -248,21 +249,21 @@ interface PreinitializedMapStore<Value extends object = any> extends MapStore<Va
|
|
|
248
249
|
* @param value Initial store value.
|
|
249
250
|
* @returns The store object with methods to subscribe.
|
|
250
251
|
*/
|
|
251
|
-
declare function map<Value extends object, StoreExt extends object = object>(value: Value): PreinitializedMapStore<Value> & StoreExt;
|
|
252
|
+
export declare function map<Value extends object, StoreExt extends object = object>(value: Value): PreinitializedMapStore<Value> & StoreExt;
|
|
252
253
|
/**
|
|
253
254
|
* Create map store with no initial value, or one that may be missing.
|
|
254
255
|
*
|
|
255
256
|
* @param value Initial store value, if there is one.
|
|
256
257
|
* @returns The store object with methods to subscribe.
|
|
257
258
|
*/
|
|
258
|
-
declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Partial<Value>> & StoreExt;
|
|
259
|
+
export declare function map<Value extends object, StoreExt extends object = object>(value?: Value): PreinitializedMapStore<Partial<Value>> & StoreExt;
|
|
259
260
|
//#endregion
|
|
260
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
261
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/task/index.d.ts
|
|
261
262
|
interface Task<Value> extends Promise<Value> {
|
|
262
263
|
t: true;
|
|
263
264
|
}
|
|
264
265
|
//#endregion
|
|
265
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
266
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/computed/index.d.ts
|
|
266
267
|
type StoreValues<Stores extends readonly Gettable[]> = { -readonly [Index in keyof Stores]: StoreValue<Stores[Index]>; };
|
|
267
268
|
interface Computed {
|
|
268
269
|
/**
|
|
@@ -291,7 +292,7 @@ interface Computed {
|
|
|
291
292
|
*/
|
|
292
293
|
<Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
|
|
293
294
|
}
|
|
294
|
-
declare const computed: Computed;
|
|
295
|
+
export declare const computed: Computed;
|
|
295
296
|
interface Batched {
|
|
296
297
|
<Value, OriginStore extends Store>(stores: OriginStore, cb: (value: StoreValue<OriginStore>) => Task<Value> | Value): ReadableAtom<Value>;
|
|
297
298
|
/**
|
|
@@ -310,7 +311,7 @@ interface Batched {
|
|
|
310
311
|
*/
|
|
311
312
|
<Value, OriginStores extends readonly Store[]>(stores: readonly [...OriginStores], cb: (...values: StoreValues<OriginStores>) => Task<Value> | Value): ReadableAtom<Value>;
|
|
312
313
|
}
|
|
313
|
-
declare const batched: Batched;
|
|
314
|
+
export declare const batched: Batched;
|
|
314
315
|
//#endregion
|
|
315
316
|
//#region src/rpc/protocol.d.ts
|
|
316
317
|
interface LikeC4VitePluginRpc {
|
|
@@ -343,7 +344,7 @@ interface LikeC4VitePluginRpc {
|
|
|
343
344
|
}): Promise<LayoutedElementView>;
|
|
344
345
|
}
|
|
345
346
|
//#endregion
|
|
346
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@
|
|
347
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@2.0.1_nanostores@1.5.5_react@19.3.0/node_modules/@nanostores/react/index.d.ts
|
|
347
348
|
type StoreKeys<T> = T extends {
|
|
348
349
|
setKey: (k: infer K, v: any) => unknown;
|
|
349
350
|
} ? K : never;
|
|
@@ -389,10 +390,10 @@ interface UseStoreOptions<SomeStore> {
|
|
|
389
390
|
* @param store Store instance.
|
|
390
391
|
* @returns Store value.
|
|
391
392
|
*/
|
|
392
|
-
declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
|
|
393
|
+
export declare function useStore<SomeStore extends Store>(store: SomeStore, options?: UseStoreOptions<SomeStore>): StoreValue<SomeStore>;
|
|
393
394
|
//#endregion
|
|
394
395
|
//#region src/internal.d.ts
|
|
395
|
-
interface LikeC4VitePluginRpcOptions {
|
|
396
|
+
export interface LikeC4VitePluginRpcOptions {
|
|
396
397
|
/**
|
|
397
398
|
* Function to post raw message
|
|
398
399
|
*/
|
|
@@ -406,8 +407,8 @@ interface LikeC4VitePluginRpcOptions {
|
|
|
406
407
|
* Create a PluginRPC instance for the LikeC4 Vite plugin
|
|
407
408
|
* used by the Vite plugin in virtual modules
|
|
408
409
|
*/
|
|
409
|
-
declare function createRpc(options: LikeC4VitePluginRpcOptions): LikeC4VitePluginRpc;
|
|
410
|
-
declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData>): {
|
|
410
|
+
export declare function createRpc(options: LikeC4VitePluginRpcOptions): LikeC4VitePluginRpc;
|
|
411
|
+
export declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData>): {
|
|
411
412
|
updateModel: (data: LayoutedLikeC4ModelData) => void;
|
|
412
413
|
$likec4model: Atom<LikeC4Model.Layouted>;
|
|
413
414
|
useLikeC4Model: () => LikeC4Model.Layouted;
|
|
@@ -415,4 +416,4 @@ declare function createHooksForModel($atom: WritableAtom<LayoutedLikeC4ModelData
|
|
|
415
416
|
useLikeC4View: (viewId: string) => LayoutedView | null;
|
|
416
417
|
};
|
|
417
418
|
//#endregion
|
|
418
|
-
export {
|
|
419
|
+
export type { Atom, LikeC4VitePluginRpc, ReadableAtom, WritableAtom };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { t as __name } from "./chunks/rolldown-runtime.mjs";
|
|
1
2
|
import { LikeC4Model } from "@likec4/core/model";
|
|
2
3
|
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
3
4
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
5
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/atom/index.js
|
|
5
6
|
let listenerQueue = [];
|
|
6
7
|
let lqIndex = 0;
|
|
7
8
|
let batchSeen = null;
|
|
@@ -9,12 +10,22 @@ const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
|
9
10
|
const nanostoresGlobal = globalThis.nanostoresGlobal ||= { epoch: 0 };
|
|
10
11
|
let drainQueue = () => {
|
|
11
12
|
let thrown;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
let i;
|
|
14
|
+
while (lqIndex < listenerQueue.length) {
|
|
15
|
+
i = lqIndex;
|
|
16
|
+
lqIndex += QUEUE_ITEMS_PER_LISTENER;
|
|
17
|
+
let pendingStores = batchSeen?.get(listenerQueue[i]);
|
|
18
|
+
if (pendingStores) {
|
|
19
|
+
if (!pendingStores.has(listenerQueue[i + 1])) continue;
|
|
20
|
+
pendingStores.clear();
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
listenerQueue[i](listenerQueue[i + 1].value, listenerQueue[i + 2], listenerQueue[i + 3]);
|
|
24
|
+
} catch (e) {
|
|
25
|
+
thrown = e;
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
|
-
listenerQueue.length = 0;
|
|
28
|
+
listenerQueue.length = lqIndex = 0;
|
|
18
29
|
if (thrown) throw thrown;
|
|
19
30
|
};
|
|
20
31
|
const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
@@ -30,7 +41,8 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
30
41
|
listen(listener) {
|
|
31
42
|
$atom.lc = listeners.push(listener);
|
|
32
43
|
return () => {
|
|
33
|
-
|
|
44
|
+
batchSeen?.get(listener)?.delete($atom);
|
|
45
|
+
for (let i = lqIndex; i < listenerQueue.length;) if (listenerQueue[i] === listener && listenerQueue[i + 1] === $atom) listenerQueue.splice(i, QUEUE_ITEMS_PER_LISTENER);
|
|
34
46
|
else i += QUEUE_ITEMS_PER_LISTENER;
|
|
35
47
|
let index = listeners.indexOf(listener);
|
|
36
48
|
if (~index) {
|
|
@@ -43,8 +55,12 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
43
55
|
nanostoresGlobal.epoch++;
|
|
44
56
|
let runListenerQueue = !listenerQueue.length && !batchSeen;
|
|
45
57
|
for (let listener of listeners) {
|
|
46
|
-
if (batchSeen
|
|
47
|
-
|
|
58
|
+
if (batchSeen) {
|
|
59
|
+
let pendingStores = batchSeen.get(listener);
|
|
60
|
+
if (!pendingStores) batchSeen.set(listener, pendingStores = /* @__PURE__ */ new Set());
|
|
61
|
+
if (pendingStores.has($atom)) continue;
|
|
62
|
+
pendingStores.add($atom);
|
|
63
|
+
}
|
|
48
64
|
listenerQueue.push(listener, $atom, oldValue, batchSeen ? void 0 : changedKey);
|
|
49
65
|
}
|
|
50
66
|
if (runListenerQueue) drainQueue();
|
|
@@ -68,7 +84,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
68
84
|
};
|
|
69
85
|
|
|
70
86
|
//#endregion
|
|
71
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
87
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/lifecycle/index.js
|
|
72
88
|
const MOUNT = 5;
|
|
73
89
|
const UNMOUNT = 6;
|
|
74
90
|
const REVERT_MUTATION = 10;
|
|
@@ -85,11 +101,12 @@ let on = (object, listener, eventKey, mutateStore) => {
|
|
|
85
101
|
return () => {
|
|
86
102
|
let currentListeners = object.events[eventKey];
|
|
87
103
|
let index = currentListeners.indexOf(listener);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
104
|
+
if (~index) {
|
|
105
|
+
currentListeners.splice(index, 1);
|
|
106
|
+
if (!currentListeners.length) {
|
|
107
|
+
object.events[eventKey + REVERT_MUTATION]();
|
|
108
|
+
delete object.events[eventKey + REVERT_MUTATION];
|
|
109
|
+
}
|
|
93
110
|
}
|
|
94
111
|
};
|
|
95
112
|
};
|
|
@@ -128,7 +145,7 @@ let onMount = ($store, initialize) => {
|
|
|
128
145
|
};
|
|
129
146
|
|
|
130
147
|
//#endregion
|
|
131
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
148
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/computed/index.js
|
|
132
149
|
let computedStore = (stores, cb, batched) => {
|
|
133
150
|
if (!Array.isArray(stores)) stores = [stores];
|
|
134
151
|
let previousArgs;
|
|
@@ -137,7 +154,7 @@ let computedStore = (stores, cb, batched) => {
|
|
|
137
154
|
if (currentEpoch === nanostoresGlobal.epoch) return;
|
|
138
155
|
currentEpoch = nanostoresGlobal.epoch;
|
|
139
156
|
let args = stores.map(($store) => $store.get());
|
|
140
|
-
if (!previousArgs
|
|
157
|
+
if (!previousArgs?.every((arg, i) => stores[i].eq(arg, args[i]))) {
|
|
141
158
|
previousArgs = args;
|
|
142
159
|
let value = cb(...args);
|
|
143
160
|
if (value && value.then && value.t) value.then((asyncValue) => {
|
|
@@ -149,7 +166,7 @@ let computedStore = (stores, cb, batched) => {
|
|
|
149
166
|
}
|
|
150
167
|
}
|
|
151
168
|
};
|
|
152
|
-
let $computed = /* @__PURE__ */ atom(
|
|
169
|
+
let $computed = /* @__PURE__ */ atom();
|
|
153
170
|
let get = $computed.get;
|
|
154
171
|
$computed.get = () => {
|
|
155
172
|
set();
|
|
@@ -173,7 +190,7 @@ const computed = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores
|
|
|
173
190
|
const batched = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores, fn, true);
|
|
174
191
|
|
|
175
192
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
193
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/deep-map/path.js
|
|
177
194
|
function getPath(obj, path) {
|
|
178
195
|
let allKeys = getAllKeysFromPath(path);
|
|
179
196
|
let res = obj;
|
|
@@ -196,16 +213,17 @@ function getKeyAndIndicesFromKey(key) {
|
|
|
196
213
|
}
|
|
197
214
|
|
|
198
215
|
//#endregion
|
|
199
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
216
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/listen-keys/index.js
|
|
200
217
|
function listenKeys($store, keys, listener) {
|
|
201
218
|
let keysSet = new Set(keys);
|
|
202
219
|
return $store.listen((value, oldValue, changed) => {
|
|
203
|
-
|
|
220
|
+
let pathChanged = (key) => !Object.is(getPath(value, key), getPath(oldValue, key));
|
|
221
|
+
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);
|
|
204
222
|
});
|
|
205
223
|
}
|
|
206
224
|
|
|
207
225
|
//#endregion
|
|
208
|
-
//#region ../../node_modules/.pnpm/nanostores@1.5.
|
|
226
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.5/node_modules/nanostores/map/index.js
|
|
209
227
|
const map = /* @__NO_SIDE_EFFECTS__ */ (initial = {}) => {
|
|
210
228
|
let $map = /* @__PURE__ */ atom(initial);
|
|
211
229
|
$map.eqKey = Object.is;
|
|
@@ -227,7 +245,7 @@ const map = /* @__NO_SIDE_EFFECTS__ */ (initial = {}) => {
|
|
|
227
245
|
};
|
|
228
246
|
|
|
229
247
|
//#endregion
|
|
230
|
-
//#region ../../node_modules/.pnpm/@nanostores+react@
|
|
248
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@2.0.1_nanostores@1.5.5_react@19.3.0/node_modules/@nanostores/react/index.js
|
|
231
249
|
let emit = (snapshotRef, onChange) => (value) => {
|
|
232
250
|
if (snapshotRef.current === value) return;
|
|
233
251
|
snapshotRef.current = value;
|
|
@@ -395,7 +413,8 @@ function createBirpc($functions, options) {
|
|
|
395
413
|
}
|
|
396
414
|
if (msg.t === "q") {
|
|
397
415
|
const { m: method, a: args, o: optional } = msg;
|
|
398
|
-
let result
|
|
416
|
+
let result;
|
|
417
|
+
let error;
|
|
399
418
|
let fn = await (resolver ? resolver.call(rpc, method, $functions[method]) : $functions[method]);
|
|
400
419
|
if (optional) fn ||= () => void 0;
|
|
401
420
|
if (!fn) error = /* @__PURE__ */ new Error(`[birpc] function "${method}" not found`);
|
|
@@ -445,9 +464,10 @@ function createBirpc($functions, options) {
|
|
|
445
464
|
}
|
|
446
465
|
|
|
447
466
|
//#endregion
|
|
448
|
-
//#region ../../node_modules/.pnpm/fast-equals@6.
|
|
467
|
+
//#region ../../node_modules/.pnpm/fast-equals@6.1.1/node_modules/fast-equals/dist/es/index.mjs
|
|
449
468
|
const { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
450
|
-
const { hasOwnProperty } = Object.prototype;
|
|
469
|
+
const { hasOwnProperty, toString: toString$1 } = Object.prototype;
|
|
470
|
+
const OBJECT_TAG = "[object Object]";
|
|
451
471
|
/**
|
|
452
472
|
* Combine two comparators into a single comparators.
|
|
453
473
|
*/
|
|
@@ -488,11 +508,27 @@ function getStrictProperties(object) {
|
|
|
488
508
|
* Whether the object contains the property passed as an own property.
|
|
489
509
|
*/
|
|
490
510
|
const hasOwn = Object.hasOwn || ((object, property) => hasOwnProperty.call(object, property));
|
|
511
|
+
/**
|
|
512
|
+
* Whether a null-prototype object is being compared with a plain object. Only one side can be
|
|
513
|
+
* null-prototype when the constructors differ. The other side must be a plain object by
|
|
514
|
+
* constructor, or by tag when it comes from another realm.
|
|
515
|
+
*/
|
|
516
|
+
function isNullPrototypeComparable(a, b) {
|
|
517
|
+
const aConstructor = a.constructor;
|
|
518
|
+
const bConstructor = b.constructor;
|
|
519
|
+
if (aConstructor == null) return bConstructor === Object || toString$1.call(b) === OBJECT_TAG;
|
|
520
|
+
if (bConstructor == null) return aConstructor === Object || toString$1.call(a) === OBJECT_TAG;
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
491
523
|
const PREACT_VNODE = "__v";
|
|
492
524
|
const PREACT_OWNER = "__o";
|
|
493
525
|
const REACT_OWNER = "_owner";
|
|
494
526
|
const { getOwnPropertyDescriptor, keys } = Object;
|
|
495
527
|
/**
|
|
528
|
+
* Identify the element type of TypedArrays across realms and subclasses.
|
|
529
|
+
*/
|
|
530
|
+
const getTypedArrayTag = getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype), Symbol.toStringTag).get;
|
|
531
|
+
/**
|
|
496
532
|
* Whether the values passed are equal based on a [SameValue](https://262.ecma-international.org/7.0/#sec-samevalue) basis.
|
|
497
533
|
* Simplified, this maps to if the two values are referentially equal to one another (`a === b`) or both are `NaN`.
|
|
498
534
|
*
|
|
@@ -544,9 +580,16 @@ function areDatesEqual(a, b) {
|
|
|
544
580
|
}
|
|
545
581
|
/**
|
|
546
582
|
* Whether the errors passed are equal in value.
|
|
583
|
+
*
|
|
584
|
+
* @note
|
|
585
|
+
* `name`, `message` and `stack` are own properties but are not enumerable, so they are compared
|
|
586
|
+
* explicitly. `cause` is compared by value rather than by reference, matching how every other
|
|
587
|
+
* nested value in the comparison is treated. Own enumerable properties (which custom `Error`
|
|
588
|
+
* subclasses commonly add) are compared by composing this with the object comparator in the
|
|
589
|
+
* comparator config, so that the strict and circular variants apply to them as well.
|
|
547
590
|
*/
|
|
548
|
-
function areErrorsEqual(a, b) {
|
|
549
|
-
return a.name === b.name && a.message === b.message && a.
|
|
591
|
+
function areErrorsEqual(a, b, state) {
|
|
592
|
+
return a.name === b.name && a.message === b.message && a.stack === b.stack && state.equals(a.cause, b.cause, "cause", "cause", a, b, state);
|
|
550
593
|
}
|
|
551
594
|
/**
|
|
552
595
|
* Whether the `Map`s are equal in value.
|
|
@@ -659,6 +702,11 @@ function areSetsEqual(a, b, state) {
|
|
|
659
702
|
function areTypedArraysEqual(a, b) {
|
|
660
703
|
let index = a.length;
|
|
661
704
|
if (b.length !== index || a.byteOffset !== b.byteOffset) return false;
|
|
705
|
+
const tag = getTypedArrayTag.call(a);
|
|
706
|
+
if (tag === "Float64Array" || tag === "Float32Array" || tag === "Float16Array") {
|
|
707
|
+
while (index-- > 0) if (a[index] !== b[index] && (a[index] === a[index] || b[index] === b[index])) return false;
|
|
708
|
+
return true;
|
|
709
|
+
}
|
|
662
710
|
while (index-- > 0) if (a[index] !== b[index]) return false;
|
|
663
711
|
return true;
|
|
664
712
|
}
|
|
@@ -666,19 +714,69 @@ function areTypedArraysEqual(a, b) {
|
|
|
666
714
|
* Whether the URL instances are equal in value.
|
|
667
715
|
*/
|
|
668
716
|
function areUrlsEqual(a, b) {
|
|
669
|
-
|
|
717
|
+
if (a.href === b.href) return true;
|
|
718
|
+
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);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Whether the search params passed are equal in value.
|
|
722
|
+
*
|
|
723
|
+
* @note
|
|
724
|
+
* Order is not significant, matching how the other unordered collections in the library are
|
|
725
|
+
* compared. Repeated keys are, so this is a comparison of multisets rather than of sets:
|
|
726
|
+
* `a=1&a=2` is equal to `a=2&a=1`, but not to `a=1&a=1`.
|
|
727
|
+
*/
|
|
728
|
+
function areSearchParamsEqual(a, b) {
|
|
729
|
+
const serializedA = a.toString();
|
|
730
|
+
const serializedB = b.toString();
|
|
731
|
+
return serializedA === serializedB || sortSearchParams(serializedA) === sortSearchParams(serializedB);
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Reorder a serialized query string so that params holding the same pairs compare as equal
|
|
735
|
+
* regardless of the order they appear in.
|
|
736
|
+
*
|
|
737
|
+
* @note
|
|
738
|
+
* The serializer percent-encodes `&` and `=` wherever they appear inside a name or a value, so
|
|
739
|
+
* splitting on `&` recovers exactly the pairs and nothing else.
|
|
740
|
+
*/
|
|
741
|
+
function sortSearchParams(serialized) {
|
|
742
|
+
return serialized.split("&").sort().join("&");
|
|
670
743
|
}
|
|
671
744
|
function isPropertyEqual(a, b, state, property) {
|
|
672
745
|
if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) return true;
|
|
673
746
|
return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
|
|
674
747
|
}
|
|
675
|
-
const toString = Object.prototype
|
|
748
|
+
const { toString } = Object.prototype;
|
|
676
749
|
/**
|
|
677
750
|
* Create a comparator method based on the type-specific equality comparators passed.
|
|
678
751
|
*/
|
|
679
752
|
function createEqualityComparator(config) {
|
|
680
753
|
const supportedComparatorMap = createSupportedComparatorMap(config);
|
|
681
|
-
const { areArraysEqual, areDatesEqual, areFunctionsEqual, areMapsEqual, areNumbersEqual, areObjectsEqual, areRegExpsEqual, areSetsEqual, getUnsupportedCustomComparator } = config;
|
|
754
|
+
const { areArraysEqual, areDatesEqual, areFunctionsEqual, areMapsEqual, areNumbersEqual, areObjectsEqual, areRegExpsEqual, areSetsEqual, getUnsupportedCustomComparator, strictNullPrototypeComparison } = config;
|
|
755
|
+
/**
|
|
756
|
+
* Whether the custom objects are equal in value, based on their string tag. If not matching any tags
|
|
757
|
+
* that require a specific type of comparison, then we hard-code false because the only thing remaining
|
|
758
|
+
* is strict equality, which has already been compared. This is for a few reasons:
|
|
759
|
+
* - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only
|
|
760
|
+
* comparison that can be made.
|
|
761
|
+
* - For types that can be introspected but do not have an objective definition of what
|
|
762
|
+
* equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.
|
|
763
|
+
* In all cases, these decisions should be reevaluated based on changes to the language and
|
|
764
|
+
* common development practices.
|
|
765
|
+
*
|
|
766
|
+
* Capturing the tag is reasonably performant in modern environments like v8 and SpiderMonkey. This is
|
|
767
|
+
* kept out of the main comparator so that it stays within the engine's bytecode budget for inlining.
|
|
768
|
+
* See [#207](https://github.com/planttheidea/fast-equals/pull/207) for more details.
|
|
769
|
+
*/
|
|
770
|
+
const areTaggedObjectsEqual = getUnsupportedCustomComparator ? function areTaggedObjectsEqual(a, b, state) {
|
|
771
|
+
const tag = toString.call(a);
|
|
772
|
+
const supportedComparator = supportedComparatorMap[tag];
|
|
773
|
+
if (supportedComparator) return supportedComparator(a, b, state);
|
|
774
|
+
const unsupportedCustomComparator = getUnsupportedCustomComparator(a, b, state, tag);
|
|
775
|
+
return unsupportedCustomComparator ? unsupportedCustomComparator(a, b, state) : false;
|
|
776
|
+
} : function areTaggedObjectsEqual(a, b, state) {
|
|
777
|
+
const supportedComparator = supportedComparatorMap[toString.call(a)];
|
|
778
|
+
return supportedComparator ? supportedComparator(a, b, state) : false;
|
|
779
|
+
};
|
|
682
780
|
/**
|
|
683
781
|
* compare the value of the two objects and return true if they are equivalent in values
|
|
684
782
|
*/
|
|
@@ -693,33 +791,29 @@ function createEqualityComparator(config) {
|
|
|
693
791
|
return false;
|
|
694
792
|
}
|
|
695
793
|
const constructor = a.constructor;
|
|
696
|
-
if (constructor !== b.constructor) return false;
|
|
794
|
+
if (constructor !== b.constructor) return strictNullPrototypeComparison ? false : isNullPrototypeComparable(a, b) && areObjectsEqual(a, b, state);
|
|
697
795
|
if (constructor === Object) return areObjectsEqual(a, b, state);
|
|
698
796
|
if (constructor === Array) return areArraysEqual(a, b, state);
|
|
699
797
|
if (constructor === Date) return areDatesEqual(a, b, state);
|
|
700
798
|
if (constructor === RegExp) return areRegExpsEqual(a, b, state);
|
|
701
799
|
if (constructor === Map) return areMapsEqual(a, b, state);
|
|
702
800
|
if (constructor === Set) return areSetsEqual(a, b, state);
|
|
801
|
+
if (constructor == null) return areObjectsEqual(a, b, state);
|
|
703
802
|
if (constructor === Promise) return false;
|
|
704
803
|
if (Array.isArray(a)) return areArraysEqual(a, b, state);
|
|
705
|
-
|
|
706
|
-
const supportedComparator = supportedComparatorMap[tag];
|
|
707
|
-
if (supportedComparator) return supportedComparator(a, b, state);
|
|
708
|
-
const unsupportedCustomComparator = getUnsupportedCustomComparator && getUnsupportedCustomComparator(a, b, state, tag);
|
|
709
|
-
if (unsupportedCustomComparator) return unsupportedCustomComparator(a, b, state);
|
|
710
|
-
return false;
|
|
804
|
+
return areTaggedObjectsEqual(a, b, state);
|
|
711
805
|
};
|
|
712
806
|
}
|
|
713
807
|
/**
|
|
714
808
|
* Create the configuration object used for building comparators.
|
|
715
809
|
*/
|
|
716
|
-
function createEqualityComparatorConfig({ circular, createCustomConfig, strict }) {
|
|
810
|
+
function createEqualityComparatorConfig({ circular, createCustomConfig, strict, strictNullPrototypeComparison = true }) {
|
|
717
811
|
let config = {
|
|
718
812
|
areArrayBuffersEqual,
|
|
719
813
|
areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
|
|
720
814
|
areDataViewsEqual,
|
|
721
815
|
areDatesEqual,
|
|
722
|
-
areErrorsEqual,
|
|
816
|
+
areErrorsEqual: strict ? combineComparators(areErrorsEqual, areObjectsEqualStrict) : combineComparators(areErrorsEqual, areObjectsEqual),
|
|
723
817
|
areFunctionsEqual: strictEqual,
|
|
724
818
|
areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
|
|
725
819
|
areNumbersEqual: sameValueEqual,
|
|
@@ -729,16 +823,19 @@ function createEqualityComparatorConfig({ circular, createCustomConfig, strict }
|
|
|
729
823
|
areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
|
|
730
824
|
areTypedArraysEqual: strict ? combineComparators(areTypedArraysEqual, areObjectsEqualStrict) : areTypedArraysEqual,
|
|
731
825
|
areUrlsEqual,
|
|
732
|
-
getUnsupportedCustomComparator: void 0
|
|
826
|
+
getUnsupportedCustomComparator: void 0,
|
|
827
|
+
strictNullPrototypeComparison
|
|
733
828
|
};
|
|
734
829
|
if (createCustomConfig) config = Object.assign({}, config, createCustomConfig(config));
|
|
735
830
|
if (circular) {
|
|
736
831
|
const areArraysEqual = createIsCircular(config.areArraysEqual);
|
|
832
|
+
const areErrorsEqual = createIsCircular(config.areErrorsEqual);
|
|
737
833
|
const areMapsEqual = createIsCircular(config.areMapsEqual);
|
|
738
834
|
const areObjectsEqual = createIsCircular(config.areObjectsEqual);
|
|
739
835
|
const areSetsEqual = createIsCircular(config.areSetsEqual);
|
|
740
836
|
config = Object.assign({}, config, {
|
|
741
837
|
areArraysEqual,
|
|
838
|
+
areErrorsEqual,
|
|
742
839
|
areMapsEqual,
|
|
743
840
|
areObjectsEqual,
|
|
744
841
|
areSetsEqual
|
|
@@ -789,13 +886,13 @@ function createIsEqual({ circular, comparator, createState, equals, strict }) {
|
|
|
789
886
|
/**
|
|
790
887
|
* Create a map of `toString()` values to their respective handlers for `tag`-based lookups.
|
|
791
888
|
*/
|
|
792
|
-
function createSupportedComparatorMap({ areArrayBuffersEqual, areArraysEqual, areDataViewsEqual, areDatesEqual, areErrorsEqual, areFunctionsEqual, areMapsEqual,
|
|
889
|
+
function createSupportedComparatorMap({ areArrayBuffersEqual, areArraysEqual, areDataViewsEqual, areDatesEqual, areErrorsEqual, areFunctionsEqual, areMapsEqual, areObjectsEqual, arePrimitiveWrappersEqual, areRegExpsEqual, areSetsEqual, areTypedArraysEqual, areUrlsEqual }) {
|
|
793
890
|
return {
|
|
794
891
|
"[object Arguments]": areObjectsEqual,
|
|
795
892
|
"[object Array]": areArraysEqual,
|
|
796
893
|
"[object ArrayBuffer]": areArrayBuffersEqual,
|
|
797
894
|
"[object AsyncGeneratorFunction]": areFunctionsEqual,
|
|
798
|
-
"[object BigInt]":
|
|
895
|
+
"[object BigInt]": arePrimitiveWrappersEqual,
|
|
799
896
|
"[object BigInt64Array]": areTypedArraysEqual,
|
|
800
897
|
"[object BigUint64Array]": areTypedArraysEqual,
|
|
801
898
|
"[object Boolean]": arePrimitiveWrappersEqual,
|
|
@@ -891,7 +988,7 @@ function createCustomEqual(options = {}) {
|
|
|
891
988
|
}
|
|
892
989
|
|
|
893
990
|
//#endregion
|
|
894
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
991
|
+
//#region ../../node_modules/.pnpm/remeda@2.51.0/node_modules/remeda/dist/lazyDataLastImpl--3B10z3s.js
|
|
895
992
|
function e(e, t, n) {
|
|
896
993
|
let r = (n) => e(n, ...t);
|
|
897
994
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -901,16 +998,17 @@ function e(e, t, n) {
|
|
|
901
998
|
}
|
|
902
999
|
|
|
903
1000
|
//#endregion
|
|
904
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
1001
|
+
//#region ../../node_modules/.pnpm/remeda@2.51.0/node_modules/remeda/dist/purry.js
|
|
905
1002
|
function t$1(t, n, r) {
|
|
906
1003
|
let i = t.length - n.length;
|
|
907
1004
|
if (i === 0) return t(...n);
|
|
908
1005
|
if (i === 1) return e(t, n, r);
|
|
909
1006
|
throw Error(`Wrong number of arguments`);
|
|
910
1007
|
}
|
|
1008
|
+
__name(t$1, "t");
|
|
911
1009
|
|
|
912
1010
|
//#endregion
|
|
913
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
1011
|
+
//#region ../../node_modules/.pnpm/remeda@2.51.0/node_modules/remeda/dist/mapValues.js
|
|
914
1012
|
function t(...t) {
|
|
915
1013
|
return t$1(n, t);
|
|
916
1014
|
}
|