@kubohiroya/turbowarp-asset-cache 0.6.1 → 0.7.0

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/README.ja.md CHANGED
@@ -88,14 +88,14 @@ SVG入力は既定で拒否します。remote binaryのcache entryは、保存
88
88
  versionを付けたnpm packageにも、同じレビュー済みビルドが入っています。
89
89
 
90
90
  ```bash
91
- pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.6.1
91
+ pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.7.0
92
92
  ```
93
93
 
94
94
  `node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`を読み込むか、version固定の
95
95
  CDN URLを使います。
96
96
 
97
97
  ```text
98
- https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.6.1/dist/asset-cache.js
98
+ https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js
99
99
  ```
100
100
 
101
101
  ## クイックスタート
package/README.md CHANGED
@@ -66,13 +66,13 @@ The built JavaScript file is committed to this repository so users do not need t
66
66
  The versioned npm package contains the same reviewed build:
67
67
 
68
68
  ```bash
69
- pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.6.1
69
+ pnpm add --save-exact @kubohiroya/turbowarp-asset-cache@0.7.0
70
70
  ```
71
71
 
72
72
  Load `node_modules/@kubohiroya/turbowarp-asset-cache/dist/asset-cache.js`, or use the version-pinned CDN URL:
73
73
 
74
74
  ```text
75
- https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.6.1/dist/asset-cache.js
75
+ https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-cache@0.7.0/dist/asset-cache.js
76
76
  ```
77
77
 
78
78
  ## Quick Start
@@ -721,7 +721,7 @@ var block_definitions_default = {
721
721
  ]
722
722
  };
723
723
  //#endregion
724
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
724
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.8.1_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
725
725
  var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
