@metagl/smartearth-base 0.3.0 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ - 预设库的内置预设只留一个「交付基线」(sdk-render 交付基线参数,套用后回到建地球时的默认环境和时间),SDK 的 7 个场景预设不再显示:`builtinSource` 换成 `baselineSource`,`builtin` 选项保留;示例页「环境」面板去掉预设按钮。`environment.setPreset` 底层接口保留。
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  - 新增 `earth.environment`(光照时间、场景预设、环境与画面效果):
package/README.md CHANGED
@@ -241,7 +241,7 @@ env.setEffectOptions('postProcessing', { exposure: 1.2, bloomBrightness: -0.5 })
241
241
 
242
242
  ### 预设库(`@metagl/smartearth-base/presets`)
243
243
 
244
- 预设是底座提供的原生能力,分三层:核心只管环境快照(上面的 `captureSnapshot` / `restoreSnapshot` / `on('change')` 和 `createEarth` 的 `presetFile`),不认识任何服务器;预设层 `createPresetLibrary` 管预设文档格式与数据源;界面是 Vue 组件 `SmartEarthPresetLibrary`。功能同 sdk-render 样板间的「配置库」:城市 / 大区浏览、搜索,SDK 内置、业务集群预设与样板间储存桶的卡片合在一起,点卡预览、确认或取消,存到业务集群,生成样板间上传包。
244
+ 预设是底座提供的原生能力,分三层:核心只管环境快照(上面的 `captureSnapshot` / `restoreSnapshot` / `on('change')` 和 `createEarth` 的 `presetFile`),不认识任何服务器;预设层 `createPresetLibrary` 管预设文档格式与数据源;界面是 Vue 组件 `SmartEarthPresetLibrary`。功能同 sdk-render 样板间的「配置库」:城市 / 大区浏览、搜索,内置的「交付基线」、业务集群预设与样板间储存桶的卡片合在一起,点卡预览、确认或取消,存到业务集群,生成样板间上传包。
245
245
 
