lucid-extension-sdk 0.0.75 → 0.0.77

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.75",
3
+ "version": "0.0.77",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "sdk/index.js",
6
6
  "types": "sdk/index.d.ts",
@@ -105,7 +105,7 @@ export declare function isEmptyOrNullishObject(val: unknown): val is {};
105
105
  export declare function isAny(val: unknown): val is any;
106
106
  export declare function isUnknown(val: unknown): val is unknown;
107
107
  export declare function isPromise(val: unknown): val is Promise<unknown>;
108
- export declare function isLiteral<T extends string | number | symbol>(t: T): (x: unknown) => x is T;
108
+ export declare function isLiteral<T extends string | number | symbol | true | false>(t: T): (x: unknown) => x is T;
109
109
  declare type AbstractConstructor<T> = Function & {
110
110
  prototype: T;
111
111
  };
@@ -14,6 +14,9 @@ export declare type SerializedFields = {
14
14
  export declare type SerializedLucidDateObject = {
15
15
  'ms': number;
16
16
  'isDateOnly'?: boolean;
17
+ } | {
18
+ 'isoDate': string;
19
+ 'displayTimezone'?: string;
17
20
  };
18
21
  export declare type SerializedRGBColor = {
19
22
  'r': number;
@@ -15,8 +15,10 @@ function isSerializedLucidCurrency(value) {
15
15
  }
16
16
  exports.isSerializedLucidCurrency = isSerializedLucidCurrency;
17
17
  function isSerializedLucidDateObject(value) {
18
- var _a;
19
- return (0, checks_1.isObject)(value) && (0, checks_1.isNumber)(value['ms']) && (0, checks_1.isBoolean)((_a = value['isDateOnly']) !== null && _a !== void 0 ? _a : true);
18
+ var _a, _b;
19
+ return ((0, checks_1.isObject)(value) &&
20
+ (((0, checks_1.isNumber)(value['ms']) && (0, checks_1.isBoolean)((_a = value['isDateOnly']) !== null && _a !== void 0 ? _a : true)) ||
21
+ ((0, checks_1.isString)(value['isoDate']) && (0, checks_1.isString)((_b = value['displayTimezone']) !== null && _b !== void 0 ? _b : 'a'))));
20
22
  }
21
23
  exports.isSerializedLucidDateObject = isSerializedLucidDateObject;
22
24
  function isSerializedFieldType(value) {