lucid-extension-sdk
Advanced tools
Comparing version 0.0.247 to 0.0.248
@@ -73,2 +73,3 @@ import { SerializedFieldTypeDefinition } from './core/data/fieldtypedefinition/fieldtypedefinition'; | ||
GetDocumentAccessPermission = "gdap", | ||
GetDocumentChunks = "gdc", | ||
GetDocumentId = "gdid", | ||
@@ -346,2 +347,6 @@ GetElementType = "get", | ||
}; | ||
[CommandName.GetDocumentChunks]: { | ||
query: GetDocumentChunksQuery; | ||
result: GetDocumentChunksResult; | ||
}; | ||
[CommandName.GetDocumentId]: { | ||
@@ -1117,2 +1122,25 @@ query: GetDocumentIdQuery; | ||
export type GetDocumentAccessPermissionResult = DocumentAccessPermission; | ||
export declare enum GetDocumentChunksType { | ||
/** | ||
* Breaks up a document into chunks geographically | ||
*/ | ||
Geographic = 0, | ||
/** | ||
* Breaks up a document into chunks by finding containing blocks | ||
*/ | ||
Container = 1 | ||
} | ||
export type GetDocumentChunksQuery = { | ||
't': GetDocumentChunksType[]; | ||
}; | ||
export type GetDocumentChunksResult = SerializedDocumentChunk[]; | ||
type SerializedDocumentChunk = { | ||
/** Bounding box of all items combined */ | ||
'bb': Box; | ||
/** Ids of the items included in the chunk */ | ||
'i': string[]; | ||
't': string; | ||
/** Very brief description that helps describe the chunk */ | ||
'd': string; | ||
}; | ||
export type GetDocumentIdQuery = void; | ||
@@ -1690,1 +1718,2 @@ export type GetDocumentIdResult = string; | ||
export type ZOrderResult = undefined; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ZOrderOperation = exports.isRawSendXHRResponse = exports.MermaidDiagramType = exports.GetLLMContextType = exports.GetItemsAtSearchType = exports.HashAlgorithmEnum = exports.commandTitles = void 0; | ||
exports.ZOrderOperation = exports.isRawSendXHRResponse = exports.MermaidDiagramType = exports.GetLLMContextType = exports.GetItemsAtSearchType = exports.GetDocumentChunksType = exports.HashAlgorithmEnum = exports.commandTitles = void 0; | ||
const checks_1 = require("./core/checks"); | ||
@@ -49,2 +49,3 @@ /** @ignore */ | ||
["gdap" /* CommandName.GetDocumentAccessPermission */, 'GetDocumentAccessPermission'], | ||
["gdc" /* CommandName.GetDocumentChunks */, 'GetDocumentChunks'], | ||
["gdid" /* CommandName.GetDocumentId */, 'GetDocumentId'], | ||
@@ -135,2 +136,13 @@ ["get" /* CommandName.GetElementType */, 'GetElementType'], | ||
})(HashAlgorithmEnum || (exports.HashAlgorithmEnum = HashAlgorithmEnum = {})); | ||
var GetDocumentChunksType; | ||
(function (GetDocumentChunksType) { | ||
/** | ||
* Breaks up a document into chunks geographically | ||
*/ | ||
GetDocumentChunksType[GetDocumentChunksType["Geographic"] = 0] = "Geographic"; | ||
/** | ||
* Breaks up a document into chunks by finding containing blocks | ||
*/ | ||
GetDocumentChunksType[GetDocumentChunksType["Container"] = 1] = "Container"; | ||
})(GetDocumentChunksType || (exports.GetDocumentChunksType = GetDocumentChunksType = {})); | ||
var GetItemsAtSearchType; | ||
@@ -137,0 +149,0 @@ (function (GetItemsAtSearchType) { |
@@ -0,2 +1,4 @@ | ||
import { GetDocumentChunksType } from '../commandtypes'; | ||
import { EditorClient } from '../editorclient'; | ||
import { DocumentChunk } from './documentchunk'; | ||
import { CardConfigProxy } from './documentelement/cardconfigproxy'; | ||
@@ -44,2 +46,4 @@ import { RuleProxy } from './documentelement/ruleproxy'; | ||
getTitle(): string; | ||
/** @ignore */ | ||
getDocumentChunks(types: GetDocumentChunksType[]): DocumentChunk[]; | ||
/** | ||
@@ -46,0 +50,0 @@ * Infrequently, you may need to watch for *any* changes to the document. These changes may be |
@@ -8,2 +8,3 @@ "use strict"; | ||
const elementproxy_1 = require("./elementproxy"); | ||
const itemproxy_1 = require("./itemproxy"); | ||
const mapproxy_1 = require("./mapproxy"); | ||
@@ -74,2 +75,16 @@ const pageproxy_1 = require("./pageproxy"); | ||
} | ||
/** @ignore */ | ||
getDocumentChunks(types) { | ||
const chunks = this.client.sendCommand("gdc" /* CommandName.GetDocumentChunks */, { 't': types }); | ||
return chunks.map((chunk) => { | ||
return { | ||
boundingBox: chunk['bb'], | ||
items: chunk['i'] | ||
.map((id) => this.client.getElementProxy(id)) | ||
.filter((element) => element instanceof itemproxy_1.ItemProxy), | ||
text: chunk['t'], | ||
description: chunk['d'], | ||
}; | ||
}); | ||
} | ||
/** | ||
@@ -76,0 +91,0 @@ * Infrequently, you may need to watch for *any* changes to the document. These changes may be |
{ | ||
"name": "lucid-extension-sdk", | ||
"version": "0.0.247", | ||
"version": "0.0.248", | ||
"description": "Utility classes for writing Lucid Software editor extensions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
747010
290
17348