726
726
  var invalidNumber = Object.freeze({
727
727
  kind: "invalid",
@@ -1118,7 +1118,7 @@ function fixedInputRegistration(scratch) {
1118
1118
  };
1119
1119
  }
1120
1120
  //#endregion
1121
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.7.0/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
1121
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.8.0-rc.1/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
1122
1122
  var NAMED_DATA_REGISTRY_SYMBOL_KEY = "@kubohiroya/turbowarp-named-data/registry";
1123
1123
  var NAMED_DATA_REGISTRY_SYMBOL = Symbol.for(NAMED_DATA_REGISTRY_SYMBOL_KEY);
1124
1124
  var NAMED_DATA_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/u;
@@ -1158,6 +1158,18 @@ var NAMED_DATA_ERROR_CODES = [
1158
1158
  "NAMED_DATA_ABORTED",
1159
1159
  "NAMED_DATA_PROVIDER_RELEASED"
1160
1160
  ];
1161
+ /** Native byte forms retained by each provider kind; this does not enable conversion. */
1162
+ var NAMED_DATA_NATIVE_REPRESENTATIONS = Object.freeze({
1163
+ structured: Object.freeze(["json", "yaml"]),
1164
+ document: Object.freeze([
1165
+ "html",
1166
+ "markdown",
1167
+ "yaml",
1168
+ "json"
1169
+ ]),
1170
+ binary: Object.freeze(["raw"]),
1171
+ asset: Object.freeze(["raw"])
1172
+ });
1161
1173
  var NamedDataError = class extends Error {
1162
1174
  constructor(code, message, options) {
1163
1175
  super(`${code}: ${message}`, options);
@@ -1430,9 +1442,7 @@ function sameSchemaRef(left, right) {
1430
1442
  return left === void 0 ? right === void 0 : right !== void 0 && left.id === right.id && left.version === right.version;
1431
1443
  }
1432
1444
  function isNativeRepresentation(kind, representation) {
1433
- if (kind === "structured") return representation === "json" || representation === "yaml";
1434
- if (kind === "document") return representation === "html" || representation === "markdown";
1435
- return representation === "raw";
1445
+ return NAMED_DATA_NATIVE_REPRESENTATIONS[kind].includes(representation);
1436
1446
  }
1437
1447
  function requireNamespace(namespace) {
1438
1448
  if (!isNamedDataNamespace(namespace)) throw invalidReference$1("Invalid namespace.");
@@ -710,7 +710,7 @@ var block_definitions_default = {
710
710
  ]
711
711
  };
712
712
  //#endregion
713
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.5.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
713
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-extension-data-editor@0.8.1_react@18.3.1/node_modules/@kubohiroya/turbowarp-extension-data-editor/dist/fixed-input-schema.js
714
714
  var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
715
715
  var invalidNumber = Object.freeze({
716
716
  kind: "invalid",
@@ -1107,7 +1107,7 @@ function fixedInputRegistration(scratch) {
1107
1107
  };
1108
1108
  }
1109
1109
  //#endregion
1110
- //#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.7.0/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
1110
+ //#region node_modules/.pnpm/@kubohiroya+turbowarp-named-data@0.8.0-rc.1/node_modules/@kubohiroya/turbowarp-named-data/dist/composition.js
1111
1111
  var NAMED_DATA_REGISTRY_SYMBOL_KEY = "@kubohiroya/turbowarp-named-data/registry";
1112
1112
  var NAMED_DATA_REGISTRY_SYMBOL = Symbol.for(NAMED_DATA_REGISTRY_SYMBOL_KEY);
1113
1113
  var NAMED_DATA_NAMESPACE_PATTERN = /^[a-z][a-z0-9.-]{0,63}$/u;
@@ -1147,6 +1147,18 @@ var NAMED_DATA_ERROR_CODES = [
1147
1147
  "NAMED_DATA_ABORTED",
1148
1148
  "NAMED_DATA_PROVIDER_RELEASED"
1149
1149
  ];
1150
+ /** Native byte forms retained by each provider kind; this does not enable conversion. */
1151
+ var NAMED_DATA_NATIVE_REPRESENTATIONS = Object.freeze({
1152
+ structured: Object.freeze(["json", "yaml"]),
1153
+ document: Object.freeze([
1154
+ "html",
1155
+ "markdown",
1156
+ "yaml",
1157
+ "json"
1158
+ ]),
1159
+ binary: Object.freeze(["raw"]),
1160
+ asset: Object.freeze(["raw"])
1161
+ });
1150
1162
  var NamedDataError = class extends Error {
1151
1163
  constructor(code, message, options) {
1152
1164
  super(`${code}: ${message}`, options);
@@ -1419,9 +1431,7 @@ function sameSchemaRef(left, right) {
1419
1431
  return left === void 0 ? right === void 0 : right !== void 0 && left.id === right.id && left.version === right.version;
1420
1432
  }
1421
1433
  function isNativeRepresentation(kind, representation) {
1422
- if (kind === "structured") return representation === "json" || representation === "yaml";
1423
- if (kind === "document") return representation === "html" || representation === "markdown";
1424
- return representation === "raw";
1434
+ return NAMED_DATA_NATIVE_REPRESENTATIONS[kind].includes(representation);
1425
1435
  }
1426
1436
  function requireNamespace(namespace) {
1427
1437
  if (!isNamedDataNamespace(namespace)) throw invalidReference$1("Invalid namespace.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-asset-cache",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "A browser-local image, audio, and runtime-text asset cache for TurboWarp projects.",
5
5
  "author": {
6
6
  "name": "Hiroya Kubo",
@@ -72,10 +72,10 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint/js": "^9.39.5",
75
- "@kubohiroya/turbowarp-extension-data-editor": "^0.5.0",
75
+ "@kubohiroya/turbowarp-extension-data-editor": "^0.8.1",
76
76
  "@kubohiroya/turbowarp-extension-manifest": "^0.5.0",
77
- "@kubohiroya/turbowarp-named-data": "^0.7.0",
78
- "@kubohiroya/vite-plugin-turbowarp-extension": "^0.10.0",
77
+ "@kubohiroya/turbowarp-named-data": "^0.8.0-rc.1",
78
+ "@kubohiroya/vite-plugin-turbowarp-extension": "^0.11.0",
79
79
  "@types/node": "^22.20.1",
80
80
  "@xmldom/xmldom": "0.9.11",
81
81
  "eslint": "^9.39.5",
@@ -86,7 +86,7 @@
86
86
  "vitest": "^4.1.10"
87
87
  },
88
88
  "peerDependencies": {
89
- "@kubohiroya/turbowarp-named-data": "^0.7.0"
89
+ "@kubohiroya/turbowarp-named-data": "^0.8.0-rc.1"
90
90
  },
91
91
  "keywords": [
92
92
  "turbowarp",