From 44981ec0170e8f828a056ec330340a0cef395fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Tue, 26 Nov 2024 16:27:25 +0100 Subject: [PATCH] Feat(exporter-tokens): Sort typography tokens and remove unused parameters --- exporters/tokens/exporter.json | 2 +- exporters/tokens/generated/exporter.cjs | 74 +++++++++---------- exporters/tokens/src/config/fileConfig.ts | 1 - .../__tests__/mixinGenerator.test.ts | 5 +- .../__tests__/stylesGenerator.test.ts | 12 +-- .../__tests__/stylesObjectGenerator.test.ts | 9 +-- .../tokens/src/generators/contentGenerator.ts | 10 +-- .../tokens/src/generators/fileGenerator.ts | 2 +- .../tokens/src/generators/mixinGenerator.ts | 3 +- .../tokens/src/generators/stylesGenerator.ts | 3 +- .../src/generators/stylesObjectGenerator.ts | 7 +- exporters/tokens/src/helpers/tokenHelper.ts | 1 - 12 files changed, 52 insertions(+), 77 deletions(-) diff --git a/exporters/tokens/exporter.json b/exporters/tokens/exporter.json index 65253fc940..75bcfe2416 100644 --- a/exporters/tokens/exporter.json +++ b/exporters/tokens/exporter.json @@ -4,7 +4,7 @@ "description": "Spirit Tokens Exporter allows you to export a tokens from Supernova", "author": "Spirit Design System Team ", "organization": "Alma Career", - "version": "1.0.1", + "version": "1.1.0", "usesBrands": true, "usesThemes": true, "executable": "/generated/exporter.cjs", diff --git a/exporters/tokens/generated/exporter.cjs b/exporters/tokens/generated/exporter.cjs index 4a2c8b5382..c4f91e7607 100644 --- a/exporters/tokens/generated/exporter.cjs +++ b/exporters/tokens/generated/exporter.cjs @@ -1,68 +1,68 @@ -"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function dt(n){if(n.__esModule)return n;var a=n.default;if(typeof a=="function"){var c=function i(){return this instanceof i?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};c.prototype=a.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var m=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(c,i,m.get?m:{enumerable:!0,get:function(){return n[i]}})}),c}var P={},M={},W;function oe(){return W||(W=1,function(n){(()=>{var a={4379:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SupernovaError=void 0;class o extends Error{constructor(s,T,l,p,u,d,g){super(s),this.code=T,this.status=l,this.formErrors=p,this.requestId=u,this.serverTime=d,this.url=g}static fromNetworkResponse(s,T,l){var p,u,d;return new o(s.message,s.errorCode||s.reason||s.label||null,s.code||T,(p=s.formErrors)!==null&&p!==void 0?p:null,(u=s.requestId)!==null&&u!==void 0?u:null,(d=s.serverTime)!==null&&d!==void 0?d:null,l)}static fromNoNetworkResponse(s){return new o("No network or internet unreachable","NO_NETWORK",12163,null,new Date().toISOString(),null,s)}static fromCode(s){return new o(s,s,null,null,null,null,null)}static fromMessage(s){return new o(s,null,null,null,null,null,null)}isFieldErrored(s){return this.formErrors.find(T=>T.key===s)!==void 0}errorForField(s){var T;return(T=this.formErrors.find(l=>l.key===s))!==null&&T!==void 0?T:null}toString(){var s,T,l,p,u,d;return` +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function dt(n){if(n.__esModule)return n;var a=n.default;if(typeof a=="function"){var s=function i(){return this instanceof i?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};s.prototype=a.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var m=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(s,i,m.get?m:{enumerable:!0,get:function(){return n[i]}})}),s}var P={},M={},G;function re(){return G||(G=1,function(n){(()=>{var a={4379:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SupernovaError=void 0;class o extends Error{constructor(c,T,u,p,l,d,g){super(c),this.code=T,this.status=u,this.formErrors=p,this.requestId=l,this.serverTime=d,this.url=g}static fromNetworkResponse(c,T,u){var p,l,d;return new o(c.message,c.errorCode||c.reason||c.label||null,c.code||T,(p=c.formErrors)!==null&&p!==void 0?p:null,(l=c.requestId)!==null&&l!==void 0?l:null,(d=c.serverTime)!==null&&d!==void 0?d:null,u)}static fromNoNetworkResponse(c){return new o("No network or internet unreachable","NO_NETWORK",12163,null,new Date().toISOString(),null,c)}static fromCode(c){return new o(c,c,null,null,null,null,null)}static fromMessage(c){return new o(c,null,null,null,null,null,null)}isFieldErrored(c){return this.formErrors.find(T=>T.key===c)!==void 0}errorForField(c){var T;return(T=this.formErrors.find(u=>u.key===c))!==null&&T!==void 0?T:null}toString(){var c,T,u,p,l,d;return` Error thrown: ${this.message} - Code: ${(s=this.code)!==null&&s!==void 0?s:"-"} + Code: ${(c=this.code)!==null&&c!==void 0?c:"-"} Status: ${(T=this.status)!==null&&T!==void 0?T:"-"} Fields: ${JSON.stringify(this.formErrors,null,2)} - Request ID: ${(l=this.requestId)!==null&&l!==void 0?l:"-"} + Request ID: ${(u=this.requestId)!==null&&u!==void 0?u:"-"} Server time: ${(p=this.serverTime)!==null&&p!==void 0?p:"-"} - Network URL: ${(u=this.url)!==null&&u!==void 0?u:"-"} + Network URL: ${(l=this.url)!==null&&l!==void 0?l:"-"} Stack: ${(d=this.stack)!==null&&d!==void 0?d:"-"} - `}toHumanReadable(){return`${this.message}${this.requestId?` (request ${this.requestId})`:""}`}}t.SupernovaError=o},9932:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.docsImageRefToUrl=t.DocsImageRefType=void 0,function(e){e.resource="Resource",e.figmaNode="FigmaNode"}(o||(t.DocsImageRefType=o={})),t.docsImageRefToUrl=function(e,s,T){var l;if(e)switch(e.type){case o.resource:return(l=e.resource)===null||l===void 0?void 0:l.url;case o.figmaNode:return!e.figmaNode||!e.figmaNode.sourceId||!e.figmaNode.frameReferenceId?void 0:s.resources.getFigmaFrameHostedUrl({designSystemId:T.dsId,versionId:T.versionId},e.figmaNode.frameReferenceId);default:return}}},5673:(r,t)=>{var o;function e(s){switch(s.type){case o.documentationItem:return`@page:${s.documentationItemId}`;case o.pageHeading:return`@page:${s.documentationItemId}#${s.pageHeadingId}`;case o.url:return s.url;default:return}}Object.defineProperty(t,"__esModule",{value:!0}),t.linkAttributeToDocsLink=t.docsLinkToLinkAttributes=t.docsLinkToUrl=t.DocsLinkRefType=void 0,function(s){s.documentationItem="DocumentationItem",s.pageHeading="PageHeading",s.url="Url"}(o||(t.DocsLinkRefType=o={})),t.docsLinkToUrl=e,t.docsLinkToLinkAttributes=function(s){const T=e(s);if(T)return{href:T,target:s.openInNewTab?"_blank":"_self"}},t.linkAttributeToDocsLink=function(s,T){if(!s)return;const l=T==="_blank";if(s.startsWith("@page:")){if(s.includes("#")){const[p,u]=s.replace("@page:","").split("#");return{type:o.pageHeading,documentationItemId:p,pageHeadingId:u,openInNewTab:l}}return{type:o.documentationItem,documentationItemId:s.replace("@page:",""),openInNewTab:l}}return{type:o.url,url:s,openInNewTab:l}}},2657:(r,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=o={})),t.DocumentationLegacyPageBlockShortcut=class{constructor(e){var s;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&&(!((s=e.documentationItemPreview)===null||s===void 0)&&s.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,s){var T,l,p,u,d;let g=null;return e.title&&e.title.trim().length>0?g=e.title:s===o.internal?g=(l=(T=e.documentationItemPreview)===null||T===void 0?void 0:T.title)!==null&&l!==void 0?l:null:s===o.external&&(g=(d=(u=(p=e.urlPreview)===null||p===void 0?void 0:p.title)!==null&&u!==void 0?u:e.url)!==null&&d!==void 0?d:null),g&&g.trim().length!==0?g:null}shortcutDescriptionFromModel(e,s){var T;let l=null;return e.description&&e.description.trim().length>0?l=e.description:s===o.external&&(l=(T=e.urlPreview)===null||T===void 0?void 0:T.description),l&&l.trim().length!==0?l:null}shortcutPreviewUrlFromModel(e){var s,T,l,p,u;return(u=(l=(s=e.assetUrl)!==null&&s!==void 0?s:(T=e.asset)===null||T===void 0?void 0:T.url)!==null&&l!==void 0?l:(p=e.urlPreview)===null||p===void 0?void 0:p.thumbnailUrl)!==null&&u!==void 0?u:null}}},7476:(r,t)=>{var o,e;Object.defineProperty(t,"__esModule",{value:!0}),t.TextAlignment=t.Alignment=void 0,function(s){s.left="Left",s.center="Center",s.stretch="Stretch"}(o||(t.Alignment=o={})),function(s){s.left="Left",s.center="Center",s.right="Right"}(e||(t.TextAlignment=e={}))},8738:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetFormat=void 0,function(e){e.png="png",e.pdf="pdf",e.svg="svg"}(o||(t.AssetFormat=o={}))},915:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScale=void 0,function(e){e.x1="x1",e.x2="x2",e.x3="x3",e.x4="x4"}(o||(t.AssetScale=o={}))},899:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScaleType=void 0,function(e){e.aspectFill="AspectFill",e.aspectFit="AspectFit"}(o||(t.AssetScaleType=o={}))},6192:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.BlurType=void 0,function(e){e.layer="Layer",e.background="Background"}(o||(t.BlurType=o={}))},1160:(r,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=o={})),t.ALL_BORDER_POSITIONS=[o.inside,o.center,o.outside]},4546:(r,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=o={})),t.ALL_BORDER_STYLES=[o.dashed,o.dotted,o.solid,o.groove]},8042:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportWarningType=void 0,function(e){e.UnsupportedFill="UnsupportedFill",e.UnsupportedStroke="UnsupportedStroke",e.UnsupportedEffect="UnsupportedEffect",e.StyleNotApplied="StyleNotApplied",e.NoPublishedStyles="NoPublishedStyles",e.NoPublishedComponents="NoPublishedComponents",e.NoPublishedAssets="NoPublishedAssets",e.NoVersionFound="NoVersionFound",e.ComponentHasNoThumbnail="ComponentHasNoThumbnail",e.DuplicateImportedStyleId="DuplicateImportedStyleId",e.DuplicateImportedStylePath="DuplicateImportedStylePath",e.NoPublishedElements="NoPublishedElements",e.NoUnpublishedStyles="NoUnpublishedStyles"}(o||(t.ImportWarningType=o={}))},5695:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainErrorCode=void 0,function(e){e.generalError="GeneralError",e.dnsNotConfigured="DNSNotConfigured",e.maintenance="Maintenance"}(o||(t.CustomDomainErrorCode=o={}))},7737:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainState=void 0,function(e){e.initial="Initial",e.domainSetupInProgress="DomainSetupInProgress",e.domainSetupFailed="DomainSetupFailed",e.domainSetupsSucces="DomainSetupSuccess",e.sslSetupInProgress="SSLSetupInProgress",e.sslSetupFailed="SSLSetupFailed",e.sslSetupSuccess="SSLSetupSuccess"}(o||(t.CustomDomainState=o={}))},5651:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorDataType=void 0,function(e){e.item="Item",e.token="Token",e.asset="Asset",e.component="Component",e.figmaNode="FigmaNode",e.figmaComponent="FigmaComponent"}(o||(t.DocsBlockBehaviorDataType=o={}))},3733:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorSelectionType=void 0,function(e){e.entity="Entity",e.group="Group",e.entityAndGroup="EntityAndGroup"}(o||(t.DocsBlockBehaviorSelectionType=o={}))},8890:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockImagePropertyAspectRatio=void 0,function(e){e.auto="Auto",e.square="Square",e.landscape="Landscape",e.portrait="Portrait",e.wide="Wide"}(o||(t.DocsBlockImagePropertyAspectRatio=o={}))},9377:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemEntityType=void 0,function(e){e.token="Token",e.tokenGroup="TokenGroup",e.asset="Asset",e.assetGroup="AssetGroup",e.component="Component",e.componentGroup="ComponentGroup"}(o||(t.DocsBlockItemEntityType=o={}))},5883:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyOptionRenderingStyle=void 0,function(e){e.segmentedControl="SegmentedControl",e.toggleButton="ToggleButton",e.select="Select",e.checkbox="Checkbox"}(o||(t.DocsBlockItemPropertyOptionRenderingStyle=o={}))},8061:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyRichTextStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.quote="Quote",e.callout="Callout",e.ol="OL",e.ul="UL"}(o||(t.DocsBlockItemPropertyRichTextStyle=o={}))},7479:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyTextStyle=void 0,function(e){e.small="Small",e.regular="Regular",e.bold="Bold"}(o||(t.DocsBlockItemPropertyTextStyle=o={}))},6839:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyType=void 0,function(e){e.richText="RichText",e.multiRichText="MultiRichText",e.text="Text",e.richTextEditor="RichTextEditor",e.boolean="Boolean",e.number="Number",e.singleSelect="SingleSelect",e.multiSelect="MultiSelect",e.image="Image",e.token="Token",e.tokenType="TokenType",e.tokenProperty="TokenProperty",e.component="Component",e.componentProperty="ComponentProperty",e.asset="Asset",e.assetProperty="AssetProperty",e.embedURL="EmbedURL",e.url="URL",e.markdown="Markdown",e.code="Code",e.codeSandbox="CodeSandbox",e.table="Table",e.divider="Divider",e.storybook="Storybook",e.color="Color",e.figmaNode="FigmaNode",e.figmaComponent="FigmaComponent"}(o||(t.DocsBlockItemPropertyType=o={}))},8095:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutType=void 0,function(e){e.column="Column",e.row="Row"}(o||(t.DocsBlockItemVariantLayoutType=o={}))},7291:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutWidth=void 0,function(e){e.c1="1",e.c2="2",e.c3="3",e.c4="4",e.c5="5",e.c6="6",e.c7="7",e.c8="8",e.c9="9",e.c10="10",e.c11="11",e.c12="12"}(o||(t.DocsBlockItemVariantLayoutWidth=o={}))},9133:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionColor=void 0,function(e){e.green="Green",e.red="Red",e.yellow="Yellow",e.blue="Blue",e.purple="Purple",e.orange="Orange",e.pink="Pink",e.teal="Teal",e.grey="Grey",e.lightGrey="LightGrey",e.cyan="Cyan",e.fuchsia="Fuchsia"}(o||(t.DocsBlockOptionColor=o={}))},5963:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionRenderingStyle=void 0,function(e){e.segmentedControl="SegmentedControl",e.toggleButton="ToggleButton",e.select="Select",e.checkbox="Checkbox"}(o||(t.DocsBlockOptionRenderingStyle=o={}))},6644:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockRichTextPropertyStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.quote="Quote",e.callout="Callout",e.default="Default"}(o||(t.DocsBlockRichTextPropertyStyle=o={}))},306:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockTextPropertyStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.default="Default",e.defaultBold="DefaultBold",e.defaultSemibold="DefaultSemibold",e.small="Small",e.smallBold="SmallBold",e.smallSemibold="SmallSemibold",e.custom="Custom"}(o||(t.DocsBlockTextPropertyStyle=o={}))},4068:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityGroupBehavior=void 0,function(e){e.group="Group",e.tabs="Tabs"}(o||(t.DocsEntityGroupBehavior=o={}))},1233:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityType=void 0,function(e){e.group="Group",e.page="Page"}(o||(t.DocsEntityType=o={}))},7971:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsSectionType=void 0,function(e){e.plain="Plain",e.tabs="Tabs"}(o||(t.DocsSectionType=o={}))},5102:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyCalloutType=void 0,function(e){e.info="Info",e.success="Success",e.warning="Warning",e.error="Error"}(o||(t.DocumentationLegacyCalloutType=o={}))},2123:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyGroupBehavior=void 0,function(e){e.group="Group",e.tabs="Tabs"}(o||(t.DocumentationLegacyGroupBehavior=o={}))},9896:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyHeadingType=void 0,function(e){e[e.h1=1]="h1",e[e.h2=2]="h2",e[e.h3=3]="h3"}(o||(t.DocumentationLegacyHeadingType=o={}))},7379:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyItemType=void 0,function(e){e.group="Group",e.page="Page"}(o||(t.DocumentationLegacyItemType=o={}))},1423:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageAssetType=void 0,function(e){e.image="image",e.figmaFrame="figmaFrame"}(o||(t.DocumentationLegacyPageAssetType=o={}))},1601:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockThemeType=void 0,function(e){e.override="Override",e.comparison="Comparison"}(o||(t.DocumentationLegacyPageBlockThemeType=o={}))},1846:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockType=void 0,function(e){e.text="Text",e.heading="Heading",e.code="Code",e.unorderedList="UnorderedList",e.orderedList="OrderedList",e.quote="Quote",e.callout="Callout",e.divider="Divider",e.image="Image",e.token="Token",e.tokenList="TokenList",e.tokenGroup="TokenGroup",e.shortcuts="Shortcuts",e.link="Link",e.figmaEmbed="FigmaEmbed",e.youtubeEmbed="YoutubeEmbed",e.storybookEmbed="StorybookEmbed",e.genericEmbed="Embed",e.figmaFrames="FigmaFrames",e.custom="Custom",e.renderCode="RenderCode",e.componentAssets="ComponentAssets",e.column="Column",e.columnItem="ColumnItem",e.tabs="Tabs",e.tabItem="TabItem",e.table="Table",e.tableCell="TableCell",e.tableRow="TableRow"}(o||(t.DocumentationLegacyPageBlockType=o={}))},1255:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameAlignment=void 0,function(e){e.frameHeight="FrameHeight",e.center="Center"}(o||(t.FrameAlignment=o={}))},3718:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameLayout=void 0,function(e){e.c8="C8",e.c7="C7",e.c6="C6",e.c5="C5",e.c4="C4",e.c3="C3",e.c2="C2",e.c1="C1",e.c175="C1_75"}(o||(t.FrameLayout=o={}))},1:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GradientType=void 0,function(e){e.linear="Linear",e.radial="Radial",e.angular="Angular"}(o||(t.GradientType=o={}))},934:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.IconSet=void 0,function(e){e.checkCircle="CheckCircle",e.crossCircle="CrossCircle",e.alert="Alert"}(o||(t.IconSet=o={}))},2674:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.RichTextSpanAttributeType=void 0,function(e){e.bold="Bold",e.italic="Italic",e.link="Link",e.strikethrough="Strikethrough",e.code="Code"}(o||(t.RichTextSpanAttributeType=o={}))},9125:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowType=void 0,function(e){e.drop="Drop",e.inner="Inner"}(o||(t.ShadowType=o={}))},4652:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=void 0,function(e){e.figma="Figma",e.tokenStudio="TokenStudio",e.figmaVariablesPlugin="FigmaVariablesPlugin"}(o||(t.SourceType=o={}))},922:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextCase=void 0,function(e){e.original="Original",e.upper="Upper",e.lower="Lower",e.camel="Camel",e.smallCaps="SmallCaps"}(o||(t.TextCase=o={}))},7040:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextDecoration=void 0,function(e){e.original="None",e.underline="Underline",e.strikethrough="Strikethrough"}(o||(t.TextDecoration=o={}))},3788:(r,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.shadow="Shadow",e.border="Border",e.gradient="Gradient",e.blur="Blur",e.radius="BorderRadius",e.borderWidth="BorderWidth",e.duration="Duration",e.fontSize="FontSize",e.dimension="Dimension",e.letterSpacing="LetterSpacing",e.lineHeight="LineHeight",e.opacity="Opacity",e.paragraphSpacing="ParagraphSpacing",e.size="Size",e.space="Space",e.zIndex="ZIndex",e.textDecoration="TextDecoration",e.textCase="TextCase",e.visibility="Visibility",e.fontFamily="FontFamily",e.fontWeight="FontWeight",e.string="String",e.productCopy="ProductCopy"}(o||(t.TokenType=o={})),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,o.string,...t.OPTION_TOKEN_TYPES]},8607:(r,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=o={})),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]},9478:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertRemoteToUserRole=t.UserRole=void 0;const e=o(4379);var s;(function(T){T.owner="Owner",T.admin="Admin",T.creator="Creator",T.contributor="Contributor",T.billing="Billing",T.viewer="Viewer"})(s||(t.UserRole=s={})),t.convertRemoteToUserRole=T=>{switch(T){case"Owner":return s.owner;case"Admin":return s.admin;case"Creator":return s.creator;case"Contributor":return s.contributor;case"Billing":return s.billing;case"Viewer":return s.viewer;default:throw e.SupernovaError.fromMessage(`Unknown role: ${T}`)}}},6141:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityType=void 0,function(e){e.visible="Visible",e.hidden="Hidden"}(o||(t.VisibilityType=o={}))},6298:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryAuthType=void 0,function(e){e.basic="Basic",e.bearer="Bearer"}(o||(t.WorkspaceNPMRegistryAuthType=o={}))},7968:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryType=void 0,function(e){e.npmJS="NPMJS",e.gitHub="GitHub",e.azureDevOps="AzureDevOps",e.artifactory="Artifactory",e.custom="Custom"}(o||(t.WorkspaceNPMRegistryType=o={}))},5503:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionPlanInterval=void 0,function(e){e.yearly="yearly",e.monthly="monthly"}(o||(t.WorkspaceSubscriptionPlanInterval=o={}))},4290:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionProductCode=void 0,function(e){e.free="free",e.team="team",e.teamTest="team_test",e.company="company",e.enterprise="enterprise"}(o||(t.WorkspaceSubscriptionProductCode=o={}))},3607:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionStatus=void 0,function(e){e.active="active",e.gracePeriod="gracePeriod",e.cancelled="cancelled",e.suspended="suspended"}(o||(t.WorkspaceSubscriptionStatus=o={}))},2802:(r,t)=>{var o,e;Object.defineProperty(t,"__esModule",{value:!0}),t.PulsarExecutor=t.OutputFileType=void 0,function(s){s.copyRemoteUrl="copyRemoteUrl",s.text="text",s.binary="binary"}(o||(t.OutputFileType=o={})),function(s){s.supernova="supernova",s.local="local"}(e||(t.PulsarExecutor=e={}))}},c={};function i(r){var t=c[r];if(t!==void 0)return t.exports;var o=c[r]={exports:{}};return a[r](o,o.exports,i),o.exports}var m={};(()=>{var r=m;Object.defineProperty(r,"__esModule",{value:!0}),r.TokenType=r.TextDecoration=r.TextCase=r.ShadowType=r.RichTextSpanAttributeType=r.GradientType=r.FrameLayout=r.FrameAlignment=r.IconSet=r.SourceType=r.DocsImageRefType=r.DocsLinkRefType=r.DocsSectionType=r.DocsEntityType=r.DocsEntityGroupBehavior=r.DocsBlockTextPropertyStyle=r.DocsBlockRichTextPropertyStyle=r.DocsBlockOptionColor=r.DocsBlockOptionRenderingStyle=r.DocsBlockItemVariantLayoutWidth=r.DocsBlockItemVariantLayoutType=r.DocsBlockItemPropertyType=r.DocsBlockItemPropertyTextStyle=r.DocsBlockItemPropertyRichTextStyle=r.DocsBlockItemPropertyOptionRenderingStyle=r.DocsBlockItemEntityType=r.DocsBlockImagePropertyAspectRatio=r.DocsBlockBehaviorSelectionType=r.DocsBlockBehaviorDataType=r.DocumentationLegacyPageBlockShortcutType=r.DocumentationLegacyPageBlockThemeType=r.DocumentationLegacyPageBlockType=r.DocumentationLegacyPageAssetType=r.DocumentationLegacyItemType=r.DocumentationLegacyHeadingType=r.DocumentationLegacyGroupBehavior=r.DocumentationLegacyCalloutType=r.BorderStyle=r.BorderPosition=r.BlurType=r.AssetScaleType=r.AssetScale=r.AssetFormat=r.Alignment=r.ALL_TOKEN_TYPES=r.ALL_BORDER_STYLES=r.ALL_BORDER_POSITIONS=r.OPTION_TOKEN_TYPES=r.STRING_TOKEN_TYPES=r.DIMENSION_TOKEN_TYPES=void 0,r.PulsarExecutor=r.OutputFileType=r.CustomDomainState=r.CustomDomainErrorCode=r.ImportWarningType=r.WorkspaceNPMRegistryType=r.WorkspaceNPMRegistryAuthType=r.WorkspaceSubscriptionStatus=r.WorkspaceSubscriptionProductCode=r.WorkspaceSubscriptionPlanInterval=r.VisibilityType=r.UserRole=r.Unit=void 0;var t=i(3788);Object.defineProperty(r,"DIMENSION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.DIMENSION_TOKEN_TYPES}}),Object.defineProperty(r,"STRING_TOKEN_TYPES",{enumerable:!0,get:function(){return t.STRING_TOKEN_TYPES}}),Object.defineProperty(r,"OPTION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.OPTION_TOKEN_TYPES}});var o=i(1160);Object.defineProperty(r,"ALL_BORDER_POSITIONS",{enumerable:!0,get:function(){return o.ALL_BORDER_POSITIONS}});var e=i(4546);Object.defineProperty(r,"ALL_BORDER_STYLES",{enumerable:!0,get:function(){return e.ALL_BORDER_STYLES}});var s=i(3788);Object.defineProperty(r,"ALL_TOKEN_TYPES",{enumerable:!0,get:function(){return s.ALL_TOKEN_TYPES}});var T=i(7476);Object.defineProperty(r,"Alignment",{enumerable:!0,get:function(){return T.Alignment}});var l=i(8738);Object.defineProperty(r,"AssetFormat",{enumerable:!0,get:function(){return l.AssetFormat}});var p=i(915);Object.defineProperty(r,"AssetScale",{enumerable:!0,get:function(){return p.AssetScale}});var u=i(899);Object.defineProperty(r,"AssetScaleType",{enumerable:!0,get:function(){return u.AssetScaleType}});var d=i(6192);Object.defineProperty(r,"BlurType",{enumerable:!0,get:function(){return d.BlurType}});var g=i(1160);Object.defineProperty(r,"BorderPosition",{enumerable:!0,get:function(){return g.BorderPosition}});var S=i(4546);Object.defineProperty(r,"BorderStyle",{enumerable:!0,get:function(){return S.BorderStyle}});var b=i(5102);Object.defineProperty(r,"DocumentationLegacyCalloutType",{enumerable:!0,get:function(){return b.DocumentationLegacyCalloutType}});var v=i(2123);Object.defineProperty(r,"DocumentationLegacyGroupBehavior",{enumerable:!0,get:function(){return v.DocumentationLegacyGroupBehavior}});var h=i(9896);Object.defineProperty(r,"DocumentationLegacyHeadingType",{enumerable:!0,get:function(){return h.DocumentationLegacyHeadingType}});var C=i(7379);Object.defineProperty(r,"DocumentationLegacyItemType",{enumerable:!0,get:function(){return C.DocumentationLegacyItemType}});var j=i(1423);Object.defineProperty(r,"DocumentationLegacyPageAssetType",{enumerable:!0,get:function(){return j.DocumentationLegacyPageAssetType}});var D=i(1846);Object.defineProperty(r,"DocumentationLegacyPageBlockType",{enumerable:!0,get:function(){return D.DocumentationLegacyPageBlockType}});var Pe=i(1601);Object.defineProperty(r,"DocumentationLegacyPageBlockThemeType",{enumerable:!0,get:function(){return Pe.DocumentationLegacyPageBlockThemeType}});var Oe=i(2657);Object.defineProperty(r,"DocumentationLegacyPageBlockShortcutType",{enumerable:!0,get:function(){return Oe.DocumentationLegacyPageBlockShortcutType}});var _e=i(5651);Object.defineProperty(r,"DocsBlockBehaviorDataType",{enumerable:!0,get:function(){return _e.DocsBlockBehaviorDataType}});var Ie=i(3733);Object.defineProperty(r,"DocsBlockBehaviorSelectionType",{enumerable:!0,get:function(){return Ie.DocsBlockBehaviorSelectionType}});var Ee=i(8890);Object.defineProperty(r,"DocsBlockImagePropertyAspectRatio",{enumerable:!0,get:function(){return Ee.DocsBlockImagePropertyAspectRatio}});var Ne=i(9377);Object.defineProperty(r,"DocsBlockItemEntityType",{enumerable:!0,get:function(){return Ne.DocsBlockItemEntityType}});var De=i(5883);Object.defineProperty(r,"DocsBlockItemPropertyOptionRenderingStyle",{enumerable:!0,get:function(){return De.DocsBlockItemPropertyOptionRenderingStyle}});var Re=i(8061);Object.defineProperty(r,"DocsBlockItemPropertyRichTextStyle",{enumerable:!0,get:function(){return Re.DocsBlockItemPropertyRichTextStyle}});var xe=i(7479);Object.defineProperty(r,"DocsBlockItemPropertyTextStyle",{enumerable:!0,get:function(){return xe.DocsBlockItemPropertyTextStyle}});var $e=i(6839);Object.defineProperty(r,"DocsBlockItemPropertyType",{enumerable:!0,get:function(){return $e.DocsBlockItemPropertyType}});var je=i(8095);Object.defineProperty(r,"DocsBlockItemVariantLayoutType",{enumerable:!0,get:function(){return je.DocsBlockItemVariantLayoutType}});var Be=i(7291);Object.defineProperty(r,"DocsBlockItemVariantLayoutWidth",{enumerable:!0,get:function(){return Be.DocsBlockItemVariantLayoutWidth}});var Fe=i(5963);Object.defineProperty(r,"DocsBlockOptionRenderingStyle",{enumerable:!0,get:function(){return Fe.DocsBlockOptionRenderingStyle}});var Le=i(9133);Object.defineProperty(r,"DocsBlockOptionColor",{enumerable:!0,get:function(){return Le.DocsBlockOptionColor}});var we=i(6644);Object.defineProperty(r,"DocsBlockRichTextPropertyStyle",{enumerable:!0,get:function(){return we.DocsBlockRichTextPropertyStyle}});var Me=i(306);Object.defineProperty(r,"DocsBlockTextPropertyStyle",{enumerable:!0,get:function(){return Me.DocsBlockTextPropertyStyle}});var Ae=i(4068);Object.defineProperty(r,"DocsEntityGroupBehavior",{enumerable:!0,get:function(){return Ae.DocsEntityGroupBehavior}});var He=i(1233);Object.defineProperty(r,"DocsEntityType",{enumerable:!0,get:function(){return He.DocsEntityType}});var Ve=i(7971);Object.defineProperty(r,"DocsSectionType",{enumerable:!0,get:function(){return Ve.DocsSectionType}});var Ue=i(5673);Object.defineProperty(r,"DocsLinkRefType",{enumerable:!0,get:function(){return Ue.DocsLinkRefType}});var We=i(9932);Object.defineProperty(r,"DocsImageRefType",{enumerable:!0,get:function(){return We.DocsImageRefType}});var Ge=i(4652);Object.defineProperty(r,"SourceType",{enumerable:!0,get:function(){return Ge.SourceType}});var Ye=i(934);Object.defineProperty(r,"IconSet",{enumerable:!0,get:function(){return Ye.IconSet}});var Ke=i(1255);Object.defineProperty(r,"FrameAlignment",{enumerable:!0,get:function(){return Ke.FrameAlignment}});var ze=i(3718);Object.defineProperty(r,"FrameLayout",{enumerable:!0,get:function(){return ze.FrameLayout}});var qe=i(1);Object.defineProperty(r,"GradientType",{enumerable:!0,get:function(){return qe.GradientType}});var Xe=i(2674);Object.defineProperty(r,"RichTextSpanAttributeType",{enumerable:!0,get:function(){return Xe.RichTextSpanAttributeType}});var Ze=i(9125);Object.defineProperty(r,"ShadowType",{enumerable:!0,get:function(){return Ze.ShadowType}});var Qe=i(922);Object.defineProperty(r,"TextCase",{enumerable:!0,get:function(){return Qe.TextCase}});var Je=i(7040);Object.defineProperty(r,"TextDecoration",{enumerable:!0,get:function(){return Je.TextDecoration}});var et=i(3788);Object.defineProperty(r,"TokenType",{enumerable:!0,get:function(){return et.TokenType}});var tt=i(8607);Object.defineProperty(r,"Unit",{enumerable:!0,get:function(){return tt.Unit}});var ot=i(9478);Object.defineProperty(r,"UserRole",{enumerable:!0,get:function(){return ot.UserRole}});var rt=i(6141);Object.defineProperty(r,"VisibilityType",{enumerable:!0,get:function(){return rt.VisibilityType}});var nt=i(5503);Object.defineProperty(r,"WorkspaceSubscriptionPlanInterval",{enumerable:!0,get:function(){return nt.WorkspaceSubscriptionPlanInterval}});var at=i(4290);Object.defineProperty(r,"WorkspaceSubscriptionProductCode",{enumerable:!0,get:function(){return at.WorkspaceSubscriptionProductCode}});var it=i(3607);Object.defineProperty(r,"WorkspaceSubscriptionStatus",{enumerable:!0,get:function(){return it.WorkspaceSubscriptionStatus}});var st=i(6298);Object.defineProperty(r,"WorkspaceNPMRegistryAuthType",{enumerable:!0,get:function(){return st.WorkspaceNPMRegistryAuthType}});var ct=i(7968);Object.defineProperty(r,"WorkspaceNPMRegistryType",{enumerable:!0,get:function(){return ct.WorkspaceNPMRegistryType}});var lt=i(8042);Object.defineProperty(r,"ImportWarningType",{enumerable:!0,get:function(){return lt.ImportWarningType}});var ut=i(5695);Object.defineProperty(r,"CustomDomainErrorCode",{enumerable:!0,get:function(){return ut.CustomDomainErrorCode}});var pt=i(7737);Object.defineProperty(r,"CustomDomainState",{enumerable:!0,get:function(){return pt.CustomDomainState}});var U=i(2802);Object.defineProperty(r,"OutputFileType",{enumerable:!0,get:function(){return U.OutputFileType}}),Object.defineProperty(r,"PulsarExecutor",{enumerable:!0,get:function(){return U.PulsarExecutor}})})();var y=n;for(var f in m)y[f]=m[f];m.__esModule&&Object.defineProperty(y,"__esModule",{value:!0})})()}(M)),M}var O=function(){return O=Object.assign||function(a){for(var c,i=1,m=arguments.length;i0&&c>="0"&&c<="9"?"_"+c+i:""+c.toUpperCase()+i}function re(n){return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}function ne(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"",transform:H},a))}function ae(n,a){return a===0?n.toLowerCase():H(n,a)}function ft(n,a){return a===0?n.toLowerCase():re(n)}function gt(n,a){return a===void 0&&(a={}),ne(n,O({transform:ae},a))}function ie(n){return n.charAt(0).toUpperCase()+n.substr(1)}function se(n){return ie(n.toLowerCase())}function ce(n,a){return a===void 0&&(a={}),$(n,O({delimiter:" ",transform:se},a))}function St(n){return n.toUpperCase()}function bt(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"_",transform:St},a))}function w(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"."},a))}function ht(n,a){return a===void 0&&(a={}),ce(n,O({delimiter:"-"},a))}function vt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"-"},a))}function kt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"/"},a))}function le(n,a){var c=n.toLowerCase();return a===0?ie(c):c}function Ct(n,a){return a===void 0&&(a={}),$(n,O({delimiter:" ",transform:le},a))}function Pt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"_"},a))}const Ot=Object.freeze(Object.defineProperty({__proto__:null,camelCase:gt,camelCaseTransform:ae,camelCaseTransformMerge:ft,capitalCase:ce,capitalCaseTransform:se,constantCase:bt,dotCase:w,headerCase:ht,noCase:$,paramCase:vt,pascalCase:ne,pascalCaseTransform:H,pascalCaseTransformMerge:re,pathCase:kt,sentenceCase:Ct,sentenceCaseTransform:le,snakeCase:Pt},Symbol.toStringTag,{value:"Module"})),_t=dt(Ot);(function(n){(()=>{var a={639:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Iterators=void 0;const e=o(58);t.Iterators=class{static allTokenTypes(){return[e.TokenType.color,e.TokenType.typography,e.TokenType.dimension,e.TokenType.size,e.TokenType.space,e.TokenType.opacity,e.TokenType.fontSize,e.TokenType.lineHeight,e.TokenType.letterSpacing,e.TokenType.paragraphSpacing,e.TokenType.borderWidth,e.TokenType.radius,e.TokenType.duration,e.TokenType.zIndex,e.TokenType.shadow,e.TokenType.border,e.TokenType.gradient,e.TokenType.string,e.TokenType.productCopy,e.TokenType.fontFamily,e.TokenType.fontWeight,e.TokenType.textCase,e.TokenType.textDecoration,e.TokenType.visibility,e.TokenType.blur]}static allDimensionTokenTypes(){return[e.TokenType.dimension,e.TokenType.size,e.TokenType.space,e.TokenType.opacity,e.TokenType.fontSize,e.TokenType.lineHeight,e.TokenType.letterSpacing,e.TokenType.paragraphSpacing,e.TokenType.borderWidth,e.TokenType.radius,e.TokenType.duration,e.TokenType.zIndex]}static allStringTokenTypes(){return[e.TokenType.string,e.TokenType.productCopy,e.TokenType.fontFamily,e.TokenType.fontWeight]}static allOptionTokenTypes(){return[e.TokenType.textCase,e.TokenType.textDecoration,e.TokenType.visibility]}}},989:(r,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:(r,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:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileHelper=void 0;const e=o(58);t.FileHelper=class{static createCopyRemoteFile({relativePath:s,fileName:T,url:l}){return{path:s,name:T,type:e.OutputFileType.copyRemoteUrl,url:l}}static createTextFile({relativePath:s,fileName:T,content:l}){return{path:s,name:T,type:e.OutputFileType.text,content:l}}static createBinaryFile({relativePath:s,fileName:T,data:l}){return{path:s,name:T,type:e.OutputFileType.binary,data:l}}}},761:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sureOptionalReference=void 0,t.sureOptionalReference=function(o,e,s=!0){if(!o||!s)return null;const T=e.get(o);if(!T)throw new Error(`Trying to retrieve unknown referenced token ${o}`);return T}},118:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkHelper=void 0,t.NetworkHelper=class{static async fetchAsText(o,e,s){return(await this.performFetch(o,e,s)).text()}static async fetchAsJSON(o,e,s){return(await this.performFetch(o,e,s)).json()}static async fetchAsData(o,e,s){return(await this.performFetch(o,e,s)).arrayBuffer()}static async performFetch(o,e,s){try{const T=await o.network.fetch(e,s);if(!T.ok)throw new Error(`Request failed with status ${T.status}, error: ${await T.text()}`);return T}catch(T){throw T}}}},771:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CSSHelper=void 0;const e=o(58),s=o(761),T=o(952);t.CSSHelper=class{static tokenToCSS(l,p,u){switch(l.tokenType){case e.TokenType.color:return this.colorTokenValueToCSS(l.value,p,u);case e.TokenType.border:return this.borderTokenValueToCSS(l.value,p,u);case e.TokenType.gradient:return this.gradientTokenValueToCSS(l.value,p,u);case e.TokenType.dimension:case e.TokenType.size:case e.TokenType.space:case e.TokenType.opacity:case e.TokenType.fontSize:case e.TokenType.lineHeight:case e.TokenType.letterSpacing:case e.TokenType.paragraphSpacing:case e.TokenType.borderWidth:case e.TokenType.radius:case e.TokenType.duration:case e.TokenType.zIndex:return this.dimensionTokenValueToCSS(l.value,p,u);case e.TokenType.shadow:return this.shadowTokenValueToCSS(l.value,p,u);case e.TokenType.fontWeight:return this.fontWeightTokenValueToCSS(l.value,p,u);case e.TokenType.fontFamily:case e.TokenType.productCopy:case e.TokenType.string:return this.stringTokenValueToCSS(l.value,p,u);case e.TokenType.textCase:case e.TokenType.textDecoration:case e.TokenType.visibility:return this.optionTokenValueToCSS(l.value,p,u,l.tokenType);case e.TokenType.blur:return this.blurTokenValueToCSS(l.value,p,u);case e.TokenType.typography:return this.typographyTokenValueToCSS(l.value,p,u);default:throw new e.UnreachableCaseError(l.tokenType,"Unsupported token type for transformation to CSS:")}}static colorTokenValueToCSS(l,p,u){return T.ColorHelper.formattedColorOrVariableName(l,p,u)}static borderTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);if(d)return u.tokenToVariableRef(d);const g=this.dimensionTokenValueToCSS(l.width,p,u),S=this.borderStyleToCSS(l.style),b=this.colorTokenValueToCSS(l.color,p,u);return this.borderPositionToCSS(l.position),`${g} ${S} ${b}`}static gradientTokenValueToCSS(l,p,u){return l.map(d=>this.gradientLayerToCSS(d,p,u)).join(", ")}static gradientLayerToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);if(d)return u.tokenToVariableRef(d);const g=T.ColorHelper.roundToDecimals(l.to.x,u.decimals)-T.ColorHelper.roundToDecimals(l.from.x,u.decimals),S=T.ColorHelper.roundToDecimals(l.to.y,u.decimals)-T.ColorHelper.roundToDecimals(l.from.y,u.decimals),b=Math.atan2(S,g)*(180/Math.PI),v=()=>g>=0&&S>0||g>0&&S<=0||g<=0&&S<0?90+b:b-270;let h="";switch(l.type){case e.GradientType.linear:h=`linear-gradient(${v()}deg, `;break;case e.GradientType.radial:h="radial-gradient(circle, ";break;case e.GradientType.angular:h="conic-gradient(";break;default:h=`linear-gradient(${v()}deg, `}return`${h}${l.stops.map(C=>`${this.colorTokenValueToCSS(C.color,p,u)} ${T.ColorHelper.roundToDecimals(100*C.position,u.decimals)}%`).join(", ")})`}static dimensionTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return d?u.tokenToVariableRef(d):`${T.ColorHelper.roundToDecimals(l.measure,u.decimals)}${this.unitToCSS(l.unit)}`}static shadowTokenValueToCSS(l,p,u){return l.map(d=>this.shadowLayerToCSS(d,p,u)).join(", ")}static shadowLayerToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return d?u.tokenToVariableRef(d):`${l.type===e.ShadowType.inner?"inset ":""}${l.x}px ${l.y}px ${l.radius}px ${l.spread}px ${this.colorTokenValueToCSS({...l.color,...l.opacity&&{opacity:l.opacity}},p,u)}`}static fontWeightTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return d?u.tokenToVariableRef(d):`${l.text}`}static stringTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return d?u.tokenToVariableRef(d):`"${l.text}"`}static optionTokenValueToCSS(l,p,u,d){const g=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return g?u.tokenToVariableRef(g):d===e.TokenType.textCase?this.textCaseToCSS(l.value):d===e.TokenType.textDecoration?this.textDecorationToCSS(l.value):l.value}static blurTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);return d?u.tokenToVariableRef(d):`blur(${this.dimensionTokenValueToCSS(l.radius,p,u)})`}static typographyTokenValueToCSS(l,p,u){const d=(0,s.sureOptionalReference)(l.referencedTokenId,p,u.allowReferences);if(d)return u.tokenToVariableRef(d);const g=(0,s.sureOptionalReference)(l.fontFamily.referencedTokenId,p,u.allowReferences),S=(0,s.sureOptionalReference)(l.fontWeight.referencedTokenId,p,u.allowReferences),b=(0,s.sureOptionalReference)(l.textDecoration.referencedTokenId,p,u.allowReferences),v=(0,s.sureOptionalReference)(l.textCase.referencedTokenId,p,u.allowReferences),h={fontFamily:g?u.tokenToVariableRef(g):l.fontFamily.text,fontWeight:S?u.tokenToVariableRef(S):l.fontWeight.text,textDecoration:b?u.tokenToVariableRef(b):l.textDecoration.value===e.TextDecoration.original?this.textDecorationToCSS(l.textDecoration.value):void 0,textCase:v?u.tokenToVariableRef(v):l.textCase.value===e.TextCase.original?this.textCaseToCSS(l.textCase.value):void 0,caps:l.textCase.value===e.TextCase.smallCaps,fontSize:this.dimensionTokenValueToCSS(l.fontSize,p,u),lineHeight:l.lineHeight?this.dimensionTokenValueToCSS(l.lineHeight,p,u):void 0},C=h.fontSize;return`${h.caps?"small-caps ":""}${h.fontWeight} ${h.lineHeight?`${C}/${h.lineHeight}`:C} ${g?h.fontFamily:`"${h.fontFamily}"`}`}static borderStyleToCSS(l){switch(l){case e.BorderStyle.dashed:return"dashed";case e.BorderStyle.dotted:return"dotted";case e.BorderStyle.solid:return"solid";case e.BorderStyle.groove:return"groove";default:return"solid"}}static borderPositionToCSS(l){switch(l){case e.BorderPosition.center:return"center";case e.BorderPosition.inside:return"inside";case e.BorderPosition.outside:default:return"outside"}}static unitToCSS(l){switch(l){case e.Unit.percent:return"%";case e.Unit.pixels:return"px";case e.Unit.rem:return"rem";case e.Unit.raw:return"";case e.Unit.ms:return"ms";default:return"px"}}static textCaseToCSS(l){switch(l){case e.TextCase.original:return"none";case e.TextCase.upper:return"uppercase";case e.TextCase.lower:return"lowercase";case e.TextCase.camel:case e.TextCase.smallCaps:return"capitalize"}}static textDecorationToCSS(l){switch(l){case e.TextDecoration.original:return"none";case e.TextDecoration.underline:return"underline";case e.TextDecoration.strikethrough:return"line-through"}}}},952:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorHelper=void 0;const e=o(989),s=o(761);class T{static formattedColorOrVariableName(p,u,d){let g,S,b;const v=(0,s.sureOptionalReference)(p.referencedTokenId,u,d.allowReferences);if(v)g=d.tokenToVariableRef(v);else{const h=(0,s.sureOptionalReference)(p.color.referencedTokenId,u,d.allowReferences);h&&(S=d.tokenToVariableRef(h));const C=(0,s.sureOptionalReference)(p.opacity.referencedTokenId,u,d.allowReferences);C&&(b=d.tokenToVariableRef(C))}if(g)return g;if(!g&&!S&&!b)return this.formattedColor(p,d.colorFormat,d.decimals);switch(d.colorFormat){case e.ColorFormat.rgb:case e.ColorFormat.rgba:case e.ColorFormat.smartRgba:return this.colorToRgb(d.colorFormat,this.normalizedIntColor(p),p.opacity.measure,d.decimals,S,b);default:return this.formattedColor(p,d.colorFormat,d.decimals)}}static formattedColor(p,u,d=3){switch(u){case e.ColorFormat.hex6:case e.ColorFormat.hex8:case e.ColorFormat.hashHex6:case e.ColorFormat.hashHex8:case e.ColorFormat.smartHex:case e.ColorFormat.smartHashHex:return this.colorToHex(u,this.normalizedIntColor(p),p.opacity.measure);case e.ColorFormat.rgb:case e.ColorFormat.rgba:case e.ColorFormat.smartRgba:return this.colorToRgb(u,this.normalizedIntColor(p),p.opacity.measure,d,null,null);case e.ColorFormat.hsl:case e.ColorFormat.hsla:case e.ColorFormat.smartHsla:return this.colorToHsl(u,this.normalizedFractionalColor(p),p.opacity.measure,d);case e.ColorFormat.smartUIColor:return this.colorToUIColor(this.normalizedIntColor(p),p.opacity.measure,d)}}static colorToRgb(p,u,d,g,S,b){let v;return v=p===e.ColorFormat.rgba||p===e.ColorFormat.smartRgba&&d<1?`rgba(${S||`${u.r}, ${u.g}, ${u.b}`}, ${b||this.roundToDecimals(d,g)})`:`rgb(${S||`${u.r}, ${u.g}, ${u.b}`})`,v}static colorToHex(p,u,d){let g=`${this.pHex(u.r)}${this.pHex(u.g)}${this.pHex(u.b)}`;return(p===e.ColorFormat.hex8||p===e.ColorFormat.hashHex8||p===e.ColorFormat.smartHex&&d<1||p===e.ColorFormat.smartHashHex&&d<1)&&(g+=`${this.pHex(Math.round(255*d))}`),p!==e.ColorFormat.hashHex6&&p!==e.ColorFormat.hashHex8&&p!==e.ColorFormat.smartHashHex||(g=`#${g}`),g}static colorToHsl(p,u,d,g){const S=Math.max(u.r,u.g,u.b),b=Math.min(u.r,u.g,u.b);let v,h,C,j=(S+b)/2;if(S===b)v=h=0;else{const D=S-b;h=j>.5?D/(2-S-b):D/(S+b),S===u.r?v=(u.g-u.b)/D+(u.g{Object.defineProperty(t,"__esModule",{value:!0}),t.NamingHelper=void 0;const e=o(110),s=o(545);class T{static codeSafeVariableNameForToken(p,u,d,g){let S=[];return d&&(S=[...d.path],d.isRoot||S.push(d.name)),S.push(p.name),g&&g.length>0&&S.unshift(g),T.codeSafeVariableName(S,u)}static codeSafeVariableName(p,u){let d=typeof p=="string"?p:p.join(" ");switch(d=d.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),u){case s.StringCase.camelCase:d=(0,e.camelCase)(d);break;case s.StringCase.capitalCase:d=(0,e.capitalCase)(d);break;case s.StringCase.constantCase:d=(0,e.constantCase)(d);break;case s.StringCase.dotCase:d=(0,e.dotCase)(d);break;case s.StringCase.headerCase:d=(0,e.headerCase)(d);break;case s.StringCase.noCase:d=(0,e.noCase)(d);break;case s.StringCase.paramCase:d=(0,e.paramCase)(d);break;case s.StringCase.pascalCase:d=(0,e.pascalCase)(d);break;case s.StringCase.pathCase:d=(0,e.pathCase)(d);break;case s.StringCase.sentenceCase:d=(0,e.sentenceCase)(d);break;case s.StringCase.snakeCase:d=(0,e.snakeCase)(d)}return u!==s.StringCase.snakeCase&&u!==s.StringCase.constantCase&&(d=d.replaceAll("_","")),d.match(/^[^a-zA-Z]/)&&(d="_"+d),d}static nameAsCSSVarReference(p){return`var(--${p})`}static nameAsCSSVarDeclaration(p){return`--${p}`}}t.NamingHelper=T},58:r=>{r.exports=oe()},110:r=>{r.exports=_t}},c={};function i(r){var t=c[r];if(t!==void 0)return t.exports;var o=c[r]={exports:{}};return a[r](o,o.exports,i),o.exports}var m={};(()=>{var r=m;Object.defineProperty(r,"__esModule",{value:!0}),r.ColorFormat=r.StringCase=r.Iterators=r.CSSHelper=r.FileHelper=r.ColorHelper=r.NamingHelper=r.NetworkHelper=void 0;var t=i(118);Object.defineProperty(r,"NetworkHelper",{enumerable:!0,get:function(){return t.NetworkHelper}});var o=i(453);Object.defineProperty(r,"NamingHelper",{enumerable:!0,get:function(){return o.NamingHelper}});var e=i(952);Object.defineProperty(r,"ColorHelper",{enumerable:!0,get:function(){return e.ColorHelper}});var s=i(617);Object.defineProperty(r,"FileHelper",{enumerable:!0,get:function(){return s.FileHelper}});var T=i(771);Object.defineProperty(r,"CSSHelper",{enumerable:!0,get:function(){return T.CSSHelper}});var l=i(639);Object.defineProperty(r,"Iterators",{enumerable:!0,get:function(){return l.Iterators}});var p=i(545);Object.defineProperty(r,"StringCase",{enumerable:!0,get:function(){return p.StringCase}});var u=i(989);Object.defineProperty(r,"ColorFormat",{enumerable:!0,get:function(){return u.ColorFormat}})})();var y=n;for(var f in m)y[f]=m[f];m.__esModule&&Object.defineProperty(y,"__esModule",{value:!0})})()})(P);var k=oe();const Y=[{fileName:"borders",tokenTypes:[k.TokenType.dimension],groupNames:["Border"],hasStylesObject:!1,sortByNumValue:!0},{fileName:"other",tokenTypes:[k.TokenType.dimension,k.TokenType.string],excludeGroupNames:["Border","Radius","Spacing"],sortByNumValue:!0},{fileName:"radii",tokenTypes:[k.TokenType.dimension],groupNames:["Radius"],hasParentPrefix:!1,sortByNumValue:!0},{fileName:"spacing",tokenTypes:[k.TokenType.dimension],groupNames:["Spacing"],hasParentPrefix:!1,sortByNumValue:!0},{fileName:"shadows",tokenTypes:[k.TokenType.shadow],hasParentPrefix:!1},{fileName:"gradients",tokenTypes:[k.TokenType.gradient],hasParentPrefix:!0},{fileName:"typography",tokenTypes:[k.TokenType.typography],hasParentPrefix:!1}],K=[{fileName:"colors",tokenTypes:[k.TokenType.color],hasMixin:!0,hasStylesObject:!1}],It=[{fileName:"color-tokens",tokenTypes:[k.TokenType.color]}],ue="Colors",z="colors",V="-colors",R="global-tokens",x="js",Et=" ",N="scss",pe=" ",_="themes",Nt="Theme tokens",Dt="Collection",q="styles",Rt=n=>n.replace(/\n{3,}/g,` + `}toHumanReadable(){return`${this.message}${this.requestId?` (request ${this.requestId})`:""}`}}t.SupernovaError=o},9932:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.docsImageRefToUrl=t.DocsImageRefType=void 0,function(e){e.resource="Resource",e.figmaNode="FigmaNode"}(o||(t.DocsImageRefType=o={})),t.docsImageRefToUrl=function(e,c,T){var u;if(e)switch(e.type){case o.resource:return(u=e.resource)===null||u===void 0?void 0:u.url;case o.figmaNode:return!e.figmaNode||!e.figmaNode.sourceId||!e.figmaNode.frameReferenceId?void 0:c.resources.getFigmaFrameHostedUrl({designSystemId:T.dsId,versionId:T.versionId},e.figmaNode.frameReferenceId);default:return}}},5673:(r,t)=>{var o;function e(c){switch(c.type){case o.documentationItem:return`@page:${c.documentationItemId}`;case o.pageHeading:return`@page:${c.documentationItemId}#${c.pageHeadingId}`;case o.url:return c.url;default:return}}Object.defineProperty(t,"__esModule",{value:!0}),t.linkAttributeToDocsLink=t.docsLinkToLinkAttributes=t.docsLinkToUrl=t.DocsLinkRefType=void 0,function(c){c.documentationItem="DocumentationItem",c.pageHeading="PageHeading",c.url="Url"}(o||(t.DocsLinkRefType=o={})),t.docsLinkToUrl=e,t.docsLinkToLinkAttributes=function(c){const T=e(c);if(T)return{href:T,target:c.openInNewTab?"_blank":"_self"}},t.linkAttributeToDocsLink=function(c,T){if(!c)return;const u=T==="_blank";if(c.startsWith("@page:")){if(c.includes("#")){const[p,l]=c.replace("@page:","").split("#");return{type:o.pageHeading,documentationItemId:p,pageHeadingId:l,openInNewTab:u}}return{type:o.documentationItem,documentationItemId:c.replace("@page:",""),openInNewTab:u}}return{type:o.url,url:c,openInNewTab:u}}},2657:(r,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=o={})),t.DocumentationLegacyPageBlockShortcut=class{constructor(e){var c;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&&(!((c=e.documentationItemPreview)===null||c===void 0)&&c.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,c){var T,u,p,l,d;let g=null;return e.title&&e.title.trim().length>0?g=e.title:c===o.internal?g=(u=(T=e.documentationItemPreview)===null||T===void 0?void 0:T.title)!==null&&u!==void 0?u:null:c===o.external&&(g=(d=(l=(p=e.urlPreview)===null||p===void 0?void 0:p.title)!==null&&l!==void 0?l:e.url)!==null&&d!==void 0?d:null),g&&g.trim().length!==0?g:null}shortcutDescriptionFromModel(e,c){var T;let u=null;return e.description&&e.description.trim().length>0?u=e.description:c===o.external&&(u=(T=e.urlPreview)===null||T===void 0?void 0:T.description),u&&u.trim().length!==0?u:null}shortcutPreviewUrlFromModel(e){var c,T,u,p,l;return(l=(u=(c=e.assetUrl)!==null&&c!==void 0?c:(T=e.asset)===null||T===void 0?void 0:T.url)!==null&&u!==void 0?u:(p=e.urlPreview)===null||p===void 0?void 0:p.thumbnailUrl)!==null&&l!==void 0?l:null}}},7476:(r,t)=>{var o,e;Object.defineProperty(t,"__esModule",{value:!0}),t.TextAlignment=t.Alignment=void 0,function(c){c.left="Left",c.center="Center",c.stretch="Stretch"}(o||(t.Alignment=o={})),function(c){c.left="Left",c.center="Center",c.right="Right"}(e||(t.TextAlignment=e={}))},8738:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetFormat=void 0,function(e){e.png="png",e.pdf="pdf",e.svg="svg"}(o||(t.AssetFormat=o={}))},915:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScale=void 0,function(e){e.x1="x1",e.x2="x2",e.x3="x3",e.x4="x4"}(o||(t.AssetScale=o={}))},899:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.AssetScaleType=void 0,function(e){e.aspectFill="AspectFill",e.aspectFit="AspectFit"}(o||(t.AssetScaleType=o={}))},6192:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.BlurType=void 0,function(e){e.layer="Layer",e.background="Background"}(o||(t.BlurType=o={}))},1160:(r,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=o={})),t.ALL_BORDER_POSITIONS=[o.inside,o.center,o.outside]},4546:(r,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=o={})),t.ALL_BORDER_STYLES=[o.dashed,o.dotted,o.solid,o.groove]},8042:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportWarningType=void 0,function(e){e.UnsupportedFill="UnsupportedFill",e.UnsupportedStroke="UnsupportedStroke",e.UnsupportedEffect="UnsupportedEffect",e.StyleNotApplied="StyleNotApplied",e.NoPublishedStyles="NoPublishedStyles",e.NoPublishedComponents="NoPublishedComponents",e.NoPublishedAssets="NoPublishedAssets",e.NoVersionFound="NoVersionFound",e.ComponentHasNoThumbnail="ComponentHasNoThumbnail",e.DuplicateImportedStyleId="DuplicateImportedStyleId",e.DuplicateImportedStylePath="DuplicateImportedStylePath",e.NoPublishedElements="NoPublishedElements",e.NoUnpublishedStyles="NoUnpublishedStyles"}(o||(t.ImportWarningType=o={}))},5695:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainErrorCode=void 0,function(e){e.generalError="GeneralError",e.dnsNotConfigured="DNSNotConfigured",e.maintenance="Maintenance"}(o||(t.CustomDomainErrorCode=o={}))},7737:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.CustomDomainState=void 0,function(e){e.initial="Initial",e.domainSetupInProgress="DomainSetupInProgress",e.domainSetupFailed="DomainSetupFailed",e.domainSetupsSucces="DomainSetupSuccess",e.sslSetupInProgress="SSLSetupInProgress",e.sslSetupFailed="SSLSetupFailed",e.sslSetupSuccess="SSLSetupSuccess"}(o||(t.CustomDomainState=o={}))},5651:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorDataType=void 0,function(e){e.item="Item",e.token="Token",e.asset="Asset",e.component="Component",e.figmaNode="FigmaNode",e.figmaComponent="FigmaComponent"}(o||(t.DocsBlockBehaviorDataType=o={}))},3733:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockBehaviorSelectionType=void 0,function(e){e.entity="Entity",e.group="Group",e.entityAndGroup="EntityAndGroup"}(o||(t.DocsBlockBehaviorSelectionType=o={}))},8890:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockImagePropertyAspectRatio=void 0,function(e){e.auto="Auto",e.square="Square",e.landscape="Landscape",e.portrait="Portrait",e.wide="Wide"}(o||(t.DocsBlockImagePropertyAspectRatio=o={}))},9377:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemEntityType=void 0,function(e){e.token="Token",e.tokenGroup="TokenGroup",e.asset="Asset",e.assetGroup="AssetGroup",e.component="Component",e.componentGroup="ComponentGroup"}(o||(t.DocsBlockItemEntityType=o={}))},5883:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyOptionRenderingStyle=void 0,function(e){e.segmentedControl="SegmentedControl",e.toggleButton="ToggleButton",e.select="Select",e.checkbox="Checkbox"}(o||(t.DocsBlockItemPropertyOptionRenderingStyle=o={}))},8061:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyRichTextStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.quote="Quote",e.callout="Callout",e.ol="OL",e.ul="UL"}(o||(t.DocsBlockItemPropertyRichTextStyle=o={}))},7479:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyTextStyle=void 0,function(e){e.small="Small",e.regular="Regular",e.bold="Bold"}(o||(t.DocsBlockItemPropertyTextStyle=o={}))},6839:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemPropertyType=void 0,function(e){e.richText="RichText",e.multiRichText="MultiRichText",e.text="Text",e.richTextEditor="RichTextEditor",e.boolean="Boolean",e.number="Number",e.singleSelect="SingleSelect",e.multiSelect="MultiSelect",e.image="Image",e.token="Token",e.tokenType="TokenType",e.tokenProperty="TokenProperty",e.component="Component",e.componentProperty="ComponentProperty",e.asset="Asset",e.assetProperty="AssetProperty",e.embedURL="EmbedURL",e.url="URL",e.markdown="Markdown",e.code="Code",e.codeSandbox="CodeSandbox",e.table="Table",e.divider="Divider",e.storybook="Storybook",e.color="Color",e.figmaNode="FigmaNode",e.figmaComponent="FigmaComponent"}(o||(t.DocsBlockItemPropertyType=o={}))},8095:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutType=void 0,function(e){e.column="Column",e.row="Row"}(o||(t.DocsBlockItemVariantLayoutType=o={}))},7291:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockItemVariantLayoutWidth=void 0,function(e){e.c1="1",e.c2="2",e.c3="3",e.c4="4",e.c5="5",e.c6="6",e.c7="7",e.c8="8",e.c9="9",e.c10="10",e.c11="11",e.c12="12"}(o||(t.DocsBlockItemVariantLayoutWidth=o={}))},9133:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionColor=void 0,function(e){e.green="Green",e.red="Red",e.yellow="Yellow",e.blue="Blue",e.purple="Purple",e.orange="Orange",e.pink="Pink",e.teal="Teal",e.grey="Grey",e.lightGrey="LightGrey",e.cyan="Cyan",e.fuchsia="Fuchsia"}(o||(t.DocsBlockOptionColor=o={}))},5963:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockOptionRenderingStyle=void 0,function(e){e.segmentedControl="SegmentedControl",e.toggleButton="ToggleButton",e.select="Select",e.checkbox="Checkbox"}(o||(t.DocsBlockOptionRenderingStyle=o={}))},6644:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockRichTextPropertyStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.quote="Quote",e.callout="Callout",e.default="Default"}(o||(t.DocsBlockRichTextPropertyStyle=o={}))},306:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsBlockTextPropertyStyle=void 0,function(e){e.title1="Title1",e.title2="Title2",e.title3="Title3",e.title4="Title4",e.title5="Title5",e.default="Default",e.defaultBold="DefaultBold",e.defaultSemibold="DefaultSemibold",e.small="Small",e.smallBold="SmallBold",e.smallSemibold="SmallSemibold",e.custom="Custom"}(o||(t.DocsBlockTextPropertyStyle=o={}))},4068:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityGroupBehavior=void 0,function(e){e.group="Group",e.tabs="Tabs"}(o||(t.DocsEntityGroupBehavior=o={}))},1233:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsEntityType=void 0,function(e){e.group="Group",e.page="Page"}(o||(t.DocsEntityType=o={}))},7971:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocsSectionType=void 0,function(e){e.plain="Plain",e.tabs="Tabs"}(o||(t.DocsSectionType=o={}))},5102:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyCalloutType=void 0,function(e){e.info="Info",e.success="Success",e.warning="Warning",e.error="Error"}(o||(t.DocumentationLegacyCalloutType=o={}))},2123:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyGroupBehavior=void 0,function(e){e.group="Group",e.tabs="Tabs"}(o||(t.DocumentationLegacyGroupBehavior=o={}))},9896:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyHeadingType=void 0,function(e){e[e.h1=1]="h1",e[e.h2=2]="h2",e[e.h3=3]="h3"}(o||(t.DocumentationLegacyHeadingType=o={}))},7379:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyItemType=void 0,function(e){e.group="Group",e.page="Page"}(o||(t.DocumentationLegacyItemType=o={}))},1423:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageAssetType=void 0,function(e){e.image="image",e.figmaFrame="figmaFrame"}(o||(t.DocumentationLegacyPageAssetType=o={}))},1601:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockThemeType=void 0,function(e){e.override="Override",e.comparison="Comparison"}(o||(t.DocumentationLegacyPageBlockThemeType=o={}))},1846:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentationLegacyPageBlockType=void 0,function(e){e.text="Text",e.heading="Heading",e.code="Code",e.unorderedList="UnorderedList",e.orderedList="OrderedList",e.quote="Quote",e.callout="Callout",e.divider="Divider",e.image="Image",e.token="Token",e.tokenList="TokenList",e.tokenGroup="TokenGroup",e.shortcuts="Shortcuts",e.link="Link",e.figmaEmbed="FigmaEmbed",e.youtubeEmbed="YoutubeEmbed",e.storybookEmbed="StorybookEmbed",e.genericEmbed="Embed",e.figmaFrames="FigmaFrames",e.custom="Custom",e.renderCode="RenderCode",e.componentAssets="ComponentAssets",e.column="Column",e.columnItem="ColumnItem",e.tabs="Tabs",e.tabItem="TabItem",e.table="Table",e.tableCell="TableCell",e.tableRow="TableRow"}(o||(t.DocumentationLegacyPageBlockType=o={}))},1255:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameAlignment=void 0,function(e){e.frameHeight="FrameHeight",e.center="Center"}(o||(t.FrameAlignment=o={}))},3718:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.FrameLayout=void 0,function(e){e.c8="C8",e.c7="C7",e.c6="C6",e.c5="C5",e.c4="C4",e.c3="C3",e.c2="C2",e.c1="C1",e.c175="C1_75"}(o||(t.FrameLayout=o={}))},1:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.GradientType=void 0,function(e){e.linear="Linear",e.radial="Radial",e.angular="Angular"}(o||(t.GradientType=o={}))},934:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.IconSet=void 0,function(e){e.checkCircle="CheckCircle",e.crossCircle="CrossCircle",e.alert="Alert"}(o||(t.IconSet=o={}))},2674:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.RichTextSpanAttributeType=void 0,function(e){e.bold="Bold",e.italic="Italic",e.link="Link",e.strikethrough="Strikethrough",e.code="Code"}(o||(t.RichTextSpanAttributeType=o={}))},9125:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowType=void 0,function(e){e.drop="Drop",e.inner="Inner"}(o||(t.ShadowType=o={}))},4652:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceType=void 0,function(e){e.figma="Figma",e.tokenStudio="TokenStudio",e.figmaVariablesPlugin="FigmaVariablesPlugin"}(o||(t.SourceType=o={}))},922:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextCase=void 0,function(e){e.original="Original",e.upper="Upper",e.lower="Lower",e.camel="Camel",e.smallCaps="SmallCaps"}(o||(t.TextCase=o={}))},7040:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.TextDecoration=void 0,function(e){e.original="None",e.underline="Underline",e.strikethrough="Strikethrough"}(o||(t.TextDecoration=o={}))},3788:(r,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.shadow="Shadow",e.border="Border",e.gradient="Gradient",e.blur="Blur",e.radius="BorderRadius",e.borderWidth="BorderWidth",e.duration="Duration",e.fontSize="FontSize",e.dimension="Dimension",e.letterSpacing="LetterSpacing",e.lineHeight="LineHeight",e.opacity="Opacity",e.paragraphSpacing="ParagraphSpacing",e.size="Size",e.space="Space",e.zIndex="ZIndex",e.textDecoration="TextDecoration",e.textCase="TextCase",e.visibility="Visibility",e.fontFamily="FontFamily",e.fontWeight="FontWeight",e.string="String",e.productCopy="ProductCopy"}(o||(t.TokenType=o={})),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,o.string,...t.OPTION_TOKEN_TYPES]},8607:(r,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=o={})),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]},9478:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertRemoteToUserRole=t.UserRole=void 0;const e=o(4379);var c;(function(T){T.owner="Owner",T.admin="Admin",T.creator="Creator",T.contributor="Contributor",T.billing="Billing",T.viewer="Viewer"})(c||(t.UserRole=c={})),t.convertRemoteToUserRole=T=>{switch(T){case"Owner":return c.owner;case"Admin":return c.admin;case"Creator":return c.creator;case"Contributor":return c.contributor;case"Billing":return c.billing;case"Viewer":return c.viewer;default:throw e.SupernovaError.fromMessage(`Unknown role: ${T}`)}}},6141:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityType=void 0,function(e){e.visible="Visible",e.hidden="Hidden"}(o||(t.VisibilityType=o={}))},6298:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryAuthType=void 0,function(e){e.basic="Basic",e.bearer="Bearer"}(o||(t.WorkspaceNPMRegistryAuthType=o={}))},7968:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceNPMRegistryType=void 0,function(e){e.npmJS="NPMJS",e.gitHub="GitHub",e.azureDevOps="AzureDevOps",e.artifactory="Artifactory",e.custom="Custom"}(o||(t.WorkspaceNPMRegistryType=o={}))},5503:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionPlanInterval=void 0,function(e){e.yearly="yearly",e.monthly="monthly"}(o||(t.WorkspaceSubscriptionPlanInterval=o={}))},4290:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionProductCode=void 0,function(e){e.free="free",e.team="team",e.teamTest="team_test",e.company="company",e.enterprise="enterprise"}(o||(t.WorkspaceSubscriptionProductCode=o={}))},3607:(r,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSubscriptionStatus=void 0,function(e){e.active="active",e.gracePeriod="gracePeriod",e.cancelled="cancelled",e.suspended="suspended"}(o||(t.WorkspaceSubscriptionStatus=o={}))},2802:(r,t)=>{var o,e;Object.defineProperty(t,"__esModule",{value:!0}),t.PulsarExecutor=t.OutputFileType=void 0,function(c){c.copyRemoteUrl="copyRemoteUrl",c.text="text",c.binary="binary"}(o||(t.OutputFileType=o={})),function(c){c.supernova="supernova",c.local="local"}(e||(t.PulsarExecutor=e={}))}},s={};function i(r){var t=s[r];if(t!==void 0)return t.exports;var o=s[r]={exports:{}};return a[r](o,o.exports,i),o.exports}var m={};(()=>{var r=m;Object.defineProperty(r,"__esModule",{value:!0}),r.TokenType=r.TextDecoration=r.TextCase=r.ShadowType=r.RichTextSpanAttributeType=r.GradientType=r.FrameLayout=r.FrameAlignment=r.IconSet=r.SourceType=r.DocsImageRefType=r.DocsLinkRefType=r.DocsSectionType=r.DocsEntityType=r.DocsEntityGroupBehavior=r.DocsBlockTextPropertyStyle=r.DocsBlockRichTextPropertyStyle=r.DocsBlockOptionColor=r.DocsBlockOptionRenderingStyle=r.DocsBlockItemVariantLayoutWidth=r.DocsBlockItemVariantLayoutType=r.DocsBlockItemPropertyType=r.DocsBlockItemPropertyTextStyle=r.DocsBlockItemPropertyRichTextStyle=r.DocsBlockItemPropertyOptionRenderingStyle=r.DocsBlockItemEntityType=r.DocsBlockImagePropertyAspectRatio=r.DocsBlockBehaviorSelectionType=r.DocsBlockBehaviorDataType=r.DocumentationLegacyPageBlockShortcutType=r.DocumentationLegacyPageBlockThemeType=r.DocumentationLegacyPageBlockType=r.DocumentationLegacyPageAssetType=r.DocumentationLegacyItemType=r.DocumentationLegacyHeadingType=r.DocumentationLegacyGroupBehavior=r.DocumentationLegacyCalloutType=r.BorderStyle=r.BorderPosition=r.BlurType=r.AssetScaleType=r.AssetScale=r.AssetFormat=r.Alignment=r.ALL_TOKEN_TYPES=r.ALL_BORDER_STYLES=r.ALL_BORDER_POSITIONS=r.OPTION_TOKEN_TYPES=r.STRING_TOKEN_TYPES=r.DIMENSION_TOKEN_TYPES=void 0,r.PulsarExecutor=r.OutputFileType=r.CustomDomainState=r.CustomDomainErrorCode=r.ImportWarningType=r.WorkspaceNPMRegistryType=r.WorkspaceNPMRegistryAuthType=r.WorkspaceSubscriptionStatus=r.WorkspaceSubscriptionProductCode=r.WorkspaceSubscriptionPlanInterval=r.VisibilityType=r.UserRole=r.Unit=void 0;var t=i(3788);Object.defineProperty(r,"DIMENSION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.DIMENSION_TOKEN_TYPES}}),Object.defineProperty(r,"STRING_TOKEN_TYPES",{enumerable:!0,get:function(){return t.STRING_TOKEN_TYPES}}),Object.defineProperty(r,"OPTION_TOKEN_TYPES",{enumerable:!0,get:function(){return t.OPTION_TOKEN_TYPES}});var o=i(1160);Object.defineProperty(r,"ALL_BORDER_POSITIONS",{enumerable:!0,get:function(){return o.ALL_BORDER_POSITIONS}});var e=i(4546);Object.defineProperty(r,"ALL_BORDER_STYLES",{enumerable:!0,get:function(){return e.ALL_BORDER_STYLES}});var c=i(3788);Object.defineProperty(r,"ALL_TOKEN_TYPES",{enumerable:!0,get:function(){return c.ALL_TOKEN_TYPES}});var T=i(7476);Object.defineProperty(r,"Alignment",{enumerable:!0,get:function(){return T.Alignment}});var u=i(8738);Object.defineProperty(r,"AssetFormat",{enumerable:!0,get:function(){return u.AssetFormat}});var p=i(915);Object.defineProperty(r,"AssetScale",{enumerable:!0,get:function(){return p.AssetScale}});var l=i(899);Object.defineProperty(r,"AssetScaleType",{enumerable:!0,get:function(){return l.AssetScaleType}});var d=i(6192);Object.defineProperty(r,"BlurType",{enumerable:!0,get:function(){return d.BlurType}});var g=i(1160);Object.defineProperty(r,"BorderPosition",{enumerable:!0,get:function(){return g.BorderPosition}});var S=i(4546);Object.defineProperty(r,"BorderStyle",{enumerable:!0,get:function(){return S.BorderStyle}});var b=i(5102);Object.defineProperty(r,"DocumentationLegacyCalloutType",{enumerable:!0,get:function(){return b.DocumentationLegacyCalloutType}});var v=i(2123);Object.defineProperty(r,"DocumentationLegacyGroupBehavior",{enumerable:!0,get:function(){return v.DocumentationLegacyGroupBehavior}});var h=i(9896);Object.defineProperty(r,"DocumentationLegacyHeadingType",{enumerable:!0,get:function(){return h.DocumentationLegacyHeadingType}});var C=i(7379);Object.defineProperty(r,"DocumentationLegacyItemType",{enumerable:!0,get:function(){return C.DocumentationLegacyItemType}});var j=i(1423);Object.defineProperty(r,"DocumentationLegacyPageAssetType",{enumerable:!0,get:function(){return j.DocumentationLegacyPageAssetType}});var D=i(1846);Object.defineProperty(r,"DocumentationLegacyPageBlockType",{enumerable:!0,get:function(){return D.DocumentationLegacyPageBlockType}});var Pe=i(1601);Object.defineProperty(r,"DocumentationLegacyPageBlockThemeType",{enumerable:!0,get:function(){return Pe.DocumentationLegacyPageBlockThemeType}});var Oe=i(2657);Object.defineProperty(r,"DocumentationLegacyPageBlockShortcutType",{enumerable:!0,get:function(){return Oe.DocumentationLegacyPageBlockShortcutType}});var _e=i(5651);Object.defineProperty(r,"DocsBlockBehaviorDataType",{enumerable:!0,get:function(){return _e.DocsBlockBehaviorDataType}});var Ie=i(3733);Object.defineProperty(r,"DocsBlockBehaviorSelectionType",{enumerable:!0,get:function(){return Ie.DocsBlockBehaviorSelectionType}});var Ee=i(8890);Object.defineProperty(r,"DocsBlockImagePropertyAspectRatio",{enumerable:!0,get:function(){return Ee.DocsBlockImagePropertyAspectRatio}});var Ne=i(9377);Object.defineProperty(r,"DocsBlockItemEntityType",{enumerable:!0,get:function(){return Ne.DocsBlockItemEntityType}});var De=i(5883);Object.defineProperty(r,"DocsBlockItemPropertyOptionRenderingStyle",{enumerable:!0,get:function(){return De.DocsBlockItemPropertyOptionRenderingStyle}});var Re=i(8061);Object.defineProperty(r,"DocsBlockItemPropertyRichTextStyle",{enumerable:!0,get:function(){return Re.DocsBlockItemPropertyRichTextStyle}});var xe=i(7479);Object.defineProperty(r,"DocsBlockItemPropertyTextStyle",{enumerable:!0,get:function(){return xe.DocsBlockItemPropertyTextStyle}});var $e=i(6839);Object.defineProperty(r,"DocsBlockItemPropertyType",{enumerable:!0,get:function(){return $e.DocsBlockItemPropertyType}});var je=i(8095);Object.defineProperty(r,"DocsBlockItemVariantLayoutType",{enumerable:!0,get:function(){return je.DocsBlockItemVariantLayoutType}});var Be=i(7291);Object.defineProperty(r,"DocsBlockItemVariantLayoutWidth",{enumerable:!0,get:function(){return Be.DocsBlockItemVariantLayoutWidth}});var Fe=i(5963);Object.defineProperty(r,"DocsBlockOptionRenderingStyle",{enumerable:!0,get:function(){return Fe.DocsBlockOptionRenderingStyle}});var Le=i(9133);Object.defineProperty(r,"DocsBlockOptionColor",{enumerable:!0,get:function(){return Le.DocsBlockOptionColor}});var we=i(6644);Object.defineProperty(r,"DocsBlockRichTextPropertyStyle",{enumerable:!0,get:function(){return we.DocsBlockRichTextPropertyStyle}});var Me=i(306);Object.defineProperty(r,"DocsBlockTextPropertyStyle",{enumerable:!0,get:function(){return Me.DocsBlockTextPropertyStyle}});var Ae=i(4068);Object.defineProperty(r,"DocsEntityGroupBehavior",{enumerable:!0,get:function(){return Ae.DocsEntityGroupBehavior}});var He=i(1233);Object.defineProperty(r,"DocsEntityType",{enumerable:!0,get:function(){return He.DocsEntityType}});var Ve=i(7971);Object.defineProperty(r,"DocsSectionType",{enumerable:!0,get:function(){return Ve.DocsSectionType}});var Ue=i(5673);Object.defineProperty(r,"DocsLinkRefType",{enumerable:!0,get:function(){return Ue.DocsLinkRefType}});var We=i(9932);Object.defineProperty(r,"DocsImageRefType",{enumerable:!0,get:function(){return We.DocsImageRefType}});var Ge=i(4652);Object.defineProperty(r,"SourceType",{enumerable:!0,get:function(){return Ge.SourceType}});var Ye=i(934);Object.defineProperty(r,"IconSet",{enumerable:!0,get:function(){return Ye.IconSet}});var Ke=i(1255);Object.defineProperty(r,"FrameAlignment",{enumerable:!0,get:function(){return Ke.FrameAlignment}});var ze=i(3718);Object.defineProperty(r,"FrameLayout",{enumerable:!0,get:function(){return ze.FrameLayout}});var qe=i(1);Object.defineProperty(r,"GradientType",{enumerable:!0,get:function(){return qe.GradientType}});var Xe=i(2674);Object.defineProperty(r,"RichTextSpanAttributeType",{enumerable:!0,get:function(){return Xe.RichTextSpanAttributeType}});var Ze=i(9125);Object.defineProperty(r,"ShadowType",{enumerable:!0,get:function(){return Ze.ShadowType}});var Qe=i(922);Object.defineProperty(r,"TextCase",{enumerable:!0,get:function(){return Qe.TextCase}});var Je=i(7040);Object.defineProperty(r,"TextDecoration",{enumerable:!0,get:function(){return Je.TextDecoration}});var et=i(3788);Object.defineProperty(r,"TokenType",{enumerable:!0,get:function(){return et.TokenType}});var tt=i(8607);Object.defineProperty(r,"Unit",{enumerable:!0,get:function(){return tt.Unit}});var ot=i(9478);Object.defineProperty(r,"UserRole",{enumerable:!0,get:function(){return ot.UserRole}});var rt=i(6141);Object.defineProperty(r,"VisibilityType",{enumerable:!0,get:function(){return rt.VisibilityType}});var nt=i(5503);Object.defineProperty(r,"WorkspaceSubscriptionPlanInterval",{enumerable:!0,get:function(){return nt.WorkspaceSubscriptionPlanInterval}});var at=i(4290);Object.defineProperty(r,"WorkspaceSubscriptionProductCode",{enumerable:!0,get:function(){return at.WorkspaceSubscriptionProductCode}});var it=i(3607);Object.defineProperty(r,"WorkspaceSubscriptionStatus",{enumerable:!0,get:function(){return it.WorkspaceSubscriptionStatus}});var st=i(6298);Object.defineProperty(r,"WorkspaceNPMRegistryAuthType",{enumerable:!0,get:function(){return st.WorkspaceNPMRegistryAuthType}});var ct=i(7968);Object.defineProperty(r,"WorkspaceNPMRegistryType",{enumerable:!0,get:function(){return ct.WorkspaceNPMRegistryType}});var lt=i(8042);Object.defineProperty(r,"ImportWarningType",{enumerable:!0,get:function(){return lt.ImportWarningType}});var ut=i(5695);Object.defineProperty(r,"CustomDomainErrorCode",{enumerable:!0,get:function(){return ut.CustomDomainErrorCode}});var pt=i(7737);Object.defineProperty(r,"CustomDomainState",{enumerable:!0,get:function(){return pt.CustomDomainState}});var W=i(2802);Object.defineProperty(r,"OutputFileType",{enumerable:!0,get:function(){return W.OutputFileType}}),Object.defineProperty(r,"PulsarExecutor",{enumerable:!0,get:function(){return W.PulsarExecutor}})})();var f=n;for(var y in m)f[y]=m[y];m.__esModule&&Object.defineProperty(f,"__esModule",{value:!0})})()}(M)),M}var O=function(){return O=Object.assign||function(a){for(var s,i=1,m=arguments.length;i0&&s>="0"&&s<="9"?"_"+s+i:""+s.toUpperCase()+i}function ne(n){return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}function ae(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"",transform:H},a))}function ie(n,a){return a===0?n.toLowerCase():H(n,a)}function ft(n,a){return a===0?n.toLowerCase():ne(n)}function gt(n,a){return a===void 0&&(a={}),ae(n,O({transform:ie},a))}function se(n){return n.charAt(0).toUpperCase()+n.substr(1)}function ce(n){return se(n.toLowerCase())}function le(n,a){return a===void 0&&(a={}),$(n,O({delimiter:" ",transform:ce},a))}function St(n){return n.toUpperCase()}function bt(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"_",transform:St},a))}function w(n,a){return a===void 0&&(a={}),$(n,O({delimiter:"."},a))}function ht(n,a){return a===void 0&&(a={}),le(n,O({delimiter:"-"},a))}function vt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"-"},a))}function kt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"/"},a))}function ue(n,a){var s=n.toLowerCase();return a===0?se(s):s}function Ct(n,a){return a===void 0&&(a={}),$(n,O({delimiter:" ",transform:ue},a))}function Pt(n,a){return a===void 0&&(a={}),w(n,O({delimiter:"_"},a))}const Ot=Object.freeze(Object.defineProperty({__proto__:null,camelCase:gt,camelCaseTransform:ie,camelCaseTransformMerge:ft,capitalCase:le,capitalCaseTransform:ce,constantCase:bt,dotCase:w,headerCase:ht,noCase:$,paramCase:vt,pascalCase:ae,pascalCaseTransform:H,pascalCaseTransformMerge:ne,pathCase:kt,sentenceCase:Ct,sentenceCaseTransform:ue,snakeCase:Pt},Symbol.toStringTag,{value:"Module"})),_t=dt(Ot);(function(n){(()=>{var a={639:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Iterators=void 0;const e=o(58);t.Iterators=class{static allTokenTypes(){return[e.TokenType.color,e.TokenType.typography,e.TokenType.dimension,e.TokenType.size,e.TokenType.space,e.TokenType.opacity,e.TokenType.fontSize,e.TokenType.lineHeight,e.TokenType.letterSpacing,e.TokenType.paragraphSpacing,e.TokenType.borderWidth,e.TokenType.radius,e.TokenType.duration,e.TokenType.zIndex,e.TokenType.shadow,e.TokenType.border,e.TokenType.gradient,e.TokenType.string,e.TokenType.productCopy,e.TokenType.fontFamily,e.TokenType.fontWeight,e.TokenType.textCase,e.TokenType.textDecoration,e.TokenType.visibility,e.TokenType.blur]}static allDimensionTokenTypes(){return[e.TokenType.dimension,e.TokenType.size,e.TokenType.space,e.TokenType.opacity,e.TokenType.fontSize,e.TokenType.lineHeight,e.TokenType.letterSpacing,e.TokenType.paragraphSpacing,e.TokenType.borderWidth,e.TokenType.radius,e.TokenType.duration,e.TokenType.zIndex]}static allStringTokenTypes(){return[e.TokenType.string,e.TokenType.productCopy,e.TokenType.fontFamily,e.TokenType.fontWeight]}static allOptionTokenTypes(){return[e.TokenType.textCase,e.TokenType.textDecoration,e.TokenType.visibility]}}},989:(r,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:(r,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:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileHelper=void 0;const e=o(58);t.FileHelper=class{static createCopyRemoteFile({relativePath:c,fileName:T,url:u}){return{path:c,name:T,type:e.OutputFileType.copyRemoteUrl,url:u}}static createTextFile({relativePath:c,fileName:T,content:u}){return{path:c,name:T,type:e.OutputFileType.text,content:u}}static createBinaryFile({relativePath:c,fileName:T,data:u}){return{path:c,name:T,type:e.OutputFileType.binary,data:u}}}},761:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sureOptionalReference=void 0,t.sureOptionalReference=function(o,e,c=!0){if(!o||!c)return null;const T=e.get(o);if(!T)throw new Error(`Trying to retrieve unknown referenced token ${o}`);return T}},118:(r,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkHelper=void 0,t.NetworkHelper=class{static async fetchAsText(o,e,c){return(await this.performFetch(o,e,c)).text()}static async fetchAsJSON(o,e,c){return(await this.performFetch(o,e,c)).json()}static async fetchAsData(o,e,c){return(await this.performFetch(o,e,c)).arrayBuffer()}static async performFetch(o,e,c){try{const T=await o.network.fetch(e,c);if(!T.ok)throw new Error(`Request failed with status ${T.status}, error: ${await T.text()}`);return T}catch(T){throw T}}}},771:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CSSHelper=void 0;const e=o(58),c=o(761),T=o(952);t.CSSHelper=class{static tokenToCSS(u,p,l){switch(u.tokenType){case e.TokenType.color:return this.colorTokenValueToCSS(u.value,p,l);case e.TokenType.border:return this.borderTokenValueToCSS(u.value,p,l);case e.TokenType.gradient:return this.gradientTokenValueToCSS(u.value,p,l);case e.TokenType.dimension:case e.TokenType.size:case e.TokenType.space:case e.TokenType.opacity:case e.TokenType.fontSize:case e.TokenType.lineHeight:case e.TokenType.letterSpacing:case e.TokenType.paragraphSpacing:case e.TokenType.borderWidth:case e.TokenType.radius:case e.TokenType.duration:case e.TokenType.zIndex:return this.dimensionTokenValueToCSS(u.value,p,l);case e.TokenType.shadow:return this.shadowTokenValueToCSS(u.value,p,l);case e.TokenType.fontWeight:return this.fontWeightTokenValueToCSS(u.value,p,l);case e.TokenType.fontFamily:case e.TokenType.productCopy:case e.TokenType.string:return this.stringTokenValueToCSS(u.value,p,l);case e.TokenType.textCase:case e.TokenType.textDecoration:case e.TokenType.visibility:return this.optionTokenValueToCSS(u.value,p,l,u.tokenType);case e.TokenType.blur:return this.blurTokenValueToCSS(u.value,p,l);case e.TokenType.typography:return this.typographyTokenValueToCSS(u.value,p,l);default:throw new e.UnreachableCaseError(u.tokenType,"Unsupported token type for transformation to CSS:")}}static colorTokenValueToCSS(u,p,l){return T.ColorHelper.formattedColorOrVariableName(u,p,l)}static borderTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);if(d)return l.tokenToVariableRef(d);const g=this.dimensionTokenValueToCSS(u.width,p,l),S=this.borderStyleToCSS(u.style),b=this.colorTokenValueToCSS(u.color,p,l);return this.borderPositionToCSS(u.position),`${g} ${S} ${b}`}static gradientTokenValueToCSS(u,p,l){return u.map(d=>this.gradientLayerToCSS(d,p,l)).join(", ")}static gradientLayerToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);if(d)return l.tokenToVariableRef(d);const g=T.ColorHelper.roundToDecimals(u.to.x,l.decimals)-T.ColorHelper.roundToDecimals(u.from.x,l.decimals),S=T.ColorHelper.roundToDecimals(u.to.y,l.decimals)-T.ColorHelper.roundToDecimals(u.from.y,l.decimals),b=Math.atan2(S,g)*(180/Math.PI),v=()=>g>=0&&S>0||g>0&&S<=0||g<=0&&S<0?90+b:b-270;let h="";switch(u.type){case e.GradientType.linear:h=`linear-gradient(${v()}deg, `;break;case e.GradientType.radial:h="radial-gradient(circle, ";break;case e.GradientType.angular:h="conic-gradient(";break;default:h=`linear-gradient(${v()}deg, `}return`${h}${u.stops.map(C=>`${this.colorTokenValueToCSS(C.color,p,l)} ${T.ColorHelper.roundToDecimals(100*C.position,l.decimals)}%`).join(", ")})`}static dimensionTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return d?l.tokenToVariableRef(d):`${T.ColorHelper.roundToDecimals(u.measure,l.decimals)}${this.unitToCSS(u.unit)}`}static shadowTokenValueToCSS(u,p,l){return u.map(d=>this.shadowLayerToCSS(d,p,l)).join(", ")}static shadowLayerToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return d?l.tokenToVariableRef(d):`${u.type===e.ShadowType.inner?"inset ":""}${u.x}px ${u.y}px ${u.radius}px ${u.spread}px ${this.colorTokenValueToCSS({...u.color,...u.opacity&&{opacity:u.opacity}},p,l)}`}static fontWeightTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return d?l.tokenToVariableRef(d):`${u.text}`}static stringTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return d?l.tokenToVariableRef(d):`"${u.text}"`}static optionTokenValueToCSS(u,p,l,d){const g=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return g?l.tokenToVariableRef(g):d===e.TokenType.textCase?this.textCaseToCSS(u.value):d===e.TokenType.textDecoration?this.textDecorationToCSS(u.value):u.value}static blurTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);return d?l.tokenToVariableRef(d):`blur(${this.dimensionTokenValueToCSS(u.radius,p,l)})`}static typographyTokenValueToCSS(u,p,l){const d=(0,c.sureOptionalReference)(u.referencedTokenId,p,l.allowReferences);if(d)return l.tokenToVariableRef(d);const g=(0,c.sureOptionalReference)(u.fontFamily.referencedTokenId,p,l.allowReferences),S=(0,c.sureOptionalReference)(u.fontWeight.referencedTokenId,p,l.allowReferences),b=(0,c.sureOptionalReference)(u.textDecoration.referencedTokenId,p,l.allowReferences),v=(0,c.sureOptionalReference)(u.textCase.referencedTokenId,p,l.allowReferences),h={fontFamily:g?l.tokenToVariableRef(g):u.fontFamily.text,fontWeight:S?l.tokenToVariableRef(S):u.fontWeight.text,textDecoration:b?l.tokenToVariableRef(b):u.textDecoration.value===e.TextDecoration.original?this.textDecorationToCSS(u.textDecoration.value):void 0,textCase:v?l.tokenToVariableRef(v):u.textCase.value===e.TextCase.original?this.textCaseToCSS(u.textCase.value):void 0,caps:u.textCase.value===e.TextCase.smallCaps,fontSize:this.dimensionTokenValueToCSS(u.fontSize,p,l),lineHeight:u.lineHeight?this.dimensionTokenValueToCSS(u.lineHeight,p,l):void 0},C=h.fontSize;return`${h.caps?"small-caps ":""}${h.fontWeight} ${h.lineHeight?`${C}/${h.lineHeight}`:C} ${g?h.fontFamily:`"${h.fontFamily}"`}`}static borderStyleToCSS(u){switch(u){case e.BorderStyle.dashed:return"dashed";case e.BorderStyle.dotted:return"dotted";case e.BorderStyle.solid:return"solid";case e.BorderStyle.groove:return"groove";default:return"solid"}}static borderPositionToCSS(u){switch(u){case e.BorderPosition.center:return"center";case e.BorderPosition.inside:return"inside";case e.BorderPosition.outside:default:return"outside"}}static unitToCSS(u){switch(u){case e.Unit.percent:return"%";case e.Unit.pixels:return"px";case e.Unit.rem:return"rem";case e.Unit.raw:return"";case e.Unit.ms:return"ms";default:return"px"}}static textCaseToCSS(u){switch(u){case e.TextCase.original:return"none";case e.TextCase.upper:return"uppercase";case e.TextCase.lower:return"lowercase";case e.TextCase.camel:case e.TextCase.smallCaps:return"capitalize"}}static textDecorationToCSS(u){switch(u){case e.TextDecoration.original:return"none";case e.TextDecoration.underline:return"underline";case e.TextDecoration.strikethrough:return"line-through"}}}},952:(r,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorHelper=void 0;const e=o(989),c=o(761);class T{static formattedColorOrVariableName(p,l,d){let g,S,b;const v=(0,c.sureOptionalReference)(p.referencedTokenId,l,d.allowReferences);if(v)g=d.tokenToVariableRef(v);else{const h=(0,c.sureOptionalReference)(p.color.referencedTokenId,l,d.allowReferences);h&&(S=d.tokenToVariableRef(h));const C=(0,c.sureOptionalReference)(p.opacity.referencedTokenId,l,d.allowReferences);C&&(b=d.tokenToVariableRef(C))}if(g)return g;if(!g&&!S&&!b)return this.formattedColor(p,d.colorFormat,d.decimals);switch(d.colorFormat){case e.ColorFormat.rgb:case e.ColorFormat.rgba:case e.ColorFormat.smartRgba:return this.colorToRgb(d.colorFormat,this.normalizedIntColor(p),p.opacity.measure,d.decimals,S,b);default:return this.formattedColor(p,d.colorFormat,d.decimals)}}static formattedColor(p,l,d=3){switch(l){case e.ColorFormat.hex6:case e.ColorFormat.hex8:case e.ColorFormat.hashHex6:case e.ColorFormat.hashHex8:case e.ColorFormat.smartHex:case e.ColorFormat.smartHashHex:return this.colorToHex(l,this.normalizedIntColor(p),p.opacity.measure);case e.ColorFormat.rgb:case e.ColorFormat.rgba:case e.ColorFormat.smartRgba:return this.colorToRgb(l,this.normalizedIntColor(p),p.opacity.measure,d,null,null);case e.ColorFormat.hsl:case e.ColorFormat.hsla:case e.ColorFormat.smartHsla:return this.colorToHsl(l,this.normalizedFractionalColor(p),p.opacity.measure,d);case e.ColorFormat.smartUIColor:return this.colorToUIColor(this.normalizedIntColor(p),p.opacity.measure,d)}}static colorToRgb(p,l,d,g,S,b){let v;return v=p===e.ColorFormat.rgba||p===e.ColorFormat.smartRgba&&d<1?`rgba(${S||`${l.r}, ${l.g}, ${l.b}`}, ${b||this.roundToDecimals(d,g)})`:`rgb(${S||`${l.r}, ${l.g}, ${l.b}`})`,v}static colorToHex(p,l,d){let g=`${this.pHex(l.r)}${this.pHex(l.g)}${this.pHex(l.b)}`;return(p===e.ColorFormat.hex8||p===e.ColorFormat.hashHex8||p===e.ColorFormat.smartHex&&d<1||p===e.ColorFormat.smartHashHex&&d<1)&&(g+=`${this.pHex(Math.round(255*d))}`),p!==e.ColorFormat.hashHex6&&p!==e.ColorFormat.hashHex8&&p!==e.ColorFormat.smartHashHex||(g=`#${g}`),g}static colorToHsl(p,l,d,g){const S=Math.max(l.r,l.g,l.b),b=Math.min(l.r,l.g,l.b);let v,h,C,j=(S+b)/2;if(S===b)v=h=0;else{const D=S-b;h=j>.5?D/(2-S-b):D/(S+b),S===l.r?v=(l.g-l.b)/D+(l.g{Object.defineProperty(t,"__esModule",{value:!0}),t.NamingHelper=void 0;const e=o(110),c=o(545);class T{static codeSafeVariableNameForToken(p,l,d,g){let S=[];return d&&(S=[...d.path],d.isRoot||S.push(d.name)),S.push(p.name),g&&g.length>0&&S.unshift(g),T.codeSafeVariableName(S,l)}static codeSafeVariableName(p,l){let d=typeof p=="string"?p:p.join(" ");switch(d=d.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),l){case c.StringCase.camelCase:d=(0,e.camelCase)(d);break;case c.StringCase.capitalCase:d=(0,e.capitalCase)(d);break;case c.StringCase.constantCase:d=(0,e.constantCase)(d);break;case c.StringCase.dotCase:d=(0,e.dotCase)(d);break;case c.StringCase.headerCase:d=(0,e.headerCase)(d);break;case c.StringCase.noCase:d=(0,e.noCase)(d);break;case c.StringCase.paramCase:d=(0,e.paramCase)(d);break;case c.StringCase.pascalCase:d=(0,e.pascalCase)(d);break;case c.StringCase.pathCase:d=(0,e.pathCase)(d);break;case c.StringCase.sentenceCase:d=(0,e.sentenceCase)(d);break;case c.StringCase.snakeCase:d=(0,e.snakeCase)(d)}return l!==c.StringCase.snakeCase&&l!==c.StringCase.constantCase&&(d=d.replaceAll("_","")),d.match(/^[^a-zA-Z]/)&&(d="_"+d),d}static nameAsCSSVarReference(p){return`var(--${p})`}static nameAsCSSVarDeclaration(p){return`--${p}`}}t.NamingHelper=T},58:r=>{r.exports=re()},110:r=>{r.exports=_t}},s={};function i(r){var t=s[r];if(t!==void 0)return t.exports;var o=s[r]={exports:{}};return a[r](o,o.exports,i),o.exports}var m={};(()=>{var r=m;Object.defineProperty(r,"__esModule",{value:!0}),r.ColorFormat=r.StringCase=r.Iterators=r.CSSHelper=r.FileHelper=r.ColorHelper=r.NamingHelper=r.NetworkHelper=void 0;var t=i(118);Object.defineProperty(r,"NetworkHelper",{enumerable:!0,get:function(){return t.NetworkHelper}});var o=i(453);Object.defineProperty(r,"NamingHelper",{enumerable:!0,get:function(){return o.NamingHelper}});var e=i(952);Object.defineProperty(r,"ColorHelper",{enumerable:!0,get:function(){return e.ColorHelper}});var c=i(617);Object.defineProperty(r,"FileHelper",{enumerable:!0,get:function(){return c.FileHelper}});var T=i(771);Object.defineProperty(r,"CSSHelper",{enumerable:!0,get:function(){return T.CSSHelper}});var u=i(639);Object.defineProperty(r,"Iterators",{enumerable:!0,get:function(){return u.Iterators}});var p=i(545);Object.defineProperty(r,"StringCase",{enumerable:!0,get:function(){return p.StringCase}});var l=i(989);Object.defineProperty(r,"ColorFormat",{enumerable:!0,get:function(){return l.ColorFormat}})})();var f=n;for(var y in m)f[y]=m[y];m.__esModule&&Object.defineProperty(f,"__esModule",{value:!0})})()})(P);var k=re();const K=[{fileName:"borders",tokenTypes:[k.TokenType.dimension],groupNames:["Border"],hasStylesObject:!1,sortByNumValue:!0},{fileName:"other",tokenTypes:[k.TokenType.dimension,k.TokenType.string],excludeGroupNames:["Border","Radius","Spacing"],sortByNumValue:!0},{fileName:"radii",tokenTypes:[k.TokenType.dimension],groupNames:["Radius"],hasParentPrefix:!1,sortByNumValue:!0},{fileName:"spacing",tokenTypes:[k.TokenType.dimension],groupNames:["Spacing"],hasParentPrefix:!1,sortByNumValue:!0},{fileName:"shadows",tokenTypes:[k.TokenType.shadow],hasParentPrefix:!1},{fileName:"gradients",tokenTypes:[k.TokenType.gradient],hasParentPrefix:!0},{fileName:"typography",tokenTypes:[k.TokenType.typography]}],z=[{fileName:"colors",tokenTypes:[k.TokenType.color],hasMixin:!0,hasStylesObject:!1}],It=[{fileName:"color-tokens",tokenTypes:[k.TokenType.color]}],pe="Colors",q="colors",V="-colors",R="global-tokens",x="js",Et=" ",N="scss",de=" ",_="themes",Nt="Theme tokens",Dt="Collection",X="styles",Rt=n=>n.replace(/\n{3,}/g,` `),xt=n=>n.replace(/\n{2,}$/,` -`),$t={js:{indentation:Et,openingBracket:"{",closingBracket:"}"},scss:{indentation:pe,openingBracket:"(",closingBracket:")"}},de=(n,a)=>{const c=a?"js":"scss",{indentation:i,openingBracket:m,closingBracket:y}=$t[c];let f=0,r="";const t=n.split(` -`);for(const o of t)o.includes(m)&&o.includes(y)?r+=`${i.repeat(f)}${o} -`:o.includes(m)?(r+=`${i.repeat(f)}${o} -`,f+=1):o.includes(y)?(f-=1,r+=`${i.repeat(f)}${o} -`):r+=`${i.repeat(f)}${o} -`;return r=Rt(r),r=xt(r),r},Te=/#([A-Fa-f0-9]{6,8})\b/g,jt=8,me=4,Bt=3,Ft=n=>n.length%2===0&&[...Array(n.length/2)].every((a,c)=>n[2*c]===n[2*c+1]),Lt=n=>n.split("").map((a,c)=>c%2===0?a:"").join(""),wt=n=>n.length===jt&&n.endsWith("ff")?n.slice(0,-2):n.length===me&&n.endsWith("f")?n.slice(0,-1):n,ye=n=>{const a=[Bt,me].includes(n.length);let c;return a?c=n:Ft(n)?c=Lt(n):c=n,c=wt(c),`#${c}`},X=n=>n.replace(Te,a=>ye(a.slice(1))),Z=(n,a,c,i)=>{let m=1;const y=i?`${i}-`:"";return a.split(",").map(r=>r.replace(Te,t=>{const o=`var(--${c}color-${y}${n}-color-${m.toString().padStart(2,"0")}, ${t})`;return m+=1,o})).join(",").replace(/0px/g,"0")},Mt=n=>n.filter(a=>{var m,y;if(a.tokenType!==k.TokenType.color)return!0;const c=a.properties.find(f=>f.name===Dt);if(!c)return!1;const i=(m=c.options)==null?void 0:m.find(f=>f.name===Nt);return i?((y=a.propertyValues)==null?void 0:y.collection)===i.id:!1}),Q=n=>({radius:"radii",spacing:"spaces"})[n]||(n.endsWith("s")?n:`${n}s`),E=n=>P.NamingHelper.codeSafeVariableName(n,P.StringCase.camelCase),J={"radius-full":"full"},At=new Map([["breakpoint-mobile",0]]),A=(n,a)=>{const c=At.get(n);return typeof c==typeof a?c:a},Ht=n=>J[n]?J[n]:n,fe=(n,a)=>{const c=Object.entries(a).reduce((y,[f,r])=>{let t;return typeof r=="object"&&r!==null&&typeof y[f]=="object"?t=fe(y[f],r):t=r,{...y,[f]:t}},{...n}),i={},m={};return Object.entries(c).forEach(([y,f])=>{typeof f=="object"&&f!==null&&f.moveToTheEnd==="true"?(delete f.moveToTheEnd,m[y]=f):i[y]=f}),{...i,...m}};function ge(n){return Object.entries(n).map(([a,c])=>{if(typeof c=="object"&&c!==null){const i=ge(c);return`${a}: ( +`),$t={js:{indentation:Et,openingBracket:"{",closingBracket:"}"},scss:{indentation:de,openingBracket:"(",closingBracket:")"}},Te=(n,a)=>{const s=a?"js":"scss",{indentation:i,openingBracket:m,closingBracket:f}=$t[s];let y=0,r="";const t=n.split(` +`);for(const o of t)o.includes(m)&&o.includes(f)?r+=`${i.repeat(y)}${o} +`:o.includes(m)?(r+=`${i.repeat(y)}${o} +`,y+=1):o.includes(f)?(y-=1,r+=`${i.repeat(y)}${o} +`):r+=`${i.repeat(y)}${o} +`;return r=Rt(r),r=xt(r),r},me=/#([A-Fa-f0-9]{6,8})\b/g,jt=8,ye=4,Bt=3,Ft=n=>n.length%2===0&&[...Array(n.length/2)].every((a,s)=>n[2*s]===n[2*s+1]),Lt=n=>n.split("").map((a,s)=>s%2===0?a:"").join(""),wt=n=>n.length===jt&&n.endsWith("ff")?n.slice(0,-2):n.length===ye&&n.endsWith("f")?n.slice(0,-1):n,fe=n=>{const a=[Bt,ye].includes(n.length);let s;return a?s=n:Ft(n)?s=Lt(n):s=n,s=wt(s),`#${s}`},Z=n=>n.replace(me,a=>fe(a.slice(1))),Q=(n,a,s,i)=>{let m=1;const f=i?`${i}-`:"";return a.split(",").map(r=>r.replace(me,t=>{const o=`var(--${s}color-${f}${n}-color-${m.toString().padStart(2,"0")}, ${t})`;return m+=1,o})).join(",").replace(/0px/g,"0")},Mt=n=>n.filter(a=>{var m,f;if(a.tokenType!==k.TokenType.color)return!0;const s=a.properties.find(y=>y.name===Dt);if(!s)return!1;const i=(m=s.options)==null?void 0:m.find(y=>y.name===Nt);return i?((f=a.propertyValues)==null?void 0:f.collection)===i.id:!1}),J=n=>({radius:"radii",spacing:"spaces"})[n]||(n.endsWith("s")?n:`${n}s`),E=n=>P.NamingHelper.codeSafeVariableName(n,P.StringCase.camelCase),ee={"radius-full":"full"},At=new Map([["breakpoint-mobile",0]]),A=(n,a)=>{const s=At.get(n);return typeof s==typeof a?s:a},Ht=n=>ee[n]?ee[n]:n,ge=(n,a)=>{const s=Object.entries(a).reduce((f,[y,r])=>{let t;return typeof r=="object"&&r!==null&&typeof f[y]=="object"?t=ge(f[y],r):t=r,{...f,[y]:t}},{...n}),i={},m={};return Object.entries(s).forEach(([f,y])=>{typeof y=="object"&&y!==null&&y.moveToTheEnd==="true"?(delete y.moveToTheEnd,m[f]=y):i[f]=y}),{...i,...m}};function Se(n){return Object.entries(n).map(([a,s])=>{if(typeof s=="object"&&s!==null){const i=Se(s);return`${a}: ( ${i} ), -`}return`${a}: ${c}, -`}).join("").slice(0,-1)}const Se=n=>Object.entries(n).map(([a,c])=>{if(typeof c=="object"&&c!==null){const i=Se(c);return`${a}: { +`}return`${a}: ${s}, +`}).join("").slice(0,-1)}const be=n=>Object.entries(n).map(([a,s])=>{if(typeof s=="object"&&s!==null){const i=be(s);return`${a}: { ${i} }, -`}return a===c?`${a}, -`:`${a}: ${c}, -`}).join("").slice(0,-1),Vt=n=>n.length===4?n.filter((a,c)=>c!==1).join("-"):n.join("-"),Ut=n=>n.length===4?n[1]:"mobile",Wt=(n,a)=>{var y;let c;const i=(y=n.name.match(/\d+/))==null?void 0:y[0],m=Ht(n.name.toLowerCase());return n.tokenType!==k.TokenType.color&&i?c=i:c=a?E(m):m,c},Gt=(n,a,c)=>{if(a===k.TokenType.color){const i=`${n.toLowerCase()}${V}`;return c?E(i):`$${i}`}return c?Q(n.toLowerCase()):`$${Q(n.toLowerCase())}`},I=(n,a,c)=>{let i;return c?i=a.find(m=>m.id===n.parentGroupId):i=null,P.NamingHelper.codeSafeVariableNameForToken(n,P.StringCase.paramCase,i,"")},Yt=(n,a)=>n===0?0:`${n}${a}`,B=(n,a,c,i)=>{const m=i?Yt(a,i):a;return c?`export const ${E(n)} = ${typeof m=="number"?m:`'${m}'`};`:`$${n}: ${m} !default;`},be=(n,a,c,i,m)=>n.sort((f,r)=>{if(m){const e=l=>l.tokenType===k.TokenType.dimension?l.value.measure:l.tokenType===k.TokenType.string?l.value.text:l.value,s=e(f),T=e(r);if(s&&T)return parseInt(s.toString(),10)-parseInt(T.toString(),10)}const t=I(f,a,c),o=I(r,a,c);return t.localeCompare(o)}),Kt=n=>{let a=null;const c=[];return n.forEach(({css:i,parentGroupId:m})=>{a&&m!==a&&i&&c.push(""),i&&c.push(i),a=m}),c.join(` -`)},zt=n=>{const a=/linear-gradient\(([^,]+),\s*(.+)\)/,c=n.match(a);if(c){const i=c[1].trim(),m=Number(i.match(/\d+/)),y=i.match(/deg/),f=c[2].trim();return`linear-gradient(var(--gradient-angle, ${m}${y}), ${f})`}return n},qt=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Xt=n=>{const a=/^'([^']*)'$/;return n.replace(a,"$1")},Zt=n=>typeof n=="number",Qt=n=>`{ +`}return a===s?`${a}, +`:`${a}: ${s}, +`}).join("").slice(0,-1),Vt=n=>n.length===4?n.filter((a,s)=>s!==1).join("-"):n.join("-"),Ut=n=>n.length===4?n[1]:"mobile",Wt=(n,a)=>{var f;let s;const i=(f=n.name.match(/\d+/))==null?void 0:f[0],m=Ht(n.name.toLowerCase());return n.tokenType!==k.TokenType.color&&i?s=i:s=a?E(m):m,s},Gt=(n,a,s)=>{if(a===k.TokenType.color){const i=`${n.toLowerCase()}${V}`;return s?E(i):`$${i}`}return s?J(n.toLowerCase()):`$${J(n.toLowerCase())}`},I=(n,a,s)=>{let i;return s?i=a.find(m=>m.id===n.parentGroupId):i=null,P.NamingHelper.codeSafeVariableNameForToken(n,P.StringCase.paramCase,i,"")},Yt=(n,a)=>n===0?0:`${n}${a}`,B=(n,a,s,i)=>{const m=i?Yt(a,i):a;return s?`export const ${E(n)} = ${typeof m=="number"?m:`'${m}'`};`:`$${n}: ${m} !default;`},U=(n,a,s,i)=>n.sort((f,y)=>{if(i){const o=T=>T.tokenType===k.TokenType.dimension?T.value.measure:T.tokenType===k.TokenType.string?T.value.text:T.value,e=o(f),c=o(y);if(e&&c)return parseInt(e.toString(),10)-parseInt(c.toString(),10)}const r=I(f,a,s),t=I(y,a,s);return r.localeCompare(t)}),Kt=n=>{let a=null;const s=[];return n.forEach(({css:i,parentGroupId:m})=>{a&&m!==a&&i&&s.push(""),i&&s.push(i),a=m}),s.join(` +`)},zt=n=>{const a=/linear-gradient\(([^,]+),\s*(.+)\)/,s=n.match(a);if(s){const i=s[1].trim(),m=Number(i.match(/\d+/)),f=i.match(/deg/),y=s[2].trim();return`linear-gradient(var(--gradient-angle, ${m}${f}), ${y})`}return n},qt=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Xt=n=>{const a=/^'([^']*)'$/;return n.replace(a,"$1")},Zt=n=>typeof n=="number",Qt=n=>`{ ${n.join(`, `)}, }`,Jt=n=>`( ${n.join(`, `)}, -)`,eo=(n,a)=>`${n}: ${/\s/.test(a)?`"${a}"`:a}`,to=(n,a)=>{const c=qt(n);let i;return typeof a=="string"&&a.includes(", ")?i=`"${a}"`:Zt(a)?i=a:i=Xt(a),`${c}: ${i}`},ee=(n,a)=>Object.entries(n).map(c=>{const[i,m]=c;return a(i,m)}),oo=({fontFamily:n,fontSize:a,fontWeight:c,lineHeight:i},m,y)=>{const f={fontFamily:`'${n.text}', sans-serif`,fontSize:`'${a.measure}${a.unit==="Pixels"?"px":a.unit}'`,fontStyle:`'${m?"italic":"normal"}'`,fontWeight:c.text};i&&i.measure&&(f.lineHeight=i.measure/100);const r=ee(f,to),t=ee(f,eo);return y?Qt(t):Jt(r)},ro=(n,a,c,i,m,y,f)=>{var t,o,e,s;const r=T=>{const{tokenType:l}=n;return l===T};if(r(k.TokenType.dimension)){const T=n,l=I(T,c,y);let p=(t=T.value)==null?void 0:t.measure;p=A(l,p);const u=P.CSSHelper.unitToCSS((o=T.value)==null?void 0:o.unit);return B(l,p,f,u)}if(r(k.TokenType.string)){const T=n,l=I(T,c,y);let p=T.value.text;return p=A(l,p),B(l,p,f)}if(r(k.TokenType.color)){const T=n,l=I(T,c,y);if(m){let p=P.CSSHelper.colorTokenValueToCSS(T.value,a,{allowReferences:!0,decimals:3,colorFormat:P.ColorFormat.hex8,tokenToVariableRef:()=>""});return p=A(l,ye(p)),B(l,p,f)}return`$${l}: var(--${i}color-${l});`}if(r(k.TokenType.shadow)){const T=n,l=I(n,c,y),{value:p,origin:u}=T;let d=P.CSSHelper.shadowTokenValueToCSS(p,a,{allowReferences:!0,decimals:3,colorFormat:P.ColorFormat.hashHex8,tokenToVariableRef:()=>""});const g=y||(e=u==null?void 0:u.name)==null?void 0:e.split("/")[0].toLowerCase();return d=Z(l,d,i,g),d=X(d),B(l,d,f)}if(r(k.TokenType.gradient)){const T=n,l=I(n,c,y),{value:p,origin:u}=T;let d=P.CSSHelper.gradientTokenValueToCSS(p,a,{allowReferences:!0,colorFormat:P.ColorFormat.hashHex8,decimals:3,tokenToVariableRef:()=>""});d=zt(d);const g=y||(s=u==null?void 0:u.name)==null?void 0:s.split("/")[0].toLowerCase();return d=Z(l,d,i,g),d=X(d),B(l,d,f)}return null},no=(n,a,c,i,m,y,f,r,t=!1)=>{const e=be(n,c,f,m,r).map(s=>({css:ro(s,a,c,i,y,f,t),parentGroupId:s.parentGroupId}));return Kt(e)},ao=(n,a,c,i)=>{const m=a,y=n.slice(0,2),f=Vt(n).toLowerCase(),r=Ut(n).toLowerCase();let t=c;y.forEach((o,e)=>{const s=i?E(f):`$${f}`,T=e===0?s:o;e===y.length-1?t[r]=oo(m.value,f.includes("italic"),i):(t[T]=t[T]||{},t=t[T])})},io=(n,a,c,i,m,y=!1)=>{let f=m;n.forEach((r,t)=>{const o=t===0?Gt(r,a.tokenType,y):r;if(t===n.length-1){const e=y?`${E(I(a,c,i))}`:`$${I(a,c,i)}`,s=Wt(a,y);f[s]=e}else f[y?E(o):o]=f[o]||{},f=f[y?E(o):o]})},so=(n,a,c,i,m)=>{var r,t;const{tokenType:y}=n,f=(t=(r=n.origin)==null?void 0:r.name)==null?void 0:t.split("/");return!f||f.length<=1||(y===k.TokenType.typography?ao(f,n,i,m):io(f,n,a,c,i,m)),i},he=(n,a)=>{const c=a?ue:V;return n.replace(c,"").replace("$","")},co=(n,a)=>({...n,[he(a,!1)]:a}),lo=(n,a)=>n.reduce((c,i)=>({...c,[he(i,a)]:i}),{}),uo=n=>n.reduce(co,{}),po=(n,a,c,i,m)=>{const y=n.reduce((t,o)=>{const e=so(o,c,i,t,m);return{...t,...e}},{}),f=Object.keys(y).filter(t=>t.endsWith(m?ue:V));if(f.length>0){const t=lo(f,m),o=m?z:`$${z}`;return{...y,[o]:t}}const r=Object.keys(y).filter(t=>t.includes("heading")||t.includes("body"));if(r.length>0){const t=uo(r),o=m?q:`$${q}`;return{...y,[o]:{...t,moveToTheEnd:"true"}}}return y},To="css-variable-prefix",mo=n=>{var i;const a=n.find(m=>m.tokenType===k.TokenType.string&&m.name===To);return((i=a==null?void 0:a.value)==null?void 0:i.text)??""},yo=(n,a,c,i,m,y)=>`@mixin color-css-variables { -${be(n,a,m,i,y).map(t=>{const o=I(t,a,m);return`${pe}--${c}color-${o}: #{$${o}};`}).join(` +)`,eo=(n,a)=>`${n}: ${/\s/.test(a)?`"${a}"`:a}`,to=(n,a)=>{const s=qt(n);let i;return typeof a=="string"&&a.includes(", ")?i=`"${a}"`:Zt(a)?i=a:i=Xt(a),`${s}: ${i}`},te=(n,a)=>Object.entries(n).map(s=>{const[i,m]=s;return a(i,m)}),oo=({fontFamily:n,fontSize:a,fontWeight:s,lineHeight:i},m,f)=>{const y={fontFamily:`'${n.text}', sans-serif`,fontSize:`'${a.measure}${a.unit==="Pixels"?"px":a.unit}'`,fontStyle:`'${m?"italic":"normal"}'`,fontWeight:s.text};i&&i.measure&&(y.lineHeight=i.measure/100);const r=te(y,to),t=te(y,eo);return f?Qt(t):Jt(r)},ro=(n,a,s,i,m,f,y)=>{var t,o,e,c;const r=T=>{const{tokenType:u}=n;return u===T};if(r(k.TokenType.dimension)){const T=n,u=I(T,s,f);let p=(t=T.value)==null?void 0:t.measure;p=A(u,p);const l=P.CSSHelper.unitToCSS((o=T.value)==null?void 0:o.unit);return B(u,p,y,l)}if(r(k.TokenType.string)){const T=n,u=I(T,s,f);let p=T.value.text;return p=A(u,p),B(u,p,y)}if(r(k.TokenType.color)){const T=n,u=I(T,s,f);if(m){let p=P.CSSHelper.colorTokenValueToCSS(T.value,a,{allowReferences:!0,decimals:3,colorFormat:P.ColorFormat.hex8,tokenToVariableRef:()=>""});return p=A(u,fe(p)),B(u,p,y)}return`$${u}: var(--${i}color-${u});`}if(r(k.TokenType.shadow)){const T=n,u=I(n,s,f),{value:p,origin:l}=T;let d=P.CSSHelper.shadowTokenValueToCSS(p,a,{allowReferences:!0,decimals:3,colorFormat:P.ColorFormat.hashHex8,tokenToVariableRef:()=>""});const g=f||(e=l==null?void 0:l.name)==null?void 0:e.split("/")[0].toLowerCase();return d=Q(u,d,i,g),d=Z(d),B(u,d,y)}if(r(k.TokenType.gradient)){const T=n,u=I(n,s,f),{value:p,origin:l}=T;let d=P.CSSHelper.gradientTokenValueToCSS(p,a,{allowReferences:!0,colorFormat:P.ColorFormat.hashHex8,decimals:3,tokenToVariableRef:()=>""});d=zt(d);const g=f||(c=l==null?void 0:l.name)==null?void 0:c.split("/")[0].toLowerCase();return d=Q(u,d,i,g),d=Z(d),B(u,d,y)}return null},no=(n,a,s,i,m,f,y,r=!1)=>{const o=U(n,s,f,y).map(e=>({css:ro(e,a,s,i,m,f,r),parentGroupId:e.parentGroupId}));return Kt(o)},ao=(n,a,s,i)=>{const m=a,f=n.slice(0,2),y=Vt(n).toLowerCase(),r=Ut(n).toLowerCase();let t=s;f.forEach((o,e)=>{const c=i?E(y):`$${y}`,T=e===0?c:o;e===f.length-1?t[r]=oo(m.value,y.includes("italic"),i):(t[T]=t[T]||{},t=t[T])})},io=(n,a,s,i,m,f=!1)=>{let y=m;n.forEach((r,t)=>{const o=t===0?Gt(r,a.tokenType,f):r;if(t===n.length-1){const e=f?`${E(I(a,s,i))}`:`$${I(a,s,i)}`,c=Wt(a,f);y[c]=e}else y[f?E(o):o]=y[o]||{},y=y[f?E(o):o]})},so=(n,a,s,i,m)=>{var r,t;const{tokenType:f}=n,y=(t=(r=n.origin)==null?void 0:r.name)==null?void 0:t.split("/");return!y||y.length<=1||(f===k.TokenType.typography?ao(y,n,i,m):io(y,n,a,s,i,m)),i},he=(n,a)=>{const s=a?pe:V;return n.replace(s,"").replace("$","")},co=(n,a)=>({...n,[he(a,!1)]:a}),lo=(n,a)=>n.reduce((s,i)=>({...s,[he(i,a)]:i}),{}),uo=n=>n.reduce(co,{}),po=(n,a,s,i,m)=>{const y=U(n,a,s,m).reduce((o,e)=>{const c=so(e,a,s,o,i);return{...o,...c}},{}),r=Object.keys(y).filter(o=>o.endsWith(i?pe:V));if(r.length>0){const o=lo(r,i),e=i?q:`$${q}`;return{...y,[e]:o}}const t=Object.keys(y).filter(o=>o.includes("heading")||o.includes("body"));if(t.length>0){const o=uo(t),e=i?X:`$${X}`;return{...y,[e]:{...o,moveToTheEnd:"true"}}}return y},To="css-variable-prefix",mo=n=>{var i;const a=n.find(m=>m.tokenType===k.TokenType.string&&m.name===To);return((i=a==null?void 0:a.value)==null?void 0:i.text)??""},yo=(n,a,s,i,m)=>`@mixin color-css-variables { +${U(n,a,i,m).map(r=>{const t=I(r,a,i);return`${de}--${s}color-${t}: #{$${t}};`}).join(` `)} } `,fo=n=>`/* This file was generated by Supernova, don't change manually */ -${n}`,go=(n,a,c)=>n.filter(i=>{var r,t;const m=i.tokenType===a,y=(t=(r=i.origin)==null?void 0:r.name)==null?void 0:t.includes(c),f=!(i.tokenType===k.TokenType.typography&&i.name.includes("-Underline"));return m&&y&&f}),ve=(n,a)=>n!==a-1?` +${n}`,go=(n,a,s)=>n.filter(i=>{var r,t;const m=i.tokenType===a,f=(t=(r=i.origin)==null?void 0:r.name)==null?void 0:t.includes(s),y=!(i.tokenType===k.TokenType.typography&&i.name.includes("-Underline"));return m&&f&&y}),ve=(n,a)=>n!==a-1?` `:` -`,So=n=>([a,c],i)=>`export const ${a} = { -${Se(c)} -};${ve(i,n)}`,bo=n=>([a,c],i)=>`${a}: ( -${ge(c)} -) !default;${ve(i,n)}`,ke=(n,a)=>{const c=Object.entries(n);return c.map(a(c.length)).join("")},ho=n=>ke(n,So),vo=n=>ke(n,bo),ko=(n,a,c)=>{let i;if(a&&a.length>0){const y=n.filter(f=>!a.some(r=>{var t,o;return(o=(t=f.origin)==null?void 0:t.name)==null?void 0:o.includes(r)})).reduce((f,r)=>{var o,e;const t=(e=(o=r.origin)==null?void 0:o.name)==null?void 0:e.split("/")[0];return t&&!f.includes(t)&&f.push(t),f},[]);i=[...new Set(y)]}else i=c;return i},Co=(n,a,c,i,m)=>{let y="",f={},r="";const{groupNames:t=[""],hasParentPrefix:o=!0,sortByNumValue:e=!1,hasMixin:s=!1,hasStylesObject:T=!0,tokenTypes:l,excludeGroupNames:p=null}=i;l.forEach(d=>{ko(n,p,t).forEach(S=>{const b=go(n,d,S),v=mo(n);d!==k.TokenType.typography&&(y+=no(b,a,c,v,S,s,o,e,m),y+=` +`,So=n=>([a,s],i)=>`export const ${a} = { +${be(s)} +};${ve(i,n)}`,bo=n=>([a,s],i)=>`${a}: ( +${Se(s)} +) !default;${ve(i,n)}`,ke=(n,a)=>{const s=Object.entries(n);return s.map(a(s.length)).join("")},ho=n=>ke(n,So),vo=n=>ke(n,bo),ko=(n,a,s)=>{let i;if(a&&a.length>0){const f=n.filter(y=>!a.some(r=>{var t,o;return(o=(t=y.origin)==null?void 0:t.name)==null?void 0:o.includes(r)})).reduce((y,r)=>{var o,e;const t=(e=(o=r.origin)==null?void 0:o.name)==null?void 0:e.split("/")[0];return t&&!y.includes(t)&&y.push(t),y},[]);i=[...new Set(f)]}else i=s;return i},Co=(n,a,s,i,m)=>{let f="",y={},r="";const{excludeGroupNames:t=null,groupNames:o=[""],hasMixin:e=!1,hasParentPrefix:c=!0,hasStylesObject:T=!0,sortByNumValue:u=!1,tokenTypes:p}=i;p.forEach(d=>{ko(n,t,o).forEach(S=>{const b=go(n,d,S),v=mo(n);d!==k.TokenType.typography&&(f+=no(b,a,s,v,e,c,u,m),f+=` -`),!m&&s&&(r+=yo(b,c,v,S,o,e));const h=po(b,a,c,o,m);f=fe(f,h)})});let u=y;return T&&(u+=m?ho(f):vo(f)),!m&&s&&(u+=r),{content:fo(de(u,m))}},F=(n,a,c,i,m=!1)=>i.map(y=>{const f=Co(n,a,c,y,m);return{fileName:y.fileName,...f}}),L=(n,a=!1)=>`${n.map(c=>{const i=a?"ts":"scss",m=c.fileName.replace(/^_/,"").replace(new RegExp(`\\.${i}$`),"");return a?`export * from './${m}';`:`@forward '${m}';`}).sort().join(` +`),!m&&e&&(r+=yo(b,s,v,c,u));const h=po(b,s,c,m,u);y=ge(y,h)})});let l=f;return T&&(l+=m?ho(y):vo(y)),!m&&e&&(l+=r),{content:fo(Te(l,m))}},F=(n,a,s,i,m=!1)=>i.map(f=>{const y=Co(n,a,s,f,m);return{fileName:f.fileName,...y}}),L=(n,a=!1)=>`${n.map(s=>{const i=a?"ts":"scss",m=s.fileName.replace(/^_/,"").replace(new RegExp(`\\.${i}$`),"");return a?`export * from './${m}';`:`@forward '${m}';`}).sort().join(` `)} `,Po=n=>`import * as ${E(n)} from './${n}';`,Oo=n=>`@use '${_}/${n}';`,_o=n=>a=>n?Po(a.name):Oo(a.name),Io=(n,a)=>n.map(_o(a)).join(` -`),Eo=(n,a)=>n.map(c=>{const i=`variables: meta.module-variables(${c.name}), -`,m=`mixins: meta.module-mixins(${c.name}), -`;return a?`${E(c.name)}: { -tokens: ${E(c.name)}, -},`:`${c.name}: ( +`),Eo=(n,a)=>n.map(s=>{const i=`variables: meta.module-variables(${s.name}), +`,m=`mixins: meta.module-mixins(${s.name}), +`;return a?`${E(s.name)}: { +tokens: ${E(s.name)}, +},`:`${s.name}: ( ${i}${m}),`}).join(` -`),te=(n,a=!1)=>{const c=Io(n,a),i=Eo(n,a),r=`${a?"":`@use 'sass:meta'; -`}${c} +`),oe=(n,a=!1)=>{const s=Io(n,a),i=Eo(n,a),r=`${a?"":`@use 'sass:meta'; +`}${s} // The first theme is the default theme, as the left column in the Figma table. ${a?`export const themes = { @@ -70,9 +70,9 @@ ${a?`export const themes = { `}${i} ${a?`}; `:`); -`}`;return de(r,a)},No=async(n,a,c,i,m)=>{const y=[],f=Mt(n),r=F(n,a,c,Y),t=F(n,a,c,Y,!0),o=L(r),e=L(t,!0);y.push(...r.map(d=>({path:`./${N}/${R}`,fileName:`_${d.fileName}.scss`,content:d.content})),...t.map(d=>({path:`./${x}/${R}/`,fileName:`${d.fileName}.ts`,content:d.content}))),y.push({path:`./${N}/${R}/`,fileName:"index.scss",content:o}),y.push({path:`./${x}/${R}/`,fileName:"index.ts",content:e}),y.push({path:`./${N}/`,fileName:"@tokens.scss",content:`@forward '${R}'; +`}`;return Te(r,a)},No=async(n,a,s,i,m)=>{const f=[],y=Mt(n),r=F(n,a,s,K),t=F(n,a,s,K,!0),o=L(r),e=L(t,!0);f.push(...r.map(d=>({path:`./${N}/${R}`,fileName:`_${d.fileName}.scss`,content:d.content})),...t.map(d=>({path:`./${x}/${R}/`,fileName:`${d.fileName}.ts`,content:d.content}))),f.push({path:`./${N}/${R}/`,fileName:"index.scss",content:o}),f.push({path:`./${x}/${R}/`,fileName:"index.ts",content:e}),f.push({path:`./${N}/`,fileName:"@tokens.scss",content:`@forward '${R}'; @forward '${_}'; -`}),y.push({path:`./${x}/`,fileName:"index.ts",content:`export * from './${R}'; +`}),f.push({path:`./${x}/`,fileName:"index.ts",content:`export * from './${R}'; export * from './${_}'; -`});const s=await Promise.all(i.map(async d=>({themedTokens:m.tokens.computeTokensByApplyingThemes(n,f,[d]),theme:d})));for(const{themedTokens:d,theme:g}of s){const S=F(d,a,c,K),b=F(d,a,c,K,!0),v=L(S),h=L(b,!0);y.push(...S.map(C=>({path:`./${N}/${_}/${g.name}/`,fileName:`_${C.fileName}.scss`,content:C.content})),...b.map(C=>({path:`./${x}/${_}/${g.name}/`,fileName:`${C.fileName}.ts`,content:C.content}))),y.push({path:`./${N}/${_}/${g.name}/`,fileName:"index.scss",content:v}),y.push({path:`./${x}/${_}/${g.name}/`,fileName:"index.ts",content:h})}const T=te(i),l=te(i,!0),p=`@forward 'color-tokens'; -`,u=F(f,a,c,It,!1);return y.push({path:`./${N}/`,fileName:"@themes.scss",content:T}),y.push({path:`./${x}/${_}`,fileName:"index.ts",content:l}),y.push({path:`./${N}/${_}`,fileName:"index.scss",content:p}),y.push(...u.map(d=>({path:`./${N}/${_}`,fileName:`_${d.fileName}.scss`,content:d.content}))),y},Do=n=>{let a=[];const c=JSON.stringify(n,(i,m)=>{if(typeof m=="object"&&m!==null){if(a!=null&&a.includes(m))return"CIRCULAR_REFERENCE";a==null||a.push(m)}return m},2);return a=null,c},Ce=Pulsar.exportConfig();Pulsar.export(async(n,a)=>{const c={designSystemId:a.dsId,versionId:a.versionId};let i=await n.tokens.getTokens(c),m=await n.tokens.getTokenGroups(c);a.brandId&&(i=i.filter(e=>e.brandId===a.brandId),m=m.filter(e=>e.brandId===a.brandId));const y=new Map(i.map(e=>[e.id,e])),f=await n.tokens.getTokenThemes(c),r=(e,s,T)=>P.FileHelper.createTextFile({relativePath:e,fileName:s,content:T});let t=[];return t=(await No(i,y,m,f,n)).map(e=>r(e.path,e.fileName,e.content)),Ce.generateOriginalDataFiles&&t.push(r("./original-data/","_original-tokens.json",Do(i)),r("./original-data/","_original-groups.json",JSON.stringify(m,null,2))),t});exports.exportConfiguration=Ce; +`});const c=await Promise.all(i.map(async d=>({themedTokens:m.tokens.computeTokensByApplyingThemes(n,y,[d]),theme:d})));for(const{themedTokens:d,theme:g}of c){const S=F(d,a,s,z),b=F(d,a,s,z,!0),v=L(S),h=L(b,!0);f.push(...S.map(C=>({path:`./${N}/${_}/${g.name}/`,fileName:`_${C.fileName}.scss`,content:C.content})),...b.map(C=>({path:`./${x}/${_}/${g.name}/`,fileName:`${C.fileName}.ts`,content:C.content}))),f.push({path:`./${N}/${_}/${g.name}/`,fileName:"index.scss",content:v}),f.push({path:`./${x}/${_}/${g.name}/`,fileName:"index.ts",content:h})}const T=oe(i),u=oe(i,!0),p=`@forward 'color-tokens'; +`,l=F(y,a,s,It,!1);return f.push({path:`./${N}/`,fileName:"@themes.scss",content:T}),f.push({path:`./${x}/${_}`,fileName:"index.ts",content:u}),f.push({path:`./${N}/${_}`,fileName:"index.scss",content:p}),f.push(...l.map(d=>({path:`./${N}/${_}`,fileName:`_${d.fileName}.scss`,content:d.content}))),f},Do=n=>{let a=[];const s=JSON.stringify(n,(i,m)=>{if(typeof m=="object"&&m!==null){if(a!=null&&a.includes(m))return"CIRCULAR_REFERENCE";a==null||a.push(m)}return m},2);return a=null,s},Ce=Pulsar.exportConfig();Pulsar.export(async(n,a)=>{const s={designSystemId:a.dsId,versionId:a.versionId};let i=await n.tokens.getTokens(s),m=await n.tokens.getTokenGroups(s);a.brandId&&(i=i.filter(e=>e.brandId===a.brandId),m=m.filter(e=>e.brandId===a.brandId));const f=new Map(i.map(e=>[e.id,e])),y=await n.tokens.getTokenThemes(s),r=(e,c,T)=>P.FileHelper.createTextFile({relativePath:e,fileName:c,content:T});let t=[];return t=(await No(i,f,m,y,n)).map(e=>r(e.path,e.fileName,e.content)),Ce.generateOriginalDataFiles&&t.push(r("./original-data/","_original-tokens.json",Do(i)),r("./original-data/","_original-groups.json",JSON.stringify(m,null,2))),t});exports.exportConfiguration=Ce; diff --git a/exporters/tokens/src/config/fileConfig.ts b/exporters/tokens/src/config/fileConfig.ts index 14716de2bd..fe263dcca9 100644 --- a/exporters/tokens/src/config/fileConfig.ts +++ b/exporters/tokens/src/config/fileConfig.ts @@ -52,7 +52,6 @@ export const nonThemedFilesData: FileData[] = [ { fileName: 'typography', tokenTypes: [TokenType.typography], - hasParentPrefix: false, }, ]; diff --git a/exporters/tokens/src/generators/__tests__/mixinGenerator.test.ts b/exporters/tokens/src/generators/__tests__/mixinGenerator.test.ts index 342d8aa91c..fbb110bc0c 100644 --- a/exporters/tokens/src/generators/__tests__/mixinGenerator.test.ts +++ b/exporters/tokens/src/generators/__tests__/mixinGenerator.test.ts @@ -12,7 +12,6 @@ describe('mixinGenerator', () => { const dataProvider = [ { tokens: exampleColorsTokens, - groupName: '', hasParentPrefix: false, hasTokenPrefix: true, description: 'should generate mixin from tokens', @@ -20,7 +19,6 @@ describe('mixinGenerator', () => { }, { tokens: exampleColorsTokens, - groupName: '', hasParentPrefix: false, hasTokenPrefix: false, description: 'should generate mixin with parent prefix and no token prefix', @@ -30,7 +28,7 @@ describe('mixinGenerator', () => { it.each(dataProvider)( 'should correctly generate mixin for $description', - ({ tokens, expectedStyles, groupName, hasParentPrefix, hasTokenPrefix }) => { + ({ tokens, expectedStyles, hasParentPrefix, hasTokenPrefix }) => { const prefixTokens = Array.from(examplePrefixToken.values()); const tokenPrefix = hasTokenPrefix ? findTokenPrefix(prefixTokens) : ''; @@ -38,7 +36,6 @@ describe('mixinGenerator', () => { Array.from(tokens.values()), tokenGroups, tokenPrefix, - groupName, hasParentPrefix, false, ); diff --git a/exporters/tokens/src/generators/__tests__/stylesGenerator.test.ts b/exporters/tokens/src/generators/__tests__/stylesGenerator.test.ts index be703e46c5..cce5cf28c8 100644 --- a/exporters/tokens/src/generators/__tests__/stylesGenerator.test.ts +++ b/exporters/tokens/src/generators/__tests__/stylesGenerator.test.ts @@ -158,7 +158,6 @@ describe('stylesGenerator', () => { const dataProvider = [ { tokens: exampleDimensionAndStringTokens, - groupName: 'Grid', hasJsOutput: false, hasMixin: false, hasParentPrefix: true, @@ -168,7 +167,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleDimensionAndStringTokens, - groupName: 'Grid', hasJsOutput: true, hasMixin: false, hasParentPrefix: true, @@ -178,7 +176,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleColorsTokens, - groupName: '', hasJsOutput: false, hasMixin: true, hasParentPrefix: false, @@ -188,7 +185,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleColorsTokens, - groupName: '', hasJsOutput: false, hasMixin: false, hasParentPrefix: false, @@ -198,7 +194,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleColorsTokens, - groupName: '', hasJsOutput: true, hasMixin: true, hasParentPrefix: false, @@ -208,7 +203,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleShadowTokens, - groupName: '', hasJsOutput: false, hasMixin: false, hasParentPrefix: false, @@ -218,7 +212,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleShadowTokens, - groupName: '', hasJsOutput: false, hasMixin: false, hasParentPrefix: false, @@ -228,7 +221,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleGradientTokens, - groupName: '', hasJsOutput: false, hasMixin: false, hasParentPrefix: false, @@ -239,7 +231,6 @@ describe('stylesGenerator', () => { }, { tokens: exampleGradientTokens, - groupName: '', hasJsOutput: false, hasMixin: false, hasParentPrefix: false, @@ -252,7 +243,7 @@ describe('stylesGenerator', () => { it.each(dataProvider)( '$description', - ({ tokens, groupName, hasJsOutput, hasMixin, hasParentPrefix, hasTokenPrefix, expectedStyles }) => { + ({ tokens, hasJsOutput, hasMixin, hasParentPrefix, hasTokenPrefix, expectedStyles }) => { const prefixTokens = Array.from(examplePrefixToken.values()); const tokenPrefix = hasTokenPrefix ? findTokenPrefix(prefixTokens) : ''; const styles = generateStylesFromTokens( @@ -260,7 +251,6 @@ describe('stylesGenerator', () => { mappedTokens, tokenGroups, tokenPrefix, - groupName, hasMixin, hasParentPrefix, false, diff --git a/exporters/tokens/src/generators/__tests__/stylesObjectGenerator.test.ts b/exporters/tokens/src/generators/__tests__/stylesObjectGenerator.test.ts index d35a7f4fec..e2a2d9415c 100644 --- a/exporters/tokens/src/generators/__tests__/stylesObjectGenerator.test.ts +++ b/exporters/tokens/src/generators/__tests__/stylesObjectGenerator.test.ts @@ -15,7 +15,6 @@ import { typographyGroupReducer, } from '../stylesObjectGenerator'; -const mappedTokens: Map = new Map([]); const tokenGroups: Array = exampleGroups; describe('stylesObjectGenerator', () => { @@ -109,13 +108,7 @@ describe('stylesObjectGenerator', () => { ]; it.each(dataProvider)('$description', ({ tokens, expectedStyles, hasJsOutput }) => { - const styles = generateStylesObjectFromTokens( - Array.from(tokens.values()), - mappedTokens, - tokenGroups, - true, - hasJsOutput, - ); + const styles = generateStylesObjectFromTokens(Array.from(tokens.values()), tokenGroups, true, hasJsOutput, false); expect(styles).toStrictEqual(expectedStyles); }); diff --git a/exporters/tokens/src/generators/contentGenerator.ts b/exporters/tokens/src/generators/contentGenerator.ts index bc52e5928c..9395ea1340 100644 --- a/exporters/tokens/src/generators/contentGenerator.ts +++ b/exporters/tokens/src/generators/contentGenerator.ts @@ -90,13 +90,13 @@ export const generateFileContent = ( let stylesObject: StylesObjectType = {}; let styledMixin = ''; const { + excludeGroupNames = null, groupNames = [''], - hasParentPrefix = true, - sortByNumValue = false, hasMixin = false, + hasParentPrefix = true, hasStylesObject = true, + sortByNumValue = false, tokenTypes, - excludeGroupNames = null, } = fileData; // Iterate over token types and groups to filter tokens @@ -114,7 +114,6 @@ export const generateFileContent = ( mappedTokens, tokenGroups, tokenPrefix, - group, hasMixin, hasParentPrefix, sortByNumValue, @@ -129,7 +128,6 @@ export const generateFileContent = ( filteredTokens, tokenGroups, tokenPrefix, - group, hasParentPrefix, sortByNumValue, ); @@ -138,10 +136,10 @@ export const generateFileContent = ( // Generate css object and merge it with the existing one const groupStylesObject = generateStylesObjectFromTokens( filteredTokens, - mappedTokens, tokenGroups, hasParentPrefix, hasJsOutput, + sortByNumValue, ); stylesObject = deepMergeObjects(stylesObject, groupStylesObject); }); diff --git a/exporters/tokens/src/generators/fileGenerator.ts b/exporters/tokens/src/generators/fileGenerator.ts index efb67b4ade..14616528fd 100644 --- a/exporters/tokens/src/generators/fileGenerator.ts +++ b/exporters/tokens/src/generators/fileGenerator.ts @@ -162,7 +162,7 @@ export const generateOutputFilesByThemes = async ( // Generate root themes file const rootThemesFileContent = generateThemesRootFile(themes); const rootTsThemesFileContent = generateThemesRootFile(themes, true); - const rootScssThemesFile = `@forward 'color-tokens';\n`; + const rootScssThemesFile = "@forward 'color-tokens';\n"; const colorTokensFile = generateFiles( filteredColorCollections, mappedTokens, diff --git a/exporters/tokens/src/generators/mixinGenerator.ts b/exporters/tokens/src/generators/mixinGenerator.ts index d44195e14f..24a4c4eee0 100644 --- a/exporters/tokens/src/generators/mixinGenerator.ts +++ b/exporters/tokens/src/generators/mixinGenerator.ts @@ -6,11 +6,10 @@ export const generateMixinFromTokens = ( tokens: Token[], tokenGroups: Array, tokenPrefix: string, - group: string, hasParentPrefix: boolean, sortByNumValue: boolean, ): string => { - const sortedTokens = sortTokens(tokens, tokenGroups, hasParentPrefix, group, sortByNumValue); + const sortedTokens = sortTokens(tokens, tokenGroups, hasParentPrefix, sortByNumValue); const variables = sortedTokens .map((token) => { const name = tokenVariableName(token, tokenGroups, hasParentPrefix); diff --git a/exporters/tokens/src/generators/stylesGenerator.ts b/exporters/tokens/src/generators/stylesGenerator.ts index d156f3a5da..97ab9f1284 100644 --- a/exporters/tokens/src/generators/stylesGenerator.ts +++ b/exporters/tokens/src/generators/stylesGenerator.ts @@ -122,13 +122,12 @@ export const generateStylesFromTokens = ( mappedTokens: Map, tokenGroups: Array, tokenPrefix: string, - group: string, hasMixin: boolean, hasParentPrefix: boolean, sortByNumValue: boolean, hasJsOutput: boolean = false, ): string => { - const sortedTokens = sortTokens(tokens, tokenGroups, hasParentPrefix, group, sortByNumValue); + const sortedTokens = sortTokens(tokens, tokenGroups, hasParentPrefix, sortByNumValue); const cssTokens = sortedTokens.map((token) => ({ css: tokenToStyleByType(token, mappedTokens, tokenGroups, tokenPrefix, hasMixin, hasParentPrefix, hasJsOutput), diff --git a/exporters/tokens/src/generators/stylesObjectGenerator.ts b/exporters/tokens/src/generators/stylesObjectGenerator.ts index dcc316fb44..bc217c98ac 100644 --- a/exporters/tokens/src/generators/stylesObjectGenerator.ts +++ b/exporters/tokens/src/generators/stylesObjectGenerator.ts @@ -1,6 +1,6 @@ import { Token, TokenGroup, TokenType, TypographyToken } from '@supernovaio/sdk-exporters'; import { formatTypographyName, getBreakpoint, getTokenAlias, normalizeFirstNamePart } from '../helpers/objectHelper'; -import { tokenVariableName, typographyValue } from '../helpers/tokenHelper'; +import { sortTokens, tokenVariableName, typographyValue } from '../helpers/tokenHelper'; import { toCamelCase } from '../helpers/stringHelper'; import { COLOR_JS_SUFFIX, COLOR_KEY, COLOR_SCSS_SUFFIX, TYPOGRAPHY_KEY } from '../constants'; @@ -115,12 +115,13 @@ export const createGlobalTypographyObject = (typographyKeys: Array) => { // TODO: refactor this function to not use cssObject reference export const generateStylesObjectFromTokens = ( tokens: Array, - mappedTokens: Map, tokenGroups: Array, hasParentPrefix: boolean, hasJsOutput: boolean, + sortByNumValue: boolean, ): StylesObjectType => { - const stylesObject = tokens.reduce((stylesObjectAccumulator, token) => { + const sortedTokens = sortTokens(tokens, tokenGroups, hasParentPrefix, sortByNumValue); + const stylesObject = sortedTokens.reduce((stylesObjectAccumulator, token) => { const currentObject = createStylesObjectStructureFromTokenNameParts( token, tokenGroups, diff --git a/exporters/tokens/src/helpers/tokenHelper.ts b/exporters/tokens/src/helpers/tokenHelper.ts index 555a4ff7b0..f3035ff824 100644 --- a/exporters/tokens/src/helpers/tokenHelper.ts +++ b/exporters/tokens/src/helpers/tokenHelper.ts @@ -45,7 +45,6 @@ export const sortTokens = ( tokens: Token[], tokenGroups: Array, hasParentPrefix: boolean, - group: string, sortByNumValue: boolean, ) => { const sortedTokens = tokens.sort((a, b) => {