@webskill/polyfill 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/dist/polyfill.js +20 -2
  2. package/package.json +2 -2
package/dist/polyfill.js CHANGED
@@ -13108,16 +13108,19 @@ Never claim to have created, saved, or installed a skill unless a skill tool cal
13108
13108
  const raw = data["$chart"];
13109
13109
  if (!isRecord$4(raw)) return void 0;
13110
13110
  const { kind, labels, series } = raw;
13111
- if (kind !== "bar" && kind !== "line" && kind !== "pie") return void 0;
13111
+ if (kind !== "bar" && kind !== "line" && kind !== "pie" && kind !== "bar-line") return void 0;
13112
13112
  if (!Array.isArray(labels) || !labels.every((l) => typeof l === "string")) return void 0;
13113
13113
  if (!Array.isArray(series)) return void 0;
13114
13114
  const validSeries = [];
13115
13115
  for (const item of series) {
13116
13116
  if (!isRecord$4(item) || !Array.isArray(item["data"]) || !item["data"].every((n) => typeof n === "number")) return;
13117
13117
  const name = item["name"];
13118
+ const type = item["type"];
13119
+ if (type !== void 0 && type !== "bar" && type !== "line") return void 0;
13118
13120
  validSeries.push({
13119
13121
  ...typeof name === "string" ? { name } : {},
13120
- data: item["data"]
13122
+ data: item["data"],
13123
+ ...type === "bar" || type === "line" ? { type } : {}
13121
13124
  });
13122
13125
  }
13123
13126
  const title = raw["title"];
@@ -17616,6 +17619,21 @@ Never claim to have created, saved, or installed a skill unless a skill tool cal
17616
17619
  return new Uint8Array(await (await handle.getFile()).arrayBuffer());
17617
17620
  });
17618
17621
  }
17622
+ async createReadStream(p) {
17623
+ const stream = (await this.#wrap(p, async () => (await this.#walkFile(p)).getFile())).stream();
17624
+ return (async function* () {
17625
+ const reader = stream.getReader();
17626
+ try {
17627
+ for (;;) {
17628
+ const { done, value } = await reader.read();
17629
+ if (done) return;
17630
+ if (value !== void 0) yield value;
17631
+ }
17632
+ } finally {
17633
+ reader.releaseLock();
17634
+ }
17635
+ })();
17636
+ }
17619
17637
  async writeBinary(p, content) {
17620
17638
  await this.#wrap(p, async () => {
17621
17639
  const segments = this.#segments(p);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webskill/polyfill",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Browser polyfill for the WebSkill navigator API",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "peerDependencies": {
34
- "@webskill/sdk": "^0.27.0"
34
+ "@webskill/sdk": "^0.28.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@webskill/sdk": "workspace:^",