@punica/editor 1.22.1 → 1.22.3

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.22.1",
3
+ "version": "1.22.3",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -313,6 +313,23 @@ declare module 'punica' {
313
313
  * `totalMemoryBytes` and treat this as a hint.
314
314
  */
315
315
  freeMemoryBytes: number;
316
+ /**
317
+ * Bytes the OS would hand a new allocation without swapping: truly
318
+ * free pages plus reclaimable caches (`vm_stat` on macOS, the
319
+ * kernel's `MemAvailable` on Linux, `ullAvailPhys` on Windows). Size
320
+ * "is there room right now" against THIS, not `freeMemoryBytes`,
321
+ * which the page cache pins near zero on any warm macOS machine.
322
+ * ABSENT when the host cannot measure it.
323
+ */
324
+ availableMemoryBytes?: number;
325
+ /**
326
+ * Share of CPU time in use across all cores, 0–100, measured over the
327
+ * interval between this `info()` call and the previous one in the same
328
+ * host process — whoever made it, so concurrent pollers shorten each
329
+ * other's window without corrupting it. ABSENT on the first call and
330
+ * on hosts that cannot measure it; absent means "unknown", never 0.
331
+ */
332
+ cpuLoadPercent?: number;
316
333
  /**
317
334
  * Free bytes on the filesystem holding the requested path. ABSENT
318
335
  * rather than zero when the host cannot measure it — zero would read as
@@ -20,9 +20,20 @@ declare module 'punica' {
20
20
  * finalized (avoids re-highlighting partial code every token).
21
21
  */
22
22
  highlight?: boolean;
23
+ /**
24
+ * Render raw HTML found in the source instead of escaping it
25
+ * (default false). The returned string is then UNSANITIZED — the
26
+ * caller must sanitize it before inserting it into the DOM. Only
27
+ * surfaces whose source is the user's own document should pass true
28
+ * (notebook markdown cells); anything carrying model output must not.
29
+ */
30
+ html?: boolean;
23
31
  }
24
32
 
25
- /** Render a Markdown string to a safe, DOM-free HTML fragment. */
33
+ /**
34
+ * Render a Markdown string to a DOM-free HTML fragment — safe to insert
35
+ * as-is unless `html: true` was passed.
36
+ */
26
37
  function render(src: string, opts?: RenderOptions): string;
27
38
 
28
39
  /**