@punica/editor 1.3.3 → 1.3.5

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": "@punica/editor",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -15,6 +15,8 @@ declare module 'punica' {
15
15
  * provider has not declared).
16
16
  *
17
17
  * - 'streaming' : opt-in chunked read/write for large files
18
+ * - 'binary' : ranged binary reads via `readBytes` (e.g.
19
+ * Parquet); text-only providers omit this
18
20
  * - 'watch' : path-scoped change notifications
19
21
  * - 'versioning' : per-path history + time-travel reads
20
22
  * - 'encrypted-at-rest' : payloads stored encrypted by the host
@@ -22,6 +24,7 @@ declare module 'punica' {
22
24
  */
23
25
  export type FileSystemProviderCapability =
24
26
  | 'streaming'
27
+ | 'binary'
25
28
  | 'watch'
26
29
  | 'versioning'
27
30
  | 'encrypted-at-rest'
@@ -214,6 +217,18 @@ declare module 'punica' {
214
217
  */
215
218
  readFile(path: string): Promise<string>;
216
219
 
220
+ /**
221
+ * Read a raw byte range of a workspace file. Optional/capability-gated:
222
+ * present on hosts with a binary bridge (Electron), absent in the browser.
223
+ * Returns fewer bytes than `length` only at EOF. Use for binary workspace
224
+ * files (e.g. Parquet) that `readFile` (text-only) cannot handle.
225
+ */
226
+ readBytes?(
227
+ path: string,
228
+ offset: number,
229
+ length: number
230
+ ): Promise<ArrayBuffer>;
231
+
217
232
  /**
218
233
  * Create a new file with the given textual content.
219
234
  */
@@ -337,6 +352,13 @@ declare module 'punica' {
337
352
  * Unique identifier for this opener within the runtime.
338
353
  */
339
354
  id: string;
355
+ /**
356
+ * Human-readable name shown in an "Open With…" chooser (e.g. "DuckDB",
357
+ * "CSV Viewer"). Declared in the extension manifest
358
+ * (`integrations.fileOpeners[].label`). Falls back to the opener id when
359
+ * omitted.
360
+ */
361
+ label?: string;
340
362
  /**
341
363
  * Command id that will be executed when this opener is selected.
342
364
  * The convention is that commands accept at least (path: string, content: string, ctx?: FileOpenContext).
@@ -380,6 +402,13 @@ declare module 'punica' {
380
402
  * Returns null when no suitable opener is found.
381
403
  */
382
404
  resolve(ctx: FileOpenContext): ResolvedOpener | null;
405
+ /**
406
+ * All openers that match the given file context, ordered by priority
407
+ * (highest first). Powers an "Open With…" chooser: the first entry is
408
+ * what `resolve` would return; the rest are alternatives. Excludes
409
+ * matchless fallback openers. Returns an empty array when none match.
410
+ */
411
+ resolveAll(ctx: FileOpenContext): ResolvedOpener[];
383
412
  }
384
413
  }
385
414
  }