lucid-extension-sdk 0.0.121 → 0.0.123

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 (29) hide show
  1. package/package.json +1 -1
  2. package/sdk/commandtypes.d.ts +24 -0
  3. package/sdk/commandtypes.js +1 -0
  4. package/sdk/core/base64.js +6 -0
  5. package/sdk/core/checks.d.ts +6 -0
  6. package/sdk/core/checks.js +10 -1
  7. package/sdk/core/data/datasource/datasourcetype.d.ts +1 -1
  8. package/sdk/core/data/datasource/datasourcetype.js +1 -1
  9. package/sdk/core/data/datasource/metadatatypes.d.ts +1 -1
  10. package/sdk/core/data/datasource/metadatatypes.js +1 -1
  11. package/sdk/core/data/datasource/serializeddatasourceproperties.d.ts +1 -1
  12. package/sdk/core/data/datasource/serializedimporteddatasource.d.ts +3 -3
  13. package/sdk/core/data/datasource/serializedupstreamconfig.d.ts +1 -1
  14. package/sdk/core/data/datasource/upstreampatchtype.d.ts +1 -1
  15. package/sdk/core/data/datasource/upstreampatchtype.js +1 -1
  16. package/sdk/core/data/datasource/upstreamupdatetype.d.ts +1 -1
  17. package/sdk/core/data/datasource/upstreamupdatetype.js +1 -1
  18. package/sdk/core/data/fieldspecification.js +1 -2
  19. package/sdk/core/object.d.ts +0 -3
  20. package/sdk/core/object.js +1 -6
  21. package/sdk/core/spreadsheetintegration/lucidspreadsheetintegration.d.ts +20 -0
  22. package/sdk/core/spreadsheetintegration/lucidspreadsheetintegration.js +17 -0
  23. package/sdk/core/spreadsheetintegration/lucidspreadsheetintegrationregistry.d.ts +11 -0
  24. package/sdk/core/spreadsheetintegration/lucidspreadsheetintegrationregistry.js +53 -0
  25. package/sdk/dataconnector/debugserver.js +2 -2
  26. package/sdk/editorclient.js +1 -2
  27. package/sdk/index.d.ts +2 -0
  28. package/sdk/index.js +2 -0
  29. package/sdk/ui/viewport.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.121",
3
+ "version": "0.0.123",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "sdk/index.js",
6
6
  "types": "sdk/index.d.ts",
