@hubspot/cms-dev-server 0.18.28 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/index-BDlX5eip.js +154 -0
- package/dist/app/assets/index-C0KdU9bk.css +1 -0
- package/dist/app/index.html +2 -2
- package/dist/app/server/serverEntry.js +189 -119
- package/dist/index.js +160 -98
- package/dist/run.js +270 -212
- package/package.json +3 -3
- package/types/api/designmanager.d.ts +1 -0
- package/types/api/project.d.ts +5 -0
- package/types/constants/errors.d.ts +5 -0
- package/types/createAppViteConfig.d.ts +2 -0
- package/types/createDevServer.d.ts +1 -1
- package/types/lib/cli.d.ts +22 -0
- package/types/lib/cliUtils.d.ts +14 -0
- package/types/lib/constants.d.ts +1 -0
- package/types/lib/getDevServerUIData.d.ts +11 -0
- package/types/routes/api.d.ts +2 -0
- package/types/routes/appServerRoutes.d.ts +5 -0
- package/types/storybook-main/preview.d.ts +9 -0
- package/dist/app/assets/index-BivIDhYl.css +0 -1
- package/dist/app/assets/index-C5FZod7r.js +0 -154
- package/types/lib/renderModuleJson.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#efedeb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#cecccb}input::placeholder,textarea::placeholder{opacity:1;color:#cecccb}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 215 27% 27%;--primary-default: #7d53e9;--primary-hover: #6431da;--primary-pressed: #5113ba;--primary-disabled: #e5e1fa;--primary-subtle: #e5e1fa;--primary-foreground: #ffffff;--radius: .5rem;--accent: 240 4.8% 95.9%;--input: 240 5.9% 90%;--muted: 240 4.8% 95.9%;--popover: 0 0% 100%}body{font-family:Lexend Deca,Helvetica,Arial,sans-serif;--tw-text-opacity: 1;color:rgb(20 20 20 / var(--tw-text-opacity))}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.right-1\.5{right:.375rem}.right-4{right:1rem}.top-0{top:0}.top-1\.5{top:.375rem}.top-4{top:1rem}.z-10{z-index:10}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mb-16{margin-bottom:4rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mr-2{margin-right:.5rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-36{height:9rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[20px\]{height:20px}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\[770px\]{max-height:770px}.min-h-36{min-height:9rem}.w-10{width:2.5rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1px\]{width:1px}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-2xl{max-width:42rem}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.grid-cols-\[repeat\(auto-fit\,minmax\(100px\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-14{gap:3.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(231 229 228 / var(--tw-border-opacity))}.border-input{border-color:hsl(var(--input))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity))}.bg-\[\#0F172A\]{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/80{background-color:#000c}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(239 237 235 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:var(--primary-default)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-slate-900\/90{background-color:#0f172ae6}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.p-0{padding:0}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.text-\[\#9CDCFE\]{--tw-text-opacity: 1;color:rgb(156 220 254 / var(--tw-text-opacity))}.text-\[\#ff7a59\]{--tw-text-opacity: 1;color:rgb(255 122 89 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity: 1;color:rgb(182 177 175 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(20 20 20 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:var(--primary-default)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}@font-face{font-family:Lexend Deca;src:url(/assets/LexendDeca-Light-BtcvwT5C.woff2) format("woff2")}@font-face{font-family:Lexend Deca;src:url(/assets/LexendDeca-Medium-CxVPR2j6.woff2) format("woff2");font-weight:500}@font-face{font-family:Lexend Deca;src:url(/assets/LexendDeca-SemiBold-BhzS3XUP.woff2) format("woff2");font-weight:600}@font-face{font-family:Lexend Deca;src:url(/assets/LexendDeca-Bold-B8uERmr8.woff2) format("woff2");font-weight:700}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.even\:bg-gray-100:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(245 243 242 / var(--tw-bg-opacity))}.even\:bg-gray-50:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 243 242 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(239 237 235 / var(--tw-bg-opacity))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-gray-200:active{--tw-bg-opacity: 1;background-color:rgb(239 237 235 / var(--tw-bg-opacity))}.active\:bg-primary-pressed:active{background-color:var(--primary-pressed)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:bg-primary-disabled:disabled{background-color:var(--primary-disabled)}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}@media (min-width: 640px){.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:w-\[170px\]{width:170px}.md\:flex-none{flex:none}.md\:flex-row{flex-direction:row}}@media (min-width: 1024px){.lg\:block{display:block}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}
|
package/dist/app/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>CMS React Dev Server Home</title>
|
|
7
7
|
<!--app-head-->
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BDlX5eip.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-C0KdU9bk.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"><!--app-html--></div>
|
|
@@ -1574,7 +1574,8 @@ function unstable_usePodcastShows(resolvableIds) {
|
|
|
1574
1574
|
function unstable_usePodcastEpisodes(resolvableIds) {
|
|
1575
1575
|
var _a;
|
|
1576
1576
|
const renderContext = useRenderContext();
|
|
1577
|
-
const
|
|
1577
|
+
const normalizedType = resolvableIds.type.toUpperCase();
|
|
1578
|
+
const uniqueId = `${normalizedType}:${resolvableIds.value}`;
|
|
1578
1579
|
if (!((_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.podcastEpisodes)) {
|
|
1579
1580
|
return [];
|
|
1580
1581
|
}
|
|
@@ -2221,29 +2222,6 @@ function useAddModule(name, path, label) {
|
|
|
2221
2222
|
}
|
|
2222
2223
|
};
|
|
2223
2224
|
}
|
|
2224
|
-
function DndArea(props) {
|
|
2225
|
-
const { name } = props;
|
|
2226
|
-
useAddDndArea(name);
|
|
2227
|
-
return /* @__PURE__ */ jsx(
|
|
2228
|
-
"div",
|
|
2229
|
-
{
|
|
2230
|
-
dangerouslySetInnerHTML: {
|
|
2231
|
-
__html: `<!-- hs-dnd-area-placeholder-${name} -->`
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
);
|
|
2235
|
-
}
|
|
2236
|
-
function useAddDndArea(name) {
|
|
2237
|
-
const renderContext = useServerRenderContext();
|
|
2238
|
-
const dndAreaValue = { name };
|
|
2239
|
-
renderContext.contentDescriptors = {
|
|
2240
|
-
...renderContext.contentDescriptors,
|
|
2241
|
-
dndAreas: {
|
|
2242
|
-
...renderContext.contentDescriptors.dndAreas,
|
|
2243
|
-
[name]: dndAreaValue
|
|
2244
|
-
}
|
|
2245
|
-
};
|
|
2246
|
-
}
|
|
2247
2225
|
async function renderServerSidePropsWithAsyncLocalStoreContext$1(getServerSideProps, propsAndDeps, renderContext) {
|
|
2248
2226
|
var _a;
|
|
2249
2227
|
if (propsAndDeps.extraDeps.url && ((_a = propsAndDeps.extraDeps) == null ? void 0 : _a.url.toString()) !== renderContext.pageUrl) {
|
|
@@ -2261,7 +2239,6 @@ const cmsComponents = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
2261
2239
|
ALL_MODULE_DATA_FETCH_DEPENDENCY_TYPES,
|
|
2262
2240
|
ClientRenderContextProvider,
|
|
2263
2241
|
Cta,
|
|
2264
|
-
DndArea,
|
|
2265
2242
|
ExistingIslandContextProvider,
|
|
2266
2243
|
Form,
|
|
2267
2244
|
ISO639CodeEnum,
|
|
@@ -2409,6 +2386,9 @@ async function renderOnServer(elements, renderContext = bootStrapRenderContext()
|
|
|
2409
2386
|
function cn(...inputs) {
|
|
2410
2387
|
return twMerge(clsx(inputs));
|
|
2411
2388
|
}
|
|
2389
|
+
function getHSBaseUrl(authedEnv) {
|
|
2390
|
+
return `https://app.hubspot${authedEnv === "qa" ? "qa" : ""}.com`;
|
|
2391
|
+
}
|
|
2412
2392
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
2413
2393
|
const Tooltip = TooltipPrimitive.Root;
|
|
2414
2394
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -2464,10 +2444,10 @@ const Button = React.forwardRef(
|
|
|
2464
2444
|
}
|
|
2465
2445
|
);
|
|
2466
2446
|
Button.displayName = "Button";
|
|
2467
|
-
const IconButton = ({ text, url, Icon: Icon2 }) => /* @__PURE__ */
|
|
2447
|
+
const IconButton = ({ text, url, Icon: Icon2, className }) => /* @__PURE__ */ jsx(Button, { variant: "ghost", className, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
2468
2448
|
Icon2 && /* @__PURE__ */ jsx(Icon2, { className: "w-6 h-6 mr-2 text-black" }),
|
|
2469
2449
|
url ? /* @__PURE__ */ jsx("a", { href: url, target: "_blank", children: text }) : /* @__PURE__ */ jsx("div", { children: text })
|
|
2470
|
-
] });
|
|
2450
|
+
] }) });
|
|
2471
2451
|
const copyToClipboard = (value) => {
|
|
2472
2452
|
navigator.clipboard.writeText(value);
|
|
2473
2453
|
};
|
|
@@ -2512,7 +2492,7 @@ const WhiteBox = ({ count, label, subText, onClick }) => /* @__PURE__ */ jsxs(
|
|
|
2512
2492
|
"div",
|
|
2513
2493
|
{
|
|
2514
2494
|
onClick,
|
|
2515
|
-
className: "w-[170px] h-36 px-8 py-6 bg-white rounded-lg flex flex-col justify-center items-center gap-1 text-gray-900 cursor-pointer",
|
|
2495
|
+
className: "flex-1 md:flex-none md:w-[170px] h-36 px-8 py-6 bg-white rounded-lg flex flex-col justify-center items-center gap-1 text-gray-900 cursor-pointer",
|
|
2516
2496
|
children: [
|
|
2517
2497
|
/* @__PURE__ */ jsx("div", { className: "text-2xl font-light", children: count }),
|
|
2518
2498
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase leading-4", children: label }),
|
|
@@ -2520,7 +2500,7 @@ const WhiteBox = ({ count, label, subText, onClick }) => /* @__PURE__ */ jsxs(
|
|
|
2520
2500
|
]
|
|
2521
2501
|
}
|
|
2522
2502
|
);
|
|
2523
|
-
const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("div", { className: "flex justify-start gap-
|
|
2503
|
+
const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row md:flex-row justify-start gap-4 w-full", children: [
|
|
2524
2504
|
/* @__PURE__ */ jsx(
|
|
2525
2505
|
WhiteBox,
|
|
2526
2506
|
{
|
|
@@ -2546,49 +2526,60 @@ const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("di
|
|
|
2546
2526
|
}
|
|
2547
2527
|
)
|
|
2548
2528
|
] });
|
|
2549
|
-
const CLICommands = (
|
|
2529
|
+
const CLICommands = ({
|
|
2530
|
+
cliCommands = []
|
|
2531
|
+
}) => /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-end items-start min-h-36 p-6 bg-slate-900 rounded-xl gap-6 overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-start items-start gap-6 w-full", children: [
|
|
2550
2532
|
/* @__PURE__ */ jsx("div", { className: "text-white text-xl font-medium leading-7", children: "Copy CLI Commands" }),
|
|
2551
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
2552
|
-
{
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2533
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(100px,1fr))] auto-cols-fr gap-2 w-full px-1 py-1 bg-white rounded-md border border-slate-300 text-black text-sm font-medium leading-tight", children: cliCommands && cliCommands.map(({ scriptName, description, runCommand }) => /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 100, children: [
|
|
2534
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "h-8 px-3 py-1.5 bg-white flex items-center justify-center relative group cursor-pointer hover:bg-gray-100 active:bg-gray-200 max-w-[200px] mx-auto w-full", children: /* @__PURE__ */ jsx("span", { children: scriptName }) }) }),
|
|
2535
|
+
/* @__PURE__ */ jsxs(
|
|
2536
|
+
TooltipContent,
|
|
2537
|
+
{
|
|
2538
|
+
side: "bottom",
|
|
2539
|
+
className: "bg-white font-medium p-4",
|
|
2540
|
+
children: [
|
|
2541
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2542
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-base leading-none", children: "Copy Command" }),
|
|
2543
|
+
/* @__PURE__ */ jsxs("div", { className: "font-light text-sm leading-5 mt-2 mb-4", children: [
|
|
2544
|
+
/* @__PURE__ */ jsx("strong", { className: "font-bold", children: runCommand }),
|
|
2545
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2546
|
+
description
|
|
2547
|
+
] })
|
|
2548
|
+
] }),
|
|
2549
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
|
|
2550
|
+
Button,
|
|
2551
|
+
{
|
|
2552
|
+
size: "sm",
|
|
2553
|
+
variant: "default",
|
|
2554
|
+
onClick: () => navigator.clipboard.writeText(runCommand),
|
|
2555
|
+
children: [
|
|
2556
|
+
/* @__PURE__ */ jsx(ClipboardCopy, {}),
|
|
2557
|
+
" Copy"
|
|
2558
|
+
]
|
|
2559
|
+
}
|
|
2560
|
+
) })
|
|
2561
|
+
]
|
|
2562
|
+
}
|
|
2563
|
+
)
|
|
2564
|
+
] }, scriptName)) })
|
|
2578
2565
|
] }) });
|
|
2579
2566
|
const Hero = ({
|
|
2580
2567
|
projectName,
|
|
2581
2568
|
authedPortalId,
|
|
2582
2569
|
modulesData,
|
|
2583
2570
|
partialsData,
|
|
2584
|
-
hubLModules
|
|
2571
|
+
hubLModules,
|
|
2572
|
+
cliCommands,
|
|
2573
|
+
projectData,
|
|
2574
|
+
authedEnv
|
|
2585
2575
|
}) => {
|
|
2586
2576
|
const isAuthed = !!authedPortalId;
|
|
2587
|
-
const authTooltipText = isAuthed ? "You are connected to your HubSpot account" : `You are not connected to your HubSpot Account.
|
|
2577
|
+
const authTooltipText = isAuthed ? "You are connected to your HubSpot account" : `You are not connected to your HubSpot Account. Please run "hs init" to connect and view content in the dev server.`;
|
|
2588
2578
|
const combinedModules = [...modulesData, ...hubLModules];
|
|
2589
2579
|
const handleOpenInApp = () => {
|
|
2590
2580
|
try {
|
|
2591
|
-
const
|
|
2581
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
2582
|
+
const projectUrl = `${baseUrl}/developer-projects/${authedPortalId}/project/${projectName}`;
|
|
2592
2583
|
window.open(projectUrl, "_blank");
|
|
2593
2584
|
} catch (error) {
|
|
2594
2585
|
console.error("Failed to open project in app:", error);
|
|
@@ -2596,7 +2587,7 @@ const Hero = ({
|
|
|
2596
2587
|
};
|
|
2597
2588
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full bg-gray-200 rounded-3xl px-10 py-8", children: [
|
|
2598
2589
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
2599
|
-
/* @__PURE__ */ jsxs("div", { className: "text-gray-900 text-2xl font-semibold flex items-center gap-2", children: [
|
|
2590
|
+
/* @__PURE__ */ jsxs("div", { className: "text-gray-900 text-2xl font-semibold flex items-center gap-2 leading-6", children: [
|
|
2600
2591
|
"CMS Developer Server",
|
|
2601
2592
|
isAuthed ? /* @__PURE__ */ jsx(
|
|
2602
2593
|
IconTooltip,
|
|
@@ -2622,7 +2613,8 @@ const Hero = ({
|
|
|
2622
2613
|
{
|
|
2623
2614
|
text: "Slack Community",
|
|
2624
2615
|
Icon: ExternalLink,
|
|
2625
|
-
url: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack"
|
|
2616
|
+
url: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack",
|
|
2617
|
+
className: "hidden lg:block"
|
|
2626
2618
|
}
|
|
2627
2619
|
),
|
|
2628
2620
|
/* @__PURE__ */ jsx(
|
|
@@ -2630,28 +2622,33 @@ const Hero = ({
|
|
|
2630
2622
|
{
|
|
2631
2623
|
text: "Getting started docs",
|
|
2632
2624
|
Icon: ExternalLink,
|
|
2633
|
-
url: "https://developers.hubspot.com/docs/cms/cms-react-quickstart?hs_preview=XztBJnma-168859451746"
|
|
2625
|
+
url: "https://developers.hubspot.com/docs/cms/cms-react-quickstart?hs_preview=XztBJnma-168859451746",
|
|
2626
|
+
className: "hidden lg:block"
|
|
2634
2627
|
}
|
|
2635
2628
|
),
|
|
2636
2629
|
authedPortalId && /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 100, children: [
|
|
2637
|
-
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */
|
|
2638
|
-
|
|
2639
|
-
" Open in App"
|
|
2640
|
-
] }) }),
|
|
2641
|
-
/* @__PURE__ */ jsx(
|
|
2642
|
-
TooltipContent,
|
|
2630
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
2631
|
+
Button,
|
|
2643
2632
|
{
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
] })
|
|
2633
|
+
size: "sm",
|
|
2634
|
+
variant: "default",
|
|
2635
|
+
onClick: handleOpenInApp,
|
|
2636
|
+
disabled: !projectData,
|
|
2637
|
+
children: [
|
|
2638
|
+
/* @__PURE__ */ jsx(ExternalLink, {}),
|
|
2639
|
+
" View in HubSpot"
|
|
2640
|
+
]
|
|
2653
2641
|
}
|
|
2654
|
-
)
|
|
2642
|
+
) }) }),
|
|
2643
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
2644
|
+
"To view file in the HubSpot,",
|
|
2645
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2646
|
+
'run "hs project upload".',
|
|
2647
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2648
|
+
"If you encounter any issues",
|
|
2649
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2650
|
+
"with this version, you can revert it in Projects."
|
|
2651
|
+
] }) })
|
|
2655
2652
|
] })
|
|
2656
2653
|
] })
|
|
2657
2654
|
] }),
|
|
@@ -2661,15 +2658,15 @@ const Hero = ({
|
|
|
2661
2658
|
/* @__PURE__ */ jsx("span", { className: "mr-2", children: authedPortalId }),
|
|
2662
2659
|
/* @__PURE__ */ jsx(IconTooltip, { Icon: Copy, canCopy: true, tooltipText: authedPortalId })
|
|
2663
2660
|
] }) }),
|
|
2664
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-full mt-10", children: [
|
|
2665
|
-
/* @__PURE__ */ jsx("div", { className: "flex-none", children: /* @__PURE__ */ jsx(
|
|
2661
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row w-full mt-10 gap-14", children: [
|
|
2662
|
+
/* @__PURE__ */ jsx("div", { className: "md:flex-none", children: /* @__PURE__ */ jsx(
|
|
2666
2663
|
WhiteBoxList,
|
|
2667
2664
|
{
|
|
2668
2665
|
modulesData: combinedModules,
|
|
2669
2666
|
partialsData
|
|
2670
2667
|
}
|
|
2671
2668
|
) }),
|
|
2672
|
-
/* @__PURE__ */ jsx("div", { className: "flex-grow
|
|
2669
|
+
/* @__PURE__ */ jsx("div", { className: "flex-grow", children: /* @__PURE__ */ jsx(CLICommands, { cliCommands }) })
|
|
2673
2670
|
] })
|
|
2674
2671
|
] });
|
|
2675
2672
|
};
|
|
@@ -2912,9 +2909,15 @@ function useModulePages(previewPath, authedPortalId) {
|
|
|
2912
2909
|
}, [previewPath]);
|
|
2913
2910
|
return state;
|
|
2914
2911
|
}
|
|
2912
|
+
const getPageEditorUrl = (portalId, pageId, authedEnv) => {
|
|
2913
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
2914
|
+
return `${baseUrl}/pages/${portalId}/editor/${pageId}/content`;
|
|
2915
|
+
};
|
|
2915
2916
|
const ComponentDependencyTable = ({
|
|
2916
2917
|
pages,
|
|
2917
|
-
componentType
|
|
2918
|
+
componentType,
|
|
2919
|
+
authedPortalId,
|
|
2920
|
+
authedEnv
|
|
2918
2921
|
}) => {
|
|
2919
2922
|
if (pages.length === 0) {
|
|
2920
2923
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -2936,7 +2939,18 @@ const ComponentDependencyTable = ({
|
|
|
2936
2939
|
/* @__PURE__ */ jsx(TableHead, { className: "border", children: "Page Type" })
|
|
2937
2940
|
] }) }),
|
|
2938
2941
|
/* @__PURE__ */ jsx(TableBody, { className: "overflow-y-auto", children: pages.map((page, index) => /* @__PURE__ */ jsxs(TableRow, { className: "odd:bg-white even:bg-gray-50", children: [
|
|
2939
|
-
/* @__PURE__ */ jsx(TableCell, { className: "border", children:
|
|
2942
|
+
/* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsxs(
|
|
2943
|
+
"a",
|
|
2944
|
+
{
|
|
2945
|
+
href: getPageEditorUrl(authedPortalId, page.id, authedEnv),
|
|
2946
|
+
target: "_blank",
|
|
2947
|
+
className: "underline flex items-center gap-1",
|
|
2948
|
+
children: [
|
|
2949
|
+
page.label,
|
|
2950
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "w-4 h-4" })
|
|
2951
|
+
]
|
|
2952
|
+
}
|
|
2953
|
+
) }),
|
|
2940
2954
|
/* @__PURE__ */ jsx(TableCell, { className: "border", children: formatSubType(page.subType) })
|
|
2941
2955
|
] }, index)) })
|
|
2942
2956
|
]
|
|
@@ -2947,21 +2961,23 @@ const ComponentDependencySection = ({
|
|
|
2947
2961
|
componentType,
|
|
2948
2962
|
authedPortalId,
|
|
2949
2963
|
projectName,
|
|
2964
|
+
projectData,
|
|
2950
2965
|
webRootProjectComponentFolder,
|
|
2951
2966
|
isOpen,
|
|
2952
|
-
moduleData
|
|
2967
|
+
moduleData,
|
|
2968
|
+
authedEnv
|
|
2953
2969
|
}) => {
|
|
2954
2970
|
const previewPath = moduleData.type === ModuleType.REACT ? `@projects/${projectName}/${webRootProjectComponentFolder}/components/modules/${moduleData.nameWithExtension}` : moduleData.subPath;
|
|
2955
2971
|
const { moduleDependencies, isLoading, error } = useModulePages(
|
|
2956
|
-
isOpen ? previewPath : null,
|
|
2972
|
+
projectData && isOpen ? previewPath : null,
|
|
2957
2973
|
authedPortalId
|
|
2958
2974
|
);
|
|
2959
2975
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
2960
2976
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-3 gap-8", children: [
|
|
2961
2977
|
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold leading-9 decoration-skip-ink", children: "Dependencies" }),
|
|
2962
|
-
isLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] flex-1" }) : moduleDependencies && /* @__PURE__ */ jsx("span", { className: "text-lg font-bold leading-8", children: `${moduleDependencies.length} ${moduleDependencies.length === 1 ? "page uses" : "pages use"} this ${componentType}` })
|
|
2978
|
+
projectData && isLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] flex-1" }) : projectData && moduleDependencies && /* @__PURE__ */ jsx("span", { className: "text-lg font-bold leading-8", children: `${moduleDependencies.length} ${moduleDependencies.length === 1 ? "page uses" : "pages use"} this ${componentType}` })
|
|
2963
2979
|
] }),
|
|
2964
|
-
isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2980
|
+
!projectData ? /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500 italic", children: 'Please run "hs project upload" to see what pages this module is used on.' }) : isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2965
2981
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] w-full" }),
|
|
2966
2982
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] w-full" })
|
|
2967
2983
|
] }) : error ? /* @__PURE__ */ jsxs("div", { className: "text-red-500", children: [
|
|
@@ -2971,7 +2987,9 @@ const ComponentDependencySection = ({
|
|
|
2971
2987
|
ComponentDependencyTable,
|
|
2972
2988
|
{
|
|
2973
2989
|
pages: moduleDependencies || [],
|
|
2974
|
-
componentType
|
|
2990
|
+
componentType,
|
|
2991
|
+
authedPortalId,
|
|
2992
|
+
authedEnv
|
|
2975
2993
|
}
|
|
2976
2994
|
)
|
|
2977
2995
|
] });
|
|
@@ -3006,7 +3024,7 @@ const FieldsContainer = ({
|
|
|
3006
3024
|
),
|
|
3007
3025
|
/* @__PURE__ */ jsx("div", { className: "rounded-xl overflow-hidden p-4 bg-[#0F172A]", children: /* @__PURE__ */ jsx("pre", { className: "text-[14px] font-medium leading-6 text-[#9CDCFE] whitespace-pre-wrap", children: codeString }) })
|
|
3008
3026
|
] }),
|
|
3009
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleOpenFile, children: "View
|
|
3027
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleOpenFile, children: "View Code" }) })
|
|
3010
3028
|
] }) : /* @__PURE__ */ jsx("p", { children: "No fields found" })
|
|
3011
3029
|
] });
|
|
3012
3030
|
};
|
|
@@ -3017,6 +3035,8 @@ const ComponentDetailSheet = ({
|
|
|
3017
3035
|
authedPortalId,
|
|
3018
3036
|
projectName,
|
|
3019
3037
|
webRootProjectComponentFolder,
|
|
3038
|
+
projectData,
|
|
3039
|
+
authedEnv,
|
|
3020
3040
|
children
|
|
3021
3041
|
}) => {
|
|
3022
3042
|
var _a;
|
|
@@ -3049,9 +3069,11 @@ const ComponentDetailSheet = ({
|
|
|
3049
3069
|
componentType,
|
|
3050
3070
|
authedPortalId,
|
|
3051
3071
|
projectName,
|
|
3072
|
+
projectData,
|
|
3052
3073
|
webRootProjectComponentFolder,
|
|
3053
3074
|
isOpen,
|
|
3054
|
-
moduleData
|
|
3075
|
+
moduleData,
|
|
3076
|
+
authedEnv
|
|
3055
3077
|
}
|
|
3056
3078
|
) }),
|
|
3057
3079
|
/* @__PURE__ */ jsx("div", { className: "grid gap-6 my-6", children: /* @__PURE__ */ jsx(
|
|
@@ -3072,16 +3094,30 @@ const getModuleEditorPreviewUrl = (projectName, webRootProjectComponentFolder, c
|
|
|
3072
3094
|
throw new Error(`Could not find component: ${component.name}`);
|
|
3073
3095
|
}
|
|
3074
3096
|
const previewPath = component.type === ModuleType.REACT ? `@projects/${projectName}/${webRootProjectComponentFolder}/components/modules/${component.nameWithExtension}` : component.subPath;
|
|
3075
|
-
|
|
3097
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
3098
|
+
return `${baseUrl}/design-previewer/${portalId}/local-module-preview/${previewPath}`;
|
|
3076
3099
|
};
|
|
3077
3100
|
const ActionButtons = ({
|
|
3078
3101
|
component,
|
|
3079
3102
|
componentType,
|
|
3080
3103
|
onPreviewClick,
|
|
3081
|
-
onViewLocalClick
|
|
3104
|
+
onViewLocalClick,
|
|
3105
|
+
sslEnabled,
|
|
3106
|
+
projectData
|
|
3082
3107
|
}) => {
|
|
3083
3108
|
return /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
3084
|
-
componentType === "module" && /* @__PURE__ */
|
|
3109
|
+
componentType === "module" && /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 100, children: [
|
|
3110
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
3111
|
+
Button,
|
|
3112
|
+
{
|
|
3113
|
+
variant: "outline",
|
|
3114
|
+
onClick: () => onPreviewClick(component),
|
|
3115
|
+
disabled: !sslEnabled || !projectData,
|
|
3116
|
+
children: "View in app"
|
|
3117
|
+
}
|
|
3118
|
+
) }) }),
|
|
3119
|
+
!sslEnabled ? /* @__PURE__ */ jsx(TooltipContent, { children: "Please run the dev server with the --ssl flag to view in HubSpot" }) : !projectData ? /* @__PURE__ */ jsx(TooltipContent, { children: 'Please run "hs project upload" to view in HubSpot' }) : null
|
|
3120
|
+
] }),
|
|
3085
3121
|
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => onViewLocalClick(component), children: "View local version" })
|
|
3086
3122
|
] });
|
|
3087
3123
|
};
|
|
@@ -3093,7 +3129,9 @@ function ComponentTable({
|
|
|
3093
3129
|
projectName,
|
|
3094
3130
|
authedPortalId,
|
|
3095
3131
|
componentType,
|
|
3096
|
-
authedEnv
|
|
3132
|
+
authedEnv,
|
|
3133
|
+
sslEnabled,
|
|
3134
|
+
projectData
|
|
3097
3135
|
}) {
|
|
3098
3136
|
const handlePreviewClick = (component) => {
|
|
3099
3137
|
try {
|
|
@@ -3137,32 +3175,40 @@ function ComponentTable({
|
|
|
3137
3175
|
containerClassName: "h-fit max-h-[770px] overflow-y-auto relative",
|
|
3138
3176
|
children: [
|
|
3139
3177
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { className: "", children: headers.map((header, index) => /* @__PURE__ */ jsx(TableHead, { className: "border", children: header }, index)) }) }),
|
|
3140
|
-
/* @__PURE__ */ jsx(TableBody, { className: "overflow-y-auto", children: componentList.map((component, index) => /* @__PURE__ */ jsxs(TableRow, { className: "
|
|
3141
|
-
component.name && /* @__PURE__ */ jsx(TableCell, { className: "border", children: componentType === "module" ? /* @__PURE__ */
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3178
|
+
/* @__PURE__ */ jsx(TableBody, { className: "overflow-y-auto", children: componentList.map((component, index) => /* @__PURE__ */ jsxs(TableRow, { className: "even:bg-gray-100 hover:bg-gray-200", children: [
|
|
3179
|
+
component.name && /* @__PURE__ */ jsx(TableCell, { className: "border", children: componentType === "module" ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
3180
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
3181
|
+
ComponentDetailSheet,
|
|
3182
|
+
{
|
|
3183
|
+
moduleData: component,
|
|
3184
|
+
componentType,
|
|
3185
|
+
themeWebRoot,
|
|
3186
|
+
authedPortalId,
|
|
3187
|
+
projectName,
|
|
3188
|
+
webRootProjectComponentFolder,
|
|
3189
|
+
projectData,
|
|
3190
|
+
authedEnv,
|
|
3191
|
+
children: /* @__PURE__ */ jsx("span", { className: "underline cursor-pointer", children: component.name })
|
|
3192
|
+
}
|
|
3193
|
+
) }) }),
|
|
3194
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: "View details, dependencies, and more" })
|
|
3195
|
+
] }) : /* @__PURE__ */ jsx("span", { children: component.name }) }),
|
|
3153
3196
|
component.type && /* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3154
3197
|
component.type === "react" ? /* @__PURE__ */ jsx(ReactIcon, {}) : /* @__PURE__ */ jsx(Braces, {}),
|
|
3155
3198
|
/* @__PURE__ */ jsx("span", { children: component.type === "react" ? "React" : "HubL" })
|
|
3156
3199
|
] }) }),
|
|
3157
3200
|
component.dateCreated && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.dateCreated }),
|
|
3158
3201
|
component.status && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.status }),
|
|
3202
|
+
component.templateTypeLabel && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.templateTypeLabel }),
|
|
3159
3203
|
/* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsx(
|
|
3160
3204
|
ActionButtons,
|
|
3161
3205
|
{
|
|
3162
3206
|
component,
|
|
3163
3207
|
componentType,
|
|
3164
3208
|
onPreviewClick: handlePreviewClick,
|
|
3165
|
-
onViewLocalClick: handleViewLocalClick
|
|
3209
|
+
onViewLocalClick: handleViewLocalClick,
|
|
3210
|
+
sslEnabled,
|
|
3211
|
+
projectData
|
|
3166
3212
|
}
|
|
3167
3213
|
) })
|
|
3168
3214
|
] }, index)) })
|
|
@@ -3181,7 +3227,9 @@ const ComponentTableListItem = ({
|
|
|
3181
3227
|
themeWebRoot,
|
|
3182
3228
|
projectName,
|
|
3183
3229
|
authedPortalId,
|
|
3184
|
-
authedEnv
|
|
3230
|
+
authedEnv,
|
|
3231
|
+
sslEnabled,
|
|
3232
|
+
projectData
|
|
3185
3233
|
}) => {
|
|
3186
3234
|
return /* @__PURE__ */ jsxs("div", { id: id2, className: "mb-16", children: [
|
|
3187
3235
|
/* @__PURE__ */ jsx("h2", { className: "font-inter text-2xl font-semibold leading-9 tracking-tight text-left mb-6", children: header }),
|
|
@@ -3196,7 +3244,9 @@ const ComponentTableListItem = ({
|
|
|
3196
3244
|
themeWebRoot,
|
|
3197
3245
|
projectName,
|
|
3198
3246
|
authedPortalId,
|
|
3199
|
-
componentType
|
|
3247
|
+
componentType,
|
|
3248
|
+
sslEnabled,
|
|
3249
|
+
projectData
|
|
3200
3250
|
}
|
|
3201
3251
|
)
|
|
3202
3252
|
] });
|
|
@@ -3210,7 +3260,9 @@ const ComponentTableList = ({
|
|
|
3210
3260
|
themeWebRoot,
|
|
3211
3261
|
projectName,
|
|
3212
3262
|
authedPortalId,
|
|
3213
|
-
authedEnv
|
|
3263
|
+
authedEnv,
|
|
3264
|
+
sslEnabled,
|
|
3265
|
+
projectData
|
|
3214
3266
|
}) => {
|
|
3215
3267
|
const mapToTableData = (components, type) => components.map((component) => ({
|
|
3216
3268
|
...component,
|
|
@@ -3241,7 +3293,9 @@ const ComponentTableList = ({
|
|
|
3241
3293
|
themeWebRoot,
|
|
3242
3294
|
projectName,
|
|
3243
3295
|
authedPortalId,
|
|
3244
|
-
authedEnv
|
|
3296
|
+
authedEnv,
|
|
3297
|
+
sslEnabled,
|
|
3298
|
+
projectData
|
|
3245
3299
|
}
|
|
3246
3300
|
),
|
|
3247
3301
|
/* @__PURE__ */ jsx(
|
|
@@ -3251,7 +3305,9 @@ const ComponentTableList = ({
|
|
|
3251
3305
|
header: "Partials",
|
|
3252
3306
|
componentType: "partial",
|
|
3253
3307
|
headers: ["Name", "Type", "Actions"],
|
|
3254
|
-
data: partialData
|
|
3308
|
+
data: partialData,
|
|
3309
|
+
sslEnabled,
|
|
3310
|
+
projectData
|
|
3255
3311
|
}
|
|
3256
3312
|
),
|
|
3257
3313
|
/* @__PURE__ */ jsx(
|
|
@@ -3260,8 +3316,10 @@ const ComponentTableList = ({
|
|
|
3260
3316
|
id: "templates-table",
|
|
3261
3317
|
header: "Templates",
|
|
3262
3318
|
componentType: "template",
|
|
3263
|
-
headers: ["Name", "Type", "Actions"],
|
|
3264
|
-
data: templateData
|
|
3319
|
+
headers: ["Name", "Type", "Template Type", "Actions"],
|
|
3320
|
+
data: templateData,
|
|
3321
|
+
sslEnabled,
|
|
3322
|
+
projectData
|
|
3265
3323
|
}
|
|
3266
3324
|
)
|
|
3267
3325
|
] });
|
|
@@ -3300,6 +3358,10 @@ const Footer = () => {
|
|
|
3300
3358
|
{
|
|
3301
3359
|
href: "https://github.com/HubSpot/cms-react/tree/main/examples",
|
|
3302
3360
|
text: "Github Examples"
|
|
3361
|
+
},
|
|
3362
|
+
{
|
|
3363
|
+
href: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack",
|
|
3364
|
+
text: "Slack Community"
|
|
3303
3365
|
}
|
|
3304
3366
|
];
|
|
3305
3367
|
return /* @__PURE__ */ jsx("footer", { className: "w-full py-16", children: /* @__PURE__ */ jsx("nav", { className: "flex justify-center items-center gap-4 text-gray-900 text-sm font-normal", children: links.map((link, index) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
@@ -3412,7 +3474,10 @@ function App({
|
|
|
3412
3474
|
partialsData,
|
|
3413
3475
|
hubLTemplates,
|
|
3414
3476
|
webRootProjectComponentFolder,
|
|
3415
|
-
themeWebRoot
|
|
3477
|
+
themeWebRoot,
|
|
3478
|
+
cliCommands,
|
|
3479
|
+
sslEnabled,
|
|
3480
|
+
projectData
|
|
3416
3481
|
} = initialProps;
|
|
3417
3482
|
const [showUnauthed, setShowUnauthed] = useState(!authedPortalId);
|
|
3418
3483
|
const handleCloseUnauthed = () => {
|
|
@@ -3426,7 +3491,10 @@ function App({
|
|
|
3426
3491
|
authedPortalId,
|
|
3427
3492
|
modulesData,
|
|
3428
3493
|
partialsData,
|
|
3429
|
-
hubLModules
|
|
3494
|
+
hubLModules,
|
|
3495
|
+
cliCommands,
|
|
3496
|
+
projectData,
|
|
3497
|
+
authedEnv
|
|
3430
3498
|
}
|
|
3431
3499
|
),
|
|
3432
3500
|
/* @__PURE__ */ jsx(
|
|
@@ -3440,7 +3508,9 @@ function App({
|
|
|
3440
3508
|
themeWebRoot,
|
|
3441
3509
|
projectName,
|
|
3442
3510
|
authedPortalId,
|
|
3443
|
-
authedEnv
|
|
3511
|
+
authedEnv,
|
|
3512
|
+
sslEnabled,
|
|
3513
|
+
projectData
|
|
3444
3514
|
}
|
|
3445
3515
|
),
|
|
3446
3516
|
/* @__PURE__ */ jsx(Footer, {}),
|