@hubspot/cms-dev-server 0.18.27 → 0.18.29
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-BnyRQ2fe.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 +191 -79
- package/dist/index.js +101 -34
- package/dist/run.js +209 -142
- package/package.json +3 -3
- package/types/api/designmanager.d.ts +1 -0
- package/types/api/project.d.ts +5 -0
- package/types/lib/getDevServerUIData.d.ts +11 -0
- package/dist/app/assets/index-D-Xvc93s.js +0 -154
- package/dist/app/assets/index-vAx-PiEw.css +0 -1
|
@@ -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-BnyRQ2fe.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>
|
|
@@ -1571,6 +1571,29 @@ function unstable_usePodcastShows(resolvableIds) {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
return [];
|
|
1573
1573
|
}
|
|
1574
|
+
function unstable_usePodcastEpisodes(resolvableIds) {
|
|
1575
|
+
var _a;
|
|
1576
|
+
const renderContext = useRenderContext();
|
|
1577
|
+
const uniqueId = `${resolvableIds.type}:${resolvableIds.value}`;
|
|
1578
|
+
if (!((_a = renderContext.resolvedDataDependencies) == null ? void 0 : _a.podcastEpisodes)) {
|
|
1579
|
+
return [];
|
|
1580
|
+
}
|
|
1581
|
+
const podcastEpisodeDependencies = renderContext.resolvedDataDependencies.podcastEpisodes;
|
|
1582
|
+
const podcastDependency = podcastEpisodeDependencies.dependencies[uniqueId];
|
|
1583
|
+
if (!podcastDependency)
|
|
1584
|
+
return null;
|
|
1585
|
+
if (podcastDependency.status === "success") {
|
|
1586
|
+
const episodes = podcastDependency.ids.map(
|
|
1587
|
+
(episodeId) => podcastEpisodeDependencies.data[episodeId]
|
|
1588
|
+
);
|
|
1589
|
+
return episodes;
|
|
1590
|
+
}
|
|
1591
|
+
if (podcastDependency.status === "error") {
|
|
1592
|
+
logWarn(podcastDependency.error);
|
|
1593
|
+
return [];
|
|
1594
|
+
}
|
|
1595
|
+
return [];
|
|
1596
|
+
}
|
|
1574
1597
|
function id(value) {
|
|
1575
1598
|
return { type: "id", value };
|
|
1576
1599
|
}
|
|
@@ -2293,6 +2316,7 @@ const cmsComponents = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
2293
2316
|
setSecrets,
|
|
2294
2317
|
setSecretsFromEnv,
|
|
2295
2318
|
sortIslandRootsByPriority,
|
|
2319
|
+
unstable_usePodcastEpisodes,
|
|
2296
2320
|
unstable_usePodcastShows,
|
|
2297
2321
|
unstable_useVideos,
|
|
2298
2322
|
useAfterIslandHydration,
|
|
@@ -2385,6 +2409,9 @@ async function renderOnServer(elements, renderContext = bootStrapRenderContext()
|
|
|
2385
2409
|
function cn(...inputs) {
|
|
2386
2410
|
return twMerge(clsx(inputs));
|
|
2387
2411
|
}
|
|
2412
|
+
function getHSBaseUrl(authedEnv) {
|
|
2413
|
+
return `https://app.hubspot${authedEnv === "qa" ? "qa" : ""}.com`;
|
|
2414
|
+
}
|
|
2388
2415
|
const TooltipProvider = TooltipPrimitive.Provider;
|
|
2389
2416
|
const Tooltip = TooltipPrimitive.Root;
|
|
2390
2417
|
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -2406,7 +2433,7 @@ const buttonVariants = cva(
|
|
|
2406
2433
|
{
|
|
2407
2434
|
variants: {
|
|
2408
2435
|
variant: {
|
|
2409
|
-
default: "bg-primary text-primary-foreground hover:bg-primary
|
|
2436
|
+
default: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-pressed disabled:bg-primary-disabled",
|
|
2410
2437
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
2411
2438
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
2412
2439
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -2440,10 +2467,10 @@ const Button = React.forwardRef(
|
|
|
2440
2467
|
}
|
|
2441
2468
|
);
|
|
2442
2469
|
Button.displayName = "Button";
|
|
2443
|
-
const IconButton = ({ text, url, Icon: Icon2 }) => /* @__PURE__ */
|
|
2470
|
+
const IconButton = ({ text, url, Icon: Icon2, className }) => /* @__PURE__ */ jsx(Button, { variant: "ghost", className, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
2444
2471
|
Icon2 && /* @__PURE__ */ jsx(Icon2, { className: "w-6 h-6 mr-2 text-black" }),
|
|
2445
2472
|
url ? /* @__PURE__ */ jsx("a", { href: url, target: "_blank", children: text }) : /* @__PURE__ */ jsx("div", { children: text })
|
|
2446
|
-
] });
|
|
2473
|
+
] }) });
|
|
2447
2474
|
const copyToClipboard = (value) => {
|
|
2448
2475
|
navigator.clipboard.writeText(value);
|
|
2449
2476
|
};
|
|
@@ -2488,7 +2515,7 @@ const WhiteBox = ({ count, label, subText, onClick }) => /* @__PURE__ */ jsxs(
|
|
|
2488
2515
|
"div",
|
|
2489
2516
|
{
|
|
2490
2517
|
onClick,
|
|
2491
|
-
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",
|
|
2518
|
+
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",
|
|
2492
2519
|
children: [
|
|
2493
2520
|
/* @__PURE__ */ jsx("div", { className: "text-2xl font-light", children: count }),
|
|
2494
2521
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase leading-4", children: label }),
|
|
@@ -2496,7 +2523,7 @@ const WhiteBox = ({ count, label, subText, onClick }) => /* @__PURE__ */ jsxs(
|
|
|
2496
2523
|
]
|
|
2497
2524
|
}
|
|
2498
2525
|
);
|
|
2499
|
-
const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("div", { className: "flex justify-start gap-
|
|
2526
|
+
const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row md:flex-row justify-start gap-4 w-full", children: [
|
|
2500
2527
|
/* @__PURE__ */ jsx(
|
|
2501
2528
|
WhiteBox,
|
|
2502
2529
|
{
|
|
@@ -2522,49 +2549,60 @@ const WhiteBoxList = ({ modulesData, partialsData }) => /* @__PURE__ */ jsxs("di
|
|
|
2522
2549
|
}
|
|
2523
2550
|
)
|
|
2524
2551
|
] });
|
|
2525
|
-
const CLICommands = (
|
|
2552
|
+
const CLICommands = ({
|
|
2553
|
+
cliCommands = []
|
|
2554
|
+
}) => /* @__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: [
|
|
2526
2555
|
/* @__PURE__ */ jsx("div", { className: "text-white text-xl font-medium leading-7", children: "Copy CLI Commands" }),
|
|
2527
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
2528
|
-
{
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2556
|
+
/* @__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: [
|
|
2557
|
+
/* @__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 }) }) }),
|
|
2558
|
+
/* @__PURE__ */ jsxs(
|
|
2559
|
+
TooltipContent,
|
|
2560
|
+
{
|
|
2561
|
+
side: "bottom",
|
|
2562
|
+
className: "bg-white font-medium p-4",
|
|
2563
|
+
children: [
|
|
2564
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2565
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-base leading-none", children: "Copy Command" }),
|
|
2566
|
+
/* @__PURE__ */ jsxs("div", { className: "font-light text-sm leading-5 mt-2 mb-4", children: [
|
|
2567
|
+
/* @__PURE__ */ jsx("strong", { className: "font-bold", children: runCommand }),
|
|
2568
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2569
|
+
description
|
|
2570
|
+
] })
|
|
2571
|
+
] }),
|
|
2572
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs(
|
|
2573
|
+
Button,
|
|
2574
|
+
{
|
|
2575
|
+
size: "sm",
|
|
2576
|
+
variant: "default",
|
|
2577
|
+
onClick: () => navigator.clipboard.writeText(runCommand),
|
|
2578
|
+
children: [
|
|
2579
|
+
/* @__PURE__ */ jsx(ClipboardCopy, {}),
|
|
2580
|
+
" Copy"
|
|
2581
|
+
]
|
|
2582
|
+
}
|
|
2583
|
+
) })
|
|
2584
|
+
]
|
|
2585
|
+
}
|
|
2586
|
+
)
|
|
2587
|
+
] }, scriptName)) })
|
|
2554
2588
|
] }) });
|
|
2555
2589
|
const Hero = ({
|
|
2556
2590
|
projectName,
|
|
2557
2591
|
authedPortalId,
|
|
2558
2592
|
modulesData,
|
|
2559
2593
|
partialsData,
|
|
2560
|
-
hubLModules
|
|
2594
|
+
hubLModules,
|
|
2595
|
+
cliCommands,
|
|
2596
|
+
projectData,
|
|
2597
|
+
authedEnv
|
|
2561
2598
|
}) => {
|
|
2562
2599
|
const isAuthed = !!authedPortalId;
|
|
2563
2600
|
const authTooltipText = isAuthed ? "You are connected to your HubSpot account" : `You are not connected to your HubSpot Account. Use the "hs init" command to connect to view content in the dev server.`;
|
|
2564
2601
|
const combinedModules = [...modulesData, ...hubLModules];
|
|
2565
2602
|
const handleOpenInApp = () => {
|
|
2566
2603
|
try {
|
|
2567
|
-
const
|
|
2604
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
2605
|
+
const projectUrl = `${baseUrl}/developer-projects/${authedPortalId}/project/${projectName}`;
|
|
2568
2606
|
window.open(projectUrl, "_blank");
|
|
2569
2607
|
} catch (error) {
|
|
2570
2608
|
console.error("Failed to open project in app:", error);
|
|
@@ -2572,7 +2610,7 @@ const Hero = ({
|
|
|
2572
2610
|
};
|
|
2573
2611
|
return /* @__PURE__ */ jsxs("div", { className: "w-full h-full bg-gray-200 rounded-3xl px-10 py-8", children: [
|
|
2574
2612
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
2575
|
-
/* @__PURE__ */ jsxs("div", { className: "text-gray-900 text-2xl font-semibold flex items-center gap-2", children: [
|
|
2613
|
+
/* @__PURE__ */ jsxs("div", { className: "text-gray-900 text-2xl font-semibold flex items-center gap-2 leading-6", children: [
|
|
2576
2614
|
"CMS Developer Server",
|
|
2577
2615
|
isAuthed ? /* @__PURE__ */ jsx(
|
|
2578
2616
|
IconTooltip,
|
|
@@ -2598,7 +2636,8 @@ const Hero = ({
|
|
|
2598
2636
|
{
|
|
2599
2637
|
text: "Slack Community",
|
|
2600
2638
|
Icon: ExternalLink,
|
|
2601
|
-
url: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack"
|
|
2639
|
+
url: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack",
|
|
2640
|
+
className: "hidden lg:block"
|
|
2602
2641
|
}
|
|
2603
2642
|
),
|
|
2604
2643
|
/* @__PURE__ */ jsx(
|
|
@@ -2606,7 +2645,8 @@ const Hero = ({
|
|
|
2606
2645
|
{
|
|
2607
2646
|
text: "Getting started docs",
|
|
2608
2647
|
Icon: ExternalLink,
|
|
2609
|
-
url: "https://developers.hubspot.com/docs/cms/cms-react-quickstart?hs_preview=XztBJnma-168859451746"
|
|
2648
|
+
url: "https://developers.hubspot.com/docs/cms/cms-react-quickstart?hs_preview=XztBJnma-168859451746",
|
|
2649
|
+
className: "hidden lg:block"
|
|
2610
2650
|
}
|
|
2611
2651
|
),
|
|
2612
2652
|
authedPortalId && /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 100, children: [
|
|
@@ -2614,8 +2654,9 @@ const Hero = ({
|
|
|
2614
2654
|
Button,
|
|
2615
2655
|
{
|
|
2616
2656
|
size: "sm",
|
|
2617
|
-
|
|
2657
|
+
variant: "default",
|
|
2618
2658
|
onClick: handleOpenInApp,
|
|
2659
|
+
disabled: !projectData,
|
|
2619
2660
|
children: [
|
|
2620
2661
|
/* @__PURE__ */ jsx(ExternalLink, {}),
|
|
2621
2662
|
" Open in App"
|
|
@@ -2645,15 +2686,15 @@ const Hero = ({
|
|
|
2645
2686
|
/* @__PURE__ */ jsx("span", { className: "mr-2", children: authedPortalId }),
|
|
2646
2687
|
/* @__PURE__ */ jsx(IconTooltip, { Icon: Copy, canCopy: true, tooltipText: authedPortalId })
|
|
2647
2688
|
] }) }),
|
|
2648
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-full mt-10", children: [
|
|
2649
|
-
/* @__PURE__ */ jsx("div", { className: "flex-none", children: /* @__PURE__ */ jsx(
|
|
2689
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col md:flex-row w-full mt-10 gap-14", children: [
|
|
2690
|
+
/* @__PURE__ */ jsx("div", { className: "md:flex-none", children: /* @__PURE__ */ jsx(
|
|
2650
2691
|
WhiteBoxList,
|
|
2651
2692
|
{
|
|
2652
2693
|
modulesData: combinedModules,
|
|
2653
2694
|
partialsData
|
|
2654
2695
|
}
|
|
2655
2696
|
) }),
|
|
2656
|
-
/* @__PURE__ */ jsx("div", { className: "flex-grow
|
|
2697
|
+
/* @__PURE__ */ jsx("div", { className: "flex-grow", children: /* @__PURE__ */ jsx(CLICommands, { cliCommands }) })
|
|
2657
2698
|
] })
|
|
2658
2699
|
] });
|
|
2659
2700
|
};
|
|
@@ -2896,9 +2937,15 @@ function useModulePages(previewPath, authedPortalId) {
|
|
|
2896
2937
|
}, [previewPath]);
|
|
2897
2938
|
return state;
|
|
2898
2939
|
}
|
|
2940
|
+
const getPageEditorUrl = (portalId, pageId, authedEnv) => {
|
|
2941
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
2942
|
+
return `${baseUrl}/pages/${portalId}/editor/${pageId}/content`;
|
|
2943
|
+
};
|
|
2899
2944
|
const ComponentDependencyTable = ({
|
|
2900
2945
|
pages,
|
|
2901
|
-
componentType
|
|
2946
|
+
componentType,
|
|
2947
|
+
authedPortalId,
|
|
2948
|
+
authedEnv
|
|
2902
2949
|
}) => {
|
|
2903
2950
|
if (pages.length === 0) {
|
|
2904
2951
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -2920,7 +2967,18 @@ const ComponentDependencyTable = ({
|
|
|
2920
2967
|
/* @__PURE__ */ jsx(TableHead, { className: "border", children: "Page Type" })
|
|
2921
2968
|
] }) }),
|
|
2922
2969
|
/* @__PURE__ */ jsx(TableBody, { className: "overflow-y-auto", children: pages.map((page, index) => /* @__PURE__ */ jsxs(TableRow, { className: "odd:bg-white even:bg-gray-50", children: [
|
|
2923
|
-
/* @__PURE__ */ jsx(TableCell, { className: "border", children:
|
|
2970
|
+
/* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsxs(
|
|
2971
|
+
"a",
|
|
2972
|
+
{
|
|
2973
|
+
href: getPageEditorUrl(authedPortalId, page.id, authedEnv),
|
|
2974
|
+
target: "_blank",
|
|
2975
|
+
className: "underline flex items-center gap-1",
|
|
2976
|
+
children: [
|
|
2977
|
+
page.label,
|
|
2978
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "w-4 h-4" })
|
|
2979
|
+
]
|
|
2980
|
+
}
|
|
2981
|
+
) }),
|
|
2924
2982
|
/* @__PURE__ */ jsx(TableCell, { className: "border", children: formatSubType(page.subType) })
|
|
2925
2983
|
] }, index)) })
|
|
2926
2984
|
]
|
|
@@ -2931,21 +2989,23 @@ const ComponentDependencySection = ({
|
|
|
2931
2989
|
componentType,
|
|
2932
2990
|
authedPortalId,
|
|
2933
2991
|
projectName,
|
|
2992
|
+
projectData,
|
|
2934
2993
|
webRootProjectComponentFolder,
|
|
2935
2994
|
isOpen,
|
|
2936
|
-
moduleData
|
|
2995
|
+
moduleData,
|
|
2996
|
+
authedEnv
|
|
2937
2997
|
}) => {
|
|
2938
2998
|
const previewPath = moduleData.type === ModuleType.REACT ? `@projects/${projectName}/${webRootProjectComponentFolder}/components/modules/${moduleData.nameWithExtension}` : moduleData.subPath;
|
|
2939
2999
|
const { moduleDependencies, isLoading, error } = useModulePages(
|
|
2940
|
-
isOpen ? previewPath : null,
|
|
3000
|
+
projectData && isOpen ? previewPath : null,
|
|
2941
3001
|
authedPortalId
|
|
2942
3002
|
);
|
|
2943
3003
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
2944
3004
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-3 gap-8", children: [
|
|
2945
3005
|
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-semibold leading-9 decoration-skip-ink", children: "Dependencies" }),
|
|
2946
|
-
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}` })
|
|
3006
|
+
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}` })
|
|
2947
3007
|
] }),
|
|
2948
|
-
isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
3008
|
+
!projectData ? /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500 italic", children: "Please use hs upload command to see module dependencies" }) : isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2949
3009
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] w-full" }),
|
|
2950
3010
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-[20px] w-full" })
|
|
2951
3011
|
] }) : error ? /* @__PURE__ */ jsxs("div", { className: "text-red-500", children: [
|
|
@@ -2955,7 +3015,9 @@ const ComponentDependencySection = ({
|
|
|
2955
3015
|
ComponentDependencyTable,
|
|
2956
3016
|
{
|
|
2957
3017
|
pages: moduleDependencies || [],
|
|
2958
|
-
componentType
|
|
3018
|
+
componentType,
|
|
3019
|
+
authedPortalId,
|
|
3020
|
+
authedEnv
|
|
2959
3021
|
}
|
|
2960
3022
|
)
|
|
2961
3023
|
] });
|
|
@@ -2990,7 +3052,7 @@ const FieldsContainer = ({
|
|
|
2990
3052
|
),
|
|
2991
3053
|
/* @__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 }) })
|
|
2992
3054
|
] }),
|
|
2993
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleOpenFile, children: "View
|
|
3055
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleOpenFile, children: "View Code" }) })
|
|
2994
3056
|
] }) : /* @__PURE__ */ jsx("p", { children: "No fields found" })
|
|
2995
3057
|
] });
|
|
2996
3058
|
};
|
|
@@ -3001,6 +3063,8 @@ const ComponentDetailSheet = ({
|
|
|
3001
3063
|
authedPortalId,
|
|
3002
3064
|
projectName,
|
|
3003
3065
|
webRootProjectComponentFolder,
|
|
3066
|
+
projectData,
|
|
3067
|
+
authedEnv,
|
|
3004
3068
|
children
|
|
3005
3069
|
}) => {
|
|
3006
3070
|
var _a;
|
|
@@ -3033,9 +3097,11 @@ const ComponentDetailSheet = ({
|
|
|
3033
3097
|
componentType,
|
|
3034
3098
|
authedPortalId,
|
|
3035
3099
|
projectName,
|
|
3100
|
+
projectData,
|
|
3036
3101
|
webRootProjectComponentFolder,
|
|
3037
3102
|
isOpen,
|
|
3038
|
-
moduleData
|
|
3103
|
+
moduleData,
|
|
3104
|
+
authedEnv
|
|
3039
3105
|
}
|
|
3040
3106
|
) }),
|
|
3041
3107
|
/* @__PURE__ */ jsx("div", { className: "grid gap-6 my-6", children: /* @__PURE__ */ jsx(
|
|
@@ -3056,16 +3122,29 @@ const getModuleEditorPreviewUrl = (projectName, webRootProjectComponentFolder, c
|
|
|
3056
3122
|
throw new Error(`Could not find component: ${component.name}`);
|
|
3057
3123
|
}
|
|
3058
3124
|
const previewPath = component.type === ModuleType.REACT ? `@projects/${projectName}/${webRootProjectComponentFolder}/components/modules/${component.nameWithExtension}` : component.subPath;
|
|
3059
|
-
|
|
3125
|
+
const baseUrl = getHSBaseUrl(authedEnv);
|
|
3126
|
+
return `${baseUrl}/design-previewer/${portalId}/local-module-preview/${previewPath}`;
|
|
3060
3127
|
};
|
|
3061
3128
|
const ActionButtons = ({
|
|
3062
3129
|
component,
|
|
3063
3130
|
componentType,
|
|
3064
3131
|
onPreviewClick,
|
|
3065
|
-
onViewLocalClick
|
|
3132
|
+
onViewLocalClick,
|
|
3133
|
+
sslEnabled
|
|
3066
3134
|
}) => {
|
|
3067
3135
|
return /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
3068
|
-
componentType === "module" && /* @__PURE__ */
|
|
3136
|
+
componentType === "module" && /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 100, children: [
|
|
3137
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
3138
|
+
Button,
|
|
3139
|
+
{
|
|
3140
|
+
variant: "outline",
|
|
3141
|
+
onClick: () => onPreviewClick(component),
|
|
3142
|
+
disabled: !sslEnabled,
|
|
3143
|
+
children: "View in app"
|
|
3144
|
+
}
|
|
3145
|
+
) }) }),
|
|
3146
|
+
!sslEnabled && /* @__PURE__ */ jsx(TooltipContent, { children: "Run the dev server with the --ssl flag to view in app" })
|
|
3147
|
+
] }),
|
|
3069
3148
|
/* @__PURE__ */ jsx(Button, { variant: "outline", onClick: () => onViewLocalClick(component), children: "View local version" })
|
|
3070
3149
|
] });
|
|
3071
3150
|
};
|
|
@@ -3077,7 +3156,9 @@ function ComponentTable({
|
|
|
3077
3156
|
projectName,
|
|
3078
3157
|
authedPortalId,
|
|
3079
3158
|
componentType,
|
|
3080
|
-
authedEnv
|
|
3159
|
+
authedEnv,
|
|
3160
|
+
sslEnabled,
|
|
3161
|
+
projectData
|
|
3081
3162
|
}) {
|
|
3082
3163
|
const handlePreviewClick = (component) => {
|
|
3083
3164
|
try {
|
|
@@ -3121,32 +3202,39 @@ function ComponentTable({
|
|
|
3121
3202
|
containerClassName: "h-fit max-h-[770px] overflow-y-auto relative",
|
|
3122
3203
|
children: [
|
|
3123
3204
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { className: "", children: headers.map((header, index) => /* @__PURE__ */ jsx(TableHead, { className: "border", children: header }, index)) }) }),
|
|
3124
|
-
/* @__PURE__ */ jsx(TableBody, { className: "overflow-y-auto", children: componentList.map((component, index) => /* @__PURE__ */ jsxs(TableRow, { className: "
|
|
3125
|
-
component.name && /* @__PURE__ */ jsx(TableCell, { className: "border", children: componentType === "module" ? /* @__PURE__ */
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3205
|
+
/* @__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: [
|
|
3206
|
+
component.name && /* @__PURE__ */ jsx(TableCell, { className: "border", children: componentType === "module" ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
3207
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
3208
|
+
ComponentDetailSheet,
|
|
3209
|
+
{
|
|
3210
|
+
moduleData: component,
|
|
3211
|
+
componentType,
|
|
3212
|
+
themeWebRoot,
|
|
3213
|
+
authedPortalId,
|
|
3214
|
+
projectName,
|
|
3215
|
+
webRootProjectComponentFolder,
|
|
3216
|
+
projectData,
|
|
3217
|
+
authedEnv,
|
|
3218
|
+
children: /* @__PURE__ */ jsx("span", { className: "underline cursor-pointer", children: component.name })
|
|
3219
|
+
}
|
|
3220
|
+
) }) }),
|
|
3221
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: "View details, dependencies, and more" })
|
|
3222
|
+
] }) : /* @__PURE__ */ jsx("span", { children: component.name }) }),
|
|
3137
3223
|
component.type && /* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3138
3224
|
component.type === "react" ? /* @__PURE__ */ jsx(ReactIcon, {}) : /* @__PURE__ */ jsx(Braces, {}),
|
|
3139
3225
|
/* @__PURE__ */ jsx("span", { children: component.type === "react" ? "React" : "HubL" })
|
|
3140
3226
|
] }) }),
|
|
3141
3227
|
component.dateCreated && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.dateCreated }),
|
|
3142
3228
|
component.status && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.status }),
|
|
3229
|
+
component.templateTypeLabel && /* @__PURE__ */ jsx(TableCell, { className: "border", children: component.templateTypeLabel }),
|
|
3143
3230
|
/* @__PURE__ */ jsx(TableCell, { className: "border", children: /* @__PURE__ */ jsx(
|
|
3144
3231
|
ActionButtons,
|
|
3145
3232
|
{
|
|
3146
3233
|
component,
|
|
3147
3234
|
componentType,
|
|
3148
3235
|
onPreviewClick: handlePreviewClick,
|
|
3149
|
-
onViewLocalClick: handleViewLocalClick
|
|
3236
|
+
onViewLocalClick: handleViewLocalClick,
|
|
3237
|
+
sslEnabled
|
|
3150
3238
|
}
|
|
3151
3239
|
) })
|
|
3152
3240
|
] }, index)) })
|
|
@@ -3165,7 +3253,9 @@ const ComponentTableListItem = ({
|
|
|
3165
3253
|
themeWebRoot,
|
|
3166
3254
|
projectName,
|
|
3167
3255
|
authedPortalId,
|
|
3168
|
-
authedEnv
|
|
3256
|
+
authedEnv,
|
|
3257
|
+
sslEnabled,
|
|
3258
|
+
projectData
|
|
3169
3259
|
}) => {
|
|
3170
3260
|
return /* @__PURE__ */ jsxs("div", { id: id2, className: "mb-16", children: [
|
|
3171
3261
|
/* @__PURE__ */ jsx("h2", { className: "font-inter text-2xl font-semibold leading-9 tracking-tight text-left mb-6", children: header }),
|
|
@@ -3180,7 +3270,9 @@ const ComponentTableListItem = ({
|
|
|
3180
3270
|
themeWebRoot,
|
|
3181
3271
|
projectName,
|
|
3182
3272
|
authedPortalId,
|
|
3183
|
-
componentType
|
|
3273
|
+
componentType,
|
|
3274
|
+
sslEnabled,
|
|
3275
|
+
projectData
|
|
3184
3276
|
}
|
|
3185
3277
|
)
|
|
3186
3278
|
] });
|
|
@@ -3194,7 +3286,9 @@ const ComponentTableList = ({
|
|
|
3194
3286
|
themeWebRoot,
|
|
3195
3287
|
projectName,
|
|
3196
3288
|
authedPortalId,
|
|
3197
|
-
authedEnv
|
|
3289
|
+
authedEnv,
|
|
3290
|
+
sslEnabled,
|
|
3291
|
+
projectData
|
|
3198
3292
|
}) => {
|
|
3199
3293
|
const mapToTableData = (components, type) => components.map((component) => ({
|
|
3200
3294
|
...component,
|
|
@@ -3225,7 +3319,9 @@ const ComponentTableList = ({
|
|
|
3225
3319
|
themeWebRoot,
|
|
3226
3320
|
projectName,
|
|
3227
3321
|
authedPortalId,
|
|
3228
|
-
authedEnv
|
|
3322
|
+
authedEnv,
|
|
3323
|
+
sslEnabled,
|
|
3324
|
+
projectData
|
|
3229
3325
|
}
|
|
3230
3326
|
),
|
|
3231
3327
|
/* @__PURE__ */ jsx(
|
|
@@ -3235,7 +3331,9 @@ const ComponentTableList = ({
|
|
|
3235
3331
|
header: "Partials",
|
|
3236
3332
|
componentType: "partial",
|
|
3237
3333
|
headers: ["Name", "Type", "Actions"],
|
|
3238
|
-
data: partialData
|
|
3334
|
+
data: partialData,
|
|
3335
|
+
sslEnabled,
|
|
3336
|
+
projectData
|
|
3239
3337
|
}
|
|
3240
3338
|
),
|
|
3241
3339
|
/* @__PURE__ */ jsx(
|
|
@@ -3244,8 +3342,10 @@ const ComponentTableList = ({
|
|
|
3244
3342
|
id: "templates-table",
|
|
3245
3343
|
header: "Templates",
|
|
3246
3344
|
componentType: "template",
|
|
3247
|
-
headers: ["Name", "Type", "Actions"],
|
|
3248
|
-
data: templateData
|
|
3345
|
+
headers: ["Name", "Type", "Template Type", "Actions"],
|
|
3346
|
+
data: templateData,
|
|
3347
|
+
sslEnabled,
|
|
3348
|
+
projectData
|
|
3249
3349
|
}
|
|
3250
3350
|
)
|
|
3251
3351
|
] });
|
|
@@ -3284,6 +3384,10 @@ const Footer = () => {
|
|
|
3284
3384
|
{
|
|
3285
3385
|
href: "https://github.com/HubSpot/cms-react/tree/main/examples",
|
|
3286
3386
|
text: "Github Examples"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
href: "https://developers.hubspot.com/beta-docs/getting-started/slack/developer-slack",
|
|
3390
|
+
text: "Slack Community"
|
|
3287
3391
|
}
|
|
3288
3392
|
];
|
|
3289
3393
|
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: [
|
|
@@ -3396,7 +3500,10 @@ function App({
|
|
|
3396
3500
|
partialsData,
|
|
3397
3501
|
hubLTemplates,
|
|
3398
3502
|
webRootProjectComponentFolder,
|
|
3399
|
-
themeWebRoot
|
|
3503
|
+
themeWebRoot,
|
|
3504
|
+
cliCommands,
|
|
3505
|
+
sslEnabled,
|
|
3506
|
+
projectData
|
|
3400
3507
|
} = initialProps;
|
|
3401
3508
|
const [showUnauthed, setShowUnauthed] = useState(!authedPortalId);
|
|
3402
3509
|
const handleCloseUnauthed = () => {
|
|
@@ -3410,7 +3517,10 @@ function App({
|
|
|
3410
3517
|
authedPortalId,
|
|
3411
3518
|
modulesData,
|
|
3412
3519
|
partialsData,
|
|
3413
|
-
hubLModules
|
|
3520
|
+
hubLModules,
|
|
3521
|
+
cliCommands,
|
|
3522
|
+
projectData,
|
|
3523
|
+
authedEnv
|
|
3414
3524
|
}
|
|
3415
3525
|
),
|
|
3416
3526
|
/* @__PURE__ */ jsx(
|
|
@@ -3424,7 +3534,9 @@ function App({
|
|
|
3424
3534
|
themeWebRoot,
|
|
3425
3535
|
projectName,
|
|
3426
3536
|
authedPortalId,
|
|
3427
|
-
authedEnv
|
|
3537
|
+
authedEnv,
|
|
3538
|
+
sslEnabled,
|
|
3539
|
+
projectData
|
|
3428
3540
|
}
|
|
3429
3541
|
),
|
|
3430
3542
|
/* @__PURE__ */ jsx(Footer, {}),
|