@realsee/dnalogel 3.79.0-alpha.0 → 3.79.1

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 (64) hide show
  1. package/CHANGELOG.md +836 -832
  2. package/dist/GuideLinePlugin/Controller.d.ts +34 -2
  3. package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +7 -2
  4. package/dist/PanoTagPlugin/Components/Common/Arrow.svelte.d.ts +1 -0
  5. package/dist/PanoTagPlugin/Components/Common/Line/Polyline.svelte.d.ts +1 -0
  6. package/dist/PanoTagPlugin/Components/Common/Line/Straight.svelte.d.ts +1 -0
  7. package/dist/PanoTagPlugin/Components/Common/Text/FlyMText.svelte.d.ts +1 -0
  8. package/dist/PanoTagPlugin/Components/Common/Text/FlyText.svelte.d.ts +1 -0
  9. package/dist/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.svelte.d.ts +1 -0
  10. package/dist/PanoTagPlugin/Components/Tag/ImageTextTag.svelte.d.ts +1 -0
  11. package/dist/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.svelte.d.ts +1 -0
  12. package/dist/PanoTagPlugin/Components/Tag/TextTag/TextTag.svelte.d.ts +1 -0
  13. package/dist/PanoTagPlugin/Components/Tag/TextTag/index.svelte.d.ts +1 -0
  14. package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +0 -6
  15. package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +3 -2
  16. package/dist/PanoTagPlugin/utils/constants.d.ts +3 -0
  17. package/dist/PanoTagPlugin/utils/doUtil.d.ts +1 -0
  18. package/dist/index.cjs.js +102 -97
  19. package/dist/index.js +16608 -14563
  20. package/dist/index.umd.js +95 -90
  21. package/libs/CruisePlugin/Move.js +27 -14
  22. package/libs/CruisePlugin/Work.js +74 -61
  23. package/libs/CruisePlugin/index.js +31 -18
  24. package/libs/GuideLinePlugin/Components/Tag.js +151 -163
  25. package/libs/GuideLinePlugin/Controller.d.ts +34 -2
  26. package/libs/GuideLinePlugin/Controller.js +85 -38
  27. package/libs/GuideLinePlugin/GuideLineItem.js +27 -14
  28. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +76 -69
  29. package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +7 -2
  30. package/libs/GuideLinePlugin/GuideLineModeItem.js +27 -14
  31. package/libs/GuideLinePlugin/index.js +31 -18
  32. package/libs/PanoTagPlugin/Components/Common/TagPopover/PopoverContent.js +77 -87
  33. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopoverToolBar.js +135 -189
  34. package/libs/PanoTagPlugin/Components/Common/TagPopover/TagPopup.js +432 -460
  35. package/libs/PanoTagPlugin/Components/Common/Text/FlyMText.js +198 -0
  36. package/libs/PanoTagPlugin/Components/Common/Text/FlyMText.svelte.d.ts +1 -0
  37. package/libs/PanoTagPlugin/Components/Common/Text/FlyText.js +258 -0
  38. package/libs/PanoTagPlugin/Components/Common/Text/FlyText.svelte.d.ts +1 -0
  39. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +358 -0
  40. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.svelte.d.ts +1 -0
  41. package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +126 -38
  42. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +259 -0
  43. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.svelte.d.ts +1 -0
  44. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js +216 -0
  45. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.svelte.d.ts +1 -0
  46. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextTag.js +219 -0
  47. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextTag.svelte.d.ts +1 -0
  48. package/libs/PanoTagPlugin/Components/Tag/TextTag/index.js +134 -0
  49. package/libs/PanoTagPlugin/Components/Tag/TextTag/index.svelte.d.ts +1 -0
  50. package/libs/PanoTagPlugin/Components/Tag/index.js +393 -292
  51. package/libs/PanoTagPlugin/Components/TagContainer.js +135 -125
  52. package/libs/PanoTagPlugin/Components/TagItem.js +322 -319
  53. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +74 -61
  54. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +108 -95
  55. package/libs/PanoTagPlugin/controller/index.js +54 -41
  56. package/libs/PanoTagPlugin/index.js +36 -23
  57. package/libs/PanoTagPlugin/tag.config.js +1 -31
  58. package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +0 -6
  59. package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +3 -2
  60. package/libs/base/BasePlugin.js +5 -5
  61. package/libs/index.js +182 -169
  62. package/libs/shared-utils/logger.js +1 -1
  63. package/libs/vendor/svelte/internal/index.js +225 -235
  64. package/package.json +2 -1
@@ -6,13 +6,20 @@ import type { Config as BaseConfig } from '../base/BasePlugin';
6
6
  import { GuideLineItem } from './GuideLineItem';
7
7
  import CruisePluginController from '../CruisePlugin/Work';
8
8
  export declare const pluginFlag: (name: string) => string;
9
- type Config = BaseConfig;
9
+ type Config = BaseConfig & {
10
+ /**
11
+ * @description 格式化距离函数,用于将米转换为显示文本(包含单位)
12
+ * @param distanceInMeter 距离(单位:米)
13
+ * @returns 格式化后的距离字符串,例如 "10m" 或 "32'10""
14
+ */
15
+ formatDistance?: (distanceInMeter: number) => string;
16
+ };
10
17
  export default class Controller extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
11
18
  readonly name = "GuideLinePlugin";
12
19
  readonly cruisePlugin: CruisePluginController;
13
20
  /** GuideLineItem 索引 */
14
21
  readonly itemMap: Map<string | number, GuideLineItem>;
