likec4 1.59.2 → 1.59.4
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__/src/chunks/AIChat.mjs +118 -123
- package/__app__/src/chunks/LikeC4Styles.mjs +828 -686
- package/__app__/src/chunks/ProjectsOverview.mjs +82 -82
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +164 -135
- package/__app__/src/chunks/libs/@floating-ui.mjs +649 -335
- package/__app__/src/chunks/libs/@mantine.mjs +2934 -2040
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +28 -28
- package/__app__/src/chunks/libs/@tanstack.mjs +46 -51
- package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
- package/__app__/src/chunks/libs/@xyflow/react.mjs +535 -448
- package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
- package/__app__/src/chunks/libs/d3.mjs +20 -45
- package/__app__/src/chunks/libs/fast-equals.mjs +62 -50
- package/__app__/src/chunks/libs/framer.mjs +300 -279
- package/__app__/src/chunks/libs/zod.mjs +17 -14
- package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
- package/__app__/src/chunks/styled-system.mjs +2580 -132
- package/__app__/src/main.mjs +24925 -23485
- package/__app__/src/style.css +1 -1
- package/config/schema.json +49 -0
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +739 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +7 -6
- package/dist/chunks/index.d.mts +18 -1
- package/dist/chunks/index2.d.mts +79 -26
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
- package/dist/chunks/libs/chevrotain.mjs +16 -16
- package/dist/chunks/libs/json5.mjs +3 -3
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +11 -11
- package/dist/chunks/libs/merge-error-cause.mjs +2 -2
- 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/picomatch.mjs +1 -1
- 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/zod.d.mts +1717 -17
- package/dist/chunks/libs/zod.mjs +4 -4
- package/dist/chunks/node.mjs +68 -57
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +168 -54
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +291 -165
- package/dist/config/index.d.mts +7 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +4 -4
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/internal/index.d.mts +72 -35
- package/dist/vite-plugin/internal/index.mjs +125 -44
- package/package.json +47 -47
- package/react/index.d.mts +22767 -1432
- package/react/index.mjs +38152 -32309
- package/vite-plugin-modules.d.ts +21 -1
- package/dist/chunks/dist.mjs +0 -10
- package/dist/chunks/logger.mjs +0 -1
package/vite-plugin-modules.d.ts
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
//
|
|
3
|
+
// Copyright (c) 2023-2026 Denis Davydkov
|
|
4
|
+
// Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
5
|
+
//
|
|
6
|
+
// Portions of this file have been modified by NVIDIA CORPORATION & AFFILIATES.
|
|
7
|
+
|
|
1
8
|
declare module 'likec4:projects' {
|
|
9
|
+
import type { RelationshipBrowserScope, WebappExportFormat } from 'likec4/config'
|
|
2
10
|
import type { ProjectId } from 'likec4/model'
|
|
3
11
|
type LandingPageConfig =
|
|
4
12
|
| { redirect: true }
|
|
5
13
|
| { include: string[] }
|
|
6
14
|
| { exclude: string[] }
|
|
7
|
-
|
|
15
|
+
export interface Project {
|
|
8
16
|
id: ProjectId
|
|
9
17
|
title?: string
|
|
18
|
+
path: string
|
|
10
19
|
landingPage?: LandingPageConfig
|
|
20
|
+
relationshipBrowserDefaultScope: RelationshipBrowserScope
|
|
21
|
+
exportFormats: readonly WebappExportFormat[]
|
|
11
22
|
}
|
|
12
23
|
export const isSingleProject: boolean
|
|
13
24
|
export const projects: readonly [Project, ...Project[]]
|
|
@@ -171,6 +182,15 @@ declare module 'likec4:react/*' {
|
|
|
171
182
|
export function ReactLikeC4({ viewId, ...props }: ReactLikeC4Props<Types>): JSX.Element
|
|
172
183
|
}
|
|
173
184
|
|
|
185
|
+
declare module 'likec4:webcomponents/*' {
|
|
186
|
+
/**
|
|
187
|
+
* Defines a custom element that renders views from this LikeC4 project.
|
|
188
|
+
*
|
|
189
|
+
* Calling this function repeatedly with the same name is safe.
|
|
190
|
+
*/
|
|
191
|
+
export function defineWebcomponent(name: string): CustomElementConstructor
|
|
192
|
+
}
|
|
193
|
+
|
|
174
194
|
declare module 'likec4:rpc' {
|
|
175
195
|
import type { LikeC4VitePluginRpc } from 'likec4/vite-plugin/internal'
|
|
176
196
|
|
package/dist/chunks/dist.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime.mjs";import{a as e,i as t,n as r,r as o,t as s}from"./libs/@logtape/logtape.mjs";import{n as c,t as u}from"./libs/merge-error-cause.mjs";function serializeValue(e,t,r,o){if(typeof e?.toJSON==`function`&&(e=e.toJSON()),!(typeof e==`object`&&e))return e;if(t.has(e)){if(!r)return`[Circular]`;let o=t.get(e);return`[Circular ${o===``?`*`:`*${o}`}]`}t.set(e,o);let s=Array.isArray(e)?[]:{};for(let[c,u]of Object.entries(e))s[c]=serializeValue(u,t,r,o===``?c:`${o}.${c}`);return t.delete(e),s}function safeStringify(e,{indentation:t,trace:r}={}){let o=serializeValue(e,new WeakMap,r,``);return JSON.stringify(o,void 0,t)}const parseStack=e=>e.split(`
|
|
2
|
-
`).map(e=>e.trim().replace(`file://`,``));function indent(e,t=2){e=Array.isArray(e)?e:e.split(`
|
|
3
|
-
`);let r=` `.repeat(t);return e.map(e=>`${r}${e}`).join(`
|
|
4
|
-
`)}function loggable(e){if(typeof e==`string`)return e;if(e instanceof Error){let t=u(e);if(t.stack){let e=parseStack(t.stack);return t.message+`
|
|
5
|
-
`+indent(e.slice(1))}return t.message}return safeStringify(e,{indentation:` `})}function wrapError(e,t){return c(e,t)}function getErrorFromLogRecord(e){let t=Object.entries(e.properties).flatMap(([e,t])=>{if(t instanceof Error){let e=u(t);return e.stack&&=parseStack(e.stack).join(`
|
|
6
|
-
`),[e]}return e===`error`||e===`err`?[Error(loggable(t))]:[]});return t.length===0?null:t.length===1?t[0]:AggregateError(t)}function errorFromLogRecord(e){let t=getErrorFromLogRecord(e);return t&&typeof e.rawMessage==`string`?c(t,e.rawMessage+`
|
|
7
|
-
`):t}function appendErrorToMessage(e,t=!1){let r=getErrorFromLogRecord(e.record);if(r){let o=r.message;return r.stack&&(o=o+`
|
|
8
|
-
`+indent(r.stack.split(`
|
|
9
|
-
`).slice(1))),t&&(o=`${m.red}${o}${p}`),{...e,message:e.message+`
|
|
10
|
-
`+indent(o)}}return e}const d={trace:`TRACE`,debug:`DEBUG`,info:`INFO `,warning:`WARN `,error:`ERROR`,fatal:`FATAL`};function getMessageOnlyFormatter(){return getTextFormatter({format:({message:e})=>e})}const level=e=>d[e];function getTextFormatter(e){let r=e?.format??(({timestamp:e,level:t,category:r,message:o})=>`${e} ${t} ${r} ${o}`);return t({timestamp:`time`,level,category:`.`,...e,format:e=>r(appendErrorToMessage(e))})}const p=`\x1B[0m`,m={red:`\x1B[31m`};function getAnsiColorFormatter(e){let t=e?.format??(({timestamp:e,level:t,category:r,message:o})=>`${e} ${t} ${r} ${o}`);return o({timestamp:`time`,level,categoryStyle:`bold`,categoryColor:`cyan`,category:`.`,levelColors:{trace:`black`,debug:`blue`,info:`green`,warning:`yellow`,error:`red`,fatal:`magenta`},...e,format:e=>t(appendErrorToMessage(e,!0))})}function getConsoleFormatter(e){let t=e?.messageFormatter;return t?e=>{let{properties:r}=e;return r&&Object.keys(r).length>0?[t(e),r]:[t(e)]}:e=>{let{message:t,properties:r}=e;return r&&Object.keys(r).length>0?[...t,r]:t}}function getConsoleSink(e){return r({formatter:getConsoleFormatter(),...e})}function getConsoleStderrSink(e){let t=e?.formatter??getConsoleFormatter();return e=>{let r=t(e);if(typeof r==`string`){let e=r.replace(/\r?\n$/,``);console.error(e)}else console.error(...r)}}const h=e(`likec4`);function createLogger(e){return h.getChild(e)}function configureLogger(e){try{let{sinks:t={},loggers:r,...o}=e??{},c={console:getConsoleSink(),...t};s({reset:!0,...o,sinks:c,loggers:[{category:[`logtape`,`meta`],sinks:[`console`],lowestLevel:`warning`},...e?.loggers??[{category:`likec4`,sinks:[`console`],lowestLevel:`debug`}]]})}catch(e){console.error(e)}}var g={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function i(e){return String(e)}i.open=``,i.close=``;function B(){let e=typeof process<`u`?process:void 0,t=e?.env||{},r=t.FORCE_TTY!==`false`,o=e?.argv||[];return!(`NO_COLOR`in t||o.includes(`--no-color`))&&(`FORCE_COLOR`in t||o.includes(`--color`)||e?.platform===`win32`||r&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function C({force:e}={}){let t=e||B(),a=(e,t,r,o)=>{let s=``,c=0;do s+=e.substring(c,o)+r,c=o+t.length,o=e.indexOf(t,c);while(~o);return s+e.substring(c)},l=(e,t,r=e)=>{let n=o=>{let s=String(o),c=s.indexOf(t,e.length);return~c?e+a(s,t,r,c)+t:e+s+t};return n.open=e,n.close=t,n},r={isColorSupported:t},f=e=>`\x1B[${e}m`;for(let e in g){let o=g[e];r[e]=t?l(f(o[0]),f(o[1]),o[2]):i}return r}var _=C();export{getConsoleSink as a,getAnsiColorFormatter as c,getTextFormatter as d,loggable as f,h as i,getConsoleFormatter as l,configureLogger as n,getConsoleStderrSink as o,wrapError as p,createLogger as r,errorFromLogRecord as s,_ as t,getMessageOnlyFormatter as u};
|
package/dist/chunks/logger.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime.mjs";import{i as e,t}from"./dist.mjs";const n=e.getChild(`vite`);function logGenerating(e,r){r?n.info(t.dim(`generating `)+t.magenta(`likec4:${e}/`)+t.magentaBright(r)):n.info(t.dim(`generating `)+t.magenta(`likec4:${e}`))}export{n,logGenerating as t};
|