@fishdingding/bim-engine-sdk 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bim-engine-sdk.es.js +2324 -2166
- package/dist/bim-engine-sdk.es.js.map +1 -1
- package/dist/bim-engine-sdk.umd.js +56 -56
- package/dist/bim-engine-sdk.umd.js.map +1 -1
- package/dist/index.d.ts +207 -28
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,16 @@ declare class BimButtonGroup implements IBimComponent {
|
|
|
36
36
|
* 只会应用到没有被用户自定义的颜色属性上
|
|
37
37
|
*/
|
|
38
38
|
setTheme(theme: ThemeConfig): void;
|
|
39
|
+
/**
|
|
40
|
+
* 应用主题系统的 CSS 变量到容器
|
|
41
|
+
* 供 glass-pill 等样式变体使用
|
|
42
|
+
*/
|
|
43
|
+
private applyThemeCssVars;
|
|
44
|
+
/**
|
|
45
|
+
* 同步 CSS 变量到所有 dropdown 元素
|
|
46
|
+
* dropdown 被添加到 body,无法继承容器的 CSS 变量
|
|
47
|
+
*/
|
|
48
|
+
private syncDropdownCssVars;
|
|
39
49
|
/**
|
|
40
50
|
* 直接设置颜色(强制覆盖)
|
|
41
51
|
* 设置的颜色会被标记为自定义,后续的 setTheme 不会覆盖它们
|
|
@@ -273,6 +283,12 @@ declare class BimTreeNode {
|
|
|
273
283
|
destroy(): void;
|
|
274
284
|
}
|
|
275
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Blur Token
|
|
288
|
+
* CSS backdrop-filter blur value (e.g., '24px')
|
|
289
|
+
*/
|
|
290
|
+
declare type BlurToken = string;
|
|
291
|
+
|
|
276
292
|
/** 按钮内部文字图标排列 */
|
|
277
293
|
declare type ButtonAlign = 'vertical' | 'horizontal';
|
|
278
294
|
|
|
@@ -336,6 +352,8 @@ declare class ButtonGroupManager extends BimComponent {
|
|
|
336
352
|
|
|
337
353
|
export declare interface ButtonGroupOptions extends ButtonGroupColors {
|
|
338
354
|
container: HTMLElement | string;
|
|
355
|
+
/** 样式类型 (默认 'default') */
|
|
356
|
+
type?: ButtonGroupType;
|
|
339
357
|
/** 屏幕位置 (如 top-left) */
|
|
340
358
|
position?: GroupPosition;
|
|
341
359
|
/** 按钮组排列方向 (默认 row) */
|
|
@@ -349,6 +367,9 @@ export declare interface ButtonGroupOptions extends ButtonGroupColors {
|
|
|
349
367
|
className?: string;
|
|
350
368
|
}
|
|
351
369
|
|
|
370
|
+
/** 按钮组样式类型 */
|
|
371
|
+
declare type ButtonGroupType = 'default' | 'glass-pill';
|
|
372
|
+
|
|
352
373
|
declare type ButtonType = 'button' | 'menu';
|
|
353
374
|
|
|
354
375
|
/**
|
|
@@ -392,6 +413,24 @@ export declare interface CollapseOptions {
|
|
|
392
413
|
onChange?: (activeIds: string[]) => void;
|
|
393
414
|
}
|
|
394
415
|
|
|
416
|
+
/**
|
|
417
|
+
* BIM Engine SDK - Unified Theme System
|
|
418
|
+
*
|
|
419
|
+
* Design Principles:
|
|
420
|
+
* 1. Semantic naming - colors describe PURPOSE, not appearance
|
|
421
|
+
* 2. Hierarchical structure - organized by category for scalability
|
|
422
|
+
* 3. Complete coverage - all UI states and component needs
|
|
423
|
+
* 4. Accessibility - ensures proper contrast ratios
|
|
424
|
+
* 5. Glassmorphism support - includes transparency and blur values
|
|
425
|
+
*
|
|
426
|
+
* Color Palette Reference: Tailwind CSS (slate, blue, red, green, amber)
|
|
427
|
+
*/
|
|
428
|
+
/**
|
|
429
|
+
* Semantic Color Token
|
|
430
|
+
* Represents a single color value with optional transparency
|
|
431
|
+
*/
|
|
432
|
+
declare type ColorToken = string;
|
|
433
|
+
|
|
395
434
|
/**
|
|
396
435
|
* 底部工具栏管理器 (ToolbarManager)
|
|
397
436
|
* 仅负责管理底部工具栏实例。
|
|
@@ -1156,40 +1195,180 @@ declare class SectionPlaneDialogManager extends BimComponent {
|
|
|
1156
1195
|
}
|
|
1157
1196
|
|
|
1158
1197
|
/**
|
|
1159
|
-
*
|
|
1160
|
-
*
|
|
1198
|
+
* Shadow Token
|
|
1199
|
+
* CSS box-shadow value
|
|
1200
|
+
*/
|
|
1201
|
+
declare type ShadowToken = string;
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Complete Theme Configuration Interface
|
|
1205
|
+
*
|
|
1206
|
+
* All colors use semantic naming to describe their purpose.
|
|
1207
|
+
* Components should map these to their internal CSS variables.
|
|
1161
1208
|
*/
|
|
1162
1209
|
export declare interface ThemeConfig {
|
|
1163
|
-
/**
|
|
1210
|
+
/** Theme identifier: 'dark' | 'light' | custom name */
|
|
1164
1211
|
name: string;
|
|
1165
|
-
/**
|
|
1166
|
-
primary:
|
|
1167
|
-
/**
|
|
1168
|
-
primaryHover:
|
|
1169
|
-
/**
|
|
1170
|
-
|
|
1171
|
-
/**
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
|
|
1187
|
-
/**
|
|
1188
|
-
|
|
1212
|
+
/** Primary brand color - used for key actions, links, active states */
|
|
1213
|
+
primary: ColorToken;
|
|
1214
|
+
/** Primary color on hover */
|
|
1215
|
+
primaryHover: ColorToken;
|
|
1216
|
+
/** Primary color when pressed/active */
|
|
1217
|
+
primaryActive: ColorToken;
|
|
1218
|
+
/** Subtle primary for backgrounds (e.g., selected row) */
|
|
1219
|
+
primarySubtle: ColorToken;
|
|
1220
|
+
/** Success color - confirmations, completed states */
|
|
1221
|
+
success: ColorToken;
|
|
1222
|
+
/** Success color on hover */
|
|
1223
|
+
successHover: ColorToken;
|
|
1224
|
+
/** Subtle success for backgrounds */
|
|
1225
|
+
successSubtle: ColorToken;
|
|
1226
|
+
/** Warning color - caution, pending states */
|
|
1227
|
+
warning: ColorToken;
|
|
1228
|
+
/** Warning color on hover */
|
|
1229
|
+
warningHover: ColorToken;
|
|
1230
|
+
/** Subtle warning for backgrounds */
|
|
1231
|
+
warningSubtle: ColorToken;
|
|
1232
|
+
/** Danger/Error color - destructive actions, errors */
|
|
1233
|
+
danger: ColorToken;
|
|
1234
|
+
/** Danger color on hover */
|
|
1235
|
+
dangerHover: ColorToken;
|
|
1236
|
+
/** Subtle danger for backgrounds */
|
|
1237
|
+
dangerSubtle: ColorToken;
|
|
1238
|
+
/** Info color - informational states */
|
|
1239
|
+
info: ColorToken;
|
|
1240
|
+
/** Info color on hover */
|
|
1241
|
+
infoHover: ColorToken;
|
|
1242
|
+
/** Subtle info for backgrounds */
|
|
1243
|
+
infoSubtle: ColorToken;
|
|
1244
|
+
/** Base/canvas background - the deepest layer (app background) */
|
|
1245
|
+
bgBase: ColorToken;
|
|
1246
|
+
/** Elevated surface - panels, cards, dialogs floating above base */
|
|
1247
|
+
bgElevated: ColorToken;
|
|
1248
|
+
/** Overlay background - modals, dropdowns, popovers */
|
|
1249
|
+
bgOverlay: ColorToken;
|
|
1250
|
+
/** Inset/recessed background - inputs, wells, sunken areas */
|
|
1251
|
+
bgInset: ColorToken;
|
|
1252
|
+
/**
|
|
1253
|
+
* Glassmorphism surface - semi-transparent with blur
|
|
1254
|
+
* Used for floating toolbars, modern panels
|
|
1255
|
+
*/
|
|
1256
|
+
bgGlass: ColorToken;
|
|
1257
|
+
/** Glassmorphism blur amount */
|
|
1258
|
+
bgGlassBlur: BlurToken;
|
|
1259
|
+
/** Primary text - headings, body text, high emphasis */
|
|
1260
|
+
textPrimary: ColorToken;
|
|
1261
|
+
/** Secondary text - descriptions, labels, medium emphasis */
|
|
1262
|
+
textSecondary: ColorToken;
|
|
1263
|
+
/** Tertiary text - placeholders, hints, low emphasis */
|
|
1264
|
+
textTertiary: ColorToken;
|
|
1265
|
+
/** Disabled text - inactive elements */
|
|
1266
|
+
textDisabled: ColorToken;
|
|
1267
|
+
/** Inverted text - text on primary/dark backgrounds */
|
|
1268
|
+
textInverse: ColorToken;
|
|
1269
|
+
/** Link text color */
|
|
1270
|
+
textLink: ColorToken;
|
|
1271
|
+
/** Link text on hover */
|
|
1272
|
+
textLinkHover: ColorToken;
|
|
1273
|
+
/** Default icon color */
|
|
1274
|
+
iconDefault: ColorToken;
|
|
1275
|
+
/** Icon on hover */
|
|
1276
|
+
iconHover: ColorToken;
|
|
1277
|
+
/** Active/selected icon */
|
|
1278
|
+
iconActive: ColorToken;
|
|
1279
|
+
/** Disabled icon */
|
|
1280
|
+
iconDisabled: ColorToken;
|
|
1281
|
+
/** Inverted icon (on colored backgrounds) */
|
|
1282
|
+
iconInverse: ColorToken;
|
|
1283
|
+
/** Default border - inputs, cards, containers */
|
|
1284
|
+
borderDefault: ColorToken;
|
|
1285
|
+
/** Subtle border - dividers, separators */
|
|
1286
|
+
borderSubtle: ColorToken;
|
|
1287
|
+
/** Strong border - focus rings, emphasis */
|
|
1288
|
+
borderStrong: ColorToken;
|
|
1289
|
+
/** Disabled border */
|
|
1290
|
+
borderDisabled: ColorToken;
|
|
1291
|
+
/** Divider color - horizontal/vertical separators */
|
|
1292
|
+
divider: ColorToken;
|
|
1293
|
+
/**
|
|
1294
|
+
* Component Background States
|
|
1295
|
+
* Used for buttons, list items, interactive elements
|
|
1296
|
+
*/
|
|
1297
|
+
/** Default component background (often transparent) */
|
|
1298
|
+
componentBg: ColorToken;
|
|
1299
|
+
/** Component background on hover */
|
|
1300
|
+
componentBgHover: ColorToken;
|
|
1301
|
+
/** Component background when pressed */
|
|
1302
|
+
componentBgActive: ColorToken;
|
|
1303
|
+
/** Component background when selected */
|
|
1304
|
+
componentBgSelected: ColorToken;
|
|
1305
|
+
/** Disabled component background */
|
|
1306
|
+
componentBgDisabled: ColorToken;
|
|
1307
|
+
/** Focus ring color */
|
|
1308
|
+
focusRing: ColorToken;
|
|
1309
|
+
/** Focus ring offset color (for contrast) */
|
|
1310
|
+
focusRingOffset: ColorToken;
|
|
1311
|
+
/** Selection background (text selection, highlighted items) */
|
|
1312
|
+
selectionBg: ColorToken;
|
|
1313
|
+
/** Selection text color */
|
|
1314
|
+
selectionText: ColorToken;
|
|
1315
|
+
/** Small shadow - subtle elevation (buttons, small cards) */
|
|
1316
|
+
shadowSm: ShadowToken;
|
|
1317
|
+
/** Medium shadow - moderate elevation (dropdowns, popovers) */
|
|
1318
|
+
shadowMd: ShadowToken;
|
|
1319
|
+
/** Large shadow - high elevation (modals, dialogs) */
|
|
1320
|
+
shadowLg: ShadowToken;
|
|
1321
|
+
/** Extra large shadow - maximum elevation */
|
|
1322
|
+
shadowXl: ShadowToken;
|
|
1323
|
+
/** Glow shadow for active/highlighted elements */
|
|
1324
|
+
shadowGlow: ShadowToken;
|
|
1325
|
+
/** Scrollbar track background */
|
|
1326
|
+
scrollbarTrack: ColorToken;
|
|
1327
|
+
/** Scrollbar thumb */
|
|
1328
|
+
scrollbarThumb: ColorToken;
|
|
1329
|
+
/** Scrollbar thumb on hover */
|
|
1330
|
+
scrollbarThumbHover: ColorToken;
|
|
1331
|
+
/**
|
|
1332
|
+
* Component-specific overrides
|
|
1333
|
+
* Only define these when absolutely necessary
|
|
1334
|
+
*/
|
|
1335
|
+
overrides?: {
|
|
1336
|
+
/** Dialog specific colors */
|
|
1337
|
+
dialog?: {
|
|
1338
|
+
headerBg?: ColorToken;
|
|
1339
|
+
footerBg?: ColorToken;
|
|
1340
|
+
};
|
|
1341
|
+
/** Toolbar specific colors */
|
|
1342
|
+
toolbar?: {
|
|
1343
|
+
bg?: ColorToken;
|
|
1344
|
+
buttonBg?: ColorToken;
|
|
1345
|
+
buttonBgHover?: ColorToken;
|
|
1346
|
+
buttonBgActive?: ColorToken;
|
|
1347
|
+
};
|
|
1348
|
+
/** Input specific colors */
|
|
1349
|
+
input?: {
|
|
1350
|
+
bg?: ColorToken;
|
|
1351
|
+
bgFocus?: ColorToken;
|
|
1352
|
+
placeholder?: ColorToken;
|
|
1353
|
+
};
|
|
1354
|
+
/** Glass-pill button group specific colors */
|
|
1355
|
+
glassPill?: {
|
|
1356
|
+
sectionBg?: ColorToken;
|
|
1357
|
+
sectionBorder?: ColorToken;
|
|
1358
|
+
sectionShadow?: ShadowToken;
|
|
1359
|
+
btnBg?: ColorToken;
|
|
1360
|
+
btnBorder?: ColorToken;
|
|
1361
|
+
btnShadow?: ShadowToken;
|
|
1362
|
+
btnBgHover?: ColorToken;
|
|
1363
|
+
btnShadowHover?: ShadowToken;
|
|
1364
|
+
iconColor?: ColorToken;
|
|
1365
|
+
iconColorHover?: ColorToken;
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1189
1368
|
}
|
|
1190
1369
|
|
|
1191
1370
|
/**
|
|
1192
|
-
*
|
|
1371
|
+
* Theme type definition
|
|
1193
1372
|
*/
|
|
1194
1373
|
export declare type ThemeType = 'dark' | 'light' | 'custom';
|
|
1195
1374
|
|