@valaxyjs/devtools 0.18.0-beta.2 → 0.18.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.
@@ -384,8 +384,12 @@ Make elements with the HTML hidden attribute stay hidden by default.
384
384
 
385
385
  [hidden] {
386
386
  display: none;
387
- } *,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}.i-ri-book-line,[i-ri-book-line=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5M19 20v-3H6.5a1.5 1.5 0 0 0 0 3zM5 15.337A3.486 3.486 0 0 1 6.5 15H19V4H6a1 1 0 0 0-1 1z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-vscode-icons\:file-type-vscode,[i-vscode-icons\:file-type-vscode=""]{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%230065a9' d='m29.01 5.03l-5.766-2.776a1.742 1.742 0 0 0-1.989.338L2.38 19.8a1.166 1.166 0 0 0-.08 1.647c.025.027.05.053.077.077l1.541 1.4a1.165 1.165 0 0 0 1.489.066L28.142 5.75A1.158 1.158 0 0 1 30 6.672v-.067a1.748 1.748 0 0 0-.99-1.575'/%3E%3Cpath fill='%23007acc' d='m29.01 26.97l-5.766 2.777a1.745 1.745 0 0 1-1.989-.338L2.38 12.2a1.166 1.166 0 0 1-.08-1.647c.025-.027.05-.053.077-.077l1.541-1.4A1.165 1.165 0 0 1 5.41 9.01l22.732 17.24A1.158 1.158 0 0 0 30 25.328v.072a1.749 1.749 0 0 1-.99 1.57'/%3E%3Cpath fill='%231f9cf0' d='M23.244 29.747a1.745 1.745 0 0 1-1.989-.338A1.025 1.025 0 0 0 23 28.684V3.316a1.024 1.024 0 0 0-1.749-.724a1.744 1.744 0 0 1 1.989-.339l5.765 2.772A1.748 1.748 0 0 1 30 6.6v18.8a1.748 1.748 0 0 1-.991 1.576Z'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em;}.ml-2{margin-left:0.5rem;}.h-8{height:2rem;}.h-full{height:100%;}.w-8{width:2rem;}.w-full{width:100%;}.flex,[flex=""],[flex~="\~"]{display:flex;}.inline-flex{display:inline-flex;}.flex-grow{flex-grow:1;}[flex~="col"]{flex-direction:column;}.cursor-pointer{cursor:pointer;}.list-decimal{list-style-type:decimal;}.items-center{align-items:center;}.justify-end{justify-content:flex-end;}.justify-center{justify-content:center;}[overflow~="auto"]{overflow:auto;}.border-b{border-bottom-width:1px;}.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246 / var(--un-bg-opacity));}.py,[py~="\34 "]{padding-top:1rem;padding-bottom:1rem;}.pl{padding-left:1rem;}.pr,[pr~="\34 "]{padding-right:1rem;}[pl~="\31 2"]{padding-left:3rem;}.text-xs{font-size:0.75rem;line-height:1rem;}.dark [text~="dark\:gray-200"]{--un-text-opacity:1;color:rgb(229 231 235 / var(--un-text-opacity));}.text-blue-500{--un-text-opacity:1;color:rgb(59 130 246 / var(--un-text-opacity));}[text~="gray-700"]{--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity));}.hover\:text-blue-500:hover{--un-text-opacity:1;color:rgb(59 130 246 / var(--un-text-opacity));}.underline{text-decoration-line:underline;}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);} html,
387
+ } *,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}.i-ri-book-line,[i-ri-book-line=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 18.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5A3.5 3.5 0 0 1 3 18.5M19 20v-3H6.5a1.5 1.5 0 0 0 0 3zM5 15.337A3.486 3.486 0 0 1 6.5 15H19V4H6a1 1 0 0 0-1 1z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-ri-folder-2-line,[i-ri-folder-2-line=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414zM20 11H4v8h16zm0-2V7h-8.414l-2-2H4v4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1.2em;height:1.2em;}.i-vscode-icons\:file-type-vscode,[i-vscode-icons\:file-type-vscode=""]{background:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='%230065a9' d='m29.01 5.03l-5.766-2.776a1.742 1.742 0 0 0-1.989.338L2.38 19.8a1.166 1.166 0 0 0-.08 1.647c.025.027.05.053.077.077l1.541 1.4a1.165 1.165 0 0 0 1.489.066L28.142 5.75A1.158 1.158 0 0 1 30 6.672v-.067a1.748 1.748 0 0 0-.99-1.575'/%3E%3Cpath fill='%23007acc' d='m29.01 26.97l-5.766 2.777a1.745 1.745 0 0 1-1.989-.338L2.38 12.2a1.166 1.166 0 0 1-.08-1.647c.025-.027.05-.053.077-.077l1.541-1.4A1.165 1.165 0 0 1 5.41 9.01l22.732 17.24A1.158 1.158 0 0 0 30 25.328v.072a1.749 1.749 0 0 1-.99 1.57'/%3E%3Cpath fill='%231f9cf0' d='M23.244 29.747a1.745 1.745 0 0 1-1.989-.338A1.025 1.025 0 0 0 23 28.684V3.316a1.024 1.024 0 0 0-1.749-.724a1.744 1.744 0 0 1 1.989-.339l5.765 2.772A1.748 1.748 0 0 1 30 6.6v18.8a1.748 1.748 0 0 1-.991 1.576Z'/%3E%3C/svg%3E") no-repeat;background-size:100% 100%;background-color:transparent;width:1.2em;height:1.2em;}.absolute{position:absolute;}.relative{position:relative;}.left-1{left:0.25rem;}[m~="x-1"]{margin-left:0.25rem;margin-right:0.25rem;}.mr-1,[mr-1=""]{margin-right:0.25rem;}.h-8{height:2rem;}.h-full{height:100%;}.w-8{width:2rem;}.w-full{width:100%;}.flex,[flex=""],[flex~="\~"]{display:flex;}.inline-flex,[inline-flex=""]{display:inline-flex;}.flex-grow{flex-grow:1;}[flex~="col"]{flex-direction:column;}.cursor-pointer{cursor:pointer;}.list-decimal{list-style-type:decimal;}.items-center,[items-center=""]{align-items:center;}.justify-end{justify-content:flex-end;}.justify-center,[justify-center=""]{justify-content:center;}[gap~="\32 "]{gap:0.5rem;}[overflow~="auto"]{overflow:auto;}.border,[border=""]{border-width:1px;}.border-b{border-bottom-width:1px;}.border-b-black,.dark [dark~="border-b-black"]{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(0 0 0 / var(--un-border-bottom-opacity));}.rounded{border-radius:0.25rem;}.rounded-full,[rounded-full=""]{border-radius:9999px;}.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246 / var(--un-bg-opacity));}.dark .dark\:bg-gray-900{--un-bg-opacity:1;background-color:rgb(17 24 39 / var(--un-bg-opacity));}.p-2,[p~="\32 "]{padding:0.5rem;}.px-1{padding-left:0.25rem;padding-right:0.25rem;}.px-2,[p~="x-2"],[px-2=""]{padding-left:0.5rem;padding-right:0.5rem;}.py,[py~="\34 "]{padding-top:1rem;padding-bottom:1rem;}.py-1,[p~="y-1"],[py-1=""]{padding-top:0.25rem;padding-bottom:0.25rem;}.py-2,[py-2=""]{padding-top:0.5rem;padding-bottom:0.5rem;}.pl{padding-left:1rem;}.pl-5{padding-left:1.25rem;}.pr,[pr~="\34 "]{padding-right:1rem;}[pl~="\31 2"]{padding-left:3rem;}.text-xs{font-size:0.75rem;line-height:1rem;}.dark [text~="dark\:gray-200"]{--un-text-opacity:1;color:rgb(229 231 235 / var(--un-text-opacity));}.text-blue-500{--un-text-opacity:1;color:rgb(59 130 246 / var(--un-text-opacity));}[text~="gray-700"]{--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity));}.hover\:text-blue-500:hover{--un-text-opacity:1;color:rgb(59 130 246 / var(--un-text-opacity));}.font-bold{font-weight:700;}.op-60{opacity:0.6;}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.hover\:shadow-lg:hover{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.shadow-inset{--un-shadow-inset:inset;}.outline{outline-style:solid;}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} html,
388
388
  body {
389
389
  height: 100%;
390
390
  }
391
+
392
+ .dark {
393
+ background-color: rgba(12, 16, 21);
394
+ }
391
395
  .splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging *{user-select:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}
@@ -5814,25 +5814,25 @@ const routes = [
5814
5814
  {
5815
5815
  path: '/',
5816
5816
  name: '/',
5817
- component: () => __vitePreload(() => import('./index-51E08Ncj.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
5817
+ component: () => __vitePreload(() => import('./index-Ic8qbUfo.js'),true?__vite__mapDeps([0,1,2]):void 0,import.meta.url),
5818
5818
  /* no children */
5819
5819
  },
5820
5820
  {
5821
5821
  path: '/about',
5822
5822
  name: '/about',
5823
- component: () => __vitePreload(() => import('./about-SiRA-rr8.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
5823
+ component: () => __vitePreload(() => import('./about-ElTANHBg.js'),true?__vite__mapDeps([3,1]):void 0,import.meta.url),
5824
5824
  /* no children */
5825
5825
  },
5826
5826
  {
5827
5827
  path: '/categories',
5828
5828
  name: '/categories',
5829
- component: () => __vitePreload(() => import('./categories-XFPOy2yC.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
5829
+ component: () => __vitePreload(() => import('./categories-J8DcyOCk.js'),true?__vite__mapDeps([4,1]):void 0,import.meta.url),
5830
5830
  /* no children */
5831
5831
  },
5832
5832
  {
5833
5833
  path: '/tags',
5834
5834
  name: '/tags',
5835
- component: () => __vitePreload(() => import('./tags-pRAQg_EK.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
5835
+ component: () => __vitePreload(() => import('./tags--GcTVHIk.js'),true?__vite__mapDeps([5,1]):void 0,import.meta.url),
5836
5836
  /* no children */
5837
5837
  }
5838
5838
  ];
@@ -7656,24 +7656,63 @@ function createRouter(options) {
7656
7656
 
7657
7657
  /* Injected with object hook! */
7658
7658
 
7659
- const _export_sfc = (sfc, props) => {
7660
- const target = sfc.__vccOpts || sfc;
7661
- for (const [key, val] of props) {
7662
- target[key] = val;
7663
- }
7664
- return target;
7665
- };
7659
+ const devtoolsRouter = ref();
7660
+ const activePath = ref("");
7661
+ const frontmatter = ref();
7662
+ const pageData = ref();
7666
7663
 
7667
7664
  /* Injected with object hook! */
7668
7665
 
7669
- /* unplugin-vue-components disabled */const _sfc_main = {};
7666
+ function getAppWindow() {
7667
+ return window.parent.parent;
7668
+ }
7669
+ function getWindowProperty(property) {
7670
+ return window.parent.parent[property];
7671
+ }
7672
+ function getGlobalValaxyProperty(property) {
7673
+ const $valaxy = window.parent.parent.$valaxy;
7674
+ return $valaxy[property];
7675
+ }
7670
7676
 
7671
- function _sfc_render(_ctx, _cache) {
7672
- const _component_RouterView = resolveComponent("RouterView");
7677
+ /* Injected with object hook! */
7673
7678
 
7674
- return (openBlock(), createBlock(_component_RouterView))
7679
+ function initDevtoolsClient() {
7680
+ const __VUE_DEVTOOLS_ROUTER__ = getWindowProperty("__VUE_DEVTOOLS_ROUTER__");
7681
+ devtoolsRouter.value = __VUE_DEVTOOLS_ROUTER__;
7682
+ devtoolsRouter.value.beforeEach((to, _from, next) => {
7683
+ activePath.value = to.path;
7684
+ next();
7685
+ });
7686
+ onMounted(() => {
7687
+ frontmatter.value = getWindowProperty("$frontmatter");
7688
+ pageData.value = getWindowProperty("$pageData");
7689
+ });
7690
+ devtoolsRouter.value.afterEach(async () => {
7691
+ await nextTick();
7692
+ frontmatter.value = getWindowProperty("$frontmatter");
7693
+ pageData.value = getWindowProperty("$pageData");
7694
+ });
7675
7695
  }
7676
- const App = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
7696
+
7697
+ /* Injected with object hook! */
7698
+
7699
+ const isStaticMode = document.body.getAttribute("data-valaxy-devtools-mode") === "BUILD";
7700
+
7701
+ /* Injected with object hook! */
7702
+
7703
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7704
+ __name: "App",
7705
+ setup(__props) {
7706
+ onMounted(() => {
7707
+ initDevtoolsClient();
7708
+ });
7709
+ return (_ctx, _cache) => {
7710
+ const _component_RouterView = resolveComponent("RouterView");
7711
+ return openBlock(), createBlock(_component_RouterView);
7712
+ };
7713
+ }
7714
+ });
7715
+
7677
7716
  /* Injected with object hook! */
7678
7717
 
7679
7718
  /* Injected with object hook! */
@@ -7684,7 +7723,7 @@ const App = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
7684
7723
 
7685
7724
  /* Injected with object hook! */
7686
7725
 
7687
- const app = createApp(App);
7726
+ const app = createApp(_sfc_main);
7688
7727
  const router = createRouter({
7689
7728
  history: createWebHashHistory()
7690
7729
  });
@@ -7695,10 +7734,10 @@ app.mount("#app");
7695
7734
 
7696
7735
  /* Injected with object hook! */
7697
7736
 
7698
- export { Fragment as F, _export_sfc as _, createCommentVNode as a, createBaseVNode as b, createElementBlock as c, defineComponent as d, createTextVNode as e, ref as f, onMounted as g, h, renderSlot as i, normalizeStyle as j, createVNode as k, normalizeClass as n, openBlock as o, renderList as r, toDisplayString as t, unref as u, withCtx as w };
7737
+ export { h as A, normalizeStyle as B, isStaticMode as C, Fragment as F, createElementBlock as a, createCommentVNode as b, computed as c, defineComponent as d, createBaseVNode as e, resolveComponent as f, getAppWindow as g, createBlock as h, ref as i, renderList as j, createTextVNode as k, createVNode as l, toRaw as m, normalizeClass as n, openBlock as o, pageData as p, frontmatter as q, renderSlot as r, getWindowProperty as s, toDisplayString as t, unref as u, onMounted as v, withCtx as w, getGlobalValaxyProperty as x, activePath as y, devtoolsRouter as z };
7699
7738
  function __vite__mapDeps(indexes) {
7700
7739
  if (!__vite__mapDeps.viteFileDeps) {
7701
- __vite__mapDeps.viteFileDeps = []
7740
+ __vite__mapDeps.viteFileDeps = ["./index-Ic8qbUfo.js","./_plugin-vue_export-helper-PLawvS9c.js","./index-xfOC-KHy.css","./about-ElTANHBg.js","./categories-J8DcyOCk.js","./tags--GcTVHIk.js"]
7702
7741
  }
7703
7742
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
7704
7743
  }
@@ -0,0 +1,61 @@
1
+ .agui-button {
2
+ --border-radius: 2px;
3
+ }
4
+ .agui-button {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ padding: 0 6px;
9
+ font-size: 12px;
10
+ appearance: none;
11
+ background: rgb(88, 88, 88) no-repeat center center;
12
+ color: #e6e6e6;
13
+ cursor: pointer;
14
+ border-radius: var(--border-radius);
15
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
16
+ }
17
+ .agui-button[data-location=ALONE] {
18
+ border-radius: var(--border-radius);
19
+ }
20
+ .agui-button[data-location=LEFT] {
21
+ border-top-left-radius: var(--border-radius) var(--border-radius);
22
+ border-bottom-left-radius: var(--border-radius) var(--border-radius);
23
+ border-top-right-radius: 0;
24
+ border-bottom-right-radius: 0;
25
+ }
26
+ .agui-button[data-location=RIGHT] {
27
+ border-top-right-radius: var(--border-radius) var(--border-radius);
28
+ border-bottom-right-radius: var(--border-radius) var(--border-radius);
29
+ border-top-left-radius: 0;
30
+ border-bottom-left-radius: 0;
31
+ }
32
+ .agui-button:hover {
33
+ background: rgb(100, 100, 100);
34
+ color: #ffffff;
35
+ }
36
+ .agui-button.pressed, .agui-button:active {
37
+ background-color: #4772b3;
38
+ color: #ffffff;
39
+ }
40
+ .agui-button.mini {
41
+ font-size: 9px;
42
+ }.agui-input {
43
+ --agui-input-c-bg: rgba(42, 42, 42, 1);
44
+ color: var(--agui-c-label);
45
+ background-color: var(--agui-input-c-bg, rgb(42, 42, 42));
46
+ border: 1px solid var(--agui-c-border);
47
+ border-radius: 3px;
48
+ font-size: 13px;
49
+ height: 20px;
50
+ box-sizing: border-box;
51
+ transition: border-color 0.2s ease-in-out;
52
+ }
53
+ .agui-input:focus {
54
+ outline: none;
55
+ border-color: var(--agui-c-active);
56
+ }
57
+ .agui-input:disabled {
58
+ opacity: 0.5;
59
+ color: var(--agui-c-text-3);
60
+ border-color: var(--agui-c-border);
61
+ }
@@ -1,4 +1,5 @@
1
- import { _ as _export_sfc, o as openBlock, c as createElementBlock } from './index-8_TdlA6f.js';
1
+ import { _ as _export_sfc } from './_plugin-vue_export-helper-PLawvS9c.js';
2
+ import { a as createElementBlock, o as openBlock } from './index-q944aN_L.js';
2
3
 
3
4
  /* unplugin-vue-components disabled */const _sfc_main = {};
4
5
 
@@ -6,8 +6,8 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <link rel="icon" href="/favicon.svg" type="image/svg+xml">
8
8
  <title>Valaxy Devtools</title>
9
- <script type="module" crossorigin src="./assets/index-8_TdlA6f.js"></script>
10
- <link rel="stylesheet" crossorigin href="./assets/index-ZDzLlgt_.css">
9
+ <script type="module" crossorigin src="./assets/index-q944aN_L.js"></script>
10
+ <link rel="stylesheet" crossorigin href="./assets/index-NKBWV0hh.css">
11
11
  </head>
12
12
 
13
13
  <body data-vite-inspect-mode="DEV">
package/dist/index.cjs CHANGED
@@ -2,29 +2,63 @@
2
2
 
3
3
  const c = require('picocolors');
4
4
  const sirv = require('sirv');
5
+ const httpProxyMiddleware = require('http-proxy-middleware');
5
6
  const node_path = require('node:path');
6
7
  const node_url = require('node:url');
8
+ const bodyParser = require('body-parser');
9
+ const matter = require('gray-matter');
10
+ const fs = require('fs-extra');
7
11
 
8
12
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
10
14
 
11
15
  const c__default = /*#__PURE__*/_interopDefaultCompat(c);
12
16
  const sirv__default = /*#__PURE__*/_interopDefaultCompat(sirv);
17
+ const bodyParser__default = /*#__PURE__*/_interopDefaultCompat(bodyParser);
18
+ const matter__default = /*#__PURE__*/_interopDefaultCompat(matter);
19
+ const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
13
20
 
14
21
  const DIR_DIST = typeof __dirname !== "undefined" ? __dirname : node_path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
15
22
  const DEVTOOLS_CLIENT_FOLDER = node_path.resolve(DIR_DIST, "../dist/client");
16
23
  const DIR_CLIENT = DEVTOOLS_CLIENT_FOLDER;
17
24
 
25
+ const prefix = "/valaxy-devtools-api";
26
+ function registerApi(server, _viteConfig) {
27
+ const app = server.middlewares;
28
+ app.use(bodyParser__default.json());
29
+ app.use(`${prefix}/frontmatter`, async (req, _res) => {
30
+ if (req.method === "POST") {
31
+ const { pageData, frontmatter: newFm } = await req.body;
32
+ const path = pageData.path;
33
+ if (fs__default.existsSync(path)) {
34
+ const rawMd = await fs__default.readFile(path, "utf-8");
35
+ const matterFile = matter__default(rawMd);
36
+ matterFile.data = newFm;
37
+ const newMd = matter__default.stringify(matterFile.content, matterFile.data);
38
+ await fs__default.writeFile(path, newMd);
39
+ }
40
+ }
41
+ });
42
+ }
43
+
18
44
  const NAME = "valaxy:devtools";
19
45
  function ValaxyDevtools(options = {}) {
20
46
  let config;
21
47
  function configureServer(server) {
22
48
  const _print = server.printUrls;
23
49
  const base = (options.base ?? server.config.base) || "/";
24
- server.middlewares.use(`${base}__valaxy_devtools__`, sirv__default(DIR_CLIENT, {
25
- single: true,
26
- dev: true
27
- }));
50
+ const devtoolsUrl = `${base}__valaxy_devtools__/`;
51
+ if (undefined?.VITE_DEV_VALAXY_DEVTOOLS === "true") {
52
+ server.middlewares.use(devtoolsUrl, httpProxyMiddleware.createProxyMiddleware({
53
+ target: "http://localhost:5001/#/",
54
+ changeOrigin: true
55
+ }));
56
+ } else {
57
+ server.middlewares.use(devtoolsUrl, sirv__default(DIR_CLIENT, {
58
+ single: true,
59
+ dev: true
60
+ }));
61
+ }
28
62
  server.printUrls = () => {
29
63
  let host = `${config.server.https ? "https" : "http"}://localhost:${config.server.port || "80"}`;
30
64
  const url = server.resolvedUrls?.local[0];
@@ -40,9 +74,11 @@ function ValaxyDevtools(options = {}) {
40
74
  const colorUrl = (url2) => c__default.green(url2.replace(/:(\d+)\//, (_, port) => `:${c__default.bold(port)}/`));
41
75
  console.log(` ${c__default.green("\u279C")} ${c__default.bold("Inspect")}: ${colorUrl(`${host}${base}__inspect/`)}`);
42
76
  };
77
+ registerApi(server);
43
78
  }
44
79
  const plugin = {
45
80
  name: NAME,
81
+ enforce: "pre",
46
82
  configResolved(_config) {
47
83
  config = _config;
48
84
  },
package/dist/index.mjs CHANGED
@@ -1,22 +1,53 @@
1
1
  import c from 'picocolors';
2
2
  import sirv from 'sirv';
3
+ import { createProxyMiddleware } from 'http-proxy-middleware';
3
4
  import { dirname, resolve } from 'node:path';
4
5
  import { fileURLToPath } from 'node:url';
6
+ import bodyParser from 'body-parser';
7
+ import matter from 'gray-matter';
8
+ import fs from 'fs-extra';
5
9
 
6
10
  const DIR_DIST = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
7
11
  const DEVTOOLS_CLIENT_FOLDER = resolve(DIR_DIST, "../dist/client");
8
12
  const DIR_CLIENT = DEVTOOLS_CLIENT_FOLDER;
9
13
 
14
+ const prefix = "/valaxy-devtools-api";
15
+ function registerApi(server, _viteConfig) {
16
+ const app = server.middlewares;
17
+ app.use(bodyParser.json());
18
+ app.use(`${prefix}/frontmatter`, async (req, _res) => {
19
+ if (req.method === "POST") {
20
+ const { pageData, frontmatter: newFm } = await req.body;
21
+ const path = pageData.path;
22
+ if (fs.existsSync(path)) {
23
+ const rawMd = await fs.readFile(path, "utf-8");
24
+ const matterFile = matter(rawMd);
25
+ matterFile.data = newFm;
26
+ const newMd = matter.stringify(matterFile.content, matterFile.data);
27
+ await fs.writeFile(path, newMd);
28
+ }
29
+ }
30
+ });
31
+ }
32
+
10
33
  const NAME = "valaxy:devtools";
11
34
  function ValaxyDevtools(options = {}) {
12
35
  let config;
13
36
  function configureServer(server) {
14
37
  const _print = server.printUrls;
15
38
  const base = (options.base ?? server.config.base) || "/";
16
- server.middlewares.use(`${base}__valaxy_devtools__`, sirv(DIR_CLIENT, {
17
- single: true,
18
- dev: true
19
- }));
39
+ const devtoolsUrl = `${base}__valaxy_devtools__/`;
40
+ if (import.meta.env?.VITE_DEV_VALAXY_DEVTOOLS === "true") {
41
+ server.middlewares.use(devtoolsUrl, createProxyMiddleware({
42
+ target: "http://localhost:5001/#/",
43
+ changeOrigin: true
44
+ }));
45
+ } else {
46
+ server.middlewares.use(devtoolsUrl, sirv(DIR_CLIENT, {
47
+ single: true,
48
+ dev: true
49
+ }));
50
+ }
20
51
  server.printUrls = () => {
21
52
  let host = `${config.server.https ? "https" : "http"}://localhost:${config.server.port || "80"}`;
22
53
  const url = server.resolvedUrls?.local[0];
@@ -32,9 +63,11 @@ function ValaxyDevtools(options = {}) {
32
63
  const colorUrl = (url2) => c.green(url2.replace(/:(\d+)\//, (_, port) => `:${c.bold(port)}/`));
33
64
  console.log(` ${c.green("\u279C")} ${c.bold("Inspect")}: ${colorUrl(`${host}${base}__inspect/`)}`);
34
65
  };
66
+ registerApi(server);
35
67
  }
36
68
  const plugin = {
37
69
  name: NAME,
70
+ enforce: "pre",
38
71
  configResolved(_config) {
39
72
  config = _config;
40
73
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valaxyjs/devtools",
3
3
  "type": "module",
4
- "version": "0.18.0-beta.2",
4
+ "version": "0.18.0",
5
5
  "repository": {
6
6
  "url": "https://github.com/YunYouJun/valaxy"
7
7
  },
@@ -18,12 +18,18 @@
18
18
  "types": "dist/index.d.ts",
19
19
  "dependencies": {
20
20
  "@rollup/pluginutils": "^5.1.0",
21
+ "axios": "^1.6.7",
22
+ "body-parser": "^1.20.2",
23
+ "http-proxy-middleware": "^2.0.6",
21
24
  "picocolors": "^1.0.0",
22
25
  "sirv": "^2.0.4"
23
26
  },
24
27
  "devDependencies": {
28
+ "@advjs/gui": "0.0.5-beta.0",
25
29
  "@iconify-json/ri": "^1.1.19",
30
+ "@types/body-parser": "^1.19.5",
26
31
  "@types/splitpanes": "^2.2.6",
32
+ "gray-matter": "^4.0.3",
27
33
  "splitpanes": "^3.1.5",
28
34
  "typescript": "^5.3.3",
29
35
  "unbuild": "^2.0.0",
@@ -36,7 +42,7 @@
36
42
  "build:node": "unbuild",
37
43
  "dev": "npm run stub && npm run dev:client",
38
44
  "dev:client": "vite build src/client --watch",
39
- "dev:src": "vite dev src/client",
45
+ "dev:src": "vite dev src/client --port 5001",
40
46
  "stub": "unbuild --stub",
41
47
  "release": "bumpp && npm publish"
42
48
  }
@@ -1,3 +1,12 @@
1
+ <script lang="ts" setup>
2
+ import { onMounted } from 'vue'
3
+ import { initDevtoolsClient } from './utils'
4
+
5
+ onMounted(() => {
6
+ initDevtoolsClient()
7
+ })
8
+ </script>
9
+
1
10
  <template>
2
11
  <RouterView />
3
12
  </template>
@@ -1,15 +1,66 @@
1
1
  <script lang="ts" setup>
2
- defineProps<{
3
- frontmatter?: object
2
+ import { ref, toRaw } from 'vue'
3
+ import type { PostFrontMatter } from 'valaxy'
4
+
5
+ import axios from 'axios'
6
+ import consola from 'consola'
7
+ import { pageData } from '../composables/app'
8
+
9
+ const props = defineProps<{
10
+ frontmatter: PostFrontMatter
4
11
  }>()
12
+
13
+ const newFm = ref<PostFrontMatter>(props.frontmatter)
14
+ async function saveNewFm() {
15
+ // const data = await fetch('/valaxy-devtools-api/frontmatter', {
16
+ // method: 'POST',
17
+ // // body: JSON.stringify(toRaw(newFm.value)),
18
+ // })
19
+
20
+ const res = await axios.post('/valaxy-devtools-api/frontmatter', {
21
+ pageData: pageData.value,
22
+ frontmatter: toRaw(newFm.value),
23
+ })
24
+ if (res)
25
+ consola.success('Frontmatter saved')
26
+
27
+ // console.log(res)
28
+ }
5
29
  </script>
6
30
 
7
31
  <template>
8
32
  <div>
9
33
  <ul v-if="frontmatter">
10
34
  <li v-for="(value, key) in frontmatter" :key="key">
11
- <strong>{{ key }}</strong>: {{ value }}
35
+ <strong>{{ key }}</strong>
36
+ <span mr-1>:</span>
37
+
38
+ <template v-if="key === 'tags'">
39
+ <VDTag v-for="tag in value" :key="tag">
40
+ {{ tag }}
41
+ </VDTag>
42
+ </template>
43
+ <template v-else-if="key === 'categories'">
44
+ <VDPostCategories :categories="value" />
45
+ </template>
46
+ <template v-else-if="key === 'encryptedContent'">
47
+ [Encrypted]
48
+ </template>
49
+ <template v-else-if="key === 'partiallyEncryptedContents'">
50
+ [Partially Encrypted]
51
+ </template>
52
+ <template v-else-if="key === 'title'">
53
+ <!-- eslint-disable-next-line vue/no-mutating-props -->
54
+ <AGUIInput v-model="newFm.title" />
55
+ </template>
56
+ <template v-else>
57
+ {{ value }}
58
+ </template>
12
59
  </li>
13
60
  </ul>
61
+
62
+ <AGUIButton @click="saveNewFm">
63
+ Save Frontmatter
64
+ </AGUIButton>
14
65
  </div>
15
66
  </template>
@@ -0,0 +1,22 @@
1
+ <script lang="ts" setup>
2
+ import { getWindowProperty, openInEditor } from '../utils'
3
+ import { frontmatter } from '../composables/app'
4
+
5
+ function launchEditor() {
6
+ openInEditor({
7
+ file: getWindowProperty('$pageData').path,
8
+ })
9
+ }
10
+ </script>
11
+
12
+ <template>
13
+ <div p="2">
14
+ <div class="flex" gap="2" py-2>
15
+ <button class="text-xs shadow transition hover:shadow-lg p-2" @click="launchEditor()">
16
+ <div i-vscode-icons:file-type-vscode />
17
+ </button>
18
+ </div>
19
+
20
+ <PageFrontmatter v-if="frontmatter" :frontmatter="frontmatter" />
21
+ </div>
22
+ </template>
@@ -0,0 +1,26 @@
1
+ <script lang="ts" setup>
2
+ import type { Post } from 'valaxy'
3
+
4
+ defineProps<{
5
+ categories: Post['categories']
6
+ }>()
7
+ </script>
8
+
9
+ <template>
10
+ <RouterLink
11
+ :to="{
12
+ path: '/categories',
13
+ query: { category: Array.isArray(categories) ? categories.join('/') : categories },
14
+ }"
15
+ class="post-category transition text-xs hover:(text-blue-500 border-blue-500)"
16
+ px-2 py-1
17
+ border rounded-full
18
+ inline-flex justify-center items-center
19
+ bg="hover:(blue-500 opacity-10)"
20
+ >
21
+ <div m="x-1" inline-flex i-ri-folder-2-line />
22
+ <span>
23
+ {{ Array.isArray(categories) ? categories.join(' > ') : categories }}
24
+ </span>
25
+ </RouterLink>
26
+ </template>
@@ -1,17 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { onMounted, ref } from 'vue'
3
- import type { Router } from 'vue-router/auto'
4
- import { getGlobalValaxyProperty, getWindowProperty, openInEditor } from '../utils'
5
- import { frontmatter } from '../composables/app'
6
-
7
- const activePath = ref('')
8
-
9
- const __VUE_DEVTOOLS_ROUTER__ = getWindowProperty('__VUE_DEVTOOLS_ROUTER__') as Router
10
- __VUE_DEVTOOLS_ROUTER__.beforeEach((to, _from, next) => {
11
- activePath.value = to.path
12
- frontmatter.value = getWindowProperty('$frontmatter')
13
- next()
14
- })
3
+ import { getGlobalValaxyProperty } from '../utils'
4
+ import { activePath, devtoolsRouter } from '../composables/app'
15
5
 
16
6
  const postList = ref()
17
7
 
@@ -20,31 +10,21 @@ onMounted(() => {
20
10
  })
21
11
 
22
12
  function onClickPost(post: any) {
23
- __VUE_DEVTOOLS_ROUTER__.push(post.path)
24
- }
25
-
26
- function launchEditor() {
27
- openInEditor({
28
- file: getWindowProperty('$pageData').path,
29
- })
13
+ devtoolsRouter.value?.push(post.path)
30
14
  }
31
15
  </script>
32
16
 
33
17
  <template>
34
18
  <ul class="h-full" overflow="auto" pl="12" pr="4" py="4">
35
- {{ activePath }}
36
19
  <li v-for="post in postList" :key="post.path" class="list-decimal">
37
20
  <div flex>
38
21
  <span
39
- class="inline-flex flex-grow cursor-pointer underline hover:text-blue-500"
40
- :class="{ 'text-blue-500': activePath === post.path }"
22
+ class="inline-flex flex-grow cursor-pointer hover:text-blue-500"
23
+ :class="{ 'text-blue-500 font-bold': activePath === post.path }"
41
24
  @click="onClickPost(post)"
42
25
  >
43
26
  {{ post.title }}
44
27
  </span>
45
- <button class="ml-2 text-xs" @click="launchEditor()">
46
- <div i-vscode-icons:file-type-vscode />
47
- </button>
48
28
  </div>
49
29
  </li>
50
30
  </ul>
@@ -0,0 +1,9 @@
1
+ <script lang="ts" setup>
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <div class="vd-tag inline-flex shadow border rounded text-xs" p="x-2 y-1">
7
+ <slot />
8
+ </div>
9
+ </template>