246
246
  ```ts
247
247
  import { createPresetLibrary } from '@metagl/smartearth-base/presets';
@@ -254,7 +254,7 @@ const store = httpPresetStore({ baseUrl: 'https://sites.geovisearth.com/stratex-
254
254
  const lib = createPresetLibrary(earth, { store });
255
255
  const cities = await lib.listCities(); // 城市列表(样板间同一接口),带 regionId
256
256
  const hits = await lib.searchCities('四川'); // 城市名、省份、大区名、看过的预设名都能搜
257
- const cards = await lib.list(110000); // SDK 内置 + 业务集群 + 样板间储存桶(card.source 区分,带 thumb)
257
+ const cards = await lib.list(110000); // 交付基线 + 业务集群 + 样板间储存桶(card.source 区分)
258
258
  await lib.preview(cards[0]); // 预览(先拍一张快照)
259
259
  await lib.cancelPreview(); // 取消:回到第一次预览之前(含时间);lib.confirmPreview() 则保留
260
260
  await lib.save({ name: '国贸黄昏', adcode: '110000' }); // 存到业务集群:快照(含时间和视角,套用时默认不飞过去)+ 截图
@@ -263,17 +263,17 @@ const doc = await lib.documentFromCurrent({ name: '交付环境', adcode: '11000
263
263
 
264
264
  | 成员 | 说明 |
265
265
  |---|---|
266
- | `sources` | 数据源,依次为 `builtin`(SDK 内置 7 个,不分城市)、`cluster`(上层传的 `store`,如业务集群预设服务;自己写的本集群预设可删,公开预设只读)、`local`(显式开启才有)、`bucket`(样板间储存桶,只读)和 `options.sources` 里自定义的 |
266
+ | `sources` | 数据源,依次为 `builtin`(内置的唯一预设「交付基线」,即 sdk-render 交付基线参数,不分城市、只读)、`cluster`(上层传的 `store`,如业务集群预设服务;自己写的本集群预设可删,公开预设只读)、`local`(显式开启才有)、`bucket`(样板间储存桶,只读)和 `options.sources` 里自定义的 |
267
267
  | `regions` / `listCities()` / `searchCities(q)` | 7 个大区 + 其他(按 adcode 前两位)、城市列表、搜索 |
268
268
  | `list(adcode)` | 某城市的卡片 `PresetSummary`(`id` 为 `{来源}:{来源内 id}`、`source`、`name`、`thumb`、`producedBy`、`writable`) |
269
- | `getDocument(card)` / `compatibility(card)` | 取完整预设文档(下载用;SDK 内置没有)/ 套用前的兼容提醒:样板间老格式,或生成时 sdk-render 主版本不同 |
269
+ | `getDocument(card)` / `compatibility(card)` | 取完整预设文档(下载用)/ 套用前的兼容提醒:样板间老格式,或生成时 sdk-render 主版本不同 |
270
270
  | `preview(card)` / `confirmPreview()` / `cancelPreview()` / `isPreviewing` | 预览流程;取消会真正回滚到预览前(样板间的取消不回滚) |
271
- | `apply(card, { camera? })` | 直接套用(SDK 内置走 `setPreset` 的渐变与防护,其余走 `restoreSnapshot`,含时间);视角默认不动,`camera: true` 时飞到预设里存的视角 |
271
+ | `apply(card, { camera? })` | 直接套用(含时间;「交付基线」走 `resetConfig`,其余走 `restoreSnapshot`);视角默认不动,`camera: true` 时飞到预设里存的视角 |
272
272
  | `save({ name, desc?, adcode, tags?, camera?, thumbnail?, target? })` / `remove(card)` / `canSave` | 预设**存在上层传的 `store` 里(业务集群预设服务),不存浏览器**;没传 `store` 时 `canSave` 为 false,保存直接报错。存业务集群要城市(`adcode`,地区名取城市名、范围取当前可视范围)和缩略图。浏览器本地存储默认关,离线演示可显式传 `storage: createLocalStorageStorage()` |
273
273
  | `documentFromCurrent({ name, desc?, adcode?, camera? })` | 把当前环境做成预设文档(`smartearth-preset/1`),不存;智作「冻结进工程」写成 `public/environment/preset.json` 用 |
274
274
  | `bucketUploadPackage(adcode, { name, desc? })` | 样板间储存桶的上传包(老格式配置、截图、合并好的 index.json),需要往样板间那边补数据时用 |
275
275
 
276
- `createPresetLibrary(earth, options)`:`store`(可写数据源,通常是 `httpPresetStore(...)`,也可以是自己实现的 `PresetSource`)、`bucket`(`{ baseUrl }` 或 `false`)、`builtin`(默认 true)、`storage`、`sources`(自己实现 `PresetSource`)、`cityListUrl`。
276
+ `createPresetLibrary(earth, options)`:`store`(可写数据源,通常是 `httpPresetStore(...)`,也可以是自己实现的 `PresetSource`)、`builtin`(内置的「交付基线」,默认 true)、`bucket`(`{ baseUrl }` 或 `false`)、`storage`、`sources`(自己实现 `PresetSource`)、`cityListUrl`。
277
277
 
278
278
  **与集群模板的约定**:模板 `template.json`(`cluster-template/2`)用集群已有的 `renderPresets: ["id@x.y.z", …]` 引用业务集群里的公开预设(≤10 个,第一个为默认),不另加字段。放起步工程时由智作用 `store.get(ref)` 取第一个,冻结写成工程的 `public/environment/preset.json`(预设文档,`source` 记 `{ kind: 'cluster', id: ref }`);运行时 `createEarth` 只读这个文件,不连业务集群。
279
279
 
@@ -1,23 +1,54 @@
1
- import { ENVIRONMENT_PRESETS, SmartEarthError, requireSnapshot, PRESET_DOCUMENT_SCHEMA, withoutClock, readSdkRenderVersion, BASE_VERSION, describeLayerCause, describeCause } from './chunk-UENQT22J.js';
1
+ import { BASE_VERSION, PRESET_DOCUMENT_SCHEMA, withoutClock, readSdkRenderVersion, requireSnapshot, SmartEarthError, describeLayerCause, describeCause } from './chunk-XJRW7VZC.js';
2
+ import * as SdkRender from '@metagl/sdk-render';
2
3
 
3
- // src/presets/builtin.ts
4
- function builtinSource(options = {}) {
5
- const ids = new Set(ENVIRONMENT_PRESETS.map((preset) => preset.id));
4
+ var SOURCE_ID = "builtin";
5
+ var BASELINE_ID = "baseline";
6
+ var NAME = "\u4EA4\u4ED8\u57FA\u7EBF";
7
+ var DESC = "SDK \u5B98\u65B9\u8C03\u597D\u7684\u9ED8\u8BA4\u73AF\u5883\uFF08\u84DD\u5929\u767D\u4E91\uFF09";
8
+ function readBaseline() {
9
+ try {
10
+ const baseline = SdkRender.DEMO_ENVIRONMENT_BASELINE;
11
+ return typeof baseline === "object" && baseline !== null ? JSON.parse(JSON.stringify(baseline)) : void 0;
12
+ } catch {
13
+ return void 0;
14
+ }
15
+ }
16
+ function clockOf(baseline) {
17
+ const clock = baseline.settings?.clockIsoTime;
18
+ return typeof clock === "string" ? clock : void 0;
19
+ }
20
+ function requireBaseline(id) {
21
+ const baseline = id === BASELINE_ID ? readBaseline() : void 0;
22
+ if (!baseline) throw new SmartEarthError("INVALID_OPTIONS", `\u6CA1\u6709\u8FD9\u4E2A\u5185\u7F6E\u9884\u8BBE\uFF1A${id}`);
23
+ return baseline;
24
+ }
25
+ function baselineSource(options = {}) {
6
26
  return {
7
- id: "builtin",
8
- label: options.label ?? "SDK \u5185\u7F6E",
27
+ id: SOURCE_ID,
28
+ label: options.label ?? "\u5185\u7F6E",
9
29
  writable: false,
10
30
  async list() {
11
- return ENVIRONMENT_PRESETS.map(
12
- (preset) => ({ id: `builtin:${preset.id}`, source: "builtin", name: preset.name, writable: false })
13
- );
31
+ if (!readBaseline()) return [];
32
+ const card = { id: `${SOURCE_ID}:${BASELINE_ID}`, source: SOURCE_ID, name: NAME, desc: DESC, writable: false };
33
+ return [card];
14
34
  },
15
- async get() {
16
- throw new SmartEarthError("INVALID_OPTIONS", "SDK \u5185\u7F6E\u9884\u8BBE\u6CA1\u6709\u73B0\u6210\u5FEB\u7167\uFF1A\u5148\u5957\u7528\uFF0C\u518D\u5B58\u6210\u81EA\u5DF1\u7684\u9884\u8BBE\u3002");
35
+ async get(id) {
36
+ const baseline = requireBaseline(id);
37
+ const time = clockOf(baseline);
38
+ return {
39
+ schema: PRESET_DOCUMENT_SCHEMA,
40
+ id: `${SOURCE_ID}:${BASELINE_ID}`,
41
+ name: NAME,
42
+ desc: DESC,
43
+ createdAt: 0,
44
+ producedBy: { base: BASE_VERSION, sdkRender: readSdkRenderVersion() ?? "unknown" },
45
+ snapshot: { environment: withoutClock(baseline), ...time ? { time } : {}, quality: "high", preset: null }
46
+ };
17
47
  },
18
48
  async apply(earth, id) {
19
- if (!ids.has(id)) throw new SmartEarthError("INVALID_OPTIONS", `\u6CA1\u6709\u8FD9\u4E2A SDK \u5185\u7F6E\u9884\u8BBE\uFF1A${id}`);
20
- earth.environment.setPreset(id, { transition: options.transition ?? 1.5 });
49
+ const time = clockOf(requireBaseline(id));
50
+ await earth.environment.resetConfig();
51
+ if (time) earth.environment.setTime(new Date(time));
21
52
  }
22
53
  };
23
54
  }
@@ -323,7 +354,7 @@ function viewRegion(viewer, name) {
323
354
  }
324
355
 
325
356
  // src/presets/httpStore.ts
326
- var SOURCE_ID = "cluster";
357
+ var SOURCE_ID2 = "cluster";
327
358
  var PRESET_SCHEMA = "render-preset/1";
328
359
  var FIRST_VERSION = "1.0.0";
329
360
  var NAME_MAX = 40;
@@ -445,8 +476,8 @@ function httpPresetStore(options) {
445
476
  const desc = [entry.region?.name, entry.author, own ? "\u4EC5\u672C\u96C6\u7FA4" : void 0].filter(Boolean).join(" \xB7 ");
446
477
  const createdAt = entry.updatedAt ? Date.parse(entry.updatedAt) : Number.NaN;
447
478
  return {
448
- id: `${SOURCE_ID}:${entry.ref}`,
449
- source: SOURCE_ID,
479
+ id: `${SOURCE_ID2}:${entry.ref}`,
480
+ source: SOURCE_ID2,
450
481
  name: entry.name,
451
482
  writable: own,
452
483
  ...desc ? { desc } : {},
@@ -463,7 +494,7 @@ function httpPresetStore(options) {
463
494
  return [city.name, city.province].some((name) => name !== void 0 && normalizeRegionName(name) === region);
464
495
  };
465
496
  return {
466
- id: SOURCE_ID,
497
+ id: SOURCE_ID2,
467
498
  label: options.label ?? "\u4E1A\u52A1\u96C6\u7FA4",
468
499
  writable: true,
469
500
  async list({ adcode, city }) {
@@ -484,12 +515,12 @@ function httpPresetStore(options) {
484
515
  }
485
516
  const document = {
486
517
  schema: PRESET_DOCUMENT_SCHEMA,
487
- id: `${SOURCE_ID}:${ref}`,
518
+ id: `${SOURCE_ID2}:${ref}`,
488
519
  name: detail.name,
489
520
  ...detail.author ? { author: detail.author } : {},
490
521
  createdAt: detail.updatedAt ? Date.parse(detail.updatedAt) || 0 : 0,
491
522
  producedBy: { base: "unknown", sdkRender: detail.sdkRender ?? "unknown" },
492
- source: { kind: SOURCE_ID, id: ref },
523
+ source: { kind: SOURCE_ID2, id: ref },
493
524
  snapshot: {
494
525
  environment: detail.render,
495
526
  ...time ? { time } : {},
@@ -554,7 +585,7 @@ function requireName(name) {
554
585
  function createPresetLibrary(earth, options = {}) {
555
586
  const bucket = options.bucket === false ? void 0 : bucketSource(options.bucket ?? {});
556
587
  const sources = [
557
- ...options.builtin === false ? [] : [builtinSource()],
588
+ ...options.builtin === false ? [] : [baselineSource()],
558
589
  ...options.store ? [options.store] : [],
559
590
  ...options.storage ? [localSource(options.storage)] : [],
560
591
  ...bucket ? [bucket] : [],
@@ -702,4 +733,4 @@ function createPresetLibrary(earth, options = {}) {
702
733
  };
703
734
  }
704
735
 
705
- export { DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, LOCAL_STORAGE_KEY, REGIONS, bucketSource, builtinSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig };
736
+ export { DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, LOCAL_STORAGE_KEY, REGIONS, baselineSource, bucketSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig };
@@ -1,4 +1,4 @@
1
- import { SmartEarthError, Emitter, readSdkRenderVersion, createEarthEnvironment, describeCause, MAP_TOKEN_APPLY_URL, describeLayerCause, syncEnabledFlags, requirePresetDocument, ALL_EFFECTS } from './chunk-UENQT22J.js';
1
+ import { SmartEarthError, Emitter, readSdkRenderVersion, createEarthEnvironment, describeCause, MAP_TOKEN_APPLY_URL, describeLayerCause, syncEnabledFlags, requirePresetDocument, ALL_EFFECTS } from './chunk-XJRW7VZC.js';
2
2
  import * as CesiumNS from 'cesium';
3
3
  import * as SdkRender from '@metagl/sdk-render';
4
4
 
@@ -880,6 +880,6 @@ function readSdkRenderVersion() {
880
880
  }
881
881
 
882
882
  // src/version.ts
883
- var BASE_VERSION = "0.3.0";
883
+ var BASE_VERSION = "0.3.1";
884
884
 
885
885
  export { ALL_EFFECTS, BASE_VERSION, COLOR_FILTERS, ENVIRONMENT_PRESETS, Emitter, MAP_TOKEN_APPLY_URL, PRESET_DOCUMENT_SCHEMA, SmartEarthError, createEarthEnvironment, describeCause, describeLayerCause, isSmartEarthError, readSdkRenderVersion, requirePresetDocument, requireSnapshot, supportsEnvironment, syncEnabledFlags, withoutClock };
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ interface EnvironmentCapableRender {
18
18
  declare function supportsEnvironment(render: unknown): render is EnvironmentCapableRender;
19
19
 
20
20
  /** 底座版本(预设文档的 producedBy.base 用)。发版时与 package.json 的 version 一起改,有测试核对。 */
21
- declare const BASE_VERSION = "0.3.0";
21
+ declare const BASE_VERSION = "0.3.1";
22
22
 
23
23
  /**
24
24
  * sdk-render 3.0 没有画质档位接口时,本包按 geovisearthsdk_web《渲染性能优化方案》(2026-08-18)
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { CESIUM_MAX_VERSION_EXCLUSIVE, CESIUM_MIN_VERSION, LOW_QUALITY_OVERRIDES, createEarth, createEarthPbr, escapeHtml, getSupportedQualities, makeExtensible, supportsPbr } from './chunk-24R3PPPA.js';
2
- export { BASE_VERSION, COLOR_FILTERS, ENVIRONMENT_PRESETS, MAP_TOKEN_APPLY_URL, PRESET_DOCUMENT_SCHEMA, SmartEarthError, isSmartEarthError, requirePresetDocument, requireSnapshot, supportsEnvironment } from './chunk-UENQT22J.js';
1
+ export { CESIUM_MAX_VERSION_EXCLUSIVE, CESIUM_MIN_VERSION, LOW_QUALITY_OVERRIDES, createEarth, createEarthPbr, escapeHtml, getSupportedQualities, makeExtensible, supportsPbr } from './chunk-JGNKH4TR.js';
2
+ export { BASE_VERSION, COLOR_FILTERS, ENVIRONMENT_PRESETS, MAP_TOKEN_APPLY_URL, PRESET_DOCUMENT_SCHEMA, SmartEarthError, isSmartEarthError, requirePresetDocument, requireSnapshot, supportsEnvironment } from './chunk-XJRW7VZC.js';
package/dist/presets.d.ts CHANGED
@@ -7,7 +7,7 @@ interface PresetDocument extends PresetDocumentCore {
7
7
  readonly id: string;
8
8
  readonly name: string;
9
9
  readonly desc?: string;
10
- /** 归属城市(6 位 adcode);SDK 内置预设没有。 */
10
+ /** 归属城市(6 位 adcode)。 */
11
11
  readonly adcode?: string;
12
12
  readonly tags?: readonly string[];
13
13
  /** 由服务端从令牌里填,前端写了也会被覆盖。 */
@@ -73,7 +73,7 @@ interface PresetListQuery {
73
73
  };
74
74
  }
75
75
  /**
76
- * 预设数据源(可插拔)。内置:builtin(SDK 场景预设)、cluster(`httpPresetStore`,业务集群预设服务)、
76
+ * 预设数据源(可插拔)。内置:builtin(交付基线)、cluster(`httpPresetStore`,业务集群预设服务)、
77
77
  * bucket(样板间储存桶,只读)、local(离线演示用,显式开启)。业务可以自己实现。
78
78
  */
79
79
  interface PresetSource {
@@ -82,13 +82,13 @@ interface PresetSource {
82
82
  /** 卡片上显示的来源名,如「业务集群」「样板间」。 */
83
83
  readonly label: string;
84
84
  readonly writable: boolean;
85
- /** 列某城市的预设;adcode 为空时列不分城市的(如 SDK 内置)。 */
85
+ /** 列某城市的预设;adcode 为空时列不分城市的。 */
86
86
  list(query: PresetListQuery): Promise<PresetSummary[]>;
87
87
  /** 取完整预设(id 是来源内的 id,不带前缀)。 */
88
88
  get(id: string): Promise<PresetDocument>;
89
89
  save?(draft: PresetDraft): Promise<PresetSummary>;
90
90
  remove?(id: string): Promise<void>;
91
- /** 自定义套用方式(SDK 内置预设走 setPreset 的渐变与防护,不走整份导入)。 */
91
+ /** 自定义套用方式;不给就整份导入快照。 */
92
92
  apply?(earth: Earth, id: string): Promise<void>;
93
93
  }
94
94
 
@@ -209,11 +209,10 @@ declare function createLocalStorageStorage(key?: string): PresetLibraryStorage;
209
209
  declare function localSource(storage: PresetLibraryStorage, label?: string): PresetSource;
210
210
 
211
211
  /**
212
- * SDK 内置场景预设(sdk-render 4.x 的 7 个)。不分城市,套用走 environment.setPreset
213
- * (渐变、高空延后、关镜面这些防护都在那里),不走整份导入。
212
+ * 内置的唯一预设:sdk-render 交付基线,也就是建地球时默认的环境。
213
+ * 套用走 environment.resetConfig(保持当前画质),再把时间拨到基线自带的时刻。
214
214
  */
215
- declare function builtinSource(options?: {
216
- readonly transition?: number;
215
+ declare function baselineSource(options?: {
217
216
  readonly label?: string;
218
217
  }): PresetSource;
219
218
 
@@ -246,10 +245,10 @@ interface PresetLibraryOptions {
246
245
  * 智作里是 `httpPresetStore({ baseUrl, getToken, clusterId })`(业务集群预设服务)。没给就只能浏览、不能存。
247
246
  */
248
247
  readonly store?: PresetSource;
248
+ /** 内置的「交付基线」预设(sdk-render 交付基线参数),默认开;false 关掉。 */
249
+ readonly builtin?: boolean;
249
250
  /** 样板间储存桶(只读),默认开;false 关掉。 */
250
251
  readonly bucket?: BucketSourceOptions | false;
251
- /** SDK 内置场景预设,默认开。 */
252
- readonly builtin?: boolean;
253
252
  /** 浏览器本地存储,默认关;只给离线演示显式开启。 */
254
253
  readonly storage?: PresetLibraryStorage;
255
254
  /** 业务自己的数据源,排在内置的后面。 */
@@ -278,9 +277,9 @@ interface PresetLibrary {
278
277
  listCities(): Promise<LibraryCity[]>;
279
278
  /** 搜城市:城市名、省份、大区名,或看过的卡片名称 / 描述。 */
280
279
  searchCities(query: string): Promise<LibraryCity[]>;
281
- /** 卡片:各数据源合并(SDK 内置不分城市,总在最前)。 */
280
+ /** 卡片:各数据源合并(内置的「交付基线」不分城市,总在最前)。 */
282
281
  list(adcode?: string | number): Promise<PresetSummary[]>;
283
- /** 取完整预设文档(SDK 内置没有,会报错)。 */
282
+ /** 取完整预设文档。 */
284
283
  getDocument(card: PresetSummary): Promise<PresetDocument>;
285
284
  /** 套用前的兼容提醒(版本不一致时有)。 */
286
285
  compatibility(card: PresetSummary): string | null;
@@ -309,4 +308,4 @@ interface PresetLibrary {
309
308
  }
310
309
  declare function createPresetLibrary(earth: Earth, options?: PresetLibraryOptions): PresetLibrary;
311
310
 
312
- export { type BucketSourceOptions, type CityConfigDraft, DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, type HttpPresetStoreOptions, LOCAL_STORAGE_KEY, type LibraryCity, type LocalPresetRecord, type PresetDocument, type PresetDraft, type PresetLibrary, type PresetLibraryOptions, type PresetLibraryStorage, type PresetListQuery, type PresetSource, type PresetSummary, REGIONS, type RegionId, type SavePresetOptions, bucketSource, builtinSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig };
311
+ export { type BucketSourceOptions, type CityConfigDraft, DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, type HttpPresetStoreOptions, LOCAL_STORAGE_KEY, type LibraryCity, type LocalPresetRecord, type PresetDocument, type PresetDraft, type PresetLibrary, type PresetLibraryOptions, type PresetLibraryStorage, type PresetListQuery, type PresetSource, type PresetSummary, REGIONS, type RegionId, type SavePresetOptions, baselineSource, bucketSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig };
package/dist/presets.js CHANGED
@@ -1,2 +1,2 @@
1
- export { DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, LOCAL_STORAGE_KEY, REGIONS, bucketSource, builtinSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig } from './chunk-POH7K3F4.js';
2
- import './chunk-UENQT22J.js';
1
+ export { DEFAULT_CITY_CONFIG_BASE_URL, DEFAULT_CITY_LIST_URL, LOCAL_STORAGE_KEY, REGIONS, baselineSource, bucketSource, compatibilityNote, createLocalStorageStorage, createPresetLibrary, httpPresetStore, localSource, normalizeRegionName, regionOf, requireDocument, wrapLegacyConfig } from './chunk-6U32ENXU.js';
2
+ import './chunk-XJRW7VZC.js';
package/dist/vue.d.ts CHANGED
@@ -7,7 +7,7 @@ import 'cesium';
7
7
  import '@metagl/sdk-render';
8
8
 
9
9
  /**
10
- * 预设库面板(同 sdk-render 样板间的配置库):大区 / 城市浏览与搜索、SDK 内置 / 业务集群 / 样板间预设卡、
10
+ * 预设库面板(同 sdk-render 样板间的配置库):大区 / 城市浏览与搜索、交付基线 / 业务集群 / 样板间预设卡、
11
11
  * 预览 → 确认 / 取消、存到业务集群、下载、生成样板间上传包。逻辑在 createPresetLibrary 上,这里只是界面。
12
12
  *
13
13
  * <SmartEarthPresetLibrary :earth="earth" :store="store" adcode="110000" @applied="..." @close="..." />
package/dist/vue.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createEarth } from './chunk-24R3PPPA.js';
2
- import { createPresetLibrary } from './chunk-POH7K3F4.js';
3
- import { SmartEarthError, describeCause } from './chunk-UENQT22J.js';
1
+ import { createEarth } from './chunk-JGNKH4TR.js';
2
+ import { createPresetLibrary } from './chunk-6U32ENXU.js';
3
+ import { SmartEarthError, describeCause } from './chunk-XJRW7VZC.js';
4
4
  import { defineComponent, h, ref, shallowRef, onMounted, onBeforeUnmount, computed } from 'vue';
5
5
 
6
6
  // src/vue/presetLibraryStyle.ts
@@ -188,7 +188,7 @@ var SmartEarthPresetLibrary = defineComponent({
188
188
  h("strong", entry.name),
189
189
  entry.desc ? h("small", entry.desc) : null,
190
190
  h("div", { class: "se-pl-chips" }, [
191
- entry.source === "builtin" ? null : button("\u4E0B\u8F7D", () => downloadCard(entry)),
191
+ button("\u4E0B\u8F7D", () => downloadCard(entry)),
192
192
  entry.writable ? button("\u5220\u9664", () => removeEntry(entry)) : null
193
193
  ])
194
194
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metagl/smartearth-base",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "集群业务地图底层包:基于 @metagl/sdk-render 的三维地球(替代已废弃的 @agent-earth/smart-earth)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",