From 01f270f25f6129b92d9cf0d4740ecd8c6b5ff306 Mon Sep 17 00:00:00 2001 From: Sergii Golyshev Date: Mon, 19 Aug 2024 13:34:06 +0300 Subject: [PATCH] CSS - Add useFontWeightAsNumbers flag --- exporters/css/config.json | 10 +++++++++- exporters/css/config.ts | 2 ++ exporters/css/dist/build.js | 2 +- exporters/css/package.json | 2 +- exporters/css/src/content/token.ts | 10 ++++++++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/exporters/css/config.json b/exporters/css/config.json index e9a7aaa..f1604c9 100644 --- a/exporters/css/config.json +++ b/exporters/css/config.json @@ -1,4 +1,5 @@ -[{ +[ + { "key": "showGeneratedFileDisclaimer", "type": "boolean", "default": true, @@ -40,6 +41,13 @@ "title": "Use References", "description": "When enabled, values will use references to other tokens where applicable" }, + { + "key": "useFontWeightAsNumbers", + "type": "boolean", + "default": false, + "title": "Use Font Weight As Numbers", + "description": "When enabled, font weight values will be resolved as numbers if possible" + }, { "key": "tokenNameStyle", "type": "enum", diff --git a/exporters/css/config.ts b/exporters/css/config.ts index db30559..8f63c2e 100644 --- a/exporters/css/config.ts +++ b/exporters/css/config.ts @@ -17,6 +17,8 @@ export type ExporterConfiguration = { showDescriptions: boolean /** When enabled, values will use references to other tokens where applicable */ useReferences: boolean + /** When enabled, font weight values will be resolved as numbers if possible */ + useFontWeightAsNumbers: boolean /** Style of exported token names */ tokenNameStyle: StringCase /** Format of the exported colors */ diff --git a/exporters/css/dist/build.js b/exporters/css/dist/build.js index 74921f4..a67eabc 100644 --- a/exporters/css/dist/build.js +++ b/exporters/css/dist/build.js @@ -1 +1 @@ -(()=>{var e={142:(e,t,o)=>{(()=>{"use strict";var e={639:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Iterators=void 0;const r=o(58);t.Iterators=class{static allTokenTypes(){return[r.TokenType.color,r.TokenType.typography,r.TokenType.dimension,r.TokenType.size,r.TokenType.space,r.TokenType.opacity,r.TokenType.fontSize,r.TokenType.lineHeight,r.TokenType.letterSpacing,r.TokenType.paragraphSpacing,r.TokenType.borderWidth,r.TokenType.radius,r.TokenType.duration,r.TokenType.zIndex,r.TokenType.shadow,r.TokenType.border,r.TokenType.gradient,r.TokenType.string,r.TokenType.productCopy,r.TokenType.fontFamily,r.TokenType.fontWeight,r.TokenType.textCase,r.TokenType.textDecoration,r.TokenType.visibility,r.TokenType.blur]}static allDimensionTokenTypes(){return[r.TokenType.dimension,r.TokenType.size,r.TokenType.space,r.TokenType.opacity,r.TokenType.fontSize,r.TokenType.lineHeight,r.TokenType.letterSpacing,r.TokenType.paragraphSpacing,r.TokenType.borderWidth,r.TokenType.radius,r.TokenType.duration,r.TokenType.zIndex]}static allStringTokenTypes(){return[r.TokenType.string,r.TokenType.productCopy,r.TokenType.fontFamily,r.TokenType.fontWeight]}static allOptionTokenTypes(){return[r.TokenType.textCase,r.TokenType.textDecoration,r.TokenType.visibility]}}},989:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorFormat=void 0,(o=t.ColorFormat||(t.ColorFormat={})).rgb="rgb",o.rgba="rgba",o.smartRgba="smartRgba",o.hex6="hex6",o.hex8="hex8",o.hashHex6="hashHex6",o.hashHex8="hashHex8",o.smartHashHex="smartHashHex",o.smartHex="smartHex",o.hsl="hsl",o.hsla="hsla",o.smartHsla="smartHsla",o.smartUIColor="smartUIColor"},545:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.StringCase=void 0,(o=t.StringCase||(t.StringCase={})).camelCase="camelCase",o.capitalCase="capitalCase",o.constantCase="constantCase",o.dotCase="dotCase",o.headerCase="headerCase",o.noCase="noCase",o.paramCase="paramCase",o.pascalCase="pascalCase",o.pathCase="pathCase",o.sentenceCase="sentenceCase",o.snakeCase="snakeCase"},617:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileHelper=void 0;const r=o(58);t.FileHelper=class{static createCopyRemoteFile({relativePath:e,fileName:t,url:o}){return{path:e,name:t,type:r.OutputFileType.copyRemoteUrl,url:o}}static createTextFile({relativePath:e,fileName:t,content:o}){return{path:e,name:t,type:r.OutputFileType.text,content:o}}static createBinaryFile({relativePath:e,fileName:t,data:o}){return{path:e,name:t,type:r.OutputFileType.binary,data:o}}}},761:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sureOptionalReference=void 0,t.sureOptionalReference=function(e,t,o=!0){if(!e||!o)return null;const r=t.get(e);if(!r)throw new Error(`Trying to retrieve unknown referenced token ${e}`);return r}},118:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkHelper=void 0,t.NetworkHelper=class{static async fetchAsText(e,t,o){return(await this.performFetch(e,t,o)).text()}static async fetchAsJSON(e,t,o){return(await this.performFetch(e,t,o)).json()}static async fetchAsData(e,t,o){return(await this.performFetch(e,t,o)).arrayBuffer()}static async performFetch(e,t,o){try{const r=await e.network.fetch(t,o);if(!r.ok)throw new Error(`Request failed with status ${r.status}, error: ${await r.text()}`);return r}catch(e){throw e}}}},771:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CSSHelper=void 0;const r=o(58),n=o(761),a=o(952);t.CSSHelper=class{static tokenToCSS(e,t,o){switch(e.tokenType){case r.TokenType.color:return this.colorTokenValueToCSS(e.value,t,o);case r.TokenType.border:return this.borderTokenValueToCSS(e.value,t,o);case r.TokenType.gradient:return this.gradientTokenValueToCSS(e.value,t,o);case r.TokenType.dimension:case r.TokenType.size:case r.TokenType.space:case r.TokenType.opacity:case r.TokenType.fontSize:case r.TokenType.lineHeight:case r.TokenType.letterSpacing:case r.TokenType.paragraphSpacing:case r.TokenType.borderWidth:case r.TokenType.radius:case r.TokenType.duration:case r.TokenType.zIndex:return this.dimensionTokenValueToCSS(e.value,t,o);case r.TokenType.shadow:return this.shadowTokenValueToCSS(e.value,t,o);case r.TokenType.fontWeight:case r.TokenType.fontFamily:case r.TokenType.productCopy:case r.TokenType.string:return this.stringTokenValueToCSS(e.value,t,o);case r.TokenType.textCase:case r.TokenType.textDecoration:case r.TokenType.visibility:return this.optionTokenValueToCSS(e.value,t,o);case r.TokenType.blur:return this.blurTokenValueToCSS(e.value,t,o);case r.TokenType.typography:return this.typographyTokenValueToCSS(e.value,t,o);default:throw new r.UnreachableCaseError(e.tokenType,"Unsupported token type for transformation to CSS:")}}static colorTokenValueToCSS(e,t,o){return a.ColorHelper.formattedColorOrVariableName(e,t,o)}static borderTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(r)return o.tokenToVariableRef(r);const a=this.dimensionTokenValueToCSS(e.width,t,o),i=this.borderStyleToCSS(e.style),l=this.colorTokenValueToCSS(e.color,t,o);return this.borderPositionToCSS(e.position),`${a} ${i} ${l}`}static gradientTokenValueToCSS(e,t,o){return e.map((e=>this.gradientLayerToCSS(e,t,o))).join(", ")}static gradientLayerToCSS(e,t,o){const i=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(i)return o.tokenToVariableRef(i);let l="";switch(e.type){case r.GradientType.linear:l="linear-gradient(0deg, ";break;case r.GradientType.radial:l="radial-gradient(circle, ";break;case r.GradientType.angular:l="conic-gradient(";break;default:l="linear-gradient(0deg, "}return`${l}${e.stops.map((e=>`${this.colorTokenValueToCSS(e.color,t,o)} ${a.ColorHelper.roundToDecimals(100*e.position,o.decimals)}%`)).join(", ")})`}static dimensionTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`${a.ColorHelper.roundToDecimals(e.measure,o.decimals)}${this.unitToCSS(e.unit)}`}static shadowTokenValueToCSS(e,t,o){return e.map((e=>this.shadowLayerToCSS(e,t,o))).join(", ")}static shadowLayerToCSS(e,t,o){const a=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return a?o.tokenToVariableRef(a):`${e.type===r.ShadowType.inner?"inset ":""}${e.x}px ${e.y}px ${e.radius}px ${e.spread}px ${this.colorTokenValueToCSS(e.color,t,o)}`}static stringTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`"${e.text}"`}static optionTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`"${e.value}"`}static blurTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`blur(${this.dimensionTokenValueToCSS(e.radius,t,o)})`}static typographyTokenValueToCSS(e,t,o){const a=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(a)return o.tokenToVariableRef(a);const i=(0,n.sureOptionalReference)(e.fontFamily.referencedTokenId,t,o.allowReferences),l=(0,n.sureOptionalReference)(e.fontWeight.referencedTokenId,t,o.allowReferences),c=(0,n.sureOptionalReference)(e.textDecoration.referencedTokenId,t,o.allowReferences),s=(0,n.sureOptionalReference)(e.textCase.referencedTokenId,t,o.allowReferences),u={fontFamily:i?o.tokenToVariableRef(i):e.fontFamily.text,fontWeight:l?o.tokenToVariableRef(l):e.fontWeight.text,textDecoration:c?o.tokenToVariableRef(c):e.textDecoration.value===r.TextDecoration.original?this.textDecorationToCSS(e.textDecoration.value):void 0,textCase:s?o.tokenToVariableRef(s):e.textCase.value===r.TextCase.original?this.textCaseToCSS(e.textCase.value):void 0,caps:e.textCase.value===r.TextCase.smallCaps,fontSize:this.dimensionTokenValueToCSS(e.fontSize,t,o),lineHeight:e.lineHeight?this.dimensionTokenValueToCSS(e.lineHeight,t,o):void 0},p=u.fontSize;return`${u.caps?"small-caps ":""}${l?u.fontWeight:`"${u.fontWeight}"`} ${u.lineHeight?`${p}/${u.lineHeight}`:p} ${i?u.fontFamily:`"${u.fontFamily}"`}`}static borderStyleToCSS(e){switch(e){case r.BorderStyle.dashed:return"dashed";case r.BorderStyle.dotted:return"dotted";case r.BorderStyle.solid:return"solid";case r.BorderStyle.groove:return"groove";default:return"solid"}}static borderPositionToCSS(e){switch(e){case r.BorderPosition.center:return"center";case r.BorderPosition.inside:return"inside";case r.BorderPosition.outside:default:return"outside"}}static unitToCSS(e){switch(e){case r.Unit.percent:return"%";case r.Unit.pixels:return"px";case r.Unit.rem:return"rem";case r.Unit.raw:return"";case r.Unit.ms:return"ms";default:return"px"}}static textCaseToCSS(e){switch(e){case r.TextCase.original:return"none";case r.TextCase.upper:return"uppercase";case r.TextCase.lower:return"lowercase";case r.TextCase.camel:case r.TextCase.smallCaps:return"capitalize"}}static textDecorationToCSS(e){switch(e){case r.TextDecoration.original:return"none";case r.TextDecoration.underline:return"underline";case r.TextDecoration.strikethrough:return"line-through"}}}},952:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorHelper=void 0;const r=o(989),n=o(761);class a{static formattedColorOrVariableName(e,t,o){let a,i,l;const c=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(c)a=o.tokenToVariableRef(c);else{const r=(0,n.sureOptionalReference)(e.color.referencedTokenId,t,o.allowReferences);r&&(i=o.tokenToVariableRef(r));const a=(0,n.sureOptionalReference)(e.opacity.referencedTokenId,t,o.allowReferences);a&&(l=o.tokenToVariableRef(a))}if(a)return a;if(!a&&!i&&!l)return this.formattedColor(e,o.colorFormat,o.decimals);switch(o.colorFormat){case r.ColorFormat.rgb:case r.ColorFormat.rgba:case r.ColorFormat.smartRgba:return this.colorToRgb(o.colorFormat,this.normalizedIntColor(e),e.opacity.measure,o.decimals,i,l);default:return this.formattedColor(e,o.colorFormat,o.decimals)}}static formattedColor(e,t,o=3){switch(t){case r.ColorFormat.hex6:case r.ColorFormat.hex8:case r.ColorFormat.hashHex6:case r.ColorFormat.hashHex8:case r.ColorFormat.smartHex:case r.ColorFormat.smartHashHex:return this.colorToHex(t,this.normalizedIntColor(e),e.opacity.measure);case r.ColorFormat.rgb:case r.ColorFormat.rgba:case r.ColorFormat.smartRgba:return this.colorToRgb(t,this.normalizedIntColor(e),e.opacity.measure,o,null,null);case r.ColorFormat.hsl:case r.ColorFormat.hsla:case r.ColorFormat.smartHsla:return this.colorToHsl(t,this.normalizedFractionalColor(e),e.opacity.measure,o);case r.ColorFormat.smartUIColor:return this.colorToUIColor(this.normalizedIntColor(e),e.opacity.measure,o)}}static colorToRgb(e,t,o,n,a,i){let l;return l=e===r.ColorFormat.rgba||e===r.ColorFormat.smartRgba&&o<1?`rgba(${a||`${t.r}, ${t.g}, ${t.b}`}, ${i||this.roundToDecimals(o,n)})`:`rgb(${a||`${t.r}, ${t.g}, ${t.b}`})`,l}static colorToHex(e,t,o){let n=`${this.pHex(t.r)}${this.pHex(t.g)}${this.pHex(t.b)}`;return(e===r.ColorFormat.hex8||e===r.ColorFormat.hashHex8||e===r.ColorFormat.smartHex&&o<1||e===r.ColorFormat.smartHashHex&&o<1)&&(n+=`${this.pHex(Math.round(255*o))}`),e!==r.ColorFormat.hashHex6&&e!==r.ColorFormat.hashHex8&&e!==r.ColorFormat.smartHashHex||(n=`#${n}`),n}static colorToHsl(e,t,o,n){const a=Math.max(t.r,t.g,t.b),i=Math.min(t.r,t.g,t.b);let l,c,s,u=(a+i)/2;if(a===i)l=c=0;else{const e=a-i;c=u>.5?e/(2-a-i):e/(a+i),a===t.r?l=(t.g-t.b)/e+(t.g{Object.defineProperty(t,"__esModule",{value:!0}),t.NamingHelper=void 0;const r=o(110),n=o(545);class a{static codeSafeVariableNameForToken(e,t,o,r){let n=[];return o&&(n=[...o.path],o.isRoot||n.push(o.name)),n.push(e.name),r&&r.length>0&&n.unshift(r),a.codeSafeVariableName(n,t)}static codeSafeVariableName(e,t){let o="string"==typeof e?e:e.join(" ");switch(o=o.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),t){case n.StringCase.camelCase:o=(0,r.camelCase)(o);break;case n.StringCase.capitalCase:o=(0,r.capitalCase)(o);break;case n.StringCase.constantCase:o=(0,r.constantCase)(o);break;case n.StringCase.dotCase:o=(0,r.dotCase)(o);break;case n.StringCase.headerCase:o=(0,r.headerCase)(o);break;case n.StringCase.noCase:o=(0,r.noCase)(o);break;case n.StringCase.paramCase:o=(0,r.paramCase)(o);break;case n.StringCase.pascalCase:o=(0,r.pascalCase)(o);break;case n.StringCase.pathCase:o=(0,r.pathCase)(o);break;case n.StringCase.sentenceCase:o=(0,r.sentenceCase)(o);break;case n.StringCase.snakeCase:o=(0,r.snakeCase)(o)}return t!==n.StringCase.snakeCase&&t!==n.StringCase.constantCase&&(o=o.replaceAll("_","")),o.match(/^[^a-zA-Z]/)&&(o="_"+o),o}static nameAsCSSVarReference(e){return`var(--${e})`}static nameAsCSSVarDeclaration(e){return`--${e}`}}t.NamingHelper=a},58:e=>{e.exports=o(907)},110:e=>{e.exports=o(576)}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,n),a.exports}var a={};(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.ColorFormat=e.StringCase=e.Iterators=e.CSSHelper=e.FileHelper=e.ColorHelper=e.NamingHelper=e.NetworkHelper=void 0;var t=n(118);Object.defineProperty(e,"NetworkHelper",{enumerable:!0,get:function(){return t.NetworkHelper}});var o=n(453);Object.defineProperty(e,"NamingHelper",{enumerable:!0,get:function(){return o.NamingHelper}});var r=n(952);Object.defineProperty(e,"ColorHelper",{enumerable:!0,get:function(){return r.ColorHelper}});var i=n(617);Object.defineProperty(e,"FileHelper",{enumerable:!0,get:function(){return i.FileHelper}});var l=n(771);Object.defineProperty(e,"CSSHelper",{enumerable:!0,get:function(){return l.CSSHelper}});var c=n(639);Object.defineProperty(e,"Iterators",{enumerable:!0,get:function(){return c.Iterators}});var s=n(545);Object.defineProperty(e,"StringCase",{enumerable:!0,get:function(){return s.StringCase}});var u=n(989);Object.defineProperty(e,"ColorFormat",{enumerable:!0,get:function(){return u.ColorFormat}})})();var i=t;for(var l in a)i[l]=a[l];a.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()},907:(e,t)=>{(()=>{"use strict";var e={275:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsImageRefType=void 0,(o=t.DocsImageRefType||(t.DocsImageRefType={})).upload="Upload",o.asset="Asset",o.figmaFrame="FigmaFrame"},2695:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsLinkRefType=void 0,(o=t.DocsLinkRefType||(t.DocsLinkRefType={})).page="Page",o.pageHeading="pageHeading",o.group="Group",o.url="url"},3476:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockShortcut=t.DocumentationLegacyPageBlockShortcutType=void 0,function(e){e.external="External",e.internal="Internal"}(o=t.DocumentationLegacyPageBlockShortcutType||(t.DocumentationLegacyPageBlockShortcutType={})),t.DocumentationLegacyPageBlockShortcut=class{constructor(e){var t;e.url?this.type=o.external:this.type=o.internal,this.title=this.shortcutTitleFromModel(e,this.type),this.description=this.shortcutDescriptionFromModel(e,this.type),this.previewUrl=this.shortcutPreviewUrlFromModel(e),this.type===o.internal&&(null===(t=e.documentationItemPreview)||void 0===t?void 0:t.valid)&&e.documentationItemId?this.internalId=e.documentationItemId:(this.internalId=null,this.type===o.external&&e.url?this.externalUrl=e.url:this.externalUrl=null)}shortcutTitleFromModel(e,t){var r,n,a,i,l;let c=null;return e.title&&e.title.trim().length>0?c=e.title:t===o.internal?c=null!==(n=null===(r=e.documentationItemPreview)||void 0===r?void 0:r.title)&&void 0!==n?n:null:t===o.external&&(c=null!==(l=null!==(i=null===(a=e.urlPreview)||void 0===a?void 0:a.title)&&void 0!==i?i:e.url)&&void 0!==l?l:null),c&&0!==c.trim().length?c:null}shortcutDescriptionFromModel(e,t){var r;let n=null;return e.description&&e.description.trim().length>0?n=e.description:t===o.external&&(n=null===(r=e.urlPreview)||void 0===r?void 0:r.description),n&&0!==n.trim().length?n:null}shortcutPreviewUrlFromModel(e){var t,o,r,n,a;return null!==(a=null!==(r=null!==(t=e.assetUrl)&&void 0!==t?t:null===(o=e.asset)||void 0===o?void 0:o.url)&&void 0!==r?r:null===(n=e.urlPreview)||void 0===n?void 0:n.thumbnailUrl)&&void 0!==a?a:null}}},4222:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Alignment=void 0,(o=t.Alignment||(t.Alignment={})).left="Left",o.center="Center",o.stretch="Stretch"},1334:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetFormat=void 0,(o=t.AssetFormat||(t.AssetFormat={})).png="png",o.pdf="pdf",o.svg="svg"},1940:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScale=void 0,(o=t.AssetScale||(t.AssetScale={})).x1="x1",o.x2="x2",o.x3="x3",o.x4="x4"},959:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScaleType=void 0,(o=t.AssetScaleType||(t.AssetScaleType={})).aspectFill="AspectFill",o.aspectFit="AspectFit"},9257:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.BlurType=void 0,(o=t.BlurType||(t.BlurType={})).layer="Layer",o.background="Background"},6675:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_BORDER_POSITIONS=t.BorderPosition=void 0,function(e){e.inside="Inside",e.center="Center",e.outside="Outside"}(o=t.BorderPosition||(t.BorderPosition={})),t.ALL_BORDER_POSITIONS=[o.inside,o.center,o.outside]},6701:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_BORDER_STYLES=t.BorderStyle=void 0,function(e){e.dashed="Dashed",e.dotted="Dotted",e.solid="Solid",e.groove="Groove"}(o=t.BorderStyle||(t.BorderStyle={})),t.ALL_BORDER_STYLES=[o.dashed,o.dotted,o.solid,o.groove]},829:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportWarningType=void 0,(o=t.ImportWarningType||(t.ImportWarningType={})).UnsupportedFill="UnsupportedFill",o.UnsupportedStroke="UnsupportedStroke",o.UnsupportedEffect="UnsupportedEffect",o.StyleNotApplied="StyleNotApplied",o.NoPublishedStyles="NoPublishedStyles",o.NoPublishedComponents="NoPublishedComponents",o.NoPublishedAssets="NoPublishedAssets",o.NoVersionFound="NoVersionFound",o.ComponentHasNoThumbnail="ComponentHasNoThumbnail",o.DuplicateImportedStyleId="DuplicateImportedStyleId",o.DuplicateImportedStylePath="DuplicateImportedStylePath",o.NoPublishedElements="NoPublishedElements"},3611:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainErrorCode=void 0,(o=t.CustomDomainErrorCode||(t.CustomDomainErrorCode={})).generalError="GeneralError",o.dnsNotConfigured="DNSNotConfigured",o.maintenance="Maintenance"},6530:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainState=void 0,(o=t.CustomDomainState||(t.CustomDomainState={})).initial="Initial",o.domainSetupInProgress="DomainSetupInProgress",o.domainSetupFailed="DomainSetupFailed",o.domainSetupsSucces="DomainSetupSuccess",o.sslSetupInProgress="SSLSetupInProgress",o.sslSetupFailed="SSLSetupFailed",o.sslSetupSuccess="SSLSetupSuccess"},4934:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorDataType=void 0,(o=t.DocsBlockBehaviorDataType||(t.DocsBlockBehaviorDataType={})).item="Item",o.token="Token",o.asset="Asset",o.component="Component"},8081:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorSelectionType=void 0,(o=t.DocsBlockBehaviorSelectionType||(t.DocsBlockBehaviorSelectionType={})).entity="Entity",o.group="Group",o.entityAndGroup="EntityAndGroup"},9534:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockImagePropertyAspectRatio=void 0,(o=t.DocsBlockImagePropertyAspectRatio||(t.DocsBlockImagePropertyAspectRatio={})).square="Square",o.landscape="Landscape",o.portrait="Portrait",o.wide="Wide"},1043:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemEntityType=void 0,(o=t.DocsBlockItemEntityType||(t.DocsBlockItemEntityType={})).token="Token",o.tokenGroup="TokenGroup",o.asset="Asset",o.assetGroup="AssetGroup",o.component="Component",o.componentGroup="ComponentGroup"},3947:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyOptionRenderingStyle=void 0,(o=t.DocsBlockItemPropertyOptionRenderingStyle||(t.DocsBlockItemPropertyOptionRenderingStyle={})).segmentedControl="SegmentedControl",o.toggleButton="ToggleButton",o.select="Select",o.checkbox="Checkbox"},4742:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyRichTextStyle=void 0,(o=t.DocsBlockItemPropertyRichTextStyle||(t.DocsBlockItemPropertyRichTextStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.quote="Quote",o.callout="Callout",o.ol="OL",o.ul="UL"},7825:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyTextStyle=void 0,(o=t.DocsBlockItemPropertyTextStyle||(t.DocsBlockItemPropertyTextStyle={})).small="Small",o.regular="Regular",o.bold="Bold"},6751:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyType=void 0,(o=t.DocsBlockItemPropertyType||(t.DocsBlockItemPropertyType={})).richText="RichText",o.text="Text",o.boolean="Boolean",o.number="Number",o.singleSelect="SingleSelect",o.multiSelect="MultiSelect",o.image="Image",o.token="Token",o.tokenType="TokenType",o.tokenProperty="TokenProperty",o.component="Component",o.componentProperty="ComponentProperty",o.asset="Asset",o.assetProperty="AssetProperty",o.page="Page",o.pageProperty="PageProperty",o.embedURL="EmbedURL",o.embedFrame="EmbedFrame",o.markdown="Markdown",o.code="Code",o.codeSandbox="CodeSandbox",o.table="Table",o.divider="Divider",o.storybook="Storybook"},6777:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutType=void 0,(o=t.DocsBlockItemVariantLayoutType||(t.DocsBlockItemVariantLayoutType={})).column="Column",o.row="Row"},9279:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutWidth=void 0,(o=t.DocsBlockItemVariantLayoutWidth||(t.DocsBlockItemVariantLayoutWidth={})).c1="1",o.c2="2",o.c3="3",o.c4="4",o.c5="5",o.c6="6",o.c7="7",o.c8="8",o.c9="9",o.c10="10",o.c11="11",o.c12="12"},5271:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionRenderingStyle=void 0,(o=t.DocsBlockOptionRenderingStyle||(t.DocsBlockOptionRenderingStyle={})).segmentedControl="SegmentedControl",o.toggleButton="ToggleButton",o.select="Select",o.checkbox="Checkbox"},3274:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockRichTextPropertyStyle=void 0,(o=t.DocsBlockRichTextPropertyStyle||(t.DocsBlockRichTextPropertyStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.quote="Quote",o.callout="Callout",o.ol="OL",o.ul="UL",o.default="Default"},6001:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockTextPropertyStyle=void 0,(o=t.DocsBlockTextPropertyStyle||(t.DocsBlockTextPropertyStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.default="Default",o.defaultBold="DefaultBold",o.defaultSemibold="DefaultSemibold",o.small="Small",o.smallBold="SmallBold",o.smallSemibold="SmallSemibold"},1755:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityGroupBehavior=void 0,(o=t.DocsEntityGroupBehavior||(t.DocsEntityGroupBehavior={})).group="Group",o.tabs="Tabs"},8240:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityType=void 0,(o=t.DocsEntityType||(t.DocsEntityType={})).group="Group",o.page="Page"},4142:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsSectionType=void 0,(o=t.DocsSectionType||(t.DocsSectionType={})).plain="Plain",o.tabs="Tabs"},4782:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyCalloutType=void 0,(o=t.DocumentationLegacyCalloutType||(t.DocumentationLegacyCalloutType={})).info="Info",o.success="Success",o.warning="Warning",o.error="Error"},8549:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyGroupBehavior=void 0,(o=t.DocumentationLegacyGroupBehavior||(t.DocumentationLegacyGroupBehavior={})).group="Group",o.tabs="Tabs"},1931:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyHeadingType=void 0,(o=t.DocumentationLegacyHeadingType||(t.DocumentationLegacyHeadingType={}))[o.h1=1]="h1",o[o.h2=2]="h2",o[o.h3=3]="h3"},5359:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyItemType=void 0,(o=t.DocumentationLegacyItemType||(t.DocumentationLegacyItemType={})).group="Group",o.page="Page"},9437:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageAssetType=void 0,(o=t.DocumentationLegacyPageAssetType||(t.DocumentationLegacyPageAssetType={})).image="image",o.figmaFrame="figmaFrame"},4649:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockThemeType=void 0,(o=t.DocumentationLegacyPageBlockThemeType||(t.DocumentationLegacyPageBlockThemeType={})).override="Override",o.comparison="Comparison"},8560:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockType=void 0,(o=t.DocumentationLegacyPageBlockType||(t.DocumentationLegacyPageBlockType={})).text="Text",o.heading="Heading",o.code="Code",o.unorderedList="UnorderedList",o.orderedList="OrderedList",o.quote="Quote",o.callout="Callout",o.divider="Divider",o.image="Image",o.token="Token",o.tokenList="TokenList",o.tokenGroup="TokenGroup",o.shortcuts="Shortcuts",o.link="Link",o.figmaEmbed="FigmaEmbed",o.youtubeEmbed="YoutubeEmbed",o.storybookEmbed="StorybookEmbed",o.genericEmbed="Embed",o.figmaFrames="FigmaFrames",o.custom="Custom",o.renderCode="RenderCode",o.componentAssets="ComponentAssets",o.column="Column",o.columnItem="ColumnItem",o.tabs="Tabs",o.tabItem="TabItem",o.table="Table",o.tableCell="TableCell",o.tableRow="TableRow"},4914:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameAlignment=void 0,(o=t.FrameAlignment||(t.FrameAlignment={})).frameHeight="FrameHeight",o.center="Center"},5986:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameLayout=void 0,(o=t.FrameLayout||(t.FrameLayout={})).c8="C8",o.c7="C7",o.c6="C6",o.c5="C5",o.c4="C4",o.c3="C3",o.c2="C2",o.c1="C1",o.c175="C1_75"},4667:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GradientType=void 0,(o=t.GradientType||(t.GradientType={})).linear="Linear",o.radial="Radial",o.angular="Angular"},4336:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.RichTextSpanAttributeType=void 0,(o=t.RichTextSpanAttributeType||(t.RichTextSpanAttributeType={})).bold="Bold",o.italic="Italic",o.link="Link",o.strikethrough="Strikethrough",o.code="Code"},5467:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowType=void 0,(o=t.ShadowType||(t.ShadowType={})).drop="Drop",o.inner="Inner"},1694:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=void 0,(o=t.SourceType||(t.SourceType={})).figma="Figma",o.tokenStudio="TokenStudio"},2047:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextCase=void 0,(o=t.TextCase||(t.TextCase={})).original="Original",o.upper="Upper",o.lower="Lower",o.camel="Camel",o.smallCaps="SmallCaps"},5780:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextDecoration=void 0,(o=t.TextDecoration||(t.TextDecoration={})).original="None",o.underline="Underline",o.strikethrough="Strikethrough"},1256:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DT_TOKEN_TYPES=t.tokenTypeIsReferencable=t.REFERENCABLE_TOKEN_TYPES=t.REPLACABLE_TOKEN_TYPES=t.tokenTypeIsNonPure=t.tokenTypeIsPure=t.PURE_TOKEN_TYPES=t.ALL_TOKEN_TYPES=t.MS_DIMENSION_TOKEN_TYPES=t.RAW_DIMENSION_TOKEN_TYPES=t.DIMENSION_TOKEN_TYPES=t.OPTION_TOKEN_TYPES=t.STRING_TOKEN_TYPES=t.TokenType=void 0,function(e){e.color="Color",e.typography="Typography",e.dimension="Dimension",e.size="Size",e.space="Space",e.opacity="Opacity",e.fontSize="FontSize",e.lineHeight="LineHeight",e.letterSpacing="LetterSpacing",e.paragraphSpacing="ParagraphSpacing",e.borderWidth="BorderWidth",e.radius="BorderRadius",e.duration="Duration",e.zIndex="ZIndex",e.shadow="Shadow",e.border="Border",e.gradient="Gradient",e.string="String",e.productCopy="ProductCopy",e.fontFamily="FontFamily",e.fontWeight="FontWeight",e.textCase="TextCase",e.textDecoration="TextDecoration",e.visibility="Visibility",e.blur="Blur"}(o=t.TokenType||(t.TokenType={})),t.STRING_TOKEN_TYPES=[o.string,o.productCopy,o.fontFamily,o.fontWeight],t.OPTION_TOKEN_TYPES=[o.textCase,o.textDecoration,o.visibility],t.DIMENSION_TOKEN_TYPES=[o.dimension,o.size,o.space,o.opacity,o.fontSize,o.lineHeight,o.letterSpacing,o.paragraphSpacing,o.borderWidth,o.radius,o.duration,o.zIndex],t.RAW_DIMENSION_TOKEN_TYPES=[o.opacity,o.zIndex],t.MS_DIMENSION_TOKEN_TYPES=[o.duration],t.ALL_TOKEN_TYPES=[...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES,o.color,o.gradient,o.border,o.radius,o.shadow,o.typography,o.blur],t.PURE_TOKEN_TYPES=[...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES],t.tokenTypeIsPure=e=>t.PURE_TOKEN_TYPES.includes(e),t.tokenTypeIsNonPure=e=>!(0,t.tokenTypeIsPure)(e),t.REPLACABLE_TOKEN_TYPES=[o.color,...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES],t.REFERENCABLE_TOKEN_TYPES=[o.color,...t.DIMENSION_TOKEN_TYPES,o.fontFamily,o.fontWeight,o.textCase,o.textDecoration],t.tokenTypeIsReferencable=e=>t.REFERENCABLE_TOKEN_TYPES.includes(e),t.DT_TOKEN_TYPES=[o.color,o.shadow,o.gradient,o.typography,o.border,...t.DIMENSION_TOKEN_TYPES,o.fontFamily,o.fontWeight,...t.OPTION_TOKEN_TYPES]},5389:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.MS_UNITS=t.PX_UNITS=t.RAW_UNITS=t.LINE_HEIGHT_UNITS=t.SIZE_UNITS=t.Unit=void 0,function(e){e.pixels="Pixels",e.percent="Percent",e.rem="Rem",e.ms="Ms",e.raw="Raw"}(o=t.Unit||(t.Unit={})),t.SIZE_UNITS=[o.pixels,o.percent,o.rem],t.LINE_HEIGHT_UNITS=[o.pixels,o.percent,o.rem,o.raw],t.RAW_UNITS=[o.raw],t.PX_UNITS=[o.pixels],t.MS_UNITS=[o.ms]},2916:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.UserRole=void 0,(o=t.UserRole||(t.UserRole={})).owner="Owner",o.admin="Admin",o.creator="Creator",o.viewer="Viewer",o.billing="Billing"},6398:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityType=void 0,(o=t.VisibilityType||(t.VisibilityType={})).visible="Visible",o.hidden="Hidden"},4838:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryAuthType=void 0,(o=t.WorkspaceNPMRegistryAuthType||(t.WorkspaceNPMRegistryAuthType={})).basic="Basic",o.bearer="Bearer"},2015:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryType=void 0,(o=t.WorkspaceNPMRegistryType||(t.WorkspaceNPMRegistryType={})).npmJS="NPMJS",o.gitHub="GitHub",o.azureDevOps="AzureDevOps",o.artifactory="Artifactory",o.custom="Custom"},4357:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionPlanInterval=void 0,(o=t.WorkspaceSubscriptionPlanInterval||(t.WorkspaceSubscriptionPlanInterval={})).yearly="yearly",o.monthly="monthly"},743:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionProductCode=void 0,(o=t.WorkspaceSubscriptionProductCode||(t.WorkspaceSubscriptionProductCode={})).free="free",o.team="team",o.teamTest="team_test",o.company="company",o.enterprise="enterprise"},5841:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionStatus=void 0,(o=t.WorkspaceSubscriptionStatus||(t.WorkspaceSubscriptionStatus={})).active="active",o.gracePeriod="gracePeriod",o.cancelled="cancelled",o.suspended="suspended"},3803:(e,t)=>{var o,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PulsarExecutor=t.OutputFileType=void 0,(r=t.OutputFileType||(t.OutputFileType={})).copyRemoteUrl="copyRemoteUrl",r.text="text",r.binary="binary",(o=t.PulsarExecutor||(t.PulsarExecutor={})).supernova="supernova",o.local="local"}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var a=o[t]={exports:{}};return e[t](a,a.exports,r),a.exports}var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.UserRole=e.Unit=e.TokenType=e.TextDecoration=e.TextCase=e.ShadowType=e.RichTextSpanAttributeType=e.GradientType=e.FrameLayout=e.FrameAlignment=e.SourceType=e.DocsImageRefType=e.DocsLinkRefType=e.DocsSectionType=e.DocsEntityType=e.DocsEntityGroupBehavior=e.DocsBlockTextPropertyStyle=e.DocsBlockRichTextPropertyStyle=e.DocsBlockOptionRenderingStyle=e.DocsBlockItemVariantLayoutWidth=e.DocsBlockItemVariantLayoutType=e.DocsBlockItemPropertyType=e.DocsBlockItemPropertyTextStyle=e.DocsBlockItemPropertyRichTextStyle=e.DocsBlockItemPropertyOptionRenderingStyle=e.DocsBlockItemEntityType=e.DocsBlockImagePropertyAspectRatio=e.DocsBlockBehaviorSelectionType=e.DocsBlockBehaviorDataType=e.DocumentationLegacyPageBlockShortcutType=e.DocumentationLegacyPageBlockThemeType=e.DocumentationLegacyPageBlockType=e.DocumentationLegacyPageAssetType=e.DocumentationLegacyItemType=e.DocumentationLegacyHeadingType=e.DocumentationLegacyGroupBehavior=e.DocumentationLegacyCalloutType=e.BorderStyle=e.BorderPosition=e.BlurType=e.AssetScaleType=e.AssetScale=e.AssetFormat=e.Alignment=e.ALL_TOKEN_TYPES=e.ALL_BORDER_STYLES=e.ALL_BORDER_POSITIONS=e.OPTION_TOKEN_TYPES=e.STRING_TOKEN_TYPES=e.DIMENSION_TOKEN_TYPES=void 0,e.PulsarExecutor=e.OutputFileType=e.CustomDomainState=e.CustomDomainErrorCode=e.ImportWarningType=e.WorkspaceNPMRegistryType=e.WorkspaceNPMRegistryAuthType=e.WorkspaceSubscriptionStatus=e.WorkspaceSubscriptionProductCode=e.WorkspaceSubscriptionPlanInterval=e.VisibilityType=void 0;var t=r(1256);Object.defineProperty(e,"DIMENSION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.DIMENSION_TOKEN_TYPES}}),Object.defineProperty(e,"STRING_TOKEN_TYPES",{enumerable:!0,get:function(){return t.STRING_TOKEN_TYPES}}),Object.defineProperty(e,"OPTION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.OPTION_TOKEN_TYPES}});var o=r(6675);Object.defineProperty(e,"ALL_BORDER_POSITIONS",{enumerable:!0,get:function(){return o.ALL_BORDER_POSITIONS}});var a=r(6701);Object.defineProperty(e,"ALL_BORDER_STYLES",{enumerable:!0,get:function(){return a.ALL_BORDER_STYLES}});var i=r(1256);Object.defineProperty(e,"ALL_TOKEN_TYPES",{enumerable:!0,get:function(){return i.ALL_TOKEN_TYPES}});var l=r(4222);Object.defineProperty(e,"Alignment",{enumerable:!0,get:function(){return l.Alignment}});var c=r(1334);Object.defineProperty(e,"AssetFormat",{enumerable:!0,get:function(){return c.AssetFormat}});var s=r(1940);Object.defineProperty(e,"AssetScale",{enumerable:!0,get:function(){return s.AssetScale}});var u=r(959);Object.defineProperty(e,"AssetScaleType",{enumerable:!0,get:function(){return u.AssetScaleType}});var p=r(9257);Object.defineProperty(e,"BlurType",{enumerable:!0,get:function(){return p.BlurType}});var d=r(6675);Object.defineProperty(e,"BorderPosition",{enumerable:!0,get:function(){return d.BorderPosition}});var y=r(6701);Object.defineProperty(e,"BorderStyle",{enumerable:!0,get:function(){return y.BorderStyle}});var T=r(4782);Object.defineProperty(e,"DocumentationLegacyCalloutType",{enumerable:!0,get:function(){return T.DocumentationLegacyCalloutType}});var m=r(8549);Object.defineProperty(e,"DocumentationLegacyGroupBehavior",{enumerable:!0,get:function(){return m.DocumentationLegacyGroupBehavior}});var f=r(1931);Object.defineProperty(e,"DocumentationLegacyHeadingType",{enumerable:!0,get:function(){return f.DocumentationLegacyHeadingType}});var g=r(5359);Object.defineProperty(e,"DocumentationLegacyItemType",{enumerable:!0,get:function(){return g.DocumentationLegacyItemType}});var S=r(9437);Object.defineProperty(e,"DocumentationLegacyPageAssetType",{enumerable:!0,get:function(){return S.DocumentationLegacyPageAssetType}});var b=r(8560);Object.defineProperty(e,"DocumentationLegacyPageBlockType",{enumerable:!0,get:function(){return b.DocumentationLegacyPageBlockType}});var v=r(4649);Object.defineProperty(e,"DocumentationLegacyPageBlockThemeType",{enumerable:!0,get:function(){return v.DocumentationLegacyPageBlockThemeType}});var h=r(3476);Object.defineProperty(e,"DocumentationLegacyPageBlockShortcutType",{enumerable:!0,get:function(){return h.DocumentationLegacyPageBlockShortcutType}});var P=r(4934);Object.defineProperty(e,"DocsBlockBehaviorDataType",{enumerable:!0,get:function(){return P.DocsBlockBehaviorDataType}});var k=r(8081);Object.defineProperty(e,"DocsBlockBehaviorSelectionType",{enumerable:!0,get:function(){return k.DocsBlockBehaviorSelectionType}});var C=r(9534);Object.defineProperty(e,"DocsBlockImagePropertyAspectRatio",{enumerable:!0,get:function(){return C.DocsBlockImagePropertyAspectRatio}});var O=r(1043);Object.defineProperty(e,"DocsBlockItemEntityType",{enumerable:!0,get:function(){return O.DocsBlockItemEntityType}});var _=r(3947);Object.defineProperty(e,"DocsBlockItemPropertyOptionRenderingStyle",{enumerable:!0,get:function(){return _.DocsBlockItemPropertyOptionRenderingStyle}});var D=r(4742);Object.defineProperty(e,"DocsBlockItemPropertyRichTextStyle",{enumerable:!0,get:function(){return D.DocsBlockItemPropertyRichTextStyle}});var I=r(7825);Object.defineProperty(e,"DocsBlockItemPropertyTextStyle",{enumerable:!0,get:function(){return I.DocsBlockItemPropertyTextStyle}});var x=r(6751);Object.defineProperty(e,"DocsBlockItemPropertyType",{enumerable:!0,get:function(){return x.DocsBlockItemPropertyType}});var E=r(6777);Object.defineProperty(e,"DocsBlockItemVariantLayoutType",{enumerable:!0,get:function(){return E.DocsBlockItemVariantLayoutType}});var R=r(9279);Object.defineProperty(e,"DocsBlockItemVariantLayoutWidth",{enumerable:!0,get:function(){return R.DocsBlockItemVariantLayoutWidth}});var B=r(5271);Object.defineProperty(e,"DocsBlockOptionRenderingStyle",{enumerable:!0,get:function(){return B.DocsBlockOptionRenderingStyle}});var N=r(3274);Object.defineProperty(e,"DocsBlockRichTextPropertyStyle",{enumerable:!0,get:function(){return N.DocsBlockRichTextPropertyStyle}});var j=r(6001);Object.defineProperty(e,"DocsBlockTextPropertyStyle",{enumerable:!0,get:function(){return j.DocsBlockTextPropertyStyle}});var F=r(1755);Object.defineProperty(e,"DocsEntityGroupBehavior",{enumerable:!0,get:function(){return F.DocsEntityGroupBehavior}});var L=r(8240);Object.defineProperty(e,"DocsEntityType",{enumerable:!0,get:function(){return L.DocsEntityType}});var M=r(4142);Object.defineProperty(e,"DocsSectionType",{enumerable:!0,get:function(){return M.DocsSectionType}});var A=r(2695);Object.defineProperty(e,"DocsLinkRefType",{enumerable:!0,get:function(){return A.DocsLinkRefType}});var w=r(275);Object.defineProperty(e,"DocsImageRefType",{enumerable:!0,get:function(){return w.DocsImageRefType}});var H=r(1694);Object.defineProperty(e,"SourceType",{enumerable:!0,get:function(){return H.SourceType}});var V=r(4914);Object.defineProperty(e,"FrameAlignment",{enumerable:!0,get:function(){return V.FrameAlignment}});var $=r(5986);Object.defineProperty(e,"FrameLayout",{enumerable:!0,get:function(){return $.FrameLayout}});var U=r(4667);Object.defineProperty(e,"GradientType",{enumerable:!0,get:function(){return U.GradientType}});var W=r(4336);Object.defineProperty(e,"RichTextSpanAttributeType",{enumerable:!0,get:function(){return W.RichTextSpanAttributeType}});var G=r(5467);Object.defineProperty(e,"ShadowType",{enumerable:!0,get:function(){return G.ShadowType}});var Y=r(2047);Object.defineProperty(e,"TextCase",{enumerable:!0,get:function(){return Y.TextCase}});var K=r(5780);Object.defineProperty(e,"TextDecoration",{enumerable:!0,get:function(){return K.TextDecoration}});var z=r(1256);Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return z.TokenType}});var Z=r(5389);Object.defineProperty(e,"Unit",{enumerable:!0,get:function(){return Z.Unit}});var q=r(2916);Object.defineProperty(e,"UserRole",{enumerable:!0,get:function(){return q.UserRole}});var J=r(6398);Object.defineProperty(e,"VisibilityType",{enumerable:!0,get:function(){return J.VisibilityType}});var Q=r(4357);Object.defineProperty(e,"WorkspaceSubscriptionPlanInterval",{enumerable:!0,get:function(){return Q.WorkspaceSubscriptionPlanInterval}});var X=r(743);Object.defineProperty(e,"WorkspaceSubscriptionProductCode",{enumerable:!0,get:function(){return X.WorkspaceSubscriptionProductCode}});var ee=r(5841);Object.defineProperty(e,"WorkspaceSubscriptionStatus",{enumerable:!0,get:function(){return ee.WorkspaceSubscriptionStatus}});var te=r(4838);Object.defineProperty(e,"WorkspaceNPMRegistryAuthType",{enumerable:!0,get:function(){return te.WorkspaceNPMRegistryAuthType}});var oe=r(2015);Object.defineProperty(e,"WorkspaceNPMRegistryType",{enumerable:!0,get:function(){return oe.WorkspaceNPMRegistryType}});var re=r(829);Object.defineProperty(e,"ImportWarningType",{enumerable:!0,get:function(){return re.ImportWarningType}});var ne=r(3611);Object.defineProperty(e,"CustomDomainErrorCode",{enumerable:!0,get:function(){return ne.CustomDomainErrorCode}});var ae=r(6530);Object.defineProperty(e,"CustomDomainState",{enumerable:!0,get:function(){return ae.CustomDomainState}});var ie=r(3803);Object.defineProperty(e,"OutputFileType",{enumerable:!0,get:function(){return ie.OutputFileType}}),Object.defineProperty(e,"PulsarExecutor",{enumerable:!0,get:function(){return ie.PulsarExecutor}})})();var a=t;for(var i in n)a[i]=n[i];n.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})()},576:(e,t,o)=>{"use strict";o.r(t),o.d(t,{camelCase:()=>T,camelCaseTransform:()=>d,camelCaseTransformMerge:()=>y,capitalCase:()=>g,capitalCaseTransform:()=>f,constantCase:()=>b,dotCase:()=>v,headerCase:()=>h,noCase:()=>l,paramCase:()=>P,pascalCase:()=>p,pascalCaseTransform:()=>s,pascalCaseTransformMerge:()=>u,pathCase:()=>k,sentenceCase:()=>O,sentenceCaseTransform:()=>C,snakeCase:()=>_});var r=function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o0&&o>="0"&&o<="9"?"_"+o+r:""+o.toUpperCase()+r}function u(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function p(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"",transform:s},t))}function d(e,t){return 0===t?e.toLowerCase():s(e,t)}function y(e,t){return 0===t?e.toLowerCase():u(e)}function T(e,t){return void 0===t&&(t={}),p(e,r({transform:d},t))}function m(e){return e.charAt(0).toUpperCase()+e.substr(1)}function f(e){return m(e.toLowerCase())}function g(e,t){return void 0===t&&(t={}),l(e,r({delimiter:" ",transform:f},t))}function S(e){return e.toUpperCase()}function b(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"_",transform:S},t))}function v(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"."},t))}function h(e,t){return void 0===t&&(t={}),g(e,r({delimiter:"-"},t))}function P(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"-"},t))}function k(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"/"},t))}function C(e,t){var o=e.toLowerCase();return 0===t?m(o):o}function O(e,t){return void 0===t&&(t={}),l(e,r({delimiter:" ",transform:C},t))}function _(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"_"},t))}},961:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertedToken=void 0;const r=o(142),n=o(607);function a(e,t){const o=n.exportConfiguration.tokenPrefixes[e.tokenType],a=t.find((t=>t.id===e.parentGroupId));return r.NamingHelper.codeSafeVariableNameForToken(e,n.exportConfiguration.tokenNameStyle,a,o)}t.convertedToken=function(e,t,o){const i=a(e,o),l=r.CSSHelper.tokenToCSS(e,t,{allowReferences:n.exportConfiguration.useReferences,decimals:n.exportConfiguration.colorPrecision,colorFormat:n.exportConfiguration.colorFormat,tokenToVariableRef:e=>`var(--${a(e,o)})`}),c=" ".repeat(n.exportConfiguration.indent);return n.exportConfiguration.showDescriptions&&e.description?`${c}/* ${e.description.trim()} */\n${c}--${i}: ${l};`:`${c}--${i}: ${l};`}},650:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indexOutputFile=void 0;const r=o(142),n=o(907),a=o(607);t.indexOutputFile=function(e){let t=Object.values(n.TokenType).map((t=>{const o=`@import "./${a.exportConfiguration.styleFileNames[t]}";`;if(a.exportConfiguration.generateEmptyFiles)return o;return e.filter((e=>e.tokenType===t)).length>0?o:null})).filter((e=>null!==e)).join("\n");return a.exportConfiguration.showGeneratedFileDisclaimer&&(t=`/* ${a.exportConfiguration.disclaimer} */\n${t}`),r.FileHelper.createTextFile({relativePath:a.exportConfiguration.baseIndexFilePath,fileName:a.exportConfiguration.indexFileName,content:t})}},37:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styleOutputFile=void 0;const r=o(142),n=o(607),a=o(961);t.styleOutputFile=function(e,t,o){const i=t.filter((t=>t.tokenType===e));if(!n.exportConfiguration.generateEmptyFiles&&0===i.length)return null;const l=new Map(t.map((e=>[e.id,e])));let c=`:root {\n${i.map((e=>(0,a.convertedToken)(e,l,o))).join("\n")}\n}`;return n.exportConfiguration.showGeneratedFileDisclaimer&&(c=`/* ${n.exportConfiguration.disclaimer} */\n${c}`),r.FileHelper.createTextFile({relativePath:n.exportConfiguration.baseStyleFilePath,fileName:n.exportConfiguration.styleFileNames[e],content:c})}},607:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportConfiguration=void 0;const r=o(907),n=o(650),a=o(37);t.exportConfiguration=Pulsar.exportConfig(),Pulsar.export((async(e,t)=>{const o={designSystemId:t.dsId,versionId:t.versionId};let i=await e.tokens.getTokens(o),l=await e.tokens.getTokenGroups(o);if(t.brandId){const r=(await e.brands.getBrands(o)).find((e=>e.id===t.brandId||e.idInVersion===t.brandId));if(!r)throw new Error(`Unable to find brand ${t.brandId}.`);i=i.filter((e=>e.brandId===r.id)),l=l.filter((e=>e.brandId===r.id))}if(t.themeId){const r=(await e.tokens.getTokenThemes(o)).find((e=>e.id===t.themeId||e.idInVersion===t.themeId));if(!r)throw new Error("Unable to apply theme which doesn't exist in the system.");i=await e.tokens.computeTokensByApplyingThemes(i,[r])}return[...Object.values(r.TokenType).map((e=>(0,a.styleOutputFile)(e,i,l))).filter((e=>null!==e)),(0,n.indexOutputFile)(i)]}))}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};o(607)})(); \ No newline at end of file +(()=>{var e={142:(e,t,o)=>{(()=>{"use strict";var e={639:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Iterators=void 0;const r=o(58);t.Iterators=class{static allTokenTypes(){return[r.TokenType.color,r.TokenType.typography,r.TokenType.dimension,r.TokenType.size,r.TokenType.space,r.TokenType.opacity,r.TokenType.fontSize,r.TokenType.lineHeight,r.TokenType.letterSpacing,r.TokenType.paragraphSpacing,r.TokenType.borderWidth,r.TokenType.radius,r.TokenType.duration,r.TokenType.zIndex,r.TokenType.shadow,r.TokenType.border,r.TokenType.gradient,r.TokenType.string,r.TokenType.productCopy,r.TokenType.fontFamily,r.TokenType.fontWeight,r.TokenType.textCase,r.TokenType.textDecoration,r.TokenType.visibility,r.TokenType.blur]}static allDimensionTokenTypes(){return[r.TokenType.dimension,r.TokenType.size,r.TokenType.space,r.TokenType.opacity,r.TokenType.fontSize,r.TokenType.lineHeight,r.TokenType.letterSpacing,r.TokenType.paragraphSpacing,r.TokenType.borderWidth,r.TokenType.radius,r.TokenType.duration,r.TokenType.zIndex]}static allStringTokenTypes(){return[r.TokenType.string,r.TokenType.productCopy,r.TokenType.fontFamily,r.TokenType.fontWeight]}static allOptionTokenTypes(){return[r.TokenType.textCase,r.TokenType.textDecoration,r.TokenType.visibility]}}},989:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorFormat=void 0,(o=t.ColorFormat||(t.ColorFormat={})).rgb="rgb",o.rgba="rgba",o.smartRgba="smartRgba",o.hex6="hex6",o.hex8="hex8",o.hashHex6="hashHex6",o.hashHex8="hashHex8",o.smartHashHex="smartHashHex",o.smartHex="smartHex",o.hsl="hsl",o.hsla="hsla",o.smartHsla="smartHsla",o.smartUIColor="smartUIColor"},545:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.StringCase=void 0,(o=t.StringCase||(t.StringCase={})).camelCase="camelCase",o.capitalCase="capitalCase",o.constantCase="constantCase",o.dotCase="dotCase",o.headerCase="headerCase",o.noCase="noCase",o.paramCase="paramCase",o.pascalCase="pascalCase",o.pathCase="pathCase",o.sentenceCase="sentenceCase",o.snakeCase="snakeCase"},617:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileHelper=void 0;const r=o(58);t.FileHelper=class{static createCopyRemoteFile({relativePath:e,fileName:t,url:o}){return{path:e,name:t,type:r.OutputFileType.copyRemoteUrl,url:o}}static createTextFile({relativePath:e,fileName:t,content:o}){return{path:e,name:t,type:r.OutputFileType.text,content:o}}static createBinaryFile({relativePath:e,fileName:t,data:o}){return{path:e,name:t,type:r.OutputFileType.binary,data:o}}}},761:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sureOptionalReference=void 0,t.sureOptionalReference=function(e,t,o=!0){if(!e||!o)return null;const r=t.get(e);if(!r)throw new Error(`Trying to retrieve unknown referenced token ${e}`);return r}},118:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkHelper=void 0,t.NetworkHelper=class{static async fetchAsText(e,t,o){return(await this.performFetch(e,t,o)).text()}static async fetchAsJSON(e,t,o){return(await this.performFetch(e,t,o)).json()}static async fetchAsData(e,t,o){return(await this.performFetch(e,t,o)).arrayBuffer()}static async performFetch(e,t,o){try{const r=await e.network.fetch(t,o);if(!r.ok)throw new Error(`Request failed with status ${r.status}, error: ${await r.text()}`);return r}catch(e){throw e}}}},771:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CSSHelper=void 0;const r=o(58),n=o(761),a=o(952);t.CSSHelper=class{static tokenToCSS(e,t,o){switch(e.tokenType){case r.TokenType.color:return this.colorTokenValueToCSS(e.value,t,o);case r.TokenType.border:return this.borderTokenValueToCSS(e.value,t,o);case r.TokenType.gradient:return this.gradientTokenValueToCSS(e.value,t,o);case r.TokenType.dimension:case r.TokenType.size:case r.TokenType.space:case r.TokenType.opacity:case r.TokenType.fontSize:case r.TokenType.lineHeight:case r.TokenType.letterSpacing:case r.TokenType.paragraphSpacing:case r.TokenType.borderWidth:case r.TokenType.radius:case r.TokenType.duration:case r.TokenType.zIndex:return this.dimensionTokenValueToCSS(e.value,t,o);case r.TokenType.shadow:return this.shadowTokenValueToCSS(e.value,t,o);case r.TokenType.fontWeight:case r.TokenType.fontFamily:case r.TokenType.productCopy:case r.TokenType.string:return this.stringTokenValueToCSS(e.value,t,o);case r.TokenType.textCase:case r.TokenType.textDecoration:case r.TokenType.visibility:return this.optionTokenValueToCSS(e.value,t,o);case r.TokenType.blur:return this.blurTokenValueToCSS(e.value,t,o);case r.TokenType.typography:return this.typographyTokenValueToCSS(e.value,t,o);default:throw new r.UnreachableCaseError(e.tokenType,"Unsupported token type for transformation to CSS:")}}static colorTokenValueToCSS(e,t,o){return a.ColorHelper.formattedColorOrVariableName(e,t,o)}static borderTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(r)return o.tokenToVariableRef(r);const a=this.dimensionTokenValueToCSS(e.width,t,o),i=this.borderStyleToCSS(e.style),l=this.colorTokenValueToCSS(e.color,t,o);return this.borderPositionToCSS(e.position),`${a} ${i} ${l}`}static gradientTokenValueToCSS(e,t,o){return e.map((e=>this.gradientLayerToCSS(e,t,o))).join(", ")}static gradientLayerToCSS(e,t,o){const i=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(i)return o.tokenToVariableRef(i);let l="";switch(e.type){case r.GradientType.linear:l="linear-gradient(0deg, ";break;case r.GradientType.radial:l="radial-gradient(circle, ";break;case r.GradientType.angular:l="conic-gradient(";break;default:l="linear-gradient(0deg, "}return`${l}${e.stops.map((e=>`${this.colorTokenValueToCSS(e.color,t,o)} ${a.ColorHelper.roundToDecimals(100*e.position,o.decimals)}%`)).join(", ")})`}static dimensionTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`${a.ColorHelper.roundToDecimals(e.measure,o.decimals)}${this.unitToCSS(e.unit)}`}static shadowTokenValueToCSS(e,t,o){return e.map((e=>this.shadowLayerToCSS(e,t,o))).join(", ")}static shadowLayerToCSS(e,t,o){const a=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return a?o.tokenToVariableRef(a):`${e.type===r.ShadowType.inner?"inset ":""}${e.x}px ${e.y}px ${e.radius}px ${e.spread}px ${this.colorTokenValueToCSS(e.color,t,o)}`}static stringTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`"${e.text}"`}static optionTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`"${e.value}"`}static blurTokenValueToCSS(e,t,o){const r=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);return r?o.tokenToVariableRef(r):`blur(${this.dimensionTokenValueToCSS(e.radius,t,o)})`}static typographyTokenValueToCSS(e,t,o){const a=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(a)return o.tokenToVariableRef(a);const i=(0,n.sureOptionalReference)(e.fontFamily.referencedTokenId,t,o.allowReferences),l=(0,n.sureOptionalReference)(e.fontWeight.referencedTokenId,t,o.allowReferences),c=(0,n.sureOptionalReference)(e.textDecoration.referencedTokenId,t,o.allowReferences),s=(0,n.sureOptionalReference)(e.textCase.referencedTokenId,t,o.allowReferences),u={fontFamily:i?o.tokenToVariableRef(i):e.fontFamily.text,fontWeight:l?o.tokenToVariableRef(l):e.fontWeight.text,textDecoration:c?o.tokenToVariableRef(c):e.textDecoration.value===r.TextDecoration.original?this.textDecorationToCSS(e.textDecoration.value):void 0,textCase:s?o.tokenToVariableRef(s):e.textCase.value===r.TextCase.original?this.textCaseToCSS(e.textCase.value):void 0,caps:e.textCase.value===r.TextCase.smallCaps,fontSize:this.dimensionTokenValueToCSS(e.fontSize,t,o),lineHeight:e.lineHeight?this.dimensionTokenValueToCSS(e.lineHeight,t,o):void 0},p=u.fontSize;return`${u.caps?"small-caps ":""}${l?u.fontWeight:`"${u.fontWeight}"`} ${u.lineHeight?`${p}/${u.lineHeight}`:p} ${i?u.fontFamily:`"${u.fontFamily}"`}`}static borderStyleToCSS(e){switch(e){case r.BorderStyle.dashed:return"dashed";case r.BorderStyle.dotted:return"dotted";case r.BorderStyle.solid:return"solid";case r.BorderStyle.groove:return"groove";default:return"solid"}}static borderPositionToCSS(e){switch(e){case r.BorderPosition.center:return"center";case r.BorderPosition.inside:return"inside";case r.BorderPosition.outside:default:return"outside"}}static unitToCSS(e){switch(e){case r.Unit.percent:return"%";case r.Unit.pixels:return"px";case r.Unit.rem:return"rem";case r.Unit.raw:return"";case r.Unit.ms:return"ms";default:return"px"}}static textCaseToCSS(e){switch(e){case r.TextCase.original:return"none";case r.TextCase.upper:return"uppercase";case r.TextCase.lower:return"lowercase";case r.TextCase.camel:case r.TextCase.smallCaps:return"capitalize"}}static textDecorationToCSS(e){switch(e){case r.TextDecoration.original:return"none";case r.TextDecoration.underline:return"underline";case r.TextDecoration.strikethrough:return"line-through"}}}},952:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorHelper=void 0;const r=o(989),n=o(761);class a{static formattedColorOrVariableName(e,t,o){let a,i,l;const c=(0,n.sureOptionalReference)(e.referencedTokenId,t,o.allowReferences);if(c)a=o.tokenToVariableRef(c);else{const r=(0,n.sureOptionalReference)(e.color.referencedTokenId,t,o.allowReferences);r&&(i=o.tokenToVariableRef(r));const a=(0,n.sureOptionalReference)(e.opacity.referencedTokenId,t,o.allowReferences);a&&(l=o.tokenToVariableRef(a))}if(a)return a;if(!a&&!i&&!l)return this.formattedColor(e,o.colorFormat,o.decimals);switch(o.colorFormat){case r.ColorFormat.rgb:case r.ColorFormat.rgba:case r.ColorFormat.smartRgba:return this.colorToRgb(o.colorFormat,this.normalizedIntColor(e),e.opacity.measure,o.decimals,i,l);default:return this.formattedColor(e,o.colorFormat,o.decimals)}}static formattedColor(e,t,o=3){switch(t){case r.ColorFormat.hex6:case r.ColorFormat.hex8:case r.ColorFormat.hashHex6:case r.ColorFormat.hashHex8:case r.ColorFormat.smartHex:case r.ColorFormat.smartHashHex:return this.colorToHex(t,this.normalizedIntColor(e),e.opacity.measure);case r.ColorFormat.rgb:case r.ColorFormat.rgba:case r.ColorFormat.smartRgba:return this.colorToRgb(t,this.normalizedIntColor(e),e.opacity.measure,o,null,null);case r.ColorFormat.hsl:case r.ColorFormat.hsla:case r.ColorFormat.smartHsla:return this.colorToHsl(t,this.normalizedFractionalColor(e),e.opacity.measure,o);case r.ColorFormat.smartUIColor:return this.colorToUIColor(this.normalizedIntColor(e),e.opacity.measure,o)}}static colorToRgb(e,t,o,n,a,i){let l;return l=e===r.ColorFormat.rgba||e===r.ColorFormat.smartRgba&&o<1?`rgba(${a||`${t.r}, ${t.g}, ${t.b}`}, ${i||this.roundToDecimals(o,n)})`:`rgb(${a||`${t.r}, ${t.g}, ${t.b}`})`,l}static colorToHex(e,t,o){let n=`${this.pHex(t.r)}${this.pHex(t.g)}${this.pHex(t.b)}`;return(e===r.ColorFormat.hex8||e===r.ColorFormat.hashHex8||e===r.ColorFormat.smartHex&&o<1||e===r.ColorFormat.smartHashHex&&o<1)&&(n+=`${this.pHex(Math.round(255*o))}`),e!==r.ColorFormat.hashHex6&&e!==r.ColorFormat.hashHex8&&e!==r.ColorFormat.smartHashHex||(n=`#${n}`),n}static colorToHsl(e,t,o,n){const a=Math.max(t.r,t.g,t.b),i=Math.min(t.r,t.g,t.b);let l,c,s,u=(a+i)/2;if(a===i)l=c=0;else{const e=a-i;c=u>.5?e/(2-a-i):e/(a+i),a===t.r?l=(t.g-t.b)/e+(t.g{Object.defineProperty(t,"__esModule",{value:!0}),t.NamingHelper=void 0;const r=o(110),n=o(545);class a{static codeSafeVariableNameForToken(e,t,o,r){let n=[];return o&&(n=[...o.path],o.isRoot||n.push(o.name)),n.push(e.name),r&&r.length>0&&n.unshift(r),a.codeSafeVariableName(n,t)}static codeSafeVariableName(e,t){let o="string"==typeof e?e:e.join(" ");switch(o=o.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),t){case n.StringCase.camelCase:o=(0,r.camelCase)(o);break;case n.StringCase.capitalCase:o=(0,r.capitalCase)(o);break;case n.StringCase.constantCase:o=(0,r.constantCase)(o);break;case n.StringCase.dotCase:o=(0,r.dotCase)(o);break;case n.StringCase.headerCase:o=(0,r.headerCase)(o);break;case n.StringCase.noCase:o=(0,r.noCase)(o);break;case n.StringCase.paramCase:o=(0,r.paramCase)(o);break;case n.StringCase.pascalCase:o=(0,r.pascalCase)(o);break;case n.StringCase.pathCase:o=(0,r.pathCase)(o);break;case n.StringCase.sentenceCase:o=(0,r.sentenceCase)(o);break;case n.StringCase.snakeCase:o=(0,r.snakeCase)(o)}return t!==n.StringCase.snakeCase&&t!==n.StringCase.constantCase&&(o=o.replaceAll("_","")),o.match(/^[^a-zA-Z]/)&&(o="_"+o),o}static nameAsCSSVarReference(e){return`var(--${e})`}static nameAsCSSVarDeclaration(e){return`--${e}`}}t.NamingHelper=a},58:e=>{e.exports=o(907)},110:e=>{e.exports=o(576)}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,n),a.exports}var a={};(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.ColorFormat=e.StringCase=e.Iterators=e.CSSHelper=e.FileHelper=e.ColorHelper=e.NamingHelper=e.NetworkHelper=void 0;var t=n(118);Object.defineProperty(e,"NetworkHelper",{enumerable:!0,get:function(){return t.NetworkHelper}});var o=n(453);Object.defineProperty(e,"NamingHelper",{enumerable:!0,get:function(){return o.NamingHelper}});var r=n(952);Object.defineProperty(e,"ColorHelper",{enumerable:!0,get:function(){return r.ColorHelper}});var i=n(617);Object.defineProperty(e,"FileHelper",{enumerable:!0,get:function(){return i.FileHelper}});var l=n(771);Object.defineProperty(e,"CSSHelper",{enumerable:!0,get:function(){return l.CSSHelper}});var c=n(639);Object.defineProperty(e,"Iterators",{enumerable:!0,get:function(){return c.Iterators}});var s=n(545);Object.defineProperty(e,"StringCase",{enumerable:!0,get:function(){return s.StringCase}});var u=n(989);Object.defineProperty(e,"ColorFormat",{enumerable:!0,get:function(){return u.ColorFormat}})})();var i=t;for(var l in a)i[l]=a[l];a.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})()},907:(e,t)=>{(()=>{"use strict";var e={275:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsImageRefType=void 0,(o=t.DocsImageRefType||(t.DocsImageRefType={})).upload="Upload",o.asset="Asset",o.figmaFrame="FigmaFrame"},2695:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsLinkRefType=void 0,(o=t.DocsLinkRefType||(t.DocsLinkRefType={})).page="Page",o.pageHeading="pageHeading",o.group="Group",o.url="url"},3476:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockShortcut=t.DocumentationLegacyPageBlockShortcutType=void 0,function(e){e.external="External",e.internal="Internal"}(o=t.DocumentationLegacyPageBlockShortcutType||(t.DocumentationLegacyPageBlockShortcutType={})),t.DocumentationLegacyPageBlockShortcut=class{constructor(e){var t;e.url?this.type=o.external:this.type=o.internal,this.title=this.shortcutTitleFromModel(e,this.type),this.description=this.shortcutDescriptionFromModel(e,this.type),this.previewUrl=this.shortcutPreviewUrlFromModel(e),this.type===o.internal&&(null===(t=e.documentationItemPreview)||void 0===t?void 0:t.valid)&&e.documentationItemId?this.internalId=e.documentationItemId:(this.internalId=null,this.type===o.external&&e.url?this.externalUrl=e.url:this.externalUrl=null)}shortcutTitleFromModel(e,t){var r,n,a,i,l;let c=null;return e.title&&e.title.trim().length>0?c=e.title:t===o.internal?c=null!==(n=null===(r=e.documentationItemPreview)||void 0===r?void 0:r.title)&&void 0!==n?n:null:t===o.external&&(c=null!==(l=null!==(i=null===(a=e.urlPreview)||void 0===a?void 0:a.title)&&void 0!==i?i:e.url)&&void 0!==l?l:null),c&&0!==c.trim().length?c:null}shortcutDescriptionFromModel(e,t){var r;let n=null;return e.description&&e.description.trim().length>0?n=e.description:t===o.external&&(n=null===(r=e.urlPreview)||void 0===r?void 0:r.description),n&&0!==n.trim().length?n:null}shortcutPreviewUrlFromModel(e){var t,o,r,n,a;return null!==(a=null!==(r=null!==(t=e.assetUrl)&&void 0!==t?t:null===(o=e.asset)||void 0===o?void 0:o.url)&&void 0!==r?r:null===(n=e.urlPreview)||void 0===n?void 0:n.thumbnailUrl)&&void 0!==a?a:null}}},4222:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Alignment=void 0,(o=t.Alignment||(t.Alignment={})).left="Left",o.center="Center",o.stretch="Stretch"},1334:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetFormat=void 0,(o=t.AssetFormat||(t.AssetFormat={})).png="png",o.pdf="pdf",o.svg="svg"},1940:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScale=void 0,(o=t.AssetScale||(t.AssetScale={})).x1="x1",o.x2="x2",o.x3="x3",o.x4="x4"},959:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScaleType=void 0,(o=t.AssetScaleType||(t.AssetScaleType={})).aspectFill="AspectFill",o.aspectFit="AspectFit"},9257:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.BlurType=void 0,(o=t.BlurType||(t.BlurType={})).layer="Layer",o.background="Background"},6675:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_BORDER_POSITIONS=t.BorderPosition=void 0,function(e){e.inside="Inside",e.center="Center",e.outside="Outside"}(o=t.BorderPosition||(t.BorderPosition={})),t.ALL_BORDER_POSITIONS=[o.inside,o.center,o.outside]},6701:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ALL_BORDER_STYLES=t.BorderStyle=void 0,function(e){e.dashed="Dashed",e.dotted="Dotted",e.solid="Solid",e.groove="Groove"}(o=t.BorderStyle||(t.BorderStyle={})),t.ALL_BORDER_STYLES=[o.dashed,o.dotted,o.solid,o.groove]},829:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportWarningType=void 0,(o=t.ImportWarningType||(t.ImportWarningType={})).UnsupportedFill="UnsupportedFill",o.UnsupportedStroke="UnsupportedStroke",o.UnsupportedEffect="UnsupportedEffect",o.StyleNotApplied="StyleNotApplied",o.NoPublishedStyles="NoPublishedStyles",o.NoPublishedComponents="NoPublishedComponents",o.NoPublishedAssets="NoPublishedAssets",o.NoVersionFound="NoVersionFound",o.ComponentHasNoThumbnail="ComponentHasNoThumbnail",o.DuplicateImportedStyleId="DuplicateImportedStyleId",o.DuplicateImportedStylePath="DuplicateImportedStylePath",o.NoPublishedElements="NoPublishedElements"},3611:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainErrorCode=void 0,(o=t.CustomDomainErrorCode||(t.CustomDomainErrorCode={})).generalError="GeneralError",o.dnsNotConfigured="DNSNotConfigured",o.maintenance="Maintenance"},6530:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainState=void 0,(o=t.CustomDomainState||(t.CustomDomainState={})).initial="Initial",o.domainSetupInProgress="DomainSetupInProgress",o.domainSetupFailed="DomainSetupFailed",o.domainSetupsSucces="DomainSetupSuccess",o.sslSetupInProgress="SSLSetupInProgress",o.sslSetupFailed="SSLSetupFailed",o.sslSetupSuccess="SSLSetupSuccess"},4934:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorDataType=void 0,(o=t.DocsBlockBehaviorDataType||(t.DocsBlockBehaviorDataType={})).item="Item",o.token="Token",o.asset="Asset",o.component="Component"},8081:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorSelectionType=void 0,(o=t.DocsBlockBehaviorSelectionType||(t.DocsBlockBehaviorSelectionType={})).entity="Entity",o.group="Group",o.entityAndGroup="EntityAndGroup"},9534:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockImagePropertyAspectRatio=void 0,(o=t.DocsBlockImagePropertyAspectRatio||(t.DocsBlockImagePropertyAspectRatio={})).square="Square",o.landscape="Landscape",o.portrait="Portrait",o.wide="Wide"},1043:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemEntityType=void 0,(o=t.DocsBlockItemEntityType||(t.DocsBlockItemEntityType={})).token="Token",o.tokenGroup="TokenGroup",o.asset="Asset",o.assetGroup="AssetGroup",o.component="Component",o.componentGroup="ComponentGroup"},3947:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyOptionRenderingStyle=void 0,(o=t.DocsBlockItemPropertyOptionRenderingStyle||(t.DocsBlockItemPropertyOptionRenderingStyle={})).segmentedControl="SegmentedControl",o.toggleButton="ToggleButton",o.select="Select",o.checkbox="Checkbox"},4742:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyRichTextStyle=void 0,(o=t.DocsBlockItemPropertyRichTextStyle||(t.DocsBlockItemPropertyRichTextStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.quote="Quote",o.callout="Callout",o.ol="OL",o.ul="UL"},7825:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyTextStyle=void 0,(o=t.DocsBlockItemPropertyTextStyle||(t.DocsBlockItemPropertyTextStyle={})).small="Small",o.regular="Regular",o.bold="Bold"},6751:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyType=void 0,(o=t.DocsBlockItemPropertyType||(t.DocsBlockItemPropertyType={})).richText="RichText",o.text="Text",o.boolean="Boolean",o.number="Number",o.singleSelect="SingleSelect",o.multiSelect="MultiSelect",o.image="Image",o.token="Token",o.tokenType="TokenType",o.tokenProperty="TokenProperty",o.component="Component",o.componentProperty="ComponentProperty",o.asset="Asset",o.assetProperty="AssetProperty",o.page="Page",o.pageProperty="PageProperty",o.embedURL="EmbedURL",o.embedFrame="EmbedFrame",o.markdown="Markdown",o.code="Code",o.codeSandbox="CodeSandbox",o.table="Table",o.divider="Divider",o.storybook="Storybook"},6777:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutType=void 0,(o=t.DocsBlockItemVariantLayoutType||(t.DocsBlockItemVariantLayoutType={})).column="Column",o.row="Row"},9279:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutWidth=void 0,(o=t.DocsBlockItemVariantLayoutWidth||(t.DocsBlockItemVariantLayoutWidth={})).c1="1",o.c2="2",o.c3="3",o.c4="4",o.c5="5",o.c6="6",o.c7="7",o.c8="8",o.c9="9",o.c10="10",o.c11="11",o.c12="12"},5271:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionRenderingStyle=void 0,(o=t.DocsBlockOptionRenderingStyle||(t.DocsBlockOptionRenderingStyle={})).segmentedControl="SegmentedControl",o.toggleButton="ToggleButton",o.select="Select",o.checkbox="Checkbox"},3274:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockRichTextPropertyStyle=void 0,(o=t.DocsBlockRichTextPropertyStyle||(t.DocsBlockRichTextPropertyStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.quote="Quote",o.callout="Callout",o.ol="OL",o.ul="UL",o.default="Default"},6001:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockTextPropertyStyle=void 0,(o=t.DocsBlockTextPropertyStyle||(t.DocsBlockTextPropertyStyle={})).title1="Title1",o.title2="Title2",o.title3="Title3",o.title4="Title4",o.title5="Title5",o.default="Default",o.defaultBold="DefaultBold",o.defaultSemibold="DefaultSemibold",o.small="Small",o.smallBold="SmallBold",o.smallSemibold="SmallSemibold"},1755:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityGroupBehavior=void 0,(o=t.DocsEntityGroupBehavior||(t.DocsEntityGroupBehavior={})).group="Group",o.tabs="Tabs"},8240:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityType=void 0,(o=t.DocsEntityType||(t.DocsEntityType={})).group="Group",o.page="Page"},4142:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsSectionType=void 0,(o=t.DocsSectionType||(t.DocsSectionType={})).plain="Plain",o.tabs="Tabs"},4782:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyCalloutType=void 0,(o=t.DocumentationLegacyCalloutType||(t.DocumentationLegacyCalloutType={})).info="Info",o.success="Success",o.warning="Warning",o.error="Error"},8549:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyGroupBehavior=void 0,(o=t.DocumentationLegacyGroupBehavior||(t.DocumentationLegacyGroupBehavior={})).group="Group",o.tabs="Tabs"},1931:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyHeadingType=void 0,(o=t.DocumentationLegacyHeadingType||(t.DocumentationLegacyHeadingType={}))[o.h1=1]="h1",o[o.h2=2]="h2",o[o.h3=3]="h3"},5359:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyItemType=void 0,(o=t.DocumentationLegacyItemType||(t.DocumentationLegacyItemType={})).group="Group",o.page="Page"},9437:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageAssetType=void 0,(o=t.DocumentationLegacyPageAssetType||(t.DocumentationLegacyPageAssetType={})).image="image",o.figmaFrame="figmaFrame"},4649:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockThemeType=void 0,(o=t.DocumentationLegacyPageBlockThemeType||(t.DocumentationLegacyPageBlockThemeType={})).override="Override",o.comparison="Comparison"},8560:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockType=void 0,(o=t.DocumentationLegacyPageBlockType||(t.DocumentationLegacyPageBlockType={})).text="Text",o.heading="Heading",o.code="Code",o.unorderedList="UnorderedList",o.orderedList="OrderedList",o.quote="Quote",o.callout="Callout",o.divider="Divider",o.image="Image",o.token="Token",o.tokenList="TokenList",o.tokenGroup="TokenGroup",o.shortcuts="Shortcuts",o.link="Link",o.figmaEmbed="FigmaEmbed",o.youtubeEmbed="YoutubeEmbed",o.storybookEmbed="StorybookEmbed",o.genericEmbed="Embed",o.figmaFrames="FigmaFrames",o.custom="Custom",o.renderCode="RenderCode",o.componentAssets="ComponentAssets",o.column="Column",o.columnItem="ColumnItem",o.tabs="Tabs",o.tabItem="TabItem",o.table="Table",o.tableCell="TableCell",o.tableRow="TableRow"},4914:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameAlignment=void 0,(o=t.FrameAlignment||(t.FrameAlignment={})).frameHeight="FrameHeight",o.center="Center"},5986:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameLayout=void 0,(o=t.FrameLayout||(t.FrameLayout={})).c8="C8",o.c7="C7",o.c6="C6",o.c5="C5",o.c4="C4",o.c3="C3",o.c2="C2",o.c1="C1",o.c175="C1_75"},4667:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GradientType=void 0,(o=t.GradientType||(t.GradientType={})).linear="Linear",o.radial="Radial",o.angular="Angular"},4336:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.RichTextSpanAttributeType=void 0,(o=t.RichTextSpanAttributeType||(t.RichTextSpanAttributeType={})).bold="Bold",o.italic="Italic",o.link="Link",o.strikethrough="Strikethrough",o.code="Code"},5467:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowType=void 0,(o=t.ShadowType||(t.ShadowType={})).drop="Drop",o.inner="Inner"},1694:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=void 0,(o=t.SourceType||(t.SourceType={})).figma="Figma",o.tokenStudio="TokenStudio"},2047:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextCase=void 0,(o=t.TextCase||(t.TextCase={})).original="Original",o.upper="Upper",o.lower="Lower",o.camel="Camel",o.smallCaps="SmallCaps"},5780:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextDecoration=void 0,(o=t.TextDecoration||(t.TextDecoration={})).original="None",o.underline="Underline",o.strikethrough="Strikethrough"},1256:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DT_TOKEN_TYPES=t.tokenTypeIsReferencable=t.REFERENCABLE_TOKEN_TYPES=t.REPLACABLE_TOKEN_TYPES=t.tokenTypeIsNonPure=t.tokenTypeIsPure=t.PURE_TOKEN_TYPES=t.ALL_TOKEN_TYPES=t.MS_DIMENSION_TOKEN_TYPES=t.RAW_DIMENSION_TOKEN_TYPES=t.DIMENSION_TOKEN_TYPES=t.OPTION_TOKEN_TYPES=t.STRING_TOKEN_TYPES=t.TokenType=void 0,function(e){e.color="Color",e.typography="Typography",e.dimension="Dimension",e.size="Size",e.space="Space",e.opacity="Opacity",e.fontSize="FontSize",e.lineHeight="LineHeight",e.letterSpacing="LetterSpacing",e.paragraphSpacing="ParagraphSpacing",e.borderWidth="BorderWidth",e.radius="BorderRadius",e.duration="Duration",e.zIndex="ZIndex",e.shadow="Shadow",e.border="Border",e.gradient="Gradient",e.string="String",e.productCopy="ProductCopy",e.fontFamily="FontFamily",e.fontWeight="FontWeight",e.textCase="TextCase",e.textDecoration="TextDecoration",e.visibility="Visibility",e.blur="Blur"}(o=t.TokenType||(t.TokenType={})),t.STRING_TOKEN_TYPES=[o.string,o.productCopy,o.fontFamily,o.fontWeight],t.OPTION_TOKEN_TYPES=[o.textCase,o.textDecoration,o.visibility],t.DIMENSION_TOKEN_TYPES=[o.dimension,o.size,o.space,o.opacity,o.fontSize,o.lineHeight,o.letterSpacing,o.paragraphSpacing,o.borderWidth,o.radius,o.duration,o.zIndex],t.RAW_DIMENSION_TOKEN_TYPES=[o.opacity,o.zIndex],t.MS_DIMENSION_TOKEN_TYPES=[o.duration],t.ALL_TOKEN_TYPES=[...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES,o.color,o.gradient,o.border,o.radius,o.shadow,o.typography,o.blur],t.PURE_TOKEN_TYPES=[...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES],t.tokenTypeIsPure=e=>t.PURE_TOKEN_TYPES.includes(e),t.tokenTypeIsNonPure=e=>!(0,t.tokenTypeIsPure)(e),t.REPLACABLE_TOKEN_TYPES=[o.color,...t.DIMENSION_TOKEN_TYPES,...t.STRING_TOKEN_TYPES,...t.OPTION_TOKEN_TYPES],t.REFERENCABLE_TOKEN_TYPES=[o.color,...t.DIMENSION_TOKEN_TYPES,o.fontFamily,o.fontWeight,o.textCase,o.textDecoration],t.tokenTypeIsReferencable=e=>t.REFERENCABLE_TOKEN_TYPES.includes(e),t.DT_TOKEN_TYPES=[o.color,o.shadow,o.gradient,o.typography,o.border,...t.DIMENSION_TOKEN_TYPES,o.fontFamily,o.fontWeight,...t.OPTION_TOKEN_TYPES]},5389:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.MS_UNITS=t.PX_UNITS=t.RAW_UNITS=t.LINE_HEIGHT_UNITS=t.SIZE_UNITS=t.Unit=void 0,function(e){e.pixels="Pixels",e.percent="Percent",e.rem="Rem",e.ms="Ms",e.raw="Raw"}(o=t.Unit||(t.Unit={})),t.SIZE_UNITS=[o.pixels,o.percent,o.rem],t.LINE_HEIGHT_UNITS=[o.pixels,o.percent,o.rem,o.raw],t.RAW_UNITS=[o.raw],t.PX_UNITS=[o.pixels],t.MS_UNITS=[o.ms]},2916:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.UserRole=void 0,(o=t.UserRole||(t.UserRole={})).owner="Owner",o.admin="Admin",o.creator="Creator",o.viewer="Viewer",o.billing="Billing"},6398:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityType=void 0,(o=t.VisibilityType||(t.VisibilityType={})).visible="Visible",o.hidden="Hidden"},4838:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryAuthType=void 0,(o=t.WorkspaceNPMRegistryAuthType||(t.WorkspaceNPMRegistryAuthType={})).basic="Basic",o.bearer="Bearer"},2015:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryType=void 0,(o=t.WorkspaceNPMRegistryType||(t.WorkspaceNPMRegistryType={})).npmJS="NPMJS",o.gitHub="GitHub",o.azureDevOps="AzureDevOps",o.artifactory="Artifactory",o.custom="Custom"},4357:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionPlanInterval=void 0,(o=t.WorkspaceSubscriptionPlanInterval||(t.WorkspaceSubscriptionPlanInterval={})).yearly="yearly",o.monthly="monthly"},743:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionProductCode=void 0,(o=t.WorkspaceSubscriptionProductCode||(t.WorkspaceSubscriptionProductCode={})).free="free",o.team="team",o.teamTest="team_test",o.company="company",o.enterprise="enterprise"},5841:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionStatus=void 0,(o=t.WorkspaceSubscriptionStatus||(t.WorkspaceSubscriptionStatus={})).active="active",o.gracePeriod="gracePeriod",o.cancelled="cancelled",o.suspended="suspended"},3803:(e,t)=>{var o,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PulsarExecutor=t.OutputFileType=void 0,(r=t.OutputFileType||(t.OutputFileType={})).copyRemoteUrl="copyRemoteUrl",r.text="text",r.binary="binary",(o=t.PulsarExecutor||(t.PulsarExecutor={})).supernova="supernova",o.local="local"}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var a=o[t]={exports:{}};return e[t](a,a.exports,r),a.exports}var n={};(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.UserRole=e.Unit=e.TokenType=e.TextDecoration=e.TextCase=e.ShadowType=e.RichTextSpanAttributeType=e.GradientType=e.FrameLayout=e.FrameAlignment=e.SourceType=e.DocsImageRefType=e.DocsLinkRefType=e.DocsSectionType=e.DocsEntityType=e.DocsEntityGroupBehavior=e.DocsBlockTextPropertyStyle=e.DocsBlockRichTextPropertyStyle=e.DocsBlockOptionRenderingStyle=e.DocsBlockItemVariantLayoutWidth=e.DocsBlockItemVariantLayoutType=e.DocsBlockItemPropertyType=e.DocsBlockItemPropertyTextStyle=e.DocsBlockItemPropertyRichTextStyle=e.DocsBlockItemPropertyOptionRenderingStyle=e.DocsBlockItemEntityType=e.DocsBlockImagePropertyAspectRatio=e.DocsBlockBehaviorSelectionType=e.DocsBlockBehaviorDataType=e.DocumentationLegacyPageBlockShortcutType=e.DocumentationLegacyPageBlockThemeType=e.DocumentationLegacyPageBlockType=e.DocumentationLegacyPageAssetType=e.DocumentationLegacyItemType=e.DocumentationLegacyHeadingType=e.DocumentationLegacyGroupBehavior=e.DocumentationLegacyCalloutType=e.BorderStyle=e.BorderPosition=e.BlurType=e.AssetScaleType=e.AssetScale=e.AssetFormat=e.Alignment=e.ALL_TOKEN_TYPES=e.ALL_BORDER_STYLES=e.ALL_BORDER_POSITIONS=e.OPTION_TOKEN_TYPES=e.STRING_TOKEN_TYPES=e.DIMENSION_TOKEN_TYPES=void 0,e.PulsarExecutor=e.OutputFileType=e.CustomDomainState=e.CustomDomainErrorCode=e.ImportWarningType=e.WorkspaceNPMRegistryType=e.WorkspaceNPMRegistryAuthType=e.WorkspaceSubscriptionStatus=e.WorkspaceSubscriptionProductCode=e.WorkspaceSubscriptionPlanInterval=e.VisibilityType=void 0;var t=r(1256);Object.defineProperty(e,"DIMENSION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.DIMENSION_TOKEN_TYPES}}),Object.defineProperty(e,"STRING_TOKEN_TYPES",{enumerable:!0,get:function(){return t.STRING_TOKEN_TYPES}}),Object.defineProperty(e,"OPTION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.OPTION_TOKEN_TYPES}});var o=r(6675);Object.defineProperty(e,"ALL_BORDER_POSITIONS",{enumerable:!0,get:function(){return o.ALL_BORDER_POSITIONS}});var a=r(6701);Object.defineProperty(e,"ALL_BORDER_STYLES",{enumerable:!0,get:function(){return a.ALL_BORDER_STYLES}});var i=r(1256);Object.defineProperty(e,"ALL_TOKEN_TYPES",{enumerable:!0,get:function(){return i.ALL_TOKEN_TYPES}});var l=r(4222);Object.defineProperty(e,"Alignment",{enumerable:!0,get:function(){return l.Alignment}});var c=r(1334);Object.defineProperty(e,"AssetFormat",{enumerable:!0,get:function(){return c.AssetFormat}});var s=r(1940);Object.defineProperty(e,"AssetScale",{enumerable:!0,get:function(){return s.AssetScale}});var u=r(959);Object.defineProperty(e,"AssetScaleType",{enumerable:!0,get:function(){return u.AssetScaleType}});var p=r(9257);Object.defineProperty(e,"BlurType",{enumerable:!0,get:function(){return p.BlurType}});var d=r(6675);Object.defineProperty(e,"BorderPosition",{enumerable:!0,get:function(){return d.BorderPosition}});var y=r(6701);Object.defineProperty(e,"BorderStyle",{enumerable:!0,get:function(){return y.BorderStyle}});var T=r(4782);Object.defineProperty(e,"DocumentationLegacyCalloutType",{enumerable:!0,get:function(){return T.DocumentationLegacyCalloutType}});var m=r(8549);Object.defineProperty(e,"DocumentationLegacyGroupBehavior",{enumerable:!0,get:function(){return m.DocumentationLegacyGroupBehavior}});var f=r(1931);Object.defineProperty(e,"DocumentationLegacyHeadingType",{enumerable:!0,get:function(){return f.DocumentationLegacyHeadingType}});var g=r(5359);Object.defineProperty(e,"DocumentationLegacyItemType",{enumerable:!0,get:function(){return g.DocumentationLegacyItemType}});var S=r(9437);Object.defineProperty(e,"DocumentationLegacyPageAssetType",{enumerable:!0,get:function(){return S.DocumentationLegacyPageAssetType}});var b=r(8560);Object.defineProperty(e,"DocumentationLegacyPageBlockType",{enumerable:!0,get:function(){return b.DocumentationLegacyPageBlockType}});var v=r(4649);Object.defineProperty(e,"DocumentationLegacyPageBlockThemeType",{enumerable:!0,get:function(){return v.DocumentationLegacyPageBlockThemeType}});var h=r(3476);Object.defineProperty(e,"DocumentationLegacyPageBlockShortcutType",{enumerable:!0,get:function(){return h.DocumentationLegacyPageBlockShortcutType}});var P=r(4934);Object.defineProperty(e,"DocsBlockBehaviorDataType",{enumerable:!0,get:function(){return P.DocsBlockBehaviorDataType}});var k=r(8081);Object.defineProperty(e,"DocsBlockBehaviorSelectionType",{enumerable:!0,get:function(){return k.DocsBlockBehaviorSelectionType}});var C=r(9534);Object.defineProperty(e,"DocsBlockImagePropertyAspectRatio",{enumerable:!0,get:function(){return C.DocsBlockImagePropertyAspectRatio}});var O=r(1043);Object.defineProperty(e,"DocsBlockItemEntityType",{enumerable:!0,get:function(){return O.DocsBlockItemEntityType}});var _=r(3947);Object.defineProperty(e,"DocsBlockItemPropertyOptionRenderingStyle",{enumerable:!0,get:function(){return _.DocsBlockItemPropertyOptionRenderingStyle}});var D=r(4742);Object.defineProperty(e,"DocsBlockItemPropertyRichTextStyle",{enumerable:!0,get:function(){return D.DocsBlockItemPropertyRichTextStyle}});var I=r(7825);Object.defineProperty(e,"DocsBlockItemPropertyTextStyle",{enumerable:!0,get:function(){return I.DocsBlockItemPropertyTextStyle}});var x=r(6751);Object.defineProperty(e,"DocsBlockItemPropertyType",{enumerable:!0,get:function(){return x.DocsBlockItemPropertyType}});var E=r(6777);Object.defineProperty(e,"DocsBlockItemVariantLayoutType",{enumerable:!0,get:function(){return E.DocsBlockItemVariantLayoutType}});var R=r(9279);Object.defineProperty(e,"DocsBlockItemVariantLayoutWidth",{enumerable:!0,get:function(){return R.DocsBlockItemVariantLayoutWidth}});var B=r(5271);Object.defineProperty(e,"DocsBlockOptionRenderingStyle",{enumerable:!0,get:function(){return B.DocsBlockOptionRenderingStyle}});var N=r(3274);Object.defineProperty(e,"DocsBlockRichTextPropertyStyle",{enumerable:!0,get:function(){return N.DocsBlockRichTextPropertyStyle}});var j=r(6001);Object.defineProperty(e,"DocsBlockTextPropertyStyle",{enumerable:!0,get:function(){return j.DocsBlockTextPropertyStyle}});var F=r(1755);Object.defineProperty(e,"DocsEntityGroupBehavior",{enumerable:!0,get:function(){return F.DocsEntityGroupBehavior}});var L=r(8240);Object.defineProperty(e,"DocsEntityType",{enumerable:!0,get:function(){return L.DocsEntityType}});var M=r(4142);Object.defineProperty(e,"DocsSectionType",{enumerable:!0,get:function(){return M.DocsSectionType}});var A=r(2695);Object.defineProperty(e,"DocsLinkRefType",{enumerable:!0,get:function(){return A.DocsLinkRefType}});var w=r(275);Object.defineProperty(e,"DocsImageRefType",{enumerable:!0,get:function(){return w.DocsImageRefType}});var H=r(1694);Object.defineProperty(e,"SourceType",{enumerable:!0,get:function(){return H.SourceType}});var V=r(4914);Object.defineProperty(e,"FrameAlignment",{enumerable:!0,get:function(){return V.FrameAlignment}});var $=r(5986);Object.defineProperty(e,"FrameLayout",{enumerable:!0,get:function(){return $.FrameLayout}});var W=r(4667);Object.defineProperty(e,"GradientType",{enumerable:!0,get:function(){return W.GradientType}});var U=r(4336);Object.defineProperty(e,"RichTextSpanAttributeType",{enumerable:!0,get:function(){return U.RichTextSpanAttributeType}});var G=r(5467);Object.defineProperty(e,"ShadowType",{enumerable:!0,get:function(){return G.ShadowType}});var Y=r(2047);Object.defineProperty(e,"TextCase",{enumerable:!0,get:function(){return Y.TextCase}});var K=r(5780);Object.defineProperty(e,"TextDecoration",{enumerable:!0,get:function(){return K.TextDecoration}});var z=r(1256);Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return z.TokenType}});var Z=r(5389);Object.defineProperty(e,"Unit",{enumerable:!0,get:function(){return Z.Unit}});var q=r(2916);Object.defineProperty(e,"UserRole",{enumerable:!0,get:function(){return q.UserRole}});var J=r(6398);Object.defineProperty(e,"VisibilityType",{enumerable:!0,get:function(){return J.VisibilityType}});var Q=r(4357);Object.defineProperty(e,"WorkspaceSubscriptionPlanInterval",{enumerable:!0,get:function(){return Q.WorkspaceSubscriptionPlanInterval}});var X=r(743);Object.defineProperty(e,"WorkspaceSubscriptionProductCode",{enumerable:!0,get:function(){return X.WorkspaceSubscriptionProductCode}});var ee=r(5841);Object.defineProperty(e,"WorkspaceSubscriptionStatus",{enumerable:!0,get:function(){return ee.WorkspaceSubscriptionStatus}});var te=r(4838);Object.defineProperty(e,"WorkspaceNPMRegistryAuthType",{enumerable:!0,get:function(){return te.WorkspaceNPMRegistryAuthType}});var oe=r(2015);Object.defineProperty(e,"WorkspaceNPMRegistryType",{enumerable:!0,get:function(){return oe.WorkspaceNPMRegistryType}});var re=r(829);Object.defineProperty(e,"ImportWarningType",{enumerable:!0,get:function(){return re.ImportWarningType}});var ne=r(3611);Object.defineProperty(e,"CustomDomainErrorCode",{enumerable:!0,get:function(){return ne.CustomDomainErrorCode}});var ae=r(6530);Object.defineProperty(e,"CustomDomainState",{enumerable:!0,get:function(){return ae.CustomDomainState}});var ie=r(3803);Object.defineProperty(e,"OutputFileType",{enumerable:!0,get:function(){return ie.OutputFileType}}),Object.defineProperty(e,"PulsarExecutor",{enumerable:!0,get:function(){return ie.PulsarExecutor}})})();var a=t;for(var i in n)a[i]=n[i];n.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})()},576:(e,t,o)=>{"use strict";o.r(t),o.d(t,{camelCase:()=>T,camelCaseTransform:()=>d,camelCaseTransformMerge:()=>y,capitalCase:()=>g,capitalCaseTransform:()=>f,constantCase:()=>b,dotCase:()=>v,headerCase:()=>h,noCase:()=>l,paramCase:()=>P,pascalCase:()=>p,pascalCaseTransform:()=>s,pascalCaseTransformMerge:()=>u,pathCase:()=>k,sentenceCase:()=>O,sentenceCaseTransform:()=>C,snakeCase:()=>_});var r=function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o0&&o>="0"&&o<="9"?"_"+o+r:""+o.toUpperCase()+r}function u(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function p(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"",transform:s},t))}function d(e,t){return 0===t?e.toLowerCase():s(e,t)}function y(e,t){return 0===t?e.toLowerCase():u(e)}function T(e,t){return void 0===t&&(t={}),p(e,r({transform:d},t))}function m(e){return e.charAt(0).toUpperCase()+e.substr(1)}function f(e){return m(e.toLowerCase())}function g(e,t){return void 0===t&&(t={}),l(e,r({delimiter:" ",transform:f},t))}function S(e){return e.toUpperCase()}function b(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"_",transform:S},t))}function v(e,t){return void 0===t&&(t={}),l(e,r({delimiter:"."},t))}function h(e,t){return void 0===t&&(t={}),g(e,r({delimiter:"-"},t))}function P(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"-"},t))}function k(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"/"},t))}function C(e,t){var o=e.toLowerCase();return 0===t?m(o):o}function O(e,t){return void 0===t&&(t={}),l(e,r({delimiter:" ",transform:C},t))}function _(e,t){return void 0===t&&(t={}),v(e,r({delimiter:"_"},t))}},961:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertedToken=void 0;const r=o(142),n=o(907),a=o(607);function i(e,t){const o=a.exportConfiguration.tokenPrefixes[e.tokenType],n=t.find((t=>t.id===e.parentGroupId));return r.NamingHelper.codeSafeVariableNameForToken(e,a.exportConfiguration.tokenNameStyle,n,o)}t.convertedToken=function(e,t,o){const l=i(e,o);let c=r.CSSHelper.tokenToCSS(e,t,{allowReferences:a.exportConfiguration.useReferences,decimals:a.exportConfiguration.colorPrecision,colorFormat:a.exportConfiguration.colorFormat,tokenToVariableRef:e=>`var(--${i(e,o)})`});if(a.exportConfiguration.useFontWeightAsNumbers&&e.tokenType===n.TokenType.fontWeight){let e=+c?.replaceAll('"',"");c=Number.isNaN(e)?c:e}const s=" ".repeat(a.exportConfiguration.indent);return a.exportConfiguration.showDescriptions&&e.description?`${s}/* ${e.description.trim()} */\n${s}--${l}: ${c};`:`${s}--${l}: ${c};`}},650:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indexOutputFile=void 0;const r=o(142),n=o(907),a=o(607);t.indexOutputFile=function(e){let t=Object.values(n.TokenType).map((t=>{const o=`@import "./${a.exportConfiguration.styleFileNames[t]}";`;if(a.exportConfiguration.generateEmptyFiles)return o;return e.filter((e=>e.tokenType===t)).length>0?o:null})).filter((e=>null!==e)).join("\n");return a.exportConfiguration.showGeneratedFileDisclaimer&&(t=`/* ${a.exportConfiguration.disclaimer} */\n${t}`),r.FileHelper.createTextFile({relativePath:a.exportConfiguration.baseIndexFilePath,fileName:a.exportConfiguration.indexFileName,content:t})}},37:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.styleOutputFile=void 0;const r=o(142),n=o(607),a=o(961);t.styleOutputFile=function(e,t,o){const i=t.filter((t=>t.tokenType===e));if(!n.exportConfiguration.generateEmptyFiles&&0===i.length)return null;const l=new Map(t.map((e=>[e.id,e])));let c=`:root {\n${i.map((e=>(0,a.convertedToken)(e,l,o))).join("\n")}\n}`;return n.exportConfiguration.showGeneratedFileDisclaimer&&(c=`/* ${n.exportConfiguration.disclaimer} */\n${c}`),r.FileHelper.createTextFile({relativePath:n.exportConfiguration.baseStyleFilePath,fileName:n.exportConfiguration.styleFileNames[e],content:c})}},607:(e,t,o)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportConfiguration=void 0;const r=o(907),n=o(650),a=o(37);t.exportConfiguration=Pulsar.exportConfig(),Pulsar.export((async(e,t)=>{const o={designSystemId:t.dsId,versionId:t.versionId};let i=await e.tokens.getTokens(o),l=await e.tokens.getTokenGroups(o);if(t.brandId){const r=(await e.brands.getBrands(o)).find((e=>e.id===t.brandId||e.idInVersion===t.brandId));if(!r)throw new Error(`Unable to find brand ${t.brandId}.`);i=i.filter((e=>e.brandId===r.id)),l=l.filter((e=>e.brandId===r.id))}if(t.themeId){const r=(await e.tokens.getTokenThemes(o)).find((e=>e.id===t.themeId||e.idInVersion===t.themeId));if(!r)throw new Error("Unable to apply theme which doesn't exist in the system.");i=await e.tokens.computeTokensByApplyingThemes(i,[r])}return[...Object.values(r.TokenType).map((e=>(0,a.styleOutputFile)(e,i,l))).filter((e=>null!==e)),(0,n.indexOutputFile)(i)]}))}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};o(607)})(); \ No newline at end of file diff --git a/exporters/css/package.json b/exporters/css/package.json index e025aad..700957b 100644 --- a/exporters/css/package.json +++ b/exporters/css/package.json @@ -1,6 +1,6 @@ { "name": "@supernovaio/exporter-css", - "version": "2.0.1", + "version": "2.0.2", "description": "Export your design system tokens into CSS variables and definitions using Supernova.io export engine", "main": "index.js", "scripts": { diff --git a/exporters/css/src/content/token.ts b/exporters/css/src/content/token.ts index 8fee25a..a6db8cb 100644 --- a/exporters/css/src/content/token.ts +++ b/exporters/css/src/content/token.ts @@ -1,5 +1,5 @@ import { NamingHelper, CSSHelper } from "@supernovaio/export-helpers" -import { Token, TokenGroup } from "@supernovaio/sdk-exporters" +import { Token, TokenGroup, TokenType } from "@supernovaio/sdk-exporters" import { exportConfiguration } from ".." export function convertedToken(token: Token, mappedTokens: Map, tokenGroups: Array): string { @@ -7,7 +7,7 @@ export function convertedToken(token: Token, mappedTokens: Map, t const name = tokenVariableName(token, tokenGroups) // Then creating the value of the token, using another helper function - const value = CSSHelper.tokenToCSS(token, mappedTokens, { + let value: string | number = CSSHelper.tokenToCSS(token, mappedTokens, { allowReferences: exportConfiguration.useReferences, decimals: exportConfiguration.colorPrecision, colorFormat: exportConfiguration.colorFormat, @@ -15,6 +15,12 @@ export function convertedToken(token: Token, mappedTokens: Map, t return `var(--${tokenVariableName(t, tokenGroups)})` }, }) + + if (exportConfiguration.useFontWeightAsNumbers && token.tokenType === TokenType.fontWeight) { + let candidate = +(value?.replaceAll('"', '')) + value = Number.isNaN(candidate) ? value : candidate + } + const indentString = " ".repeat(exportConfiguration.indent) if (exportConfiguration.showDescriptions && token.description) {