vite-plugin-vue-devtools 1.0.0-rc.8 → 7.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.
Files changed (96) hide show
  1. package/README.md +8 -172
  2. package/dist/client/assets/css-a-KJtBLB.js +505 -0
  3. package/dist/client/assets/diff--l9-nN5b.js +1 -0
  4. package/dist/client/assets/html-5-AIf93y.js +74 -0
  5. package/dist/client/assets/index-NNrCE7Vx.css +1 -0
  6. package/dist/client/assets/index-U-H6nGkn.js +1080 -0
  7. package/dist/client/assets/javascript-Of8SnKfU.js +699 -0
  8. package/dist/client/assets/json-t1qiHl76.js +25 -0
  9. package/dist/client/assets/onig-mBJmD8D5.js +1 -0
  10. package/dist/client/assets/shellscript-h1L64xId.js +4 -0
  11. package/dist/client/assets/typescript-b1Nw_bQe.js +666 -0
  12. package/dist/client/assets/unocss-runtime-kftsoZPE.js +2 -0
  13. package/dist/client/assets/vitesse-dark-5VceXvs6.js +1 -0
  14. package/dist/client/assets/vitesse-light-HOMMxGxw.js +1 -0
  15. package/dist/client/assets/vue-apis-Nh9IahXf.js +1 -0
  16. package/dist/client/assets/vue-html-eJ6eRCYJ.js +1 -0
  17. package/dist/client/assets/vue-nOwTje1i.js +2002 -0
  18. package/dist/client/assets/yaml-FtfhlYqU.js +200 -0
  19. package/dist/client/color-scheme.js +6 -0
  20. package/dist/client/css-hXHVOlj5.js +511 -0
  21. package/dist/client/devtools-panel.css +1 -0
  22. package/dist/client/devtools-panel.js +77722 -0
  23. package/dist/client/diff-nydZCsp5.js +7 -0
  24. package/dist/client/html-r4dic7N6.js +84 -0
  25. package/dist/client/index.html +13 -21
  26. package/dist/client/javascript-iu2g-HpL.js +705 -0
  27. package/dist/client/json-6ED1Ntns.js +31 -0
  28. package/dist/client/onig-NuJRzyUz.js +4 -0
  29. package/dist/client/shellscript-lFevXvOp.js +10 -0
  30. package/dist/client/typescript-SzFP_hYV.js +672 -0
  31. package/dist/client/unocss-runtime-c8-Zzj4C.js +1974 -0
  32. package/dist/client/vitesse-dark-Q3b2Vb5y.js +683 -0
  33. package/dist/client/vitesse-light-T_UJmsth.js +681 -0
  34. package/dist/client/vue-apis-j7ljdRbm.js +1127 -0
  35. package/dist/client/vue-html-IdJrwrVJ.js +16 -0
  36. package/dist/client/vue-vFbCUJfs.js +2118 -0
  37. package/dist/client/yaml-n_HyS7lr.js +206 -0
  38. package/dist/vite.cjs +116 -13794
  39. package/dist/vite.d.cts +6 -9
  40. package/dist/vite.d.mts +6 -9
  41. package/dist/vite.d.ts +6 -9
  42. package/dist/vite.mjs +113 -13774
  43. package/package.json +18 -19
  44. package/src/overlay/devtools-overlay.css +1 -0
  45. package/src/overlay/devtools-overlay.js +4 -0
  46. package/src/overlay.js +77 -0
  47. package/README.zh-CN.md +0 -186
  48. package/client.d.ts +0 -63
  49. package/dist/client/assets/DrawerRight.vue_vue_type_script_setup_true_lang-99688d1e.js +0 -81
  50. package/dist/client/assets/IconButton.vue_vue_type_script_setup_true_lang-48a6bea2.js +0 -26
  51. package/dist/client/assets/IconTitle.vue_vue_type_script_setup_true_lang-adb17252.js +0 -30
  52. package/dist/client/assets/IframeView.vue_vue_type_script_setup_true_lang-4ccdbf42.js +0 -96
  53. package/dist/client/assets/PanelGrids-664603ce.js +0 -15
  54. package/dist/client/assets/SectionBlock-0024395a.css +0 -18
  55. package/dist/client/assets/SectionBlock-04b7ab1e.js +0 -109
  56. package/dist/client/assets/StateFields.vue_vue_type_script_setup_true_lang-48cf50ad.js +0 -381
  57. package/dist/client/assets/Switch.vue_vue_type_script_setup_true_lang-d74bf986.js +0 -87
  58. package/dist/client/assets/TextInput.vue_vue_type_script_setup_true_lang-65c09c69.js +0 -38
  59. package/dist/client/assets/__eyedropper-7bbec9b2.js +0 -149
  60. package/dist/client/assets/_commonjsHelpers-7e83dbf2.js +0 -34
  61. package/dist/client/assets/assets-641818bf.js +0 -1597
  62. package/dist/client/assets/component-docs-7bd37475.js +0 -195
  63. package/dist/client/assets/components-b0181ea4.js +0 -790
  64. package/dist/client/assets/data-8729d21a.js +0 -399
  65. package/dist/client/assets/dayjs.min-f03ccd82.js +0 -13
  66. package/dist/client/assets/documentations-7cba8670.js +0 -276
  67. package/dist/client/assets/fuse.esm-c317b696.js +0 -1782
  68. package/dist/client/assets/graph-edf83976.js +0 -52092
  69. package/dist/client/assets/index-77d53487.js +0 -18551
  70. package/dist/client/assets/index-b5475fe0.css +0 -482
  71. package/dist/client/assets/inspect-d17224a9.js +0 -20
  72. package/dist/client/assets/jse-theme-dark-333a4654.js +0 -1565
  73. package/dist/client/assets/jse-theme-dark-351d62d5.css +0 -114
  74. package/dist/client/assets/npm-076ecb7c.js +0 -550
  75. package/dist/client/assets/npm-832f3f2c.css +0 -209
  76. package/dist/client/assets/overview-d99e7f18.js +0 -303
  77. package/dist/client/assets/pages-fca7d8d3.js +0 -561
  78. package/dist/client/assets/pinia-3f5b6c57.js +0 -108
  79. package/dist/client/assets/pinia-7ed2c830.svg +0 -1
  80. package/dist/client/assets/rerender-trace-3afd48a1.css +0 -14
  81. package/dist/client/assets/rerender-trace-5fc6fb22.js +0 -436
  82. package/dist/client/assets/routes-9567a43f.js +0 -132
  83. package/dist/client/assets/settings-5a2e184c.js +0 -9652
  84. package/dist/client/assets/settings-7bce89ae.css +0 -11
  85. package/dist/client/assets/splitpanes.es-26cdc434.js +0 -343
  86. package/dist/client/assets/timeline-20d79e43.js +0 -1480
  87. package/dist/client/assets/timeline-b315b2e0.css +0 -1
  88. package/dist/client/assets/vue-5d4e674c.svg +0 -1
  89. package/dist/client/assets/vueuse-995374f6.svg +0 -1
  90. package/src/app.js +0 -4
  91. package/src/views/ComponentInspector.vue +0 -68
  92. package/src/views/FrameBox.vue +0 -231
  93. package/src/views/Main.vue +0 -435
  94. package/src/views/RerenderIndicator.vue +0 -37
  95. package/src/views/composables.ts +0 -630
  96. package/src/views/utils.ts +0 -241
