@powerhousedao/powerhouse-vetra-packages 6.1.0-dev.2 → 6.1.0-dev.4
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/dist/browser/{connect-CKdlDSUw.js → connect-CC9vv60v.js} +3 -3
- package/dist/browser/connect-CC9vv60v.js.map +1 -0
- package/dist/browser/{dist-DQgJ8n4d.js → dist-BQwm3GFs.js} +16 -2
- package/dist/browser/dist-BQwm3GFs.js.map +1 -0
- package/dist/browser/{dist-CC1E3l2O.js → dist-Bm9PpE_c.js} +2 -2
- package/dist/browser/{dist-CC1E3l2O.js.map → dist-Bm9PpE_c.js.map} +1 -1
- package/dist/browser/document-models/index.js +1 -1
- package/dist/browser/{editor-Dm_73jiz.js → editor-C8LadHFD.js} +4 -4
- package/dist/browser/{editor-Dm_73jiz.js.map → editor-C8LadHFD.js.map} +1 -1
- package/dist/browser/{editor-B3yz7YdR.js → editor-DIIPXStL.js} +3 -3
- package/dist/browser/{editor-B3yz7YdR.js.map → editor-DIIPXStL.js.map} +1 -1
- package/dist/browser/editors/document-model-editor/module.js +1 -1
- package/dist/browser/editors/generic-drive-explorer/index.js +3 -3
- package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
- package/dist/browser/{folder-view-H2ov-zId.js → folder-view-nRGUuSXj.js} +2 -2
- package/dist/browser/{folder-view-H2ov-zId.js.map → folder-view-nRGUuSXj.js.map} +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/node/{connect-SGvLzr5K.mjs → connect-DVqUHW6V.mjs} +3 -3
- package/dist/node/connect-DVqUHW6V.mjs.map +1 -0
- package/dist/node/{dist-Cay1iRRr.mjs → dist-DtoYJBC4.mjs} +2 -2
- package/dist/node/{dist-Cay1iRRr.mjs.map → dist-DtoYJBC4.mjs.map} +1 -1
- package/dist/node/{dist-Bz4SgEHs.mjs → dist-Nf3PORaD.mjs} +16 -2
- package/dist/node/dist-Nf3PORaD.mjs.map +1 -0
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/{editor-W8QOlGXD.mjs → editor-BQRXHT3Q.mjs} +3 -3
- package/dist/node/{editor-W8QOlGXD.mjs.map → editor-BQRXHT3Q.mjs.map} +1 -1
- package/dist/node/{editor-BaXuDsby.mjs → editor-Dv6pju3N.mjs} +4 -4
- package/dist/node/{editor-BaXuDsby.mjs.map → editor-Dv6pju3N.mjs.map} +1 -1
- package/dist/node/editors/document-model-editor/module.mjs +1 -1
- package/dist/node/editors/generic-drive-explorer/index.mjs +3 -3
- package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
- package/dist/node/{folder-view-B0FNXbc0.mjs → folder-view-DCLHOhS5.mjs} +2 -2
- package/dist/node/{folder-view-B0FNXbc0.mjs.map → folder-view-DCLHOhS5.mjs.map} +1 -1
- package/dist/node/index.mjs +2 -2
- package/package.json +6 -6
- package/dist/browser/connect-CKdlDSUw.js.map +0 -1
- package/dist/browser/dist-DQgJ8n4d.js.map +0 -1
- package/dist/node/connect-SGvLzr5K.mjs.map +0 -1
- package/dist/node/dist-Bz4SgEHs.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as __toESM, a as boolean, c as literal, f as string, g as ZodError, i as array, l as number, m as unknown, p as union, r as any, s as lazy, t as _enum, u as object, x as __commonJSMin } from "./schemas-Cb8uEF9u.mjs";
|
|
2
|
-
import { r as pascalCase } from "./dist-BQTIepWC.mjs";
|
|
2
|
+
import { n as constantCase, r as pascalCase } from "./dist-BQTIepWC.mjs";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
|
|
@@ -5092,6 +5092,15 @@ const RESERVED_OPERATION_NAMES = [
|
|
|
5092
5092
|
"NOOP"
|
|
5093
5093
|
];
|
|
5094
5094
|
/**
|
|
5095
|
+
* Operation names become the literal action `type` string at runtime and the
|
|
5096
|
+
* key for codegen's action union. They must be SCREAMING_SNAKE_CASE so the
|
|
5097
|
+
* generated TypeScript is valid.
|
|
5098
|
+
*/
|
|
5099
|
+
const OPERATION_NAME_PATTERN = /^[A-Z][A-Z0-9_]*$/;
|
|
5100
|
+
function isValidOperationNameFormat(name) {
|
|
5101
|
+
return OPERATION_NAME_PATTERN.test(name);
|
|
5102
|
+
}
|
|
5103
|
+
/**
|
|
5095
5104
|
* Check if name conflicts with base reducer actions (case-insensitive).
|
|
5096
5105
|
*/
|
|
5097
5106
|
function isReservedOperationName(name) {
|
|
@@ -5121,6 +5130,11 @@ function getAllOperationNames(state, excludeOperationId) {
|
|
|
5121
5130
|
*/
|
|
5122
5131
|
function validateOperationName(name, state, excludeOperationId) {
|
|
5123
5132
|
if (!name) return;
|
|
5133
|
+
if (!isValidOperationNameFormat(name)) {
|
|
5134
|
+
const suggestion = constantCase(name);
|
|
5135
|
+
const hint = suggestion && suggestion !== name && isValidOperationNameFormat(suggestion) ? ` Did you mean "${suggestion}"?` : "";
|
|
5136
|
+
throw new Error(`Operation name "${name}" is invalid. Names must be SCREAMING_SNAKE_CASE (matching ${OPERATION_NAME_PATTERN.source}).${hint}`);
|
|
5137
|
+
}
|
|
5124
5138
|
const upperName = name.toUpperCase();
|
|
5125
5139
|
if (isReservedOperationName(name)) throw new Error(`Operation name "${name}" is reserved. Please use a different name.`);
|
|
5126
5140
|
if (getAllOperationNames(state, excludeOperationId).includes(upperName)) throw new Error(`Operation name "${name}" is already used by another operation. Operation names must be unique across all modules.`);
|
|
@@ -6932,4 +6946,4 @@ const logger = new class ConsoleLogger {
|
|
|
6932
6946
|
//#endregion
|
|
6933
6947
|
export { replayDocument as A, setOperationDescription as B, defaultBaseState as C, documentModelDocumentType as D, deleteOperationError as E, setModelExtension as F, undo as G, setOperationName as H, setModelId as I, validateStateSchemaName as J, validateInitialState as K, setModelName as L, setAuthorWebsite as M, setInitialState as N, isDocumentAction as O, setModelDescription as P, setModuleName as R, createZip as S, deleteOperation as T, setOperationSchema as U, setOperationErrorName as V, setStateSchema as W, generateId as Y, baseSaveToFileHandle as _, driveDocumentModelModule as a, createReducer as b, isFileNode as c, updateNode as d, addModule as f, baseLoadFromInput as g, baseCreateDocument as h, copyNode as i, setAuthorName as j, redo as k, isFolderNode as l, addOperationError as m, logger as n, generateNodesCopy as o, addOperation as p, validateModules as q, addFolder as r, handleTargetNameCollisions as s, documentModelDocumentModelModule as t, moveNode as u, buildSignedAction as v, deleteModule as w, createState as x, createPresignedHeader as y, setName as z };
|
|
6934
6948
|
|
|
6935
|
-
//# sourceMappingURL=dist-
|
|
6949
|
+
//# sourceMappingURL=dist-Nf3PORaD.mjs.map
|