@qverse-component/lit-components 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +78 -0
  2. package/dist/components/base/index.d.ts +8 -0
  3. package/dist/components/base/index.d.ts.map +1 -0
  4. package/dist/components/base/index.js +7 -0
  5. package/dist/components/base/index.js.map +1 -0
  6. package/dist/components/base/lit-button.d.ts +18 -0
  7. package/dist/components/base/lit-button.d.ts.map +1 -0
  8. package/dist/components/base/lit-button.js +161 -0
  9. package/dist/components/base/lit-button.js.map +1 -0
  10. package/dist/components/common/index.d.ts +9 -0
  11. package/dist/components/common/index.d.ts.map +1 -0
  12. package/dist/components/common/index.js +15 -0
  13. package/dist/components/common/index.js.map +1 -0
  14. package/dist/components/common/lit-switch-dollhouse-view/assets/icon.png.js +5 -0
  15. package/dist/components/common/lit-switch-dollhouse-view/assets/icon.png.js.map +1 -0
  16. package/dist/components/common/lit-switch-dollhouse-view/constants.d.ts +6 -0
  17. package/dist/components/common/lit-switch-dollhouse-view/constants.d.ts.map +1 -0
  18. package/dist/components/common/lit-switch-dollhouse-view/constants.js +11 -0
  19. package/dist/components/common/lit-switch-dollhouse-view/constants.js.map +1 -0
  20. package/dist/components/common/lit-switch-dollhouse-view/events.d.ts +3 -0
  21. package/dist/components/common/lit-switch-dollhouse-view/events.d.ts.map +1 -0
  22. package/dist/components/common/lit-switch-dollhouse-view/events.js +26 -0
  23. package/dist/components/common/lit-switch-dollhouse-view/events.js.map +1 -0
  24. package/dist/components/common/lit-switch-dollhouse-view/index.d.ts +18 -0
  25. package/dist/components/common/lit-switch-dollhouse-view/index.d.ts.map +1 -0
  26. package/dist/components/common/lit-switch-dollhouse-view/index.js +58 -0
  27. package/dist/components/common/lit-switch-dollhouse-view/index.js.map +1 -0
  28. package/dist/components/common/lit-switch-dollhouse-view/interaction.d.ts +7 -0
  29. package/dist/components/common/lit-switch-dollhouse-view/interaction.d.ts.map +1 -0
  30. package/dist/components/common/lit-switch-dollhouse-view/interaction.js +20 -0
  31. package/dist/components/common/lit-switch-dollhouse-view/interaction.js.map +1 -0
  32. package/dist/components/common/lit-switch-dollhouse-view/logic.d.ts +2 -0
  33. package/dist/components/common/lit-switch-dollhouse-view/logic.d.ts.map +1 -0
  34. package/dist/components/common/lit-switch-dollhouse-view/logic.js +7 -0
  35. package/dist/components/common/lit-switch-dollhouse-view/logic.js.map +1 -0
  36. package/dist/components/common/lit-switch-dollhouse-view/properties.d.ts +5 -0
  37. package/dist/components/common/lit-switch-dollhouse-view/properties.d.ts.map +1 -0
  38. package/dist/components/common/lit-switch-dollhouse-view/properties.js +14 -0
  39. package/dist/components/common/lit-switch-dollhouse-view/properties.js.map +1 -0
  40. package/dist/components/common/lit-switch-dollhouse-view/styles.d.ts +2 -0
  41. package/dist/components/common/lit-switch-dollhouse-view/styles.d.ts.map +1 -0
  42. package/dist/components/common/lit-switch-dollhouse-view/styles.js +41 -0
  43. package/dist/components/common/lit-switch-dollhouse-view/styles.js.map +1 -0
  44. package/dist/components/common/lit-switch-dollhouse-view/template.d.ts +3 -0
  45. package/dist/components/common/lit-switch-dollhouse-view/template.d.ts.map +1 -0
  46. package/dist/components/common/lit-switch-dollhouse-view/template.js +18 -0
  47. package/dist/components/common/lit-switch-dollhouse-view/template.js.map +1 -0
  48. package/dist/components/common/lit-switch-floorplan-view/assets/icon.png.js +5 -0
  49. package/dist/components/common/lit-switch-floorplan-view/assets/icon.png.js.map +1 -0
  50. package/dist/components/common/lit-switch-floorplan-view/constants.d.ts +6 -0
  51. package/dist/components/common/lit-switch-floorplan-view/constants.d.ts.map +1 -0
  52. package/dist/components/common/lit-switch-floorplan-view/constants.js +11 -0
  53. package/dist/components/common/lit-switch-floorplan-view/constants.js.map +1 -0
  54. package/dist/components/common/lit-switch-floorplan-view/events.d.ts +3 -0
  55. package/dist/components/common/lit-switch-floorplan-view/events.d.ts.map +1 -0
  56. package/dist/components/common/lit-switch-floorplan-view/events.js +26 -0
  57. package/dist/components/common/lit-switch-floorplan-view/events.js.map +1 -0
  58. package/dist/components/common/lit-switch-floorplan-view/index.d.ts +18 -0
  59. package/dist/components/common/lit-switch-floorplan-view/index.d.ts.map +1 -0
  60. package/dist/components/common/lit-switch-floorplan-view/index.js +58 -0
  61. package/dist/components/common/lit-switch-floorplan-view/index.js.map +1 -0
  62. package/dist/components/common/lit-switch-floorplan-view/interaction.d.ts +7 -0
  63. package/dist/components/common/lit-switch-floorplan-view/interaction.d.ts.map +1 -0
  64. package/dist/components/common/lit-switch-floorplan-view/interaction.js +20 -0
  65. package/dist/components/common/lit-switch-floorplan-view/interaction.js.map +1 -0
  66. package/dist/components/common/lit-switch-floorplan-view/logic.d.ts +2 -0
  67. package/dist/components/common/lit-switch-floorplan-view/logic.d.ts.map +1 -0
  68. package/dist/components/common/lit-switch-floorplan-view/logic.js +7 -0
  69. package/dist/components/common/lit-switch-floorplan-view/logic.js.map +1 -0
  70. package/dist/components/common/lit-switch-floorplan-view/properties.d.ts +5 -0
  71. package/dist/components/common/lit-switch-floorplan-view/properties.d.ts.map +1 -0
  72. package/dist/components/common/lit-switch-floorplan-view/properties.js +14 -0
  73. package/dist/components/common/lit-switch-floorplan-view/properties.js.map +1 -0
  74. package/dist/components/common/lit-switch-floorplan-view/styles.d.ts +2 -0
  75. package/dist/components/common/lit-switch-floorplan-view/styles.d.ts.map +1 -0
  76. package/dist/components/common/lit-switch-floorplan-view/styles.js +41 -0
  77. package/dist/components/common/lit-switch-floorplan-view/styles.js.map +1 -0
  78. package/dist/components/common/lit-switch-floorplan-view/template.d.ts +3 -0
  79. package/dist/components/common/lit-switch-floorplan-view/template.d.ts.map +1 -0
  80. package/dist/components/common/lit-switch-floorplan-view/template.js +18 -0
  81. package/dist/components/common/lit-switch-floorplan-view/template.js.map +1 -0
  82. package/dist/components/common/lit-switch-panorama-view/assets/panorama-btn.svg.js +5 -0
  83. package/dist/components/common/lit-switch-panorama-view/assets/panorama-btn.svg.js.map +1 -0
  84. package/dist/components/common/lit-switch-panorama-view/constants.d.ts +6 -0
  85. package/dist/components/common/lit-switch-panorama-view/constants.d.ts.map +1 -0
  86. package/dist/components/common/lit-switch-panorama-view/constants.js +11 -0
  87. package/dist/components/common/lit-switch-panorama-view/constants.js.map +1 -0
  88. package/dist/components/common/lit-switch-panorama-view/events.d.ts +3 -0
  89. package/dist/components/common/lit-switch-panorama-view/events.d.ts.map +1 -0
  90. package/dist/components/common/lit-switch-panorama-view/events.js +26 -0
  91. package/dist/components/common/lit-switch-panorama-view/events.js.map +1 -0
  92. package/dist/components/common/lit-switch-panorama-view/index.d.ts +18 -0
  93. package/dist/components/common/lit-switch-panorama-view/index.d.ts.map +1 -0
  94. package/dist/components/common/lit-switch-panorama-view/index.js +58 -0
  95. package/dist/components/common/lit-switch-panorama-view/index.js.map +1 -0
  96. package/dist/components/common/lit-switch-panorama-view/interaction.d.ts +8 -0
  97. package/dist/components/common/lit-switch-panorama-view/interaction.d.ts.map +1 -0
  98. package/dist/components/common/lit-switch-panorama-view/interaction.js +20 -0
  99. package/dist/components/common/lit-switch-panorama-view/interaction.js.map +1 -0
  100. package/dist/components/common/lit-switch-panorama-view/logic.d.ts +2 -0
  101. package/dist/components/common/lit-switch-panorama-view/logic.d.ts.map +1 -0
  102. package/dist/components/common/lit-switch-panorama-view/logic.js +12 -0
  103. package/dist/components/common/lit-switch-panorama-view/logic.js.map +1 -0
  104. package/dist/components/common/lit-switch-panorama-view/properties.d.ts +5 -0
  105. package/dist/components/common/lit-switch-panorama-view/properties.d.ts.map +1 -0
  106. package/dist/components/common/lit-switch-panorama-view/properties.js +14 -0
  107. package/dist/components/common/lit-switch-panorama-view/properties.js.map +1 -0
  108. package/dist/components/common/lit-switch-panorama-view/styles.d.ts +2 -0
  109. package/dist/components/common/lit-switch-panorama-view/styles.d.ts.map +1 -0
  110. package/dist/components/common/lit-switch-panorama-view/styles.js +40 -0
  111. package/dist/components/common/lit-switch-panorama-view/styles.js.map +1 -0
  112. package/dist/components/common/lit-switch-panorama-view/template.d.ts +3 -0
  113. package/dist/components/common/lit-switch-panorama-view/template.d.ts.map +1 -0
  114. package/dist/components/common/lit-switch-panorama-view/template.js +18 -0
  115. package/dist/components/common/lit-switch-panorama-view/template.js.map +1 -0
  116. package/dist/components/index.d.ts +10 -0
  117. package/dist/components/index.d.ts.map +1 -0
  118. package/dist/components/index.js +26 -0
  119. package/dist/components/index.js.map +1 -0
  120. package/dist/index.d.ts +2 -0
  121. package/dist/index.d.ts.map +1 -0
  122. package/dist/index.js +18 -0
  123. package/dist/index.js.map +1 -0
  124. package/dist/styles/tokens.d.ts +3 -0
  125. package/dist/styles/tokens.d.ts.map +1 -0
  126. package/dist/styles/tokens.generated.d.ts +3 -0
  127. package/dist/styles/tokens.generated.d.ts.map +1 -0
  128. package/dist/styles/tokens.generated.js +28 -0
  129. package/dist/styles/tokens.generated.js.map +1 -0
  130. package/dist/utils/define-lit-element.d.ts +5 -0
  131. package/dist/utils/define-lit-element.d.ts.map +1 -0
  132. package/dist/utils/define-lit-element.js +12 -0
  133. package/dist/utils/define-lit-element.js.map +1 -0
  134. package/package.json +58 -0
  135. package/theme/generated/element-plus-vars.css +60 -0
  136. package/theme/tokens.json +65 -0
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @qverse/lit-components
2
+
3
+ 基于 [Lit](https://github.com/lit/lit) 的 Web Component,源码在 `src/components/`。
4
+
5
+ ## 目录
6
+
7
+ ```
8
+ src/components/
9
+ index.ts # 全量注册
10
+ base/ # lit-button
11
+ common/ # lit-switch-*-view 等通用组件
12
+ samples/ # Vue 3 演示应用(可独立构建)
13
+ ```
14
+
15
+ ## 安装
16
+
17
+ ```json
18
+ "@qverse/lit-components": "file:../Qverse-Lit-Component"
19
+ ```
20
+
21
+ ## 使用
22
+
23
+ ```ts
24
+ import '@qverse/lit-components'
25
+
26
+ import '@qverse/lit-components/base'
27
+ import '@qverse/lit-components/common'
28
+ import '@qverse/lit-components/components'
29
+ ```
30
+
31
+ | 入口 | 说明 |
32
+ |------|------|
33
+ | `.` | 全部组件 |
34
+ | `/components` | 同 `.` |
35
+ | `/base` | `lit-button` |
36
+ | `/common` | `lit-switch-panorama-view`、`lit-switch-dollhouse-view`、`lit-switch-floorplan-view` |
37
+
38
+ 宿主应用自行引入 `element-plus/dist/index.css` 并配置主题;**不必**引入本包的 `theme.css`。
39
+
40
+ Lit 组件会读取页面上的 `--el-*`(若存在);否则使用 `tokens.generated.ts` 内 fallback。
41
+
42
+ 若需全站与 Lit 共用一套令牌,可**可选**引入 `@qverse/lit-components/theme.css`(见 `theme/README.md`)。
43
+
44
+ ## 组件事件
45
+
46
+ 组件内使用 `dispatchEvent` 派发 `CustomEvent`(`bubbles: true`、`composed: true`),宿主用 Vue `@事件名` 监听,例如 `@lit-click`、`@lit-switch-panorama-complete`。
47
+
48
+ ## 构建
49
+
50
+ ```bash
51
+ npm install
52
+ npm run build
53
+ ```
54
+
55
+ ## Samples(Vue 3 演示)
56
+
57
+ 库内 `samples/` 为独立 Vue 3 应用,用于预览组件:
58
+
59
+ ```bash
60
+ cd samples
61
+ npm install
62
+ npm run dev # http://localhost:3100
63
+ npm run build # 输出 samples/dist
64
+ ```
65
+
66
+ 详见 [samples/README.md](./samples/README.md)。
67
+
68
+ ## 本地开发(与 main-app 联调)
69
+
70
+ **仅 main-app(Vite)** 在 `vite.config.ts` 里 alias 到 `src/`;改组件后 **保存 → 硬刷新(Ctrl+Shift+R)** 即可。
71
+
72
+ **子应用(vue-cli)** 始终读 `dist/`,改 lit 后需:
73
+
74
+ 1. `cd Qverse-Lit-Component && npm run build`(或另开终端 `npm run dev` 即 `vite build --watch`)
75
+ 2. **重启** main-app / 子应用的 dev 服务
76
+ 3. 硬刷新页面(`customElements` 注册后无法 HMR 替换类)
77
+
78
+ DevTools Sources 里看到的是 **源码 + source map**,若与运行不一致,说明浏览器还在跑旧模块,按上面步骤处理。
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @qverse/lit-components/base — 基础组件
3
+ */
4
+ import './lit-button.js';
5
+ export { LitButton } from './lit-button.js';
6
+ export type { LitButtonVariant, LitButtonSize } from './lit-button.js';
7
+ export declare const LIT_BASE_TAGS: readonly ["lit-button"];
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,iBAAiB,CAAA;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEtE,eAAO,MAAM,aAAa,yBAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { LitButton } from "./lit-button.js";
2
+ const LIT_BASE_TAGS = ["lit-button"];
3
+ export {
4
+ LIT_BASE_TAGS,
5
+ LitButton
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/base/index.ts"],"sourcesContent":["/**\r\n * @qverse/lit-components/base — 基础组件\r\n */\r\nimport './lit-button.js'\r\n\r\nexport { LitButton } from './lit-button.js'\r\n\r\nexport type { LitButtonVariant, LitButtonSize } from './lit-button.js'\r\n\r\nexport const LIT_BASE_TAGS = ['lit-button'] as const\r\n"],"names":[],"mappings":";AASO,MAAM,gBAAgB,CAAC,YAAY;"}
@@ -0,0 +1,18 @@
1
+ import { LitElement } from 'lit';
2
+ export type LitButtonVariant = 'primary' | 'success' | 'danger' | 'default';
3
+ export type LitButtonSize = 'small' | 'medium' | 'large';
4
+ export declare class LitButton extends LitElement {
5
+ variant: LitButtonVariant;
6
+ size: LitButtonSize;
7
+ disabled: boolean;
8
+ block: boolean;
9
+ static styles: import("lit").CSSResult[];
10
+ private _onClick;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'lit-button': LitButton;
16
+ }
17
+ }
18
+ //# sourceMappingURL=lit-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lit-button.d.ts","sourceRoot":"","sources":["../../../src/components/base/lit-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAA;AAK3C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAC3E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExD,qBACa,SAAU,SAAQ,UAAU;IAEvC,OAAO,EAAE,gBAAgB,CAAY;IAGrC,IAAI,EAAE,aAAa,CAAW;IAG9B,QAAQ,UAAQ;IAGhB,KAAK,UAAQ;IAEb,MAAM,CAAC,MAAM,4BAoFZ;IAED,OAAO,CAAC,QAAQ;IAwChB,MAAM;CAQP;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,qBAAqB;QAE7B,YAAY,EAAE,SAAS,CAAA;KAExB;CAEF"}
@@ -0,0 +1,161 @@
1
+ import { css, LitElement, html } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import { safeCustomElement } from "../../utils/define-lit-element.js";
4
+ import { designTokens } from "../../styles/tokens.generated.js";
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __decorateClass = (decorators, target, key, kind) => {
8
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
+ if (decorator = decorators[i])
11
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
+ if (kind && result) __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ let LitButton = class extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.variant = "default";
19
+ this.size = "medium";
20
+ this.disabled = false;
21
+ this.block = false;
22
+ }
23
+ _onClick(event) {
24
+ if (this.disabled) {
25
+ event.preventDefault();
26
+ event.stopPropagation();
27
+ return;
28
+ }
29
+ event.stopPropagation();
30
+ this.dispatchEvent(
31
+ new MouseEvent("click", {
32
+ bubbles: true,
33
+ composed: true,
34
+ cancelable: true,
35
+ detail: event.detail
36
+ })
37
+ );
38
+ this.dispatchEvent(
39
+ new CustomEvent("lit-click", {
40
+ bubbles: true,
41
+ composed: true,
42
+ cancelable: true,
43
+ detail: {
44
+ originalEvent: event,
45
+ payload: { variant: this.variant }
46
+ }
47
+ })
48
+ );
49
+ }
50
+ render() {
51
+ return html`
52
+ <button type="button" ?disabled=${this.disabled} part="button" @click=${this._onClick}>
53
+ <slot></slot>
54
+ </button>
55
+ `;
56
+ }
57
+ };
58
+ LitButton.styles = [
59
+ designTokens,
60
+ css`
61
+ :host {
62
+ display: inline-block;
63
+ }
64
+ :host([block]) {
65
+ display: block;
66
+ }
67
+ button {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ gap: 6px;
72
+ box-sizing: border-box;
73
+ border: 1px solid var(--lit-border);
74
+ border-radius: var(--lit-radius);
75
+ background: var(--lit-bg);
76
+ color: var(--lit-text-regular);
77
+ cursor: pointer;
78
+ font-family: inherit;
79
+ font-size: inherit;
80
+ font-weight: 500;
81
+ line-height: 1;
82
+ padding: 0 15px;
83
+ transition:
84
+ background-color 0.15s,
85
+ border-color 0.15s,
86
+ color 0.15s;
87
+ width: 100%;
88
+ }
89
+ button:hover:not(:disabled) {
90
+ border-color: var(--lit-color-primary);
91
+ color: var(--lit-color-primary);
92
+ background: var(--lit-color-primary-light-9, #ecf5ff);
93
+ }
94
+ button:disabled {
95
+ opacity: 0.5;
96
+ cursor: not-allowed;
97
+ }
98
+ :host([variant='primary']) button {
99
+ background: var(--lit-color-primary);
100
+ border-color: var(--lit-color-primary);
101
+ color: #fff;
102
+ }
103
+ :host([variant='primary']) button:hover:not(:disabled) {
104
+ background: var(--lit-color-primary-hover);
105
+ border-color: var(--lit-color-primary-hover);
106
+ color: #fff;
107
+ }
108
+ :host([variant='success']) button {
109
+ background: var(--lit-color-success);
110
+ border-color: var(--lit-color-success);
111
+ color: #fff;
112
+ }
113
+ :host([variant='success']) button:hover:not(:disabled) {
114
+ background: var(--lit-color-success-hover);
115
+ border-color: var(--lit-color-success-hover);
116
+ color: #fff;
117
+ }
118
+ :host([variant='danger']) button {
119
+ background: var(--lit-color-danger);
120
+ border-color: var(--lit-color-danger);
121
+ color: #fff;
122
+ }
123
+ :host([variant='danger']) button:hover:not(:disabled) {
124
+ background: var(--lit-color-danger-hover);
125
+ border-color: var(--lit-color-danger-hover);
126
+ color: #fff;
127
+ }
128
+ :host([size='small']) button {
129
+ height: var(--lit-button-height-small);
130
+ padding: 0 11px;
131
+ font-size: 12px;
132
+ }
133
+ :host([size='medium']) button {
134
+ height: var(--lit-button-height);
135
+ }
136
+ :host([size='large']) button {
137
+ height: var(--lit-button-height-large);
138
+ padding: 0 19px;
139
+ font-size: 16px;
140
+ }
141
+ `
142
+ ];
143
+ __decorateClass([
144
+ property({ type: String, reflect: true })
145
+ ], LitButton.prototype, "variant", 2);
146
+ __decorateClass([
147
+ property({ type: String, reflect: true })
148
+ ], LitButton.prototype, "size", 2);
149
+ __decorateClass([
150
+ property({ type: Boolean, reflect: true })
151
+ ], LitButton.prototype, "disabled", 2);
152
+ __decorateClass([
153
+ property({ type: Boolean, reflect: true })
154
+ ], LitButton.prototype, "block", 2);
155
+ LitButton = __decorateClass([
156
+ safeCustomElement("lit-button")
157
+ ], LitButton);
158
+ export {
159
+ LitButton
160
+ };
161
+ //# sourceMappingURL=lit-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lit-button.js","sources":["../../../src/components/base/lit-button.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit'\r\nimport { property } from 'lit/decorators.js'\r\nimport { safeCustomElement } from '../../utils/define-lit-element.js'\r\nimport { designTokens } from '../../styles/tokens.js'\r\n\r\nexport type LitButtonVariant = 'primary' | 'success' | 'danger' | 'default'\r\nexport type LitButtonSize = 'small' | 'medium' | 'large'\r\n\r\n@safeCustomElement('lit-button')\r\nexport class LitButton extends LitElement {\r\n @property({ type: String, reflect: true })\r\n variant: LitButtonVariant = 'default'\r\n\r\n @property({ type: String, reflect: true })\r\n size: LitButtonSize = 'medium'\r\n\r\n @property({ type: Boolean, reflect: true })\r\n disabled = false\r\n\r\n @property({ type: Boolean, reflect: true })\r\n block = false\r\n\r\n static styles = [\r\n designTokens,\r\n css`\r\n :host {\r\n display: inline-block;\r\n }\r\n :host([block]) {\r\n display: block;\r\n }\r\n button {\r\n display: inline-flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 6px;\r\n box-sizing: border-box;\r\n border: 1px solid var(--lit-border);\r\n border-radius: var(--lit-radius);\r\n background: var(--lit-bg);\r\n color: var(--lit-text-regular);\r\n cursor: pointer;\r\n font-family: inherit;\r\n font-size: inherit;\r\n font-weight: 500;\r\n line-height: 1;\r\n padding: 0 15px;\r\n transition:\r\n background-color 0.15s,\r\n border-color 0.15s,\r\n color 0.15s;\r\n width: 100%;\r\n }\r\n button:hover:not(:disabled) {\r\n border-color: var(--lit-color-primary);\r\n color: var(--lit-color-primary);\r\n background: var(--lit-color-primary-light-9, #ecf5ff);\r\n }\r\n button:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\r\n }\r\n :host([variant='primary']) button {\r\n background: var(--lit-color-primary);\r\n border-color: var(--lit-color-primary);\r\n color: #fff;\r\n }\r\n :host([variant='primary']) button:hover:not(:disabled) {\r\n background: var(--lit-color-primary-hover);\r\n border-color: var(--lit-color-primary-hover);\r\n color: #fff;\r\n }\r\n :host([variant='success']) button {\r\n background: var(--lit-color-success);\r\n border-color: var(--lit-color-success);\r\n color: #fff;\r\n }\r\n :host([variant='success']) button:hover:not(:disabled) {\r\n background: var(--lit-color-success-hover);\r\n border-color: var(--lit-color-success-hover);\r\n color: #fff;\r\n }\r\n :host([variant='danger']) button {\r\n background: var(--lit-color-danger);\r\n border-color: var(--lit-color-danger);\r\n color: #fff;\r\n }\r\n :host([variant='danger']) button:hover:not(:disabled) {\r\n background: var(--lit-color-danger-hover);\r\n border-color: var(--lit-color-danger-hover);\r\n color: #fff;\r\n }\r\n :host([size='small']) button {\r\n height: var(--lit-button-height-small);\r\n padding: 0 11px;\r\n font-size: 12px;\r\n }\r\n :host([size='medium']) button {\r\n height: var(--lit-button-height);\r\n }\r\n :host([size='large']) button {\r\n height: var(--lit-button-height-large);\r\n padding: 0 19px;\r\n font-size: 16px;\r\n }\r\n `,\r\n ]\r\n\r\n private _onClick(event: MouseEvent) {\r\n\r\n if (this.disabled) {\r\n\r\n event.preventDefault()\r\n event.stopPropagation()\r\n\r\n return\r\n\r\n }\r\n\r\n event.stopPropagation()\r\n\r\n this.dispatchEvent(\r\n\r\n new MouseEvent('click', {\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n detail: event.detail,\r\n }),\r\n\r\n )\r\n\r\n this.dispatchEvent(\r\n\r\n new CustomEvent('lit-click', {\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n detail: {\r\n originalEvent: event,\r\n payload: { variant: this.variant },\r\n },\r\n }),\r\n\r\n )\r\n\r\n }\r\n\r\n render() {\r\n\r\n return html`\r\n <button type=\"button\" ?disabled=${this.disabled} part=\"button\" @click=${this._onClick}>\r\n <slot></slot>\r\n </button>\r\n `\r\n }\r\n}\r\n\r\ndeclare global {\r\n\r\n interface HTMLElementTagNameMap {\r\n\r\n 'lit-button': LitButton\r\n\r\n }\r\n\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;AASO,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEL,SAAA,UAA4B;AAG5B,SAAA,OAAsB;AAGtB,SAAA,WAAW;AAGX,SAAA,QAAQ;AAAA,EAAA;AAAA,EAwFA,SAAS,OAAmB;AAElC,QAAI,KAAK,UAAU;AAEjB,YAAM,eAA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,SAAS,MAAM;AAAA,GAJ9B,UAKX,WAAA,QAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAP/B,UAQX,WAAA,YAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAV/B,UAWX,WAAA,SAAA,CAAA;AAXW,YAAN,gBAAA;AAAA,EADN,kBAAkB,YAAY;AAAA,GAClB,SAAA;"}
@@ -0,0 +1,9 @@
1
+ import './lit-switch-panorama-view/index.js';
2
+ import './lit-switch-dollhouse-view/index.js';
3
+ import './lit-switch-floorplan-view/index.js';
4
+ export { LitSwitchPanoramaView } from './lit-switch-panorama-view/index.js';
5
+ export { LitSwitchDollhouseView } from './lit-switch-dollhouse-view/index.js';
6
+ export { LitSwitchFloorplanView } from './lit-switch-floorplan-view/index.js';
7
+ export declare const LIT_COMMON_TAGS: readonly ["lit-switch-panorama-view", "lit-switch-dollhouse-view", "lit-switch-floorplan-view"];
8
+ export type LitSwitchViewMode = 'panorama' | 'dollhouse' | 'floorplan';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/common/index.ts"],"names":[],"mappings":"AAMA,OAAO,qCAAqC,CAAA;AAC5C,OAAO,sCAAsC,CAAA;AAC7C,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAE7E,eAAO,MAAM,eAAe,iGAIlB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { LitSwitchPanoramaView } from "./lit-switch-panorama-view/index.js";
2
+ import { LitSwitchDollhouseView } from "./lit-switch-dollhouse-view/index.js";
3
+ import { LitSwitchFloorplanView } from "./lit-switch-floorplan-view/index.js";
4
+ const LIT_COMMON_TAGS = [
5
+ "lit-switch-panorama-view",
6
+ "lit-switch-dollhouse-view",
7
+ "lit-switch-floorplan-view"
8
+ ];
9
+ export {
10
+ LIT_COMMON_TAGS,
11
+ LitSwitchDollhouseView,
12
+ LitSwitchFloorplanView,
13
+ LitSwitchPanoramaView
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/common/index.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: @qverse/lit-components/common 聚合入口与导出\n */\n\nimport './lit-switch-panorama-view/index.js'\r\nimport './lit-switch-dollhouse-view/index.js'\r\nimport './lit-switch-floorplan-view/index.js'\r\n\r\nexport { LitSwitchPanoramaView } from './lit-switch-panorama-view/index.js'\r\nexport { LitSwitchDollhouseView } from './lit-switch-dollhouse-view/index.js'\r\nexport { LitSwitchFloorplanView } from './lit-switch-floorplan-view/index.js'\r\n\r\nexport const LIT_COMMON_TAGS = [\r\n 'lit-switch-panorama-view',\r\n 'lit-switch-dollhouse-view',\r\n 'lit-switch-floorplan-view',\r\n] as const\r\n\r\nexport type LitSwitchViewMode = 'panorama' | 'dollhouse' | 'floorplan'\r\n"],"names":[],"mappings":";;;AAcO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -0,0 +1,5 @@
1
+ const iconUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAYsSURBVGiB7ZnLqxxFFMZ/X89cvElM7s01PhIlalyYTaImKMGtEDeiuHGRjaIRfPwBGkRMQF34NlExilExKggRIZgEgtFAEFxcRJciRt34gFxuIJKHM31cdNVMTd/unpqZvpL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ArhD6eD4pp+0iYyYVeLT2ki//nt9lCZ+tNqeFaNkWu5wrnZKD5JL+/99nQes+N+iNDUBDg0R6TjPimVupMPDdiLeFeydl5jZygr9ywOfE1WN6zvC3mn2o9jR8pReKelgUEbVe/7kRFLLfb8L2FrgI5SzzidV7ewLeBB6mtlSYLuZpZLMNXiShZv7kAGdJ7eWdh4zOxNzShLTztrmsAO7B9jiGtfvnie8KcjPPyOL9ilZpG5W6PvnPBFROnYOVzbezKaAl4AtwbnS961W6/1ms9mp12q1kmazqVarJbJTk55TkNz7Y2Tz0YAfgW+CNnSeNE3vlLRe0l9O90/g12EB9x1hB/Z14FbcXU+apseSJHlqYmLiTB/7pWJmD7v2GfCzpAMFOtuSJLkB8GBT4HFJ/5TZjQ1ahYDNbDXwMXCFc9YBK2losKELSnJpM9sGPALMOb0VwHZJf1cZjMm0ChMPB3Y/GVj/rU6w4QFivqPzYC8BHpV0sp/RqCMecj1tZjcCnwJXBg36CqgLrBcDLE3TTjtDsC6VmwZelfRTjMGB98Puxn8vEN7iLQbYTgKTJInv6HBkU0mXkV27HI01Gn0Q73430QsW4DD1g82ficvMtpKBPeXKVwG7JR0exG6/RGIG+A5okXXOPLCMLr2PkIGtPKseRszsEF3AZ8iud065/yuBDyR9OKjdQSjdMrMO2DRNv2CRwIa+3Ty9li7Y5QwJFgbbPPgTRMzsdJIkk8DOgo1BzyYhTVMlSZLXKdLNf18KzDuffp2dBvYPCzY0XihmtsrMTkj6l97cNuoGsEp30HKgmabpoUaj8fawYCGC0gXOS28Gi8pqunVcAnw7KliIo/QR9xtDReUorFidPvVOSHplYHRjGctYxjKWsVzc8h+Dxlkd9eHyKQAAAABJRU5ErkJggg==";
2
+ export {
3
+ iconUrl as default
4
+ };
5
+ //# sourceMappingURL=icon.png.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.png.js","sources":["../../../../../src/components/common/lit-switch-dollhouse-view/assets/icon.png?url"],"sourcesContent":["export default \"data:image/png;base64,iVBORw0KG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WsVzc8h+Dxlkd9eHyKQAAAABJRU5ErkJggg==\""],"names":[],"mappings":"AAAA,MAAA,UAAe;"}
@@ -0,0 +1,6 @@
1
+ export declare const TAG: "lit-switch-dollhouse-view";
2
+ export declare const VIEW: "dollhouse";
3
+ export declare const ICON_CSS_VAR: "--lit-mode-dollhouse-icon";
4
+ export declare const CLICK_EVENT: "lit-switch-dollhouse-click";
5
+ export declare const COMPLETE_EVENT: "lit-switch-dollhouse-complete";
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,GAAG,EAAG,2BAAoC,CAAA;AAEvD,eAAO,MAAM,IAAI,EAAG,WAAoB,CAAA;AAExC,eAAO,MAAM,YAAY,EAAG,2BAAoC,CAAA;AAEhE,eAAO,MAAM,WAAW,EAAG,4BAAqC,CAAA;AAEhE,eAAO,MAAM,cAAc,EAAG,+BAAwC,CAAA"}
@@ -0,0 +1,11 @@
1
+ const TAG = "lit-switch-dollhouse-view";
2
+ const VIEW = "dollhouse";
3
+ const CLICK_EVENT = "lit-switch-dollhouse-click";
4
+ const COMPLETE_EVENT = "lit-switch-dollhouse-complete";
5
+ export {
6
+ CLICK_EVENT,
7
+ COMPLETE_EVENT,
8
+ TAG,
9
+ VIEW
10
+ };
11
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/constants.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view 常量(标签、事件名、CSS 变量)\n */\n\nexport const TAG = 'lit-switch-dollhouse-view' as const\r\n\r\nexport const VIEW = 'dollhouse' as const\r\n\r\nexport const ICON_CSS_VAR = '--lit-mode-dollhouse-icon' as const\r\n\r\nexport const CLICK_EVENT = 'lit-switch-dollhouse-click' as const\r\n\r\nexport const COMPLETE_EVENT = 'lit-switch-dollhouse-complete' as const\r\n"],"names":[],"mappings":"AAMO,MAAM,MAAM;AAEZ,MAAM,OAAO;AAIb,MAAM,cAAc;AAEpB,MAAM,iBAAiB;"}
@@ -0,0 +1,3 @@
1
+ export declare function dispatchClick(host: HTMLElement, originalEvent: Event): void;
2
+ export declare function dispatchComplete(host: HTMLElement, originalEvent: Event): void;
3
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/events.ts"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,QAWpE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,QAWvE"}
@@ -0,0 +1,26 @@
1
+ import { CLICK_EVENT, VIEW, COMPLETE_EVENT } from "./constants.js";
2
+ function dispatchClick(host, originalEvent) {
3
+ host.dispatchEvent(new CustomEvent(CLICK_EVENT, {
4
+ bubbles: true,
5
+ composed: true,
6
+ detail: {
7
+ view: VIEW,
8
+ originalEvent
9
+ }
10
+ }));
11
+ }
12
+ function dispatchComplete(host, originalEvent) {
13
+ host.dispatchEvent(new CustomEvent(COMPLETE_EVENT, {
14
+ bubbles: true,
15
+ composed: true,
16
+ detail: {
17
+ view: VIEW,
18
+ originalEvent
19
+ }
20
+ }));
21
+ }
22
+ export {
23
+ dispatchClick,
24
+ dispatchComplete
25
+ };
26
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/events.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view 自定义事件派发\n */\n\nimport { CLICK_EVENT, COMPLETE_EVENT, VIEW } from './constants.js'\r\n\r\nexport function dispatchClick(host: HTMLElement, originalEvent: Event) {\r\n\r\n host.dispatchEvent(new CustomEvent(CLICK_EVENT, {\r\n bubbles: true,\r\n composed: true,\r\n detail: {\r\n view: VIEW,\r\n originalEvent,\r\n },\r\n }))\r\n\r\n}\r\n\r\nexport function dispatchComplete(host: HTMLElement, originalEvent: Event) {\r\n\r\n host.dispatchEvent(new CustomEvent(COMPLETE_EVENT, {\r\n bubbles: true,\r\n composed: true,\r\n detail: {\r\n view: VIEW,\r\n originalEvent,\r\n },\r\n }))\r\n\r\n}\r\n"],"names":[],"mappings":";AAQO,SAAS,cAAc,MAAmB,eAAsB;AAErE,OAAK,cAAc,IAAI,YAAY,aAAa;AAAA,IAC9C,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,MACN,MAAM;AAAA,MACN;AAAA,IAAA;AAAA,EACF,CACD,CAAC;AAEJ;AAEO,SAAS,iBAAiB,MAAmB,eAAsB;AAExE,OAAK,cAAc,IAAI,YAAY,gBAAgB;AAAA,IACjD,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,MACN,MAAM;AAAA,MACN;AAAA,IAAA;AAAA,EACF,CACD,CAAC;AAEJ;"}
@@ -0,0 +1,18 @@
1
+ import { LitElement } from 'lit';
2
+ import { TAG } from './constants.js';
3
+ /** 切换到 dollhouse 视图;qspace 须由宿主通过 :qspace 传入;active 时隐藏 */
4
+ export declare class LitSwitchDollhouseView extends LitElement {
5
+ qspace: any;
6
+ buttonEnabled: boolean;
7
+ active: boolean;
8
+ switching: boolean;
9
+ static styles: import("lit").CSSResult;
10
+ private _onClick;
11
+ render(): import("lit-html").TemplateResult;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ [TAG]: LitSwitchDollhouseView;
16
+ }
17
+ }
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAGhC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAMpC,2DAA2D;AAC3D,qBACa,sBAAuB,SAAQ,UAAU;IAGpD,MAAM,EAAE,GAAG,CAAO;IAQlB,aAAa,UAAQ;IAGrB,MAAM,UAAQ;IAGd,SAAS,UAAQ;IAEjB,MAAM,CAAC,MAAM,0BAAS;IAEtB,OAAO,CAAC,QAAQ,CAIf;IAED,MAAM;CAMP;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,qBAAqB;QAE7B,CAAC,GAAG,CAAC,EAAE,sBAAsB,CAAA;KAE9B;CAEF"}
@@ -0,0 +1,58 @@
1
+ import { LitElement } from "lit";
2
+ import { property } from "lit/decorators.js";
3
+ import { safeCustomElement } from "../../../utils/define-lit-element.js";
4
+ import { TAG } from "./constants.js";
5
+ import { handleDollhouseClick } from "./interaction.js";
6
+ import { booleanAttr } from "./properties.js";
7
+ import { styles } from "./styles.js";
8
+ import { renderDollhouseView } from "./template.js";
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __decorateClass = (decorators, target, key, kind) => {
12
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
13
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
14
+ if (decorator = decorators[i])
15
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
16
+ if (kind && result) __defProp(target, key, result);
17
+ return result;
18
+ };
19
+ let LitSwitchDollhouseView = class extends LitElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.qspace = null;
23
+ this.buttonEnabled = false;
24
+ this.active = false;
25
+ this.switching = false;
26
+ this._onClick = (e) => {
27
+ handleDollhouseClick(this, e);
28
+ };
29
+ }
30
+ render() {
31
+ return renderDollhouseView(this._onClick);
32
+ }
33
+ };
34
+ LitSwitchDollhouseView.styles = styles;
35
+ __decorateClass([
36
+ property({ attribute: false })
37
+ ], LitSwitchDollhouseView.prototype, "qspace", 2);
38
+ __decorateClass([
39
+ property({
40
+ type: Boolean,
41
+ attribute: "button-enabled",
42
+ reflect: true,
43
+ converter: booleanAttr
44
+ })
45
+ ], LitSwitchDollhouseView.prototype, "buttonEnabled", 2);
46
+ __decorateClass([
47
+ property({ type: Boolean, reflect: true })
48
+ ], LitSwitchDollhouseView.prototype, "active", 2);
49
+ __decorateClass([
50
+ property({ type: Boolean, reflect: true })
51
+ ], LitSwitchDollhouseView.prototype, "switching", 2);
52
+ LitSwitchDollhouseView = __decorateClass([
53
+ safeCustomElement(TAG)
54
+ ], LitSwitchDollhouseView);
55
+ export {
56
+ LitSwitchDollhouseView
57
+ };
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/index.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view 组件注册与属性声明\n */\n\nimport { LitElement } from 'lit'\r\nimport { property } from 'lit/decorators.js'\r\nimport { safeCustomElement } from '../../../utils/define-lit-element.js'\r\nimport { TAG } from './constants.js'\r\nimport { handleDollhouseClick } from './interaction.js'\r\nimport { booleanAttr } from './properties.js'\r\nimport { styles } from './styles.js'\r\nimport { renderDollhouseView } from './template.js'\r\n\r\n/** 切换到 dollhouse 视图;qspace 须由宿主通过 :qspace 传入;active 时隐藏 */\r\n@safeCustomElement(TAG)\r\nexport class LitSwitchDollhouseView extends LitElement {\r\n\r\n @property({ attribute: false })\r\n qspace: any = null\r\n\r\n @property({\r\n type: Boolean,\r\n attribute: 'button-enabled',\r\n reflect: true,\r\n converter: booleanAttr,\r\n })\r\n buttonEnabled = false\r\n\r\n @property({ type: Boolean, reflect: true })\r\n active = false\r\n\r\n @property({ type: Boolean, reflect: true })\r\n switching = false\r\n\r\n static styles = styles\r\n\r\n private _onClick = (e: Event) => {\r\n\r\n handleDollhouseClick(this, e)\r\n\r\n }\r\n\r\n render() {\r\n\r\n return renderDollhouseView(this._onClick)\r\n\r\n }\r\n\r\n}\r\n\r\ndeclare global {\r\n\r\n interface HTMLElementTagNameMap {\r\n\r\n [TAG]: LitSwitchDollhouseView\r\n\r\n }\r\n\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,yBAAN,cAAqC,WAAW;AAAA,EAAhD,cAAA;AAAA,UAAA,GAAA,SAAA;AAGL,SAAA,SAAc;AAQd,SAAA,gBAAgB;AAGhB,SAAA,SAAS;AAGT,SAAA,YAAY;AAIZ,SAAQ,WAAW,CAAC,MAAa;AAE/B,2BAAqB,MAAM,CAAC;AAAA,IAE9B;AAAA,EAAA;AAAA,EAEA,SAAS;AAEP,WAAO,oBAAoB,KAAK,QAAQ;AAAA,EAE1C;AAEF;AAjCa,uBAmBJ,SAAS;AAhBhB,gBAAA;AAAA,EADC,SAAS,EAAE,WAAW,MAAA,CAAO;AAAA,GAFnB,uBAGX,WAAA,UAAA,CAAA;AAQA,gBAAA;AAAA,EANC,SAAS;AAAA,IACR,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,IACT,WAAW;AAAA,EAAA,CACZ;AAAA,GAVU,uBAWX,WAAA,iBAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAb/B,uBAcX,WAAA,UAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,GAhB/B,uBAiBX,WAAA,aAAA,CAAA;AAjBW,yBAAN,gBAAA;AAAA,EADN,kBAAkB,GAAG;AAAA,GACT,sBAAA;"}
@@ -0,0 +1,7 @@
1
+ export type DollhouseViewHost = HTMLElement & {
2
+ qspace: any;
3
+ buttonEnabled: boolean;
4
+ switching: boolean;
5
+ };
6
+ export declare function handleDollhouseClick(host: DollhouseViewHost, e: Event): void;
7
+ //# sourceMappingURL=interaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/interaction.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAE5C,MAAM,EAAE,GAAG,CAAA;IACX,aAAa,EAAE,OAAO,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;CAEnB,CAAA;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC,EAAE,KAAK,QAyBrE"}
@@ -0,0 +1,20 @@
1
+ import { dispatchClick, dispatchComplete } from "./events.js";
2
+ import { turnToDollhouseView } from "./logic.js";
3
+ function handleDollhouseClick(host, e) {
4
+ if (!host.buttonEnabled || host.switching) {
5
+ e.preventDefault();
6
+ e.stopPropagation();
7
+ return;
8
+ }
9
+ dispatchClick(host, e);
10
+ if (!host.qspace) {
11
+ return;
12
+ }
13
+ turnToDollhouseView(host.qspace, () => {
14
+ dispatchComplete(host, e);
15
+ });
16
+ }
17
+ export {
18
+ handleDollhouseClick
19
+ };
20
+ //# sourceMappingURL=interaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/interaction.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view 点击交互流程\n */\n\nimport { dispatchClick, dispatchComplete } from './events.js'\r\nimport { turnToDollhouseView } from './logic.js'\r\n\r\nexport type DollhouseViewHost = HTMLElement & {\r\n\r\n qspace: any\r\n buttonEnabled: boolean\r\n switching: boolean\r\n\r\n}\r\n\r\nexport function handleDollhouseClick(host: DollhouseViewHost, e: Event) {\r\n\r\n if (!host.buttonEnabled || host.switching) {\r\n\r\n e.preventDefault()\r\n e.stopPropagation()\r\n\r\n return\r\n\r\n }\r\n\r\n dispatchClick(host, e)\r\n\r\n if (!host.qspace) {\r\n\r\n return\r\n\r\n }\r\n\r\n turnToDollhouseView(host.qspace, () => {\r\n\r\n dispatchComplete(host, e)\r\n\r\n })\r\n\r\n}\r\n"],"names":[],"mappings":";;AAiBO,SAAS,qBAAqB,MAAyB,GAAU;AAEtE,MAAI,CAAC,KAAK,iBAAiB,KAAK,WAAW;AAEzC,MAAE,eAAA;AACF,MAAE,gBAAA;AAEF;AAAA,EAEF;AAEA,gBAAc,MAAM,CAAC;AAErB,MAAI,CAAC,KAAK,QAAQ;AAEhB;AAAA,EAEF;AAEA,sBAAoB,KAAK,QAAQ,MAAM;AAErC,qBAAiB,MAAM,CAAC;AAAA,EAE1B,CAAC;AAEH;"}
@@ -0,0 +1,2 @@
1
+ export declare function turnToDollhouseView(qspace: any, complete: () => void): void;
2
+ //# sourceMappingURL=logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/logic.ts"],"names":[],"mappings":"AAMA,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,IAAI,QAIpE"}
@@ -0,0 +1,7 @@
1
+ function turnToDollhouseView(qspace, complete) {
2
+ qspace.view.turnToDollhouse({ complete });
3
+ }
4
+ export {
5
+ turnToDollhouseView
6
+ };
7
+ //# sourceMappingURL=logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logic.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/logic.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view qspace 视图切换逻辑\n */\n\nexport function turnToDollhouseView(qspace: any, complete: () => void) {\r\n\r\n qspace.view.turnToDollhouse({ complete })\r\n\r\n}\r\n"],"names":[],"mappings":"AAMO,SAAS,oBAAoB,QAAa,UAAsB;AAErE,SAAO,KAAK,gBAAgB,EAAE,SAAA,CAAU;AAE1C;"}
@@ -0,0 +1,5 @@
1
+ export declare const booleanAttr: {
2
+ fromAttribute(value: string | null): boolean;
3
+ toAttribute(value: boolean): string | null;
4
+ };
5
+ //# sourceMappingURL=properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/properties.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;yBACD,MAAM,GAAG,IAAI,GAAG,OAAO;uBAQzB,OAAO,GAAG,MAAM,GAAG,IAAI;CAK3C,CAAA"}
@@ -0,0 +1,14 @@
1
+ const booleanAttr = {
2
+ fromAttribute(value) {
3
+ if (value === null) return false;
4
+ if (value === "false" || value === "0") return false;
5
+ return true;
6
+ },
7
+ toAttribute(value) {
8
+ return value ? "" : null;
9
+ }
10
+ };
11
+ export {
12
+ booleanAttr
13
+ };
14
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.js","sources":["../../../../src/components/common/lit-switch-dollhouse-view/properties.ts"],"sourcesContent":["/*\n * @Author: ncz\n * @Date: 2026-05-30\n * @Description: lit-switch-dollhouse-view 属性转换器\n */\n\nexport const booleanAttr = {\r\n fromAttribute(value: string | null): boolean {\r\n\r\n if (value === null) return false\r\n if (value === 'false' || value === '0') return false\r\n\r\n return true\r\n\r\n },\r\n toAttribute(value: boolean): string | null {\r\n\r\n return value ? '' : null\r\n\r\n },\r\n}\r\n"],"names":[],"mappings":"AAMO,MAAM,cAAc;AAAA,EACzB,cAAc,OAA+B;AAE3C,QAAI,UAAU,KAAM,QAAO;AAC3B,QAAI,UAAU,WAAW,UAAU,IAAK,QAAO;AAE/C,WAAO;AAAA,EAET;AAAA,EACA,YAAY,OAA+B;AAEzC,WAAO,QAAQ,KAAK;AAAA,EAEtB;AACF;"}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/common/lit-switch-dollhouse-view/styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,yBAkClB,CAAA"}