@mica-js/document 0.4.0 → 0.6.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.
@@ -24,6 +24,20 @@ export declare function decodeStrictJson(text: string): JsonDecodeResult;
24
24
  */
25
25
  export declare function deriveFusedTopology(document: FusedDocument, manifests: ReadonlyMap<string, UnifiedDeviceManifest>): FusedTopology;
26
26
 
27
+ /** `device-data` directory relative POSIX file path problem, or `undefined` when well formed. */
28
+ export declare function deviceDataPathProblem(path: string): string | undefined;
29
+
30
+ /**
31
+ * Device data file next to the schematic (RFC 0024 / RFC 0029).
32
+ *
33
+ * `path` is a directory-root relative POSIX path inside the document's sibling `device-data/`
34
+ * directory. A `disk` property accepts only this reference for a non-null value.
35
+ */
36
+ export declare interface DeviceDataReference {
37
+ readonly mode: 'device-data';
38
+ readonly path: string;
39
+ }
40
+
27
41
  /** Exact release a document depends on (RFC 0020 / RFC 0024). */
28
42
  export declare interface DeviceDependency {
29
43
  readonly version: string;
@@ -79,8 +93,10 @@ export declare interface DevicePropertyDescriptor {
79
93
  readonly alpha?: boolean;
80
94
  /** `enum`: non-empty option list. */
81
95
  readonly options?: readonly PropertyOption[];
82
- /** `image` / `binary` / `firmware`: host-side payload limit in bytes. */
96
+ /** `image` / `binary` / `disk` / `firmware`: host-side payload limit in bytes. */
83
97
  readonly maxBytes?: number;
98
+ /** `disk`: access to the session image, defaulting to read-only. */
99
+ readonly access?: 'read-only' | 'read-write';
84
100
  /** `image`: host-side pixel limit. */
85
101
  readonly maxPixels?: number;
86
102
  /** `binary`: file extension filter, each entry matching `\.[A-Za-z0-9]+`. */
@@ -98,7 +114,7 @@ export declare interface DevicePropertyDescriptor {
98
114
  }
99
115
 
100
116
  /** Predefined property value kinds of a device property description (RFC 0009 / RFC 0020). */
101
- export declare type DevicePropertyType = 'string' | 'integer' | 'number' | 'boolean' | 'color' | 'enum' | 'image' | 'binary' | 'firmware' | 'program';
117
+ export declare type DevicePropertyType = 'string' | 'integer' | 'number' | 'boolean' | 'color' | 'enum' | 'image' | 'binary' | 'disk' | 'firmware' | 'program';
102
118
 
103
119
  /** Selects available releases and opens exact locks (RFC 0020). */
104
120
  export declare interface DeviceRegistry {
@@ -508,9 +524,10 @@ export declare interface PropertyOption {
508
524
 
509
525
  /**
510
526
  * Instance property value stored in `FusedInstance.properties` (RFC 0024): a scalar, a resource
511
- * reference, a firmware reference, or `null` for an explicitly cleared nullable property.
527
+ * reference, a firmware reference, a device data reference, or `null` for an explicitly cleared
528
+ * nullable property.
512
529
  */
513
- export declare type PropertyValue = string | number | boolean | null | ResourceReference | ProgramReference;
530
+ export declare type PropertyValue = string | number | boolean | null | ResourceReference | ProgramReference | DeviceDataReference;
514
531
 
515
532
  /**
516
533
  * Structural read-only byte snapshot: read-only access plus a `slice` that returns an independent