likec4 1.59.0 → 1.59.2

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.
@@ -1585,6 +1585,7 @@ declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
1585
1585
  type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAncestors | ViewRuleAutoLayout;
1586
1586
  declare const DeploymentViewRule = "DeploymentViewRule";
1587
1587
  type DynamicViewDisplayVariantValue = 'diagram' | 'sequence';
1588
+ type DynamicViewFlowKeyword = 'alt' | 'break' | 'catch' | 'else' | 'finally' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'try' | 'when';
1588
1589
  type DynamicViewProperty = DynamicViewDisplayVariantProperty | ViewProperty;
1589
1590
  declare const DynamicViewProperty = "DynamicViewProperty";
1590
1591
  type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
@@ -1610,7 +1611,7 @@ type FqnReferenceable = Element | ExtendDeployment | ExtendElement | Referenceab
1610
1611
  declare const FqnReferenceable = "FqnReferenceable";
1611
1612
  type IconId = string;
1612
1613
  type IconPositionValue = 'bottom' | 'left' | 'right' | 'top';
1613
- type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | 'relationship' | ArrowType | DynamicViewDisplayVariantValue | ElementShape | IconPositionValue | LineOptions | Participant | RankValue | SizeValue | ThemeColor | string;
1614
+ type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | 'relationship' | ArrowType | DynamicViewDisplayVariantValue | DynamicViewFlowKeyword | ElementShape | IconPositionValue | LineOptions | Participant | RankValue | SizeValue | ThemeColor | string;
1614
1615
  type LikeC4View = DeploymentView | DynamicView | ElementView;
1615
1616
  declare const LikeC4View = "LikeC4View";
1616
1617
  type LineOptions = 'dashed' | 'dotted' | 'solid';
@@ -1648,6 +1649,7 @@ type StringProperty = ElementStringProperty | MetadataAttribute | NotationProper
1648
1649
  declare const StringProperty = "StringProperty";
1649
1650
  type StyleProperty = BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
1650
1651
  declare const StyleProperty = "StyleProperty";
1652
+ type SubflowKind = 'break' | 'else' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'when';
1651
1653
  type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
1652
1654
  type TryStep = CatchBlock | FinallyBlock | TryBlock;
1653
1655
  declare const TryStep = "TryStep";
@@ -2699,7 +2701,7 @@ declare const StepSeries = "StepSeries";
2699
2701
  interface SubflowStep extends StepsBlock {
2700
2702
  readonly $container: AltSteps | DynamicViewBody | StepsBlock;
2701
2703
  readonly $type: 'SubflowStep';
2702
- kind: 'break' | 'else' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'when';
2704
+ kind: SubflowKind;
2703
2705
  title?: string;
2704
2706
  }
2705
2707
  declare const SubflowStep = "SubflowStep";