@@ -24,6 +24,7 @@ export declare const enum CommandName {
24
24
  AddLineTextArea = "alta",
25
25
  AddMenuItem = "ami",
26
26
  AddShapeData = "asd",
27
+ AddSpreadsheetIntegration = "asi",
27
28
  Alert = "a",
28
29
  AnimateViewport = "av",
29
30
  AwaitImport = "ai",
@@ -136,6 +137,10 @@ export declare type CommandArgs = {
136
137
  query: AddShapeDataQuery;
137
138
  result: AddShapeDataResult;
138
139
  };
140
+ [CommandName.AddSpreadsheetIntegration]: {
141
+ query: AddSpreadsheetIntegrationQuery;
142
+ result: AddSpreadsheetIntegrationResult;
143
+ };
139
144
  [CommandName.Alert]: {
140
145
  query: AlertQuery;
141
146
  result: AlertResult;
@@ -576,6 +581,25 @@ export declare type AddShapeDataQuery = {
576
581
  'v'?: SerializedFieldType;
577
582
  };
578
583
  export declare type AddShapeDataResult = undefined;
584
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
585
+ export declare type AddSpreadsheetIntegrationQuery = {
586
+ /** name */
587
+ 'n': string;
588
+ /** label */
589
+ 'l': string;
590
+ /** iconUrl */
591
+ 'iu': string;
592
+ /** getSpreadsheetToImportDetails */
593
+ 'gd': string;
594
+ /** getSpreadsheetSheetIdsAndNames */
595
+ 'gs': string;
596
+ /** getPreviewData */
597
+ 'gp': string;
598
+ /** importSheets */
599
+ 'i': string;
600
+ };
601
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
602
+ export declare type AddSpreadsheetIntegrationResult = undefined;
579
603
  export declare type AlertQuery = {
580
604
  /** Title; defaults to extension title */
581
605
  't'?: string | undefined;
@@ -8,6 +8,7 @@ exports.commandTitles = new Map([
8
8
  ["alta" /* CommandName.AddLineTextArea */, 'AddLineTextArea'],
9
9
  ["ami" /* CommandName.AddMenuItem */, 'AddMenuItem'],
10
10
  ["asd" /* CommandName.AddShapeData */, 'AddShapeData'],
11
+ ["asi" /* CommandName.AddSpreadsheetIntegration */, 'AddSpreadsheetIntegration'],
11
12
  ["a" /* CommandName.Alert */, 'Alert'],
12
13
  ["av" /* CommandName.AnimateViewport */, 'AnimateViewport'],
13
14
  ["ai" /* CommandName.AwaitImport */, 'AwaitImport'],
@@ -30,6 +30,9 @@ function decodeBase64(base64String) {
30
30
  const enc2 = charCodeToEncodedInt[base64String.charCodeAt(inputIndex++)];
31
31
  const enc3 = charCodeToEncodedInt[base64String.charCodeAt(inputIndex++)];
32
32
  const enc4 = charCodeToEncodedInt[base64String.charCodeAt(inputIndex++)];
33
+ if (enc1 === undefined || enc2 === undefined || enc3 === undefined || enc4 === undefined) {
34
+ throw new Error('char code to encoded int contains an undefined index');
35
+ }
33
36
  //Read 8 total bits into each of the output values. Skip one byte
34
37
  //for each padding = at the end of the string
35
38
  output[outputIndex] = (enc1 << 2) | (enc2 >> 4);
@@ -55,6 +58,9 @@ function encodeBase64(byteArray) {
55
58
  const byte1 = byteArray[inputIndex++];
56
59
  const byte2 = byteArray[inputIndex++];
57
60
  const byte3 = byteArray[inputIndex++];
61
+ if (byte1 === undefined || byte2 === undefined || byte3 === undefined) {
62
+ throw new Error('byteArray contains undefined indexes');
63
+ }
58
64
  const enc1 = byte1 >> 2; // first 6 bits of byte1
59
65
  const enc2 = ((byte1 & 3) << 4) | (byte2 >> 4); // last 2 bits of byte1 and first 4 bits of byte2
60
66
  const enc3 = ((byte2 & 15) << 2) | (byte3 >> 6); // last 4 bits of byte2 and first 2 bits of byte3
@@ -17,6 +17,12 @@ export declare function isNull(val: unknown): val is null;
17
17
  * @return Whether variable is undefined.
18
18
  */
19
19
  export declare function isUndefined(val: unknown): val is undefined;
20
+ /**
21
+ * Returns true if the specified value is undefined.
22
+ * @param val Variable to test.
23
+ * @return Whether variable is undefined.
24
+ */
25
+ export declare function isVoid(x: unknown): x is void;
20
26
  /**
21
27
  * Returns true if the specified value is defined and not null.
22
28
  * @param val Variable to test.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInstanceOf = exports.isLiteral = exports.isPromise = exports.isUnknown = exports.isAny = exports.isEmptyOrNullishObject = exports.isTypedArray = exports.isArray = exports.isRecord = exports.isObject = exports.isFunction = exports.isInfinite = exports.isInt = exports.isNumber = exports.isBoolean = exports.isString = exports.isNullish = exports.isDefAndNotNull = exports.isUndefined = exports.isNull = exports.isDef = void 0;
3
+ exports.isInstanceOf = exports.isLiteral = exports.isPromise = exports.isUnknown = exports.isAny = exports.isEmptyOrNullishObject = exports.isTypedArray = exports.isArray = exports.isRecord = exports.isObject = exports.isFunction = exports.isInfinite = exports.isInt = exports.isNumber = exports.isBoolean = exports.isString = exports.isNullish = exports.isDefAndNotNull = exports.isVoid = exports.isUndefined = exports.isNull = exports.isDef = void 0;
4
4
  /**
5
5
  * Returns true if the specified value is not undefined.
6
6
  *
@@ -29,6 +29,15 @@ function isUndefined(val) {
29
29
  return val === undefined;
30
30
  }
31
31
  exports.isUndefined = isUndefined;
32
+ /**
33
+ * Returns true if the specified value is undefined.
34
+ * @param val Variable to test.
35
+ * @return Whether variable is undefined.
36
+ */
37
+ function isVoid(x) {
38
+ return x === undefined;
39
+ }
40
+ exports.isVoid = isVoid;
32
41
  /**
33
42
  * Returns true if the specified value is defined and not null.
34
43
  * @param val Variable to test.
@@ -1,4 +1,4 @@
1
- /** @ignore until spreadsheet integration is ready for launch */
1
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
2
2
  export declare enum DataSourceType {
3
3
  GoogleSheets = 0,
4
4
  CSV = 1,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataSourceType = void 0;
4
- /** @ignore until spreadsheet integration is ready for launch */
4
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
5
5
  var DataSourceType;
6
6
  (function (DataSourceType) {
7
7
  DataSourceType[DataSourceType["GoogleSheets"] = 0] = "GoogleSheets";
@@ -1,4 +1,4 @@
1
- /** @ignore until spreadsheet integration is ready for launch */
1
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
2
2
  export declare enum MetadataTypes {
3
3
  Format = "Format",
4
4
  FillColor = "FillColor",
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MetadataTypes = void 0;
4
4
  // Google Sheets has both notes and comments, we store notes in the comment metadata collection. Comments are not
5
5
  // meant to be permanent in Google Sheets whereas they are in Excel, resulting in some confusion with our naming.
6
- /** @ignore until spreadsheet integration is ready for launch */
6
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
7
7
  var MetadataTypes;
8
8
  (function (MetadataTypes) {
9
9
  MetadataTypes["Format"] = "Format";
@@ -1,5 +1,5 @@
1
1
  import { SerializedUpstreamConfig } from './serializedupstreamconfig';
2
- /** @ignore until spreadsheet integration is ready for launch */
2
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
3
3
  export interface SerializedDataSourceProperties {
4
4
  'Name': string;
5
5
  'UpstreamConfig'?: SerializedUpstreamConfig | null | undefined;
@@ -1,13 +1,13 @@
1
1
  import { SerializedDataItems } from '../serializedfield/serializeddataitems';
2
2
  import { SerializedSchema } from '../serializedfield/serializedschema';
3
3
  import { SerializedDataSourceProperties } from './serializeddatasourceproperties';
4
- /** @ignore until spreadsheet integration is ready for launch */
4
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
5
5
  export interface SerializedImportedMetadataCollection {
6
6
  'Name': string;
7
7
  'Schema': SerializedSchema;
8
8
  'Items': SerializedDataItems;
9
9
  }
10
- /** @ignore until spreadsheet integration is ready for launch */
10
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
11
11
  export interface SerializedImportedCollection {
12
12
  'Name': string;
13
13
  'Schema': SerializedSchema;
@@ -19,7 +19,7 @@ export interface SerializedImportedCollection {
19
19
  [key: string]: SerializedImportedMetadataCollection;
20
20
  };
21
21
  }
22
- /** @ignore until spreadsheet integration is ready for launch */
22
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
23
23
  export interface SerializedImportedDataSource {
24
24
  'Properties': SerializedDataSourceProperties;
25
25
  'Collections': SerializedImportedCollection[];
@@ -1,7 +1,7 @@
1
1
  import { DataSourceType } from './datasourcetype';
2
2
  import { UpstreamPatchType } from './upstreampatchtype';
3
3
  import { UpstreamUpdateType } from './upstreamupdatetype';
4
- /** @ignore until spreadsheet integration is ready for launch */
4
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
5
5
  export interface SerializedUpstreamConfig {
6
6
  'SourceType': DataSourceType;
7
7
  'UpdateType': UpstreamUpdateType;
@@ -1,4 +1,4 @@
1
- /** @ignore until spreadsheet integration is ready for launch */
1
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
2
2
  export declare enum UpstreamPatchType {
3
3
  NONE = 0,
4
4
  MANUAL = 2,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpstreamPatchType = void 0;
4
- /** @ignore until spreadsheet integration is ready for launch */
4
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
5
5
  var UpstreamPatchType;
6
6
  (function (UpstreamPatchType) {
7
7
  UpstreamPatchType[UpstreamPatchType["NONE"] = 0] = "NONE";
@@ -1,4 +1,4 @@
1
- /** @ignore until spreadsheet integration is ready for launch */
1
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
2
2
  export declare enum UpstreamUpdateType {
3
3
  NONE = 0,
4
4
  PULL = 1,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpstreamUpdateType = void 0;
4
- /** @ignore until spreadsheet integration is ready for launch */
4
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
5
5
  var UpstreamUpdateType;
6
6
  (function (UpstreamUpdateType) {
7
7
  UpstreamUpdateType[UpstreamUpdateType["NONE"] = 0] = "NONE";
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormattedPrimaryKey = exports.declareSchema = void 0;
4
- const object_1 = require("../object");
5
4
  function isArrayAndAssertReadonly(val) {
6
5
  return Array.isArray(val);
7
6
  }
@@ -18,7 +17,7 @@ function declareSchema({ primaryKey, fields }) {
18
17
  const primaryKeyObj = new FormattedPrimaryKey(...primaryKey);
19
18
  return {
20
19
  example: fields,
21
- array: (0, object_1.entries)(fields).map(([name, { type, constraints, mapping }]) => {
20
+ array: Object.entries(fields).map(([name, { type, constraints, mapping }]) => {
22
21
  return {
23
22
  'name': name,
24
23
  'type': isArrayAndAssertReadonly(type) ? type.slice() : type,
@@ -2,9 +2,6 @@ export declare function objectEvery<T, O extends {
2
2
  [key: string]: any;
3
3
  }>(obj: O, f: (this: T | undefined, _0: O[typeof _1], _1: string & keyof O, _2: O) => any, opt_this?: T): boolean;
4
4
  export declare function flatten<T>(a: T[][]): T[];
5
- export declare function entries<T>(obj: {
6
- [key: string]: T;
7
- }): [string, T][];
8
5
  export declare function fromEntries<K extends PropertyKey, T>(entries: Iterable<readonly [K, T]>): {
9
6
  [key in K]: T;
10
7
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fromEntries = exports.entries = exports.flatten = exports.objectEvery = void 0;
3
+ exports.fromEntries = exports.flatten = exports.objectEvery = void 0;
4
4
  function objectEvery(obj, f, opt_this) {
5
5
  for (const key in obj) {
6
6
  if (!f.call(opt_this, obj[key], key, obj)) {
@@ -18,11 +18,6 @@ function flatten(a) {
18
18
  return result;
19
19
  }
20
20
  exports.flatten = flatten;
21
- // TODO: Placeholder until we adopt ES8 and can use Object.entries(obj)
22
- function entries(obj) {
23
- return Object.keys(obj).map((key) => [key, obj[key]]);
24
- }
25
- exports.entries = entries;
26
21
  // TODO: Placeholder until we adopt ES8 and can use Object.fromEntries(obj)
27
22
  function fromEntries(entries) {
28
23
  const result = {};
@@ -0,0 +1,20 @@
1
+ import { CollectionProxy } from '../../data/collectionproxy';
2
+ import { SerializedImportedDataSource } from '../data/datasource/serializedimporteddatasource';
3
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
4
+ export declare enum LucidSpreadsheetIntegrationFailureType {
5
+ AuthorizationFailure = "AuthorizationFailure",
6
+ GenericFailure = "GenericFailure",
7
+ UserCancelled = "UserCanceled"
8
+ }
9
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
10
+ export declare const lucidSpreadsheetIntegrationFailureTypeValidator: (x: unknown) => x is LucidSpreadsheetIntegrationFailureType;
11
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
12
+ export declare abstract class LucidSpreadsheetIntegration<CONFIG, SHEET> {
13
+ abstract name: string;
14
+ abstract label: string;
15
+ abstract iconUrl: string;
16
+ abstract getSpreadsheetToImportDetails: () => Promise<CONFIG | LucidSpreadsheetIntegrationFailureType>;
17
+ abstract getSpreadsheetSheetIdsAndNames(spreadsheetDetails: CONFIG): Promise<Map<SHEET, string> | LucidSpreadsheetIntegrationFailureType>;
18
+ abstract getPreviewData(spreadsheetDetails: CONFIG, sheetIdsToPreview: SHEET[]): Promise<SerializedImportedDataSource | LucidSpreadsheetIntegrationFailureType>;
19
+ abstract importSheets(spreadsheetDetails: CONFIG, sheetIdsToImport: SHEET[]): Promise<CollectionProxy[] | LucidSpreadsheetIntegrationFailureType>;
20
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LucidSpreadsheetIntegration = exports.lucidSpreadsheetIntegrationFailureTypeValidator = exports.LucidSpreadsheetIntegrationFailureType = void 0;
4
+ const validators_1 = require("../validators/validators");
5
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
6
+ var LucidSpreadsheetIntegrationFailureType;
7
+ (function (LucidSpreadsheetIntegrationFailureType) {
8
+ LucidSpreadsheetIntegrationFailureType["AuthorizationFailure"] = "AuthorizationFailure";
9
+ LucidSpreadsheetIntegrationFailureType["GenericFailure"] = "GenericFailure";
10
+ LucidSpreadsheetIntegrationFailureType["UserCancelled"] = "UserCanceled";
11
+ })(LucidSpreadsheetIntegrationFailureType = exports.LucidSpreadsheetIntegrationFailureType || (exports.LucidSpreadsheetIntegrationFailureType = {}));
12
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
13
+ exports.lucidSpreadsheetIntegrationFailureTypeValidator = (0, validators_1.stringEnumValidator)(LucidSpreadsheetIntegrationFailureType);
14
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
15
+ class LucidSpreadsheetIntegration {
16
+ }
17
+ exports.LucidSpreadsheetIntegration = LucidSpreadsheetIntegration;
@@ -0,0 +1,11 @@
1
+ import { EditorClient } from '../../editorclient';
2
+ import { LucidSpreadsheetIntegration } from './lucidspreadsheetintegration';
3
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
4
+ export declare class LucidSpreadsheetIntegrationRegistry {
5
+ private static nextHookId;
6
+ private static nextHookName;
7
+ /**
8
+ * Register a spreadsheet integration.
9
+ */
10
+ static addSpreadsheetIntegration<CONFIG, SHEET>(client: EditorClient, spreadsheetIntegration: LucidSpreadsheetIntegration<CONFIG, SHEET>): void;
11
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LucidSpreadsheetIntegrationRegistry = void 0;
4
+ const lucidspreadsheetintegration_1 = require("./lucidspreadsheetintegration");
5
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
6
+ class LucidSpreadsheetIntegrationRegistry {
7
+ static nextHookName() {
8
+ return '__lucidspreadsheet__hook' + this.nextHookId++;
9
+ }
10
+ /**
11
+ * Register a spreadsheet integration.
12
+ */
13
+ static addSpreadsheetIntegration(client, spreadsheetIntegration) {
14
+ const getSpreadsheetToImportDetailsActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
15
+ client.registerAction(getSpreadsheetToImportDetailsActionName, async () => {
16
+ const result = await spreadsheetIntegration.getSpreadsheetToImportDetails();
17
+ return result;
18
+ });
19
+ const getSpreadsheetSheetIdsAndNamesActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
20
+ client.registerAction(getSpreadsheetSheetIdsAndNamesActionName, async (message) => {
21
+ const result = await spreadsheetIntegration.getSpreadsheetSheetIdsAndNames(message['dataDetails']);
22
+ if ((0, lucidspreadsheetintegration_1.lucidSpreadsheetIntegrationFailureTypeValidator)(result)) {
23
+ return result;
24
+ }
25
+ else {
26
+ // Serialize the Map
27
+ return Array.from(result);
28
+ }
29
+ });
30
+ const getPreviewDataActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
31
+ client.registerAction(getPreviewDataActionName, async (message) => {
32
+ const result = await spreadsheetIntegration.getPreviewData(message['dataDetails'], message['sheetIds']);
33
+ return result;
34
+ });
35
+ const importSheetsActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
36
+ client.registerAction(importSheetsActionName, async (message) => {
37
+ const result = await spreadsheetIntegration.importSheets(message['dataDetails'], message['sheetIds']);
38
+ return result;
39
+ });
40
+ const serialized = {
41
+ 'n': spreadsheetIntegration.name,
42
+ 'l': spreadsheetIntegration.label,
43
+ 'iu': spreadsheetIntegration.iconUrl,
44
+ 'gd': getSpreadsheetToImportDetailsActionName,
45
+ 'gs': getSpreadsheetSheetIdsAndNamesActionName,
46
+ 'gp': getPreviewDataActionName,
47
+ 'i': importSheetsActionName,
48
+ };
49
+ client.sendCommand("asi" /* CommandName.AddSpreadsheetIntegration */, serialized);
50
+ }
51
+ }
52
+ exports.LucidSpreadsheetIntegrationRegistry = LucidSpreadsheetIntegrationRegistry;
53
+ LucidSpreadsheetIntegrationRegistry.nextHookId = 0;
@@ -32,12 +32,12 @@ function routeDebugServer(dataConnector, options) {
32
32
  const { body, status, headers } = await route({
33
33
  body: req.body.toString(),
34
34
  headers: reqHeaders,
35
- query: (0, object_1.fromEntries)((0, object_1.entries)(req.query).map(([key, value]) => [
35
+ query: (0, object_1.fromEntries)(Object.entries(req.query).map(([key, value]) => [
36
36
  key,
37
37
  typeof value === 'string' ? value : undefined,
38
38
  ])),
39
39
  });
40
- for (const [name, value] of (0, object_1.entries)(headers !== null && headers !== void 0 ? headers : {})) {
40
+ for (const [name, value] of Object.entries(headers !== null && headers !== void 0 ? headers : {})) {
41
41
  if (typeof value === 'string') {
42
42
  res.setHeader(name, value);
43
43
  }
@@ -4,7 +4,6 @@ exports.EditorClient = void 0;
4
4
  const commandtypes_1 = require("./commandtypes");
5
5
  const base64_1 = require("./core/base64");
6
6
  const checks_1 = require("./core/checks");
7
- const object_1 = require("./core/object");
8
7
  const unfurlcallbacks_1 = require("./core/unfurl/unfurlcallbacks");
9
8
  const unfurldetails_1 = require("./core/unfurl/unfurldetails");
10
9
  const unfurlrefresherrortype_1 = require("./core/unfurl/unfurlrefresherrortype");
@@ -148,7 +147,7 @@ class EditorClient {
148
147
  * @returns A promise that resolves to a map of setting names to current setting values
149
148
  */
150
149
  async getPackageSettings() {
151
- return new Map((0, object_1.entries)(await this.sendCommand("gps" /* CommandName.GetPackageSettings */, undefined)));
150
+ return new Map(Object.entries(await this.sendCommand("gps" /* CommandName.GetPackageSettings */, undefined)));
152
151
  }
153
152
  /**
154
153
  * @returns True if the current user is allowed to edit package settings on this installation
package/sdk/index.d.ts CHANGED
@@ -43,6 +43,8 @@ export * from './core/properties/fillcolor';
43
43
  export * from './core/properties/shadow';
44
44
  export * from './core/serializeddataerror';
45
45
  export * from './core/shapedatainheritance';
46
+ export * from './core/spreadsheetintegration/lucidspreadsheetintegration';
47
+ export * from './core/spreadsheetintegration/lucidspreadsheetintegrationregistry';
46
48
  export * from './core/unfurl/unfurlcallbacks';
47
49
  export * from './core/unfurl/unfurldetails';
48
50
  export * from './core/unfurl/unfurliframe';
package/sdk/index.js CHANGED
@@ -59,6 +59,8 @@ __exportStar(require("./core/properties/fillcolor"), exports);
59
59
  __exportStar(require("./core/properties/shadow"), exports);
60
60
  __exportStar(require("./core/serializeddataerror"), exports);
61
61
  __exportStar(require("./core/shapedatainheritance"), exports);
62
+ __exportStar(require("./core/spreadsheetintegration/lucidspreadsheetintegration"), exports);
63
+ __exportStar(require("./core/spreadsheetintegration/lucidspreadsheetintegrationregistry"), exports);
62
64
  __exportStar(require("./core/unfurl/unfurlcallbacks"), exports);
63
65
  __exportStar(require("./core/unfurl/unfurldetails"), exports);
64
66
  __exportStar(require("./core/unfurl/unfurliframe"), exports);
@@ -44,7 +44,7 @@ class Viewport {
44
44
  */
45
45
  focusCameraOnItems(items) {
46
46
  const bb = (0, math_1.combinedBoundingBox)(items.map((e) => e.getBoundingBox()));
47
- if (bb) {
47
+ if (bb && items[0]) {
48
48
  //TODO: A reasonable max zoom level (e.g. 200%)
49
49
  this.client.sendCommand("av" /* CommandName.AnimateViewport */, {
50
50
  'bb': (0, math_1.padBox)(bb, 80),