15
- get config(): BaseConfig;
22
+ get config(): Config;
16
23
  state: {
17
24
  visible: boolean;
18
25
  enabled: boolean;
@@ -54,6 +61,31 @@ export default class Controller extends BasePluginWithData.Controller<PluginStat
54
61
  getGuideLineItemByID(id: string | number): GuideLineItem;
55
62
  /** 移除一个 GuideLineItem */
56
63
  removeGuideLineItem(item: GuideLineItem): void;
64
+ /**
65
+ * 动态更新距离格式化函数,立即刷新所有路线标签的距离显示。
66
+ * 不传参时恢复为默认格式(i18n('全程') + 距离 + i18n('米'))。
67
+ * @param fn 格式化函数,输入米数,返回带单位的完整字符串
68
+ * @example
69
+ * // 室内英制:英尺 + 英寸(如 "5'10"")
70
+ * plugin.setDistanceFormatter((m) => {
71
+ * const totalInches = Math.round(m * 39.3701)
72
+ * const feet = Math.floor(totalInches / 12)
73
+ * const inches = totalInches % 12
74
+ * return `${feet}'${inches}"`
75
+ * })
76
+ * // 室外英制:英里(如 "1.24 mi")
77
+ * plugin.setDistanceFormatter((m) => `${(m * 0.000621371).toFixed(2)} mi`)
78
+ * // 自动切换:近距离用英尺,远距离用英里
79
+ * plugin.setDistanceFormatter((m) => {
80
+ * if (m < 300) return `${Math.round(m * 3.28084)} ft`
81
+ * return `${(m * 0.000621371).toFixed(2)} mi`
82
+ * })
83
+ * // 恢复默认(i18n '米')
84
+ * plugin.setDistanceFormatter()
85
+ */
86
+ setDistanceFormatter(fn?: (distanceInMeter: number) => string): void;
87
+ /** 更新所有 tag 的距离显示(当 formatDistance 函数改变时调用) */
88
+ private updateTagDistances;
57
89
  /** 全量更新 tag */
58
90
  updateTagsEnable(): void;
59
91
  /** 清空所有 GuideLineItem */
@@ -23,8 +23,8 @@ declare class GuideLineModeItem {
23
23
  /** THREE Curve 路径上的点 */
24
24
  get curvePoints(): THREE.Vector3[];
25
25
  name: string;
26
- startTagContainer: GuideLineTagContainer;
27
- endTagContainer: GuideLineTagContainer;
26
+ startTagContainer?: GuideLineTagContainer;
27
+ endTagContainer?: GuideLineTagContainer;
28
28
  path: PluginType.PathItem[];
29
29
  geometryStyle: PluginType.GuideLineGeometryStyle;
30
30
  materialStyle: PluginType.GuideLineMaterialStyle;
@@ -32,6 +32,9 @@ declare class GuideLineModeItem {
32
32
  readonly group: THREE.Group;
33
33
  readonly mesh: THREE.Mesh<THREE.BufferGeometry, THREE.ShaderMaterial>;
34
34
  visible: boolean | null;
35
+ /** 保存原始的 tag 数据,用于更新距离显示 */
36
+ private startTagData;
37
+ private endTagData;
35
38
  private five;
36
39
  private mode;
37
40
  private _curvePath;
@@ -117,6 +120,8 @@ declare class GuideLineModeItem {
117
120
  setVisibleFloorIndexes(floorIndexes: number[]): void;
118
121
  setStartTag(tag: Tag | PluginType.ModelGuideLineTagData | null): void;
119
122
  setEndTag(tag: Tag | PluginType.ModelGuideLineTagData | null): void;
123
+ /** 更新 tag 的距离显示(当 formatDistance 函数改变时调用) */
124
+ updateTagDistance(): void;
120
125
  /** 闪烁 */
121
126
  flicker(): void;
122
127
  /** 求起点到 panoIndex 曲线长度
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte/internal';
@@ -351,12 +351,6 @@ export interface TagConfig<C extends TagContentType = TagContentType> {
351
351
  * @default '查看更多'
352
352
  */
353
353
  viewMoreText?: string;
354
- /**
355
- * @description 仅显示分享按钮时(showMore: false)展示在分享图标旁边的文案
356
- * @description 用于 i18n 场景,由业务侧传入,如 "立即分享"
357
- * @default undefined(不显示文案)
358
- */
359
- shareText?: string;
360
354
  /**
361
355
  * @description 鼠标悬停前的拦截函数,返回 true 允许 hover,false 阻止 hover
362
356
  */
@@ -21,7 +21,7 @@ export type TagContentType = keyof typeof ContentType;
21
21
  export interface ContentTypeMapInterface {
22
22
  /** 文字标签 */
23
23
  Text: {
24
- appearance?: 'plane';
24
+ appearance?: 'line' | 'plane';
25
25
  /** @deprecated: please use 'title' */
26
26
  text?: string;
27
27
  title?: string;
@@ -52,7 +52,8 @@ export interface ContentTypeMapInterface {
52
52
  /** @deprecated: 'text' replace by title */
53
53
  text?: string;
54
54
  title?: string;
55
- appearance?: 'plane';
55
+ /** @description 'line' 是旧的那种有一条线的,默认为'line', 'plane' 是新的那种圆形的 */
56
+ appearance?: 'line' | 'plane';
56
57
  theme?: 'dark' | 'light';
57
58
  audioUrl: string;
58
59
  };
@@ -0,0 +1,3 @@
1
+ export declare function random(): string;
2
+ declare const RANDON_STRING: string;
3
+ export { RANDON_STRING };
@@ -0,0 +1 @@
1
+ export default function doUtil<T = any>(func: () => T, util: (value: T) => boolean, duration?: number, times?: number): Promise<T>;