package/README.zh-CN.md DELETED
@@ -1,186 +0,0 @@
1
- <p align="center">
2
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/bg.png" />
3
- </p>
4
- <h1 align="center">
5
- Vue DevTools <sup>预览</sup>
6
- </h1>
7
-
8
- <p align="center">
9
- <a href="./README.md">English</a> | 简体中文
10
- </p>
11
-
12
- <p align="center">
13
- <a href="https://www.npmjs.com/package/vite-plugin-vue-devtools" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/v/vite-plugin-vue-devtools" alt="NPM Version" /></a>
14
- <a href="https://www.npmjs.com/package/vite-plugin-vue-devtools" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/npm/dt/vite-plugin-vue-devtools" alt="NPM Downloads" /></a>
15
- <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/blob/main/LICENSE" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/github/license/webfansplz/vite-plugin-vue-devtools" alt="License" /></a>
16
- </p>
17
-
18
- <p align="center">
19
- <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/discussions/1">💡 想法 & 建议</a> |
20
- <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/discussions/2">🗺️ 项目路线图</a> |
21
- <a href="https://discord.gg/sHyy7gVPUG">🧑‍💻 Discord 频道</a>
22
- </p>
23
-
24
- <p align="center">
25
- <a href="https://stackblitz.com/edit/vitejs-vite-oxbwzk?file=vite.config.ts&view=preview"><img src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt=""></a>
26
- </p>
27
-
28
-
29
- ## 📖 介绍
30
-
31
- `vite-plugin-vue-devtools` 是一个旨在增强 `Vue` 开发者体验的 `Vite` 插件。
32
-
33
-
34
-
35
- ## 🎉 特性
36
-
37
- ### Pages
38
-
39
- `Pages` 选项卡显示您当前的页面路由并提供快速导航的方法。对于动态路由,它还提供了一个表单来交互式地填写每个参数。您还可以使用文本框来测试每个路由的匹配情况。
40
-
41
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/pages.png" />
42
-
43
-
44
- ### Components
45
-
46
- `Components` 选项卡显示您应用程序的所有组件树,您还可以选择它们来查看组件的详细信息(例如数据、属性)。
47
-
48
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/components.png" />
49
-
50
- ### Assets
51
-
52
- `Assets` 选项卡显示所有静态资源及其信息,您可以在浏览器中打开或下载它。
53
-
54
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/assets.png" />
55
-
56
- ### Timeline
57
-
58
- `Timeline` 选项卡包含三个类别:性能、路由导航和 [Pinia](https://github.com/vuejs/pinia),您可以在它们之间切换以查看状态变化和时间线。
59
-
60
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/timeline.png" />
61
-
62
- ### Routes
63
-
64
- `Routes` 选项卡是与 [Vue Router](https://github.com/vuejs/router) 集成的功能,允许您查看注册的路由及其详细信息。
65
-
66
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/routes.png" />
67
-
68
- ### Pinia
69
-
70
- `Pinia` 选项卡是与 [Pinia](https://github.com/vuejs/pinia) 集成的功能,允许您查看注册的模块及其详细信息。
71
-
72
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/pinia.png" />
73
-
74
- ### Graph
75
-
76
- `Graph` 选项卡提供了显示组件依赖关系的视图。
77
-
78
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/graph.png" />
79
-
80
- ### Inspect
81
-
82
- `Inspect` 公开 [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) 集成,允许您检查 [Vite](https://vitejs.dev/) 的转换步骤,了解每个插件如何改变您的代码并发现潜在问题可能会有所帮助。
83
-
84
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/inspect.png" />
85
-
86
- ### Inspector
87
-
88
- 您还可以使用 `Inspector` 功能来检查 `DOM` 树并查看哪个组件正在渲染它,单击可转到编辑器的特定行,使更改变得更加容易,而无需彻底了解项目结构。 (该功能基于 [vite-plugin-vue-inspector](https://github.com/webfansplz/vite-plugin-vue-inspector))
89
-
90
- <img src="https://github.com/webfansplz/vite-plugin-vue-devtools/raw/main/screenshots/inspector.png" height=450 />
91
-
92
- ## 📦 安装
93
-
94
- ```
95
-
96
- # vite-plugin-vue-devtools
97
-
98
- pnpm install vite-plugin-vue-devtools -D
99
-
100
- ```
101
-
102
- ## 🦄 示例
103
-
104
- ### Vite 配置
105
-
106
- ```ts
107
- import { defineConfig } from 'vite'
108
- import VueDevTools from 'vite-plugin-vue-devtools'
109
-
110
- export default defineConfig({
111
- plugins: [
112
- VueDevTools(),
113
- vue(),
114
- ],
115
- })
116
- ```
117
-
118
- ### 选项
119
-
120
- ```ts
121
- interface AnalyzeOptions {
122
- /**
123
- * @default true
124
- */
125
- rerenderTrace: boolean
126
- }
127
-
128
- interface VitePluginVueDevToolsOptions {
129
- /**
130
- * append an import to the module id ending with `appendTo` instead of adding a script into body
131
- * useful for projects that do not use html file as an entry
132
- *
133
- * WARNING: only set this if you know exactly what it does.
134
- */
135
- appendTo?: string | RegExp
136
-
137
- /**
138
- * Enable Vue DevTools to analyze the codebase by using Babel
139
- * @default
140
- * {
141
- * rerenderTrace: true, // enable rerenderTrace feature
142
- * }
143
- */
144
- analyze?: Partial<AnalyzeOptions>
145
- }
146
- ```
147
-
148
- ## 💡 注意
149
-
150
- - 仅在 `开发模式` 下可用。
151
- - 仅支持 `Vue3.0+` 和 `Vite 3.1+`。
152
- - 仅支持单实例 `Vue` 应用程序。
153
- - 不支持 `SSR` (如果您使用 `Nuxt` ,请使用 [nuxt/devtools](https://github.com/nuxt/devtools))。
154
- - 该插件遵循 `Vue` 的 `DevTools` 配置,因此如果您配置了 `hide` 选项,它也将应用于该插件。例如
155
-
156
- ```js
157
- // This Vue instance will be ignored by the plugin.
158
- createApp({
159
- render: () => h(App),
160
- devtools: {
161
- hide: true,
162
- },
163
- })
164
- ```
165
-
166
- ## 📖 博客
167
-
168
- - [介绍 Vue DevTools (Vite 插件)](https://gist.github.com/webfansplz/bc90a773a0dd474a34e043ab2d2a37a4)
169
-
170
- ## 🌸 致谢
171
-
172
- - 该项目深受 [nuxt/devtools](https://github.com/nuxt/devtools) 的启发,感谢 [Anthony Fu](https://github.com/antfu) 和 `Nuxt` 团队的出色工作
173
-
174
- - [vuejs/devtools](https://github.com/vuejs/devtools)
175
-
176
-
177
- ## 👨‍💻 贡献者
178
-
179
- <a href="https://github.com/webfansplz/vite-plugin-vue-devtools/graphs/contributors">
180
- <img src="https://contrib.rocks/image?repo=webfansplz/vite-plugin-vue-devtools" />
181
- </a>
182
-
183
- ## 📄 License
184
-
185
- [MIT LICENSE](./LICENSE)
186
-
package/client.d.ts DELETED
@@ -1,63 +0,0 @@
1
- declare type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other'
2
-
3
- declare interface AssetInfo {
4
- path: string
5
- type: AssetType
6
- publicPath: string
7
- filePath: string
8
- size: number
9
- mtime: number
10
- }
11
- declare interface ImageMeta {
12
- width: number
13
- height: number
14
- orientation?: number
15
- type?: string
16
- mimeType?: string
17
- }
18
-
19
- declare interface ModuleInfo {
20
- id: string
21
- plugins: { name: string; transform?: number; resolveId?: number }[]
22
- deps: string[]
23
- virtual: boolean
24
- }
25
-
26
- declare interface ExecNpmScriptOptions {
27
- isDev?: boolean
28
- cwd?: string
29
- type?: 'install' | 'uninstall'
30
- callback?: (type: string, data: string) => void
31
- }
32
-
33
- declare interface RPCFunctions {
34
- componentGraph(): Promise<ModuleInfo[]>
35
- inspectClientUrl(): string
36
- staticAssets(): Promise<AssetInfo[]>
37
- getImageMeta(path: string): Promise<ImageMeta | undefined>
38
- getTextAssetContent(path: string): Promise<string | undefined>
39
- deleteStaticAsset(path: string): Promise<string | undefined>
40
- renameStaticAsset(oldPath: string, newPath: string): Promise<string | undefined>
41
- getPackages(): Promise<Record<string, Omit<PackageMeta, 'name'>>>
42
- getVueSFCList(): Promise<string[]>
43
- getComponentInfo(filename: string): Promise<Record<string, unknown>>
44
- onTerminalData(_: { id?: string; data: string }): void
45
- onTerminalExit(_: { id?: string; data?: string }): void
46
- onFileWatch(_: { event: string; path: string }): void
47
- installPackage(packages: string[], options?: ExecNpmScriptOptions): Promise<void>
48
- uninstallPackage(packages: string[], options?: ExecNpmScriptOptions): Promise<void>
49
- root(): string
50
- }
51
-
52
- declare interface PackageMeta {
53
- type: string
54
- version: string
55
- name: string
56
- }
57
-
58
- /**
59
- * - `xs` for functions that should only be available in the small view mode, e.g. `__EyeDropper`
60
- * - `default` is the default view mode
61
- * - `fullscreen` for fullscreen the whole devtool
62
- */
63
- declare type ViewMode = 'xs' | 'default' | 'fullscreen'
@@ -1,81 +0,0 @@
1
- import { _ as _sfc_main$1 } from './IconButton.vue_vue_type_script_setup_true_lang-48a6bea2.js';
2
- import { v as defineComponent, a$ as ref, cP as useElementSize, cf as onClickOutside, o as openBlock, c as createBlock, h as withCtx, e as createElementBlock, u as createVNode, x as createBaseVNode, f as renderSlot, k as mergeProps, z as unref, g as createCommentVNode, P as Transition } from './index-77d53487.js';
3
-
4
- const _hoisted_1 = {
5
- relative: "",
6
- "h-full": "",
7
- "w-full": "",
8
- "of-auto": ""
9
- };
10
- const __default__ = {
11
- inheritAttrs: false
12
- };
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- ...__default__,
15
- __name: "DrawerRight",
16
- props: {
17
- modelValue: { type: Boolean },
18
- navbar: {},
19
- autoClose: { type: Boolean }
20
- },
21
- emits: ["close"],
22
- setup(__props, { emit }) {
23
- const props = __props;
24
- const el = ref();
25
- const { height: top } = useElementSize(() => props.navbar, void 0, { box: "border-box" });
26
- onClickOutside(el, () => {
27
- if (props.modelValue && props.autoClose)
28
- emit("close");
29
- }, {
30
- ignore: ["a", "button", "summary", '[role="dialog"]']
31
- });
32
- return (_ctx, _cache) => {
33
- const _component_VDIconButton = _sfc_main$1;
34
- return openBlock(), createBlock(Transition, {
35
- "enter-active-class": "duration-200 ease-in",
36
- "enter-from-class": "transform translate-x-1/1",
37
- "enter-to-class": "opacity-100",
38
- "leave-active-class": "duration-200 ease-out",
39
- "leave-from-class": "opacity-100",
40
- "leave-to-class": "transform translate-x-1/1"
41
- }, {
42
- default: withCtx(() => [
43
- _ctx.modelValue ? (openBlock(), createElementBlock("div", mergeProps({
44
- key: 0,
45
- ref_key: "el",
46
- ref: el,
47
- border: "l base",
48
- flex: "~ col gap-1",
49
- absolute: "",
50
- "bottom-0": "",
51
- "right-0": "",
52
- "z-10": "",
53
- "z-20": "",
54
- "of-auto": "",
55
- "text-sm": "",
56
- "glass-effect": "",
57
- style: { top: `${unref(top)}px` }
58
- }, _ctx.$attrs), [
59
- createVNode(_component_VDIconButton, {
60
- absolute: "",
61
- "right-2": "",
62
- "top-2": "",
63
- "z-20": "",
64
- "text-xl": "",
65
- icon: "carbon-close",
66
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
67
- }),
68
- createBaseVNode("div", _hoisted_1, [
69
- renderSlot(_ctx.$slots, "default")
70
- ])
71
- ], 16)) : createCommentVNode("", true)
72
- ]),
73
- _: 3
74
- });
75
- };
76
- }
77
- });
78
-
79
- /* Injected with object hook! */
80
-
81
- export { _sfc_main as _ };
@@ -1,26 +0,0 @@
1
- import { v as defineComponent, o as openBlock, c as createBlock, h as withCtx, u as createVNode, bJ as _sfc_main$1, k as mergeProps, j as resolveDynamicComponent } from './index-77d53487.js';
2
-
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "IconButton",
5
- props: {
6
- to: {},
7
- icon: {}
8
- },
9
- setup(__props) {
10
- const props = __props;
11
- return (_ctx, _cache) => {
12
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.to ? "a" : "button"), mergeProps({ href: _ctx.to }, _ctx.$attrs, { class: "n-transition n-icon-button" }), {
13
- default: withCtx(() => [
14
- createVNode(_sfc_main$1, {
15
- icon: props.icon
16
- }, null, 8, ["icon"])
17
- ]),
18
- _: 1
19
- }, 16, ["href"]);
20
- };
21
- }
22
- });
23
-
24
- /* Injected with object hook! */
25
-
26
- export { _sfc_main as _ };
@@ -1,30 +0,0 @@
1
- import { v as defineComponent, o as openBlock, e as createElementBlock, q as normalizeClass, g as createCommentVNode, f as renderSlot, x as createBaseVNode, y as toDisplayString } from './index-77d53487.js';
2
-
3
- const _hoisted_1 = {
4
- flex: "~ gap-3",
5
- "items-center": ""
6
- };
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "IconTitle",
9
- props: {
10
- icon: {},
11
- text: {}
12
- },
13
- setup(__props) {
14
- return (_ctx, _cache) => {
15
- return openBlock(), createElementBlock("div", _hoisted_1, [
16
- _ctx.icon ? (openBlock(), createElementBlock("div", {
17
- key: 0,
18
- class: normalizeClass(_ctx.icon)
19
- }, null, 2)) : createCommentVNode("", true),
20
- renderSlot(_ctx.$slots, "default", {}, () => [
21
- createBaseVNode("div", null, toDisplayString(_ctx.text), 1)
22
- ])
23
- ]);
24
- };
25
- }
26
- });
27
-
28
- /* Injected with object hook! */
29
-
30
- export { _sfc_main as _ };
@@ -1,96 +0,0 @@
1
- import { v as defineComponent, cc as useColorMode, a$ as ref, a1 as computed, aZ as reactive, cv as useElementBounding, aP as onMounted, n as nextTick, bz as watchEffect, aU as onUnmounted, o as openBlock, e as createElementBlock, z as unref, g as createCommentVNode, x as createBaseVNode } from './index-77d53487.js';
2
-
3
- const _hoisted_1 = {
4
- key: 0,
5
- absolute: "",
6
- "inset-0": "",
7
- flex: "",
8
- "items-center": "",
9
- "justify-center": ""
10
- };
11
- const _hoisted_2 = /* @__PURE__ */ createBaseVNode("i", { class: "mdi:loading animate-spin text-3xl" }, null, -1);
12
- const _hoisted_3 = [
13
- _hoisted_2
14
- ];
15
- const iframeCacheMap = /* @__PURE__ */ new Map();
16
- const _sfc_main = /* @__PURE__ */ defineComponent({
17
- __name: "IframeView",
18
- props: {
19
- src: {}
20
- },
21
- setup(__props) {
22
- const props = __props;
23
- const colorMode = useColorMode();
24
- const anchor = ref();
25
- const key = computed(() => props.src);
26
- const iframeEl = ref();
27
- const box = reactive(useElementBounding(anchor));
28
- const iframeLoaded = ref(false);
29
- onMounted(() => {
30
- if (iframeCacheMap.get(key.value)) {
31
- iframeEl.value = iframeCacheMap.get(key.value);
32
- iframeEl.value.style.visibility = "visible";
33
- iframeLoaded.value = true;
34
- } else {
35
- iframeEl.value = document.createElement("iframe");
36
- iframeCacheMap.set(key.value, iframeEl.value);
37
- iframeEl.value.src = props.src;
38
- try {
39
- iframeEl.value.style.opacity = "0.01";
40
- iframeEl.value.onload = () => {
41
- syncColorMode();
42
- iframeEl.value.style.opacity = "1";
43
- iframeLoaded.value = true;
44
- };
45
- } catch (e) {
46
- iframeEl.value.style.opacity = "1";
47
- }
48
- document.body.appendChild(iframeEl.value);
49
- nextTick(updateIframeBox);
50
- }
51
- setTimeout(syncColorMode, 100);
52
- });
53
- watchEffect(updateIframeBox);
54
- watchEffect(syncColorMode);
55
- onUnmounted(() => {
56
- if (iframeEl.value)
57
- iframeEl.value.style.visibility = "hidden";
58
- });
59
- function syncColorMode() {
60
- if (!iframeEl.value || !iframeEl.value.contentWindow)
61
- return;
62
- try {
63
- const html = iframeEl.value.contentWindow.document.querySelector("html");
64
- html?.classList.toggle("dark", colorMode.value === "dark");
65
- html?.classList.toggle("light", colorMode.value === "dark");
66
- } catch (e) {
67
- }
68
- }
69
- function updateIframeBox() {
70
- if (!iframeEl.value)
71
- return;
72
- Object.assign(iframeEl.value.style, {
73
- position: "fixed",
74
- left: `${box.left}px`,
75
- top: `${box.top}px`,
76
- width: `${box.width}px`,
77
- height: `${box.height}px`,
78
- outline: "none"
79
- });
80
- }
81
- return (_ctx, _cache) => {
82
- return openBlock(), createElementBlock("div", {
83
- ref_key: "anchor",
84
- ref: anchor,
85
- "h-full": "",
86
- "w-full": ""
87
- }, [
88
- !unref(iframeLoaded) ? (openBlock(), createElementBlock("div", _hoisted_1, _hoisted_3)) : createCommentVNode("", true)
89
- ], 512);
90
- };
91
- }
92
- });
93
-
94
- /* Injected with object hook! */
95
-
96
- export { _sfc_main as _ };
@@ -1,15 +0,0 @@
1
- import { bK as _export_sfc, o as openBlock, e as createElementBlock, f as renderSlot } from './index-77d53487.js';
2
-
3
- /* unplugin-vue-components disabled */const _sfc_main = {};
4
-
5
- const _hoisted_1 = { class: "n-panel-grids-center" };
6
-
7
- function _sfc_render(_ctx, _cache) {
8
- return (openBlock(), createElementBlock("div", _hoisted_1, [
9
- renderSlot(_ctx.$slots, "default")
10
- ]))
11
- }
12
- const __unplugin_components_0 = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
13
- /* Injected with object hook! */
14
-
15
- export { __unplugin_components_0 as _ };
@@ -1,18 +0,0 @@
1
-
2
- details[data-v-e966339e] {
3
- border-style:none;;
4
- }
5
- summary[data-v-e966339e] {
6
- border-style:none;;
7
- list-style: none;
8
- }
9
- details[open] summary[data-v-e966339e] {
10
- border-style:none;;
11
- }
12
- details summary[data-v-e966339e]::-webkit-details-marker {
13
- display:none;
14
- }
15
- details[open] .chevron[data-v-e966339e] {
16
- transform: rotate(180deg);
17
- opacity: 0.75;
18
- }
@@ -1,109 +0,0 @@
1
- import { _ as _sfc_main$1 } from './IconTitle.vue_vue_type_script_setup_true_lang-adb17252.js';
2
- import { v as defineComponent, bL as useVModel, b as resolveDirective, o as openBlock, e as createElementBlock, x as createBaseVNode, q as normalizeClass, u as createVNode, h as withCtx, f as renderSlot, g as createCommentVNode, c as createBlock, z as unref, d as withDirectives, F as Fragment, a9 as createTextVNode, y as toDisplayString, p as pushScopeId, a as popScopeId, bJ as _sfc_main$2, bK as _export_sfc } from './index-77d53487.js';
3
-
4
- const _withScopeId = (n) => (pushScopeId("data-v-e966339e"), n = n(), popScopeId(), n);
5
- const _hoisted_1 = ["open"];
6
- const _hoisted_2 = { "text-base": "" };
7
- const _hoisted_3 = {
8
- key: 0,
9
- "text-sm": "",
10
- op50: ""
11
- };
12
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "flex-auto" }, null, -1));
13
- const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "x-divider" }, null, -1));
14
- const _sfc_main = /* @__PURE__ */ defineComponent({
15
- __name: "SectionBlock",
16
- props: {
17
- icon: {},
18
- text: {},
19
- description: {},
20
- containerClass: { default: "" },
21
- collapse: { type: Boolean, default: true },
22
- open: { type: Boolean, default: true },
23
- padding: { type: [Boolean, String], default: true }
24
- },
25
- setup(__props) {
26
- const props = __props;
27
- const open = useVModel(props, "open", void 0, { passive: true });
28
- function onToggle(e) {
29
- open.value = e.target.open;
30
- }
31
- return (_ctx, _cache) => {
32
- const _component_VDIcon = _sfc_main$2;
33
- const _component_VDIconTitle = _sfc_main$1;
34
- const _directive_lazy_show = resolveDirective("lazy-show");
35
- return openBlock(), createElementBlock(Fragment, null, [
36
- createBaseVNode("details", {
37
- open: unref(open),
38
- onToggle
39
- }, [
40
- createBaseVNode("summary", {
41
- class: normalizeClass(["cursor-pointer select-none hover:bg-active p4", _ctx.collapse ? "" : "pointer-events-none"])
42
- }, [
43
- createVNode(_component_VDIconTitle, {
44
- icon: _ctx.icon,
45
- text: _ctx.text,
46
- "text-xl": "",
47
- transition: "",
48
- class: normalizeClass(unref(open) ? "op100" : "op60")
49
- }, {
50
- default: withCtx(() => [
51
- createBaseVNode("div", null, [
52
- createBaseVNode("div", _hoisted_2, [
53
- renderSlot(_ctx.$slots, "text", {}, () => [
54
- createTextVNode(toDisplayString(_ctx.text), 1)
55
- ], true)
56
- ]),
57
- _ctx.description || _ctx.$slots.description ? (openBlock(), createElementBlock("div", _hoisted_3, [
58
- renderSlot(_ctx.$slots, "description", {}, () => [
59
- createTextVNode(toDisplayString(_ctx.description), 1)
60
- ], true)
61
- ])) : createCommentVNode("", true)
62
- ]),
63
- _hoisted_4,
64
- renderSlot(_ctx.$slots, "actions", {}, void 0, true),
65
- _ctx.collapse ? (openBlock(), createBlock(_component_VDIcon, {
66
- key: 0,
67
- icon: "carbon-chevron-down",
68
- class: "chevron",
69
- "cursor-pointer": "",
70
- "place-self-start": "",
71
- "text-base": "",
72
- op75: "",
73
- transition: "",
74
- "duration-500": ""
75
- })) : createCommentVNode("", true)
76
- ]),
77
- _: 3
78
- }, 8, ["icon", "text", "class"])
79
- ], 2),
80
- withDirectives((openBlock(), createElementBlock("div", {
81
- class: normalizeClass(["flex flex-col flex-gap2 pb6 pt2", typeof _ctx.padding === "string" ? _ctx.padding : _ctx.padding ? "px4" : ""])
82
- }, [
83
- renderSlot(_ctx.$slots, "details", {}, void 0, true),
84
- createBaseVNode("div", {
85
- class: normalizeClass([_ctx.containerClass, "mt1"])
86
- }, [
87
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
88
- ], 2),
89
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
90
- ], 2)), [
91
- [_directive_lazy_show, unref(open)]
92
- ])
93
- ], 40, _hoisted_1),
94
- _hoisted_5
95
- ], 64);
96
- };
97
- }
98
- });
99
-
100
- /* Injected with object hook! */
101
-
102
- /* unplugin-vue-components disabled */const SectionBlock_vue_vue_type_style_index_0_scoped_e966339e_lang = '';
103
- /* Injected with object hook! */
104
-
105
- const __unplugin_components_3 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e966339e"]]);
106
-
107
- /* Injected with object hook! */
108
-
109
- export { __unplugin_components_3 as _ };