@dcloudio/uni-app-x 0.7.113 → 0.7.114
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/package.json +1 -1
- package/types/dom2-internal/UniCSSPropertyId.d.ts +356 -351
- package/types/dom2-internal/sharedData.d.ts +219 -0
- package/types/uni/uts-plugin-api/lib/uni-editor/utssdk/interface.d.ts +2 -3
- package/types/uni/uts-plugin-component/lib/uni-editor/utssdk/interface.d.ts +2 -3
- package/types/uni/uts-plugin-component/.temp/uni-camera/utssdk/interface.uts +0 -1155
- package/types/uni/uts-plugin-component/.temp/uni-camera.d.ts +0 -38
- package/types/uni/uts-plugin-component/.temp/uni-camera.ts +0 -52
- package/types/uni/uts-plugin-component/.temp/uni-canvas/utssdk/interface.uts +0 -976
- package/types/uni/uts-plugin-component/.temp/uni-canvas-dom2/utssdk/interface.uts +0 -976
- package/types/uni/uts-plugin-component/.temp/uni-editor.d.ts +0 -171
- package/types/uni/uts-plugin-component/.temp/uni-editor.ts +0 -237
- package/types/uni/uts-plugin-component/.temp/uni-form.d.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-form.ts +0 -1
- package/types/uni/uts-plugin-component/.temp/uni-input/utssdk/interface.uts +0 -0
- package/types/uni/uts-plugin-component/.temp/uni-map-tencent.d.ts +0 -56
- package/types/uni/uts-plugin-component/.temp/uni-map-tencent.ts +0 -88
- package/types/uni/uts-plugin-component/.temp/uni-match-media.d.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-match-media.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-navigator.d.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-navigator.ts +0 -1
- package/types/uni/uts-plugin-component/.temp/uni-page-container.d.ts +0 -0
- package/types/uni/uts-plugin-component/.temp/uni-page-container.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-progress.d.ts +0 -2
- package/types/uni/uts-plugin-component/.temp/uni-progress.ts +0 -1
- package/types/uni/uts-plugin-component/.temp/uni-rich-text.d.ts +0 -7
- package/types/uni/uts-plugin-component/.temp/uni-rich-text.ts +0 -12
- package/types/uni/uts-plugin-component/.temp/uni-textarea/utssdk/interface.uts +0 -0
- package/types/uni/uts-plugin-component/.temp/uni-video/utssdk/interface.uts +0 -936
- package/types/uni/uts-plugin-component/.temp/uni-video.d.ts +0 -134
- package/types/uni/uts-plugin-component/.temp/uni-video.ts +0 -180
- package/types/uni/uts-plugin-component/.temp/uni-web-view/utssdk/interface.uts +0 -452
- package/types/uni/uts-plugin-component/.temp/uni-web-view.d.ts +0 -51
- package/types/uni/uts-plugin-component/.temp/uni-web-view.ts +0 -86
|
@@ -331,4 +331,223 @@ declare global {
|
|
|
331
331
|
function observable(): any
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
+
declare global {
|
|
335
|
+
/**
|
|
336
|
+
* 动态 sharedData class 的最小描述信息。
|
|
337
|
+
*
|
|
338
|
+
* 这份 descriptor 只服务于动态实例创建与字段/flag 存储分配,
|
|
339
|
+
* 不扩展成复杂的 registry 或反射系统。
|
|
340
|
+
*/
|
|
341
|
+
interface UniDynamicSharedDataClassDefinition {
|
|
342
|
+
/**
|
|
343
|
+
* sharedData class 名称。
|
|
344
|
+
*
|
|
345
|
+
* 用于调试、日志和与静态 sharedData class 对照。
|
|
346
|
+
*/
|
|
347
|
+
readonly sharedDataClassName: string
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* 当前 template 内唯一的 sharedData class 编号。
|
|
351
|
+
*
|
|
352
|
+
* 与动态 shared schema 中的 `sharedDataClassId` 对齐。
|
|
353
|
+
*/
|
|
354
|
+
readonly sharedDataClassId: number
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* 该 class 持有的字段数量。
|
|
358
|
+
*/
|
|
359
|
+
readonly fieldCount: number
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* 该 class 持有的 flag group 数量。
|
|
363
|
+
*/
|
|
364
|
+
readonly flagGroupCount: number
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* 当前 class 的字段声明。
|
|
368
|
+
*
|
|
369
|
+
* 动态实现通过这些字段声明完成 fieldId -> flag 标记。
|
|
370
|
+
*
|
|
371
|
+
* 当前阶段不额外放 `nullable` / `valueTag`:
|
|
372
|
+
* - 动态 `_setData(fieldId, value)` 不依赖这两类信息
|
|
373
|
+
* - 解释器读取 `getField(fieldId)` / `getFlag(flagGroupId)` 也不依赖
|
|
374
|
+
* - 如后续宿主实现证明需要,再单独补充
|
|
375
|
+
*/
|
|
376
|
+
readonly fields: ReadonlyArray<UniDynamicSharedDataField>
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* 动态 sharedData 字段声明。
|
|
381
|
+
*/
|
|
382
|
+
interface UniDynamicSharedDataField {
|
|
383
|
+
/**
|
|
384
|
+
* 当前 template 内唯一的字段编号。
|
|
385
|
+
*/
|
|
386
|
+
readonly fieldId: number
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* 对应的 flag group 编号。
|
|
390
|
+
*/
|
|
391
|
+
readonly flagGroupId: number
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* 对应的 flag bit。
|
|
395
|
+
*/
|
|
396
|
+
readonly flagBit: number
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* 普通动态 sharedData 的最小读取接口。
|
|
401
|
+
*
|
|
402
|
+
* 解释器只依赖字段与 flag 读取。
|
|
403
|
+
*
|
|
404
|
+
* 非解释器使用的内部字段、方法,命名尽量贴近静态 sharedData:
|
|
405
|
+
* - 复用已有静态基类字段
|
|
406
|
+
* - 内部方法沿用 `_xxx` 风格
|
|
407
|
+
*
|
|
408
|
+
* 这样外部仓库实现动态 sharedData 时,底层更容易复用现有代码。
|
|
409
|
+
*/
|
|
410
|
+
interface IUniDynamicSharedData {
|
|
411
|
+
/**
|
|
412
|
+
* 按字段编号读取值。
|
|
413
|
+
*
|
|
414
|
+
* 这里的 `fieldId` 由编译器 shared schema 分配,
|
|
415
|
+
* 解释器与真实实现都以该编号作为统一索引。
|
|
416
|
+
*/
|
|
417
|
+
getField(fieldId: number): UniSharedDataAny
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* 按 flag 组编号读取脏标记。
|
|
421
|
+
*
|
|
422
|
+
* 返回值与静态 sharedData 的 flag group 对齐,
|
|
423
|
+
* 解释器只关心位图值本身,不关心内部存储结构。
|
|
424
|
+
*/
|
|
425
|
+
getFlag(flagGroupId: number): number
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* 动态组件 sharedData 的最小接口。
|
|
430
|
+
*
|
|
431
|
+
* 对齐静态 renderer 会直接读取的 component builtin:
|
|
432
|
+
* - `_vueId`
|
|
433
|
+
* - `_flatten`
|
|
434
|
+
* - `_renderer`
|
|
435
|
+
*/
|
|
436
|
+
interface IUniDynamicSharedDataComponent extends IUniDynamicSharedData {
|
|
437
|
+
/**
|
|
438
|
+
* 返回组件或页面实例的 vueId。
|
|
439
|
+
*/
|
|
440
|
+
getVueId(): number
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* 返回组件当前 flatten 状态。
|
|
444
|
+
*/
|
|
445
|
+
getFlatten(): UniSharedDataComponentFlatten
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* 返回当前 renderer 类型。
|
|
449
|
+
*/
|
|
450
|
+
getRenderer(): UniSharedDataComponentRenderer
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* 动态页面 sharedData 的最小接口。
|
|
455
|
+
*
|
|
456
|
+
* 接口层明确表达:dynamic page 也是 dynamic component。
|
|
457
|
+
*
|
|
458
|
+
* 当前阶段 page 不额外增加读取能力,直接继承 component 接口。
|
|
459
|
+
* `_flushJobs`、`_render`、`_textLayouts` 等行为属于真实运行时职责,
|
|
460
|
+
* 不放进当前解释器契约。
|
|
461
|
+
*/
|
|
462
|
+
interface IUniDynamicSharedDataPage extends IUniDynamicSharedDataComponent {}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* 动态普通 scope 的最终目标基类。
|
|
466
|
+
*
|
|
467
|
+
* 外部仓库的真实实现应继承静态基类 `UniSharedData`,
|
|
468
|
+
* 同时实现 `IUniDynamicSharedData`。
|
|
469
|
+
*/
|
|
470
|
+
abstract class UniDynamicSharedData extends UniSharedData implements IUniDynamicSharedData {
|
|
471
|
+
/**
|
|
472
|
+
* 当前动态实例对应的 sharedData class 描述。
|
|
473
|
+
*/
|
|
474
|
+
readonly _sharedDataClass: UniDynamicSharedDataClassDefinition
|
|
475
|
+
|
|
476
|
+
constructor(scope: UniSharedDataPage, sharedDataClass: UniDynamicSharedDataClassDefinition)
|
|
477
|
+
|
|
478
|
+
abstract getField(fieldId: number): UniSharedDataAny
|
|
479
|
+
abstract getFlag(flagGroupId: number): number
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* 动态模式继续复用静态 `_setData` / `_resetFlags()` 命名,
|
|
483
|
+
* 但动态 `renderSharedData` 代码应优先传 `fieldId`,避免运行时再做
|
|
484
|
+
* `key -> fieldId` 匹配。
|
|
485
|
+
*
|
|
486
|
+
* 为兼容静态语义与旧调用形态,这里保留 `string` / `number` 双签名:
|
|
487
|
+
* - `string`:兼容静态 sharedData 风格,仅做类型定义无需实现
|
|
488
|
+
* - `number`:动态 sharedData 主路径,表示 `fieldId`
|
|
489
|
+
*/
|
|
490
|
+
// 同样保留双签名兼容静态调用形态,但动态实现只使用 `fieldId` 版本,无需实现 `string` 版本
|
|
491
|
+
abstract _setData(key: string, value: any | null): void
|
|
492
|
+
abstract _setData(fieldId: number, value: any | null): void
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* 动态组件 scope 的最终目标基类。
|
|
497
|
+
*
|
|
498
|
+
* 外部仓库真实实现需要保持与静态 `UniSharedDataComponent`
|
|
499
|
+
* 相同的组件级 builtin 语义。
|
|
500
|
+
*
|
|
501
|
+
* 这里的 class 继承表达“复用哪一个静态基类”:
|
|
502
|
+
* - component 复用 `UniSharedDataComponent`
|
|
503
|
+
*
|
|
504
|
+
* 因为这里不继承 `UniDynamicSharedData`,所以动态读取接口仍需显式声明,
|
|
505
|
+
* 不能只留在 `IUniDynamicSharedDataComponent` 里。
|
|
506
|
+
*/
|
|
507
|
+
abstract class UniDynamicSharedDataComponent extends UniSharedDataComponent implements IUniDynamicSharedDataComponent {
|
|
508
|
+
readonly _sharedDataClass: UniDynamicSharedDataClassDefinition
|
|
509
|
+
|
|
510
|
+
constructor(scope: UniSharedDataPage, options: UniSharedDataComponentOptions, sharedDataClass: UniDynamicSharedDataClassDefinition)
|
|
511
|
+
|
|
512
|
+
abstract getField(fieldId: number): UniSharedDataAny
|
|
513
|
+
abstract getFlag(flagGroupId: number): number
|
|
514
|
+
// 同样保留双签名兼容静态调用形态,但动态实现只使用 `fieldId` 版本,无需实现 `string` 版本
|
|
515
|
+
abstract _setData(key: string, value: any | null): void
|
|
516
|
+
abstract _setData(fieldId: number, value: any | null): void
|
|
517
|
+
abstract getVueId(): number
|
|
518
|
+
abstract getFlatten(): UniSharedDataComponentFlatten
|
|
519
|
+
abstract getRenderer(): UniSharedDataComponentRenderer
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* 动态页面 scope 的最终目标基类。
|
|
524
|
+
*
|
|
525
|
+
* 外部仓库真实实现应继承 `UniSharedDataPage`,
|
|
526
|
+
* 并沿用 component builtin 读取面。
|
|
527
|
+
*
|
|
528
|
+
* 这里不写成 `UniDynamicSharedDataPage extends UniDynamicSharedDataComponent`。
|
|
529
|
+
* 原因:
|
|
530
|
+
* 1. `page` 是否属于 `component`,由接口继承表达
|
|
531
|
+
* 2. class 继承优先表达真实静态基类复用关系
|
|
532
|
+
* 3. `UniSharedDataPage` 已经继承 `UniSharedDataComponent`
|
|
533
|
+
*
|
|
534
|
+
* 因为这里不继承 `UniDynamicSharedDataComponent`,所以动态读取接口同样
|
|
535
|
+
* 需要显式声明,不能只留在 `IUniDynamicSharedDataPage` 里。
|
|
536
|
+
*/
|
|
537
|
+
abstract class UniDynamicSharedDataPage extends UniSharedDataPage implements IUniDynamicSharedDataPage {
|
|
538
|
+
readonly _sharedDataClass: UniDynamicSharedDataClassDefinition
|
|
539
|
+
|
|
540
|
+
constructor(pageIdOrScope: number | UniSharedDataPage, options: UniSharedDataComponentOptions, sharedDataClass: UniDynamicSharedDataClassDefinition)
|
|
541
|
+
|
|
542
|
+
abstract getField(fieldId: number): UniSharedDataAny
|
|
543
|
+
abstract getFlag(flagGroupId: number): number
|
|
544
|
+
// 同样保留双签名兼容静态调用形态,但动态实现只使用 `fieldId` 版本,无需实现 `string` 版本
|
|
545
|
+
abstract _setData(key: string, value: any | null): void
|
|
546
|
+
abstract _setData(fieldId: number, value: any | null): void
|
|
547
|
+
abstract getVueId(): number
|
|
548
|
+
abstract getFlatten(): UniSharedDataComponentFlatten
|
|
549
|
+
abstract getRenderer(): UniSharedDataComponentRenderer
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
334
553
|
export {}
|
|
@@ -848,9 +848,8 @@ export interface Uni {
|
|
|
848
848
|
* }
|
|
849
849
|
* }
|
|
850
850
|
*
|
|
851
|
-
* @
|
|
852
|
-
* @tutorial
|
|
853
|
-
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context.html
|
|
851
|
+
* @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context-async.html
|
|
852
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context-async.html
|
|
854
853
|
*/
|
|
855
854
|
createEditorContextAsync : CreateEditorContextAsync
|
|
856
855
|
}
|
|
@@ -848,9 +848,8 @@ export interface Uni {
|
|
|
848
848
|
* }
|
|
849
849
|
* }
|
|
850
850
|
*
|
|
851
|
-
* @
|
|
852
|
-
* @tutorial
|
|
853
|
-
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context.html
|
|
851
|
+
* @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context-async.html
|
|
852
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/create-editor-context-async.html
|
|
854
853
|
*/
|
|
855
854
|
createEditorContextAsync : CreateEditorContextAsync
|
|
856
855
|
}
|