@punica/editor 1.11.0 → 1.11.1

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.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -16,7 +16,11 @@ declare module 'punica' {
16
16
  *
17
17
  * - 'streaming' : opt-in chunked read/write for large files
18
18
  * - 'binary' : ranged binary reads via `readBytes` (e.g.
19
- * Parquet); text-only providers omit this
19
+ * Parquet); text-only providers omit this.
20
+ * READS ONLY — binary WRITE support is not
21
+ * implied, because both shipped hosts declared
22
+ * this flag before either could write bytes.
23
+ * Feature-detect `writeBytes` directly instead
20
24
  * - 'watch' : path-scoped change notifications
21
25
  * - 'versioning' : per-path history + time-travel reads
22
26
  * - 'encrypted-at-rest' : payloads stored encrypted by the host
@@ -253,6 +257,17 @@ declare module 'punica' {
253
257
  length: number
254
258
  ): Promise<ArrayBuffer>;
255
259
 
260
+ /**
261
+ * Write raw bytes to a workspace file, creating it when absent and
262
+ * replacing it wholesale when present. Optional/capability-gated:
263
+ * present on hosts with a binary bridge, absent on text-only providers
264
+ * — feature-detect with `typeof fs.writeBytes === 'function'` rather
265
+ * than the `'binary'` flag, which speaks only for reads. Use for
266
+ * binary content (a pasted screenshot, a copied image) that
267
+ * `createFileWithContent` would corrupt by encoding it as UTF-8.
268
+ */
269
+ writeBytes?(path: string, data: ArrayBuffer): Promise<void>;
270
+
256
271
  /**
257
272
  * Create a new file with the given textual content.
258
273
  */