@@ -3928,6 +3930,7 @@ declare const DocumentParserFromMixins: {
3928
3930
  parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId$1, "source", {
3929
3931
  requireExactProps: true;
3930
3932
  }>>;
3933
+ parseDynamicStepEndpoint(node: ElementRef, endpoint: "source" | "target"): ProjectId$1;
3931
3934
  parseSubflowStep(node: SubflowStep): ProjectId$1 | ProjectId$1 | ProjectId$1 | ProjectId$1;
3932
3935
  parseTryStep(node: TryStep): ProjectId$1;
3933
3936
  parseAltSteps(node: AltSteps): ProjectId$1;
@@ -4037,6 +4040,7 @@ declare const DocumentParserFromMixins: {
4037
4040
  parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId$1, "source", {
4038
4041
  requireExactProps: true;
4039
4042
  }>>;
4043
+ parseDynamicStepEndpoint(node: ElementRef, endpoint: "source" | "target"): ProjectId$1;
4040
4044
  parseSubflowStep(node: SubflowStep): ProjectId$1 | ProjectId$1 | ProjectId$1 | ProjectId$1;
4041
4045
  parseTryStep(node: TryStep): ProjectId$1;
4042
4046
  parseAltSteps(node: AltSteps): ProjectId$1;
@@ -1 +1 @@
1
- import"../rolldown-runtime.mjs";String.fromCharCode;const e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\+/g,a=/%5e/gi,o=/%60/gi,s=/%7c/gi,c=/%20/gi;function encode(e){return encodeURI(``+e).replace(s,`|`)}function encodeQueryValue(r){return encode(typeof r==`string`?r:JSON.stringify(r)).replace(i,`%2B`).replace(c,`+`).replace(e,`%23`).replace(t,`%26`).replace(o,"`").replace(a,`^`).replace(n,`%2F`)}function encodeQueryKey(e){return encodeQueryValue(e).replace(r,`%3D`)}function decode(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function decodeQueryKey(e){return decode(e.replace(i,` `))}function decodeQueryValue(e){return decode(e.replace(i,` `))}function parseQuery(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=decodeQueryKey(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=decodeQueryValue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function encodeQueryItem(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${encodeQueryKey(e)}=${encodeQueryValue(t)}`).join(`&`):`${encodeQueryKey(e)}=${encodeQueryValue(t)}`:encodeQueryKey(e)}function stringifyQuery(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>encodeQueryItem(t,e[t])).filter(Boolean).join(`&`)}const l=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,u=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,d=/^([/\\]\s*){2,}[^/\\]/,f=/\/$|\/\?|\/#/,p=/^\.?\//;function isRelative(e){return[`./`,`../`].some(t=>e.startsWith(t))}function hasProtocol(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?l.test(e):u.test(e)||(t.acceptRelative?d.test(e):!1)}function hasTrailingSlash(e=``,t){return t?f.test(e):e.endsWith(`/`)}function withoutTrailingSlash(e=``,t){if(!t)return(hasTrailingSlash(e)?e.slice(0,-1):e)||`/`;if(!hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function withTrailingSlash(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function hasLeadingSlash(e=``){return e.startsWith(`/`)}function withoutLeadingSlash(e=``){return(hasLeadingSlash(e)?e.slice(1):e)||`/`}function withLeadingSlash(e=``){return hasLeadingSlash(e)?e:`/`+e}function cleanDoubleSlashes(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function withoutBase(e,t){if(isEmptyURL(t))return e;let n=withoutTrailingSlash(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function withQuery(e,t){let n=parseURL(e);return n.search=stringifyQuery({...parseQuery(n.search),...t}),stringifyParsedURL(n)}function isEmptyURL(e){return!e||e===`/`}function isNonEmptyURL(e){return e&&e!==`/`}function joinURL(e,...t){let n=e||``;for(let e of t.filter(e=>isNonEmptyURL(e)))if(n){let t=e.replace(p,``);n=withTrailingSlash(n)+t}else n=e;return n}function joinRelativeURL(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&hasProtocol(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}function withoutProtocol(e){return withProtocol(e,``)}function withProtocol(e,t){let n=e.match(u);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}const m=Symbol.for(`ufo:protocolRelative`);function parseURL(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!hasProtocol(e,{acceptRelative:!0}))return t?parseURL(t+e):parsePath(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=parsePath(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[m]:!r}}function parsePath(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function stringifyParsedURL(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[m]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{joinRelativeURL as a,withQuery as c,withoutLeadingSlash as d,withoutProtocol as f,isRelative as i,withTrailingSlash as l,hasLeadingSlash as n,joinURL as o,withoutTrailingSlash as p,hasProtocol as r,withLeadingSlash as s,cleanDoubleSlashes as t,withoutBase as u};
1
+ import"../rolldown-runtime.mjs";String.fromCharCode;const e=/#/g,t=/&/g,n=/\//g,r=/=/g,i=/\+/g,a=/%5e/gi,o=/%60/gi,s=/%7c/gi,c=/%20/gi;function encode(e){return encodeURI(``+e).replace(s,`|`)}function encodeQueryValue(r){return encode(typeof r==`string`?r:JSON.stringify(r)).replace(i,`%2B`).replace(c,`+`).replace(e,`%23`).replace(t,`%26`).replace(o,"`").replace(a,`^`).replace(n,`%2F`)}function encodeQueryKey(e){return encodeQueryValue(e).replace(r,`%3D`)}function decode(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function decodeQueryKey(e){return decode(e.replace(i,` `))}function decodeQueryValue(e){return decode(e.replace(i,` `))}function parseQuery(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=decodeQueryKey(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=decodeQueryValue(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function encodeQueryItem(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${encodeQueryKey(e)}=${encodeQueryValue(t)}`).join(`&`):`${encodeQueryKey(e)}=${encodeQueryValue(t)}`:encodeQueryKey(e)}function stringifyQuery(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>encodeQueryItem(t,e[t])).filter(Boolean).join(`&`)}const l=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,u=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,d=/^([/\\]\s*){2,}[^/\\]/,f=/\/$|\/\?|\/#/,p=/^\.?\//;function isRelative(e){return[`./`,`../`].some(t=>e.startsWith(t))}function hasProtocol(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?l.test(e):u.test(e)||(t.acceptRelative?d.test(e):!1)}function hasTrailingSlash(e=``,t){return t?f.test(e):e.endsWith(`/`)}function withoutTrailingSlash(e=``,t){if(!t)return(hasTrailingSlash(e)?e.slice(0,-1):e)||`/`;if(!hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function withTrailingSlash(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(hasTrailingSlash(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function hasLeadingSlash(e=``){return e.startsWith(`/`)}function withoutLeadingSlash(e=``){return(hasLeadingSlash(e)?e.slice(1):e)||`/`}function withLeadingSlash(e=``){return hasLeadingSlash(e)?e:`/`+e}function cleanDoubleSlashes(e=``){return e.split(`://`).map(e=>e.replace(/\/{2,}/g,`/`)).join(`://`)}function withoutBase(e,t){if(isEmptyURL(t))return e;let n=withoutTrailingSlash(t);if(!e.startsWith(n))return e;let r=e[n.length];return r&&r!==`/`&&r!==`?`?e:`/`+e.slice(n.length).replace(/^\/+/,``)}function withQuery(e,t){let n=parseURL(e);return n.search=stringifyQuery({...parseQuery(n.search),...t}),stringifyParsedURL(n)}function isEmptyURL(e){return!e||e===`/`}function isNonEmptyURL(e){return e&&e!==`/`}function joinURL(e,...t){let n=e||``;for(let e of t.filter(e=>isNonEmptyURL(e)))if(n){let t=e.replace(p,``);n=withTrailingSlash(n)+t}else n=e;return n}function joinRelativeURL(...e){let t=/\/(?!\/)/,n=e.filter(Boolean),r=[],i=0;for(let e of n)if(!(!e||e===`/`)){for(let[n,a]of e.split(t).entries())if(!(!a||a===`.`)){if(a===`..`){if(r.length===1&&hasProtocol(r[0]))continue;r.pop(),i--;continue}if(n===1&&r[r.length-1]?.endsWith(`:/`)){r[r.length-1]+=`/`+a;continue}r.push(a),i++}}let a=r.join(`/`);return i>=0?n[0]?.startsWith(`/`)&&!a.startsWith(`/`)?a=`/`+a:n[0]?.startsWith(`./`)&&!a.startsWith(`./`)&&(a=`./`+a):a=`../`.repeat(-1*i)+a,n[n.length-1]?.endsWith(`/`)&&!a.endsWith(`/`)&&(a+=`/`),a}const m=Symbol.for(`ufo:protocolRelative`);function parseURL(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!hasProtocol(e,{acceptRelative:!0}))return t?parseURL(t+e):parsePath(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=parsePath(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[m]:!r}}function parsePath(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function stringifyParsedURL(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[m]?(e.protocol||``)+`//`:``)+i+a+t+n+r}export{joinRelativeURL as a,withQuery as c,withoutLeadingSlash as d,withoutTrailingSlash as f,isRelative as i,withTrailingSlash as l,hasLeadingSlash as n,joinURL as o,hasProtocol as r,withLeadingSlash as s,cleanDoubleSlashes as t,withoutBase as u};