@powerhousedao/builder-tools 5.0.0-staging.2 → 5.0.0-staging.20
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.md +1 -0
- package/dist/connect-build/build.d.ts +1 -1
- package/dist/connect-build/build.d.ts.map +1 -1
- package/dist/connect-build/preview.d.ts +1 -1
- package/dist/connect-build/preview.d.ts.map +1 -1
- package/dist/connect-studio/server.d.ts +1 -1
- package/dist/connect-studio/server.d.ts.map +1 -1
- package/dist/connect-studio/server.js +11 -4
- package/dist/connect-studio/server.js.map +1 -1
- package/dist/connect-studio/studio.d.ts +1 -1
- package/dist/connect-studio/studio.d.ts.map +1 -1
- package/dist/connect-studio/studio.js +3 -0
- package/dist/connect-studio/studio.js.map +1 -1
- package/dist/connect-studio/types.d.ts +2 -0
- package/dist/connect-studio/types.d.ts.map +1 -1
- package/dist/connect-utils/helpers.d.ts +2 -2
- package/dist/connect-utils/helpers.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/base.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/base.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/base.js.map +1 -1
- package/dist/connect-utils/vite-plugins/document-models-hmr.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/document-models-hmr.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/editors-hmr.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/editors-hmr.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/external-packages.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/external-packages.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/importmap.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/importmap.d.ts.map +1 -1
- package/dist/connect-utils/vite-plugins/importmap.js.map +1 -1
- package/dist/connect-utils/vite-plugins/studio.d.ts +1 -1
- package/dist/connect-utils/vite-plugins/studio.d.ts.map +1 -1
- package/dist/document-model-editor/components/button.d.ts.map +1 -1
- package/dist/document-model-editor/components/button.js.map +1 -1
- package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts +1 -1
- package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts.map +1 -1
- package/dist/document-model-editor/components/code-editors/graphql-editor.js.map +1 -1
- package/dist/document-model-editor/components/code-editors/utils.d.ts +3 -2
- package/dist/document-model-editor/components/code-editors/utils.d.ts.map +1 -1
- package/dist/document-model-editor/components/code-editors/utils.js +1 -1
- package/dist/document-model-editor/components/code-editors/utils.js.map +1 -1
- package/dist/document-model-editor/components/form.d.ts +1 -1
- package/dist/document-model-editor/components/form.d.ts.map +1 -1
- package/dist/document-model-editor/components/form.js +1 -1
- package/dist/document-model-editor/components/form.js.map +1 -1
- package/dist/document-model-editor/components/label.d.ts +1 -1
- package/dist/document-model-editor/components/label.d.ts.map +1 -1
- package/dist/document-model-editor/components/label.js.map +1 -1
- package/dist/document-model-editor/components/model-metadata-form.d.ts +1 -1
- package/dist/document-model-editor/components/model-metadata-form.d.ts.map +1 -1
- package/dist/document-model-editor/components/modules.d.ts +1 -1
- package/dist/document-model-editor/components/modules.d.ts.map +1 -1
- package/dist/document-model-editor/components/operation.d.ts +1 -1
- package/dist/document-model-editor/components/operation.d.ts.map +1 -1
- package/dist/document-model-editor/components/operation.js +2 -2
- package/dist/document-model-editor/components/operation.js.map +1 -1
- package/dist/document-model-editor/components/state-schemas.d.ts +1 -1
- package/dist/document-model-editor/components/state-schemas.d.ts.map +1 -1
- package/dist/document-model-editor/components/text-field.d.ts.map +1 -1
- package/dist/document-model-editor/components/text-field.js.map +1 -1
- package/dist/document-model-editor/context/form-context.d.ts +1 -1
- package/dist/document-model-editor/context/form-context.d.ts.map +1 -1
- package/dist/document-model-editor/context/schema-context.d.ts +1 -1
- package/dist/document-model-editor/context/schema-context.d.ts.map +1 -1
- package/dist/document-model-editor/context/schema-context.js.map +1 -1
- package/dist/document-model-editor/document-model-editor.stories.d.ts +96 -4
- package/dist/document-model-editor/document-model-editor.stories.d.ts.map +1 -1
- package/dist/document-model-editor/document-model-editor.stories.js +4 -7
- package/dist/document-model-editor/document-model-editor.stories.js.map +1 -1
- package/dist/document-model-editor/editor.d.ts +1 -2
- package/dist/document-model-editor/editor.d.ts.map +1 -1
- package/dist/document-model-editor/editor.js +6 -6
- package/dist/document-model-editor/editor.js.map +1 -1
- package/dist/document-model-editor/hooks/useDocumentModelDocument.d.ts +4 -0
- package/dist/document-model-editor/hooks/useDocumentModelDocument.d.ts.map +1 -0
- package/dist/document-model-editor/hooks/useDocumentModelDocument.js +9 -0
- package/dist/document-model-editor/hooks/useDocumentModelDocument.js.map +1 -0
- package/dist/document-model-editor/index.d.ts +1 -0
- package/dist/document-model-editor/index.d.ts.map +1 -1
- package/dist/document-model-editor/index.js +1 -0
- package/dist/document-model-editor/index.js.map +1 -1
- package/dist/document-model-editor/module.d.ts +1 -1
- package/dist/document-model-editor/module.d.ts.map +1 -1
- package/dist/document-model-editor/utils/helpers.d.ts +3 -3
- package/dist/document-model-editor/utils/helpers.d.ts.map +1 -1
- package/dist/document-model-editor/utils/helpers.js +2 -2
- package/dist/document-model-editor/utils/helpers.js.map +1 -1
- package/dist/document-model-editor/utils/linting.d.ts +1 -1
- package/dist/document-model-editor/utils/linting.d.ts.map +1 -1
- package/dist/document-model-editor/utils/style.d.ts +1 -1
- package/dist/document-model-editor/utils/style.d.ts.map +1 -1
- package/dist/document-model-editor/utils/style.js.map +1 -1
- package/dist/editor-utils/components/documentEditor.d.ts +1 -1
- package/dist/editor-utils/components/documentEditor.d.ts.map +1 -1
- package/dist/editor-utils/components/editorToolbar.d.ts +1 -1
- package/dist/editor-utils/components/editorToolbar.d.ts.map +1 -1
- package/dist/editor-utils/components/editorWorksheet.d.ts +1 -1
- package/dist/editor-utils/components/editorWorksheet.d.ts.map +1 -1
- package/dist/editor-utils/components/styles.d.ts +1 -1
- package/dist/editor-utils/components/styles.d.ts.map +1 -1
- package/dist/editor-utils/components/stylesVariant.d.ts +1 -1
- package/dist/editor-utils/components/stylesVariant.d.ts.map +1 -1
- package/dist/editor-utils/components/textInput.d.ts +1 -1
- package/dist/editor-utils/components/textInput.d.ts.map +1 -1
- package/dist/editor-utils/components/textInput.js.map +1 -1
- package/dist/editor-utils/components/textInputVariant.d.ts +1 -1
- package/dist/editor-utils/components/textInputVariant.d.ts.map +1 -1
- package/dist/editor-utils/components/textInputVariant.js +1 -1
- package/dist/editor-utils/components/textInputVariant.js.map +1 -1
- package/dist/editor-utils/components/toolbarButton.d.ts +1 -1
- package/dist/editor-utils/components/toolbarButton.d.ts.map +1 -1
- package/dist/editor-utils/hooks/useEnsInfo.d.ts +1 -1
- package/dist/editor-utils/hooks/useEnsInfo.d.ts.map +1 -1
- package/dist/editor-utils/hooks/useEnsInfo.js +1 -1
- package/dist/editor-utils/hooks/useEnsInfo.js.map +1 -1
- package/dist/editor-utils/storybook.d.ts +6 -5
- package/dist/editor-utils/storybook.d.ts.map +1 -1
- package/dist/editor-utils/storybook.js +17 -28
- package/dist/editor-utils/storybook.js.map +1 -1
- package/dist/style.css +89 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorToolbar.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/editorToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editorToolbar.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/editorToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,UAAU,sBAAsB;CAAG;AAEnC,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,EAAE,CAAC;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,EAAE,CAAC;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,sBAAsB,CAAC,EAAE,CAAC;CACzD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAgBtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorWorksheet.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/editorWorksheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editorWorksheet.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/editorWorksheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,2CAO/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnC,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBhB,CAAC;AAEF,KAAK,cAAc,GACf,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AACX,KAAK,gBAAgB,GAAG;KAAG,CAAC,IAAI,cAAc,GAAG,aAAa;CAAE,CAAC;AAEjE,QAAA,MAAM,eAAe,EAAE,gBA2CtB,CAAC;AAEF,QAAA,MAAM,UAAU,GACd,OAAM,MAAM,OAAO,WAAqB,EACxC,eAAa;;;;;;;;;;;CAgBd,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stylesVariant.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/stylesVariant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"stylesVariant.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/stylesVariant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnC,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBhB,CAAC;AAEF,KAAK,cAAc,GACf,SAAS,GACT,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AACX,KAAK,gBAAgB,GAAG;KAAG,CAAC,IAAI,cAAc,GAAG,aAAa;CAAE,CAAC;AAEjE,QAAA,MAAM,eAAe,EAAE,gBAqDtB,CAAC;AAEF,QAAA,MAAM,UAAU,GACd,OAAM,MAAM,OAAO,WAAqB,EACxC,eAAa;;;;;;;;;;;CAgBd,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/textInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textInput.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/textInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,UAAU,cAAc;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAC3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAuH9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.js","sourceRoot":"","sources":["../../../editor-utils/components/textInput.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"textInput.js","sourceRoot":"","sources":["../../../editor-utils/components/textInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAe1D,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC;QACjC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;QACxB,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IAEH,SAAS,CA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CAAC,QAAQ,CAAC,IAAI,CAAC,EAC9B,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE,EACpC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,IATd,MAAM,CAUV,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInputVariant.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/textInputVariant.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textInputVariant.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/textInputVariant.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,UAAU,cAAc;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,2CAiIrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
|
-
import { inputStyle, typographySizes
|
|
3
|
+
import { inputStyle, typographySizes } from "./stylesVariant.js";
|
|
4
4
|
export function TextInputVariant(props) {
|
|
5
5
|
const [state, setState] = useState({
|
|
6
6
|
value: props.value || "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInputVariant.js","sourceRoot":"","sources":["../../../editor-utils/components/textInputVariant.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"textInputVariant.js","sourceRoot":"","sources":["../../../editor-utils/components/textInputVariant.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgBjE,MAAM,UAAU,gBAAgB,CAAC,KAAqB;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC;QACjC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE;QACxB,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAElB,MAAM,SAAS,GAAG,CAAC,CAAqC,EAAE,EAAE;QAC1D,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACtB,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,aAAa,E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AAE,OAAO,EAChB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE,EACpC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,KAAK,CAAC,QAAQ,EAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACnC,KAAK,EAAE,KAAK,CAAC,KAAK,IAXd,MAAM,CAYV,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarButton.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/toolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"toolbarButton.d.ts","sourceRoot":"","sources":["../../../editor-utils/components/toolbarButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CAgBzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEnsInfo.d.ts","sourceRoot":"","sources":["../../../editor-utils/hooks/useEnsInfo.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useEnsInfo.d.ts","sourceRoot":"","sources":["../../../editor-utils/hooks/useEnsInfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAC;AAGlD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAEjC,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAItD;AA6BD,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,SAAS,OAAO,EAChB,SAAS,MAAM,KACd,OAAO,CAAC,OAAO,CAiBjB,CAAC;AAEF,wBAAgB,UAAU,CACxB,OAAO,CAAC,EAAE,KAAK,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,MAAM,GACf;IAAE,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAgBjD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { createPublicClient, http
|
|
2
|
+
import { createPublicClient, http } from "viem";
|
|
3
3
|
import { getEnsAvatar, getEnsName } from "viem/actions";
|
|
4
4
|
import * as chains from "viem/chains";
|
|
5
5
|
export function getChain(id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEnsInfo.js","sourceRoot":"","sources":["../../../editor-utils/hooks/useEnsInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useEnsInfo.js","sourceRoot":"","sources":["../../../editor-utils/hooks/useEnsInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAItC,MAAM,UAAU,QAAQ,CAAC,EAAU;IACjC,OA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GAAG,SAAS,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,UAAU,UAAU,CACxB,OAAuB,EACvB,OAAgB;IAEhB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAsB,SAAS,CAAC,CAAC;IACjE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC;aACzB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAC7B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;aACpB,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvB,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAU,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type DriveEditorProps } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import React from "react";
|
|
2
|
+
import type { Decorator, Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import type { Action, PHBaseState, PHDocument } from "document-model";
|
|
4
|
+
import type React from "react";
|
|
5
5
|
export type EditorStoryArgs = Partial<{
|
|
6
|
+
document: PHDocument;
|
|
6
7
|
user: {
|
|
7
8
|
address: string;
|
|
8
9
|
networkId: string;
|
|
@@ -25,13 +26,13 @@ export type EditorStoryArgs = Partial<{
|
|
|
25
26
|
backgroundUpdateActions: ((document: PHDocument) => Action)[];
|
|
26
27
|
};
|
|
27
28
|
}>;
|
|
28
|
-
export type EditorStoryProps =
|
|
29
|
+
export type EditorStoryProps = EditorStoryArgs;
|
|
29
30
|
export type DriveEditorStoryProps = DriveEditorProps & EditorStoryArgs;
|
|
30
31
|
export type EditorStoryComponent = (props: EditorStoryProps) => React.JSX.Element;
|
|
31
32
|
export type DriveEditorStoryComponent = (props: DriveEditorStoryProps) => React.JSX.Element;
|
|
32
33
|
export type DocumentStory = StoryObj<EditorStoryComponent>;
|
|
33
34
|
export type DriveDocumentStory = StoryObj<DriveEditorStoryComponent>;
|
|
34
|
-
export declare function createDocumentStory(Editor: EditorStoryComponent,
|
|
35
|
+
export declare function createDocumentStory<TState extends PHBaseState = PHBaseState>(Editor: EditorStoryComponent, initialState: TState, additionalStoryArgs?: EditorStoryArgs, decorators?: Decorator[]): {
|
|
35
36
|
meta: Meta<typeof Editor>;
|
|
36
37
|
CreateDocumentStory: DocumentStory;
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../editor-utils/storybook.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storybook.d.ts","sourceRoot":"","sources":["../../editor-utils/storybook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EACV,MAAM,EAGN,WAAW,EACX,UAAU,EACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,KAAK,MAAM,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AC,MAAM,SAAS,WAAW,GAAG,WAAW,EAC1E,MAAM,EAAE,oBAAoB,EAC5B,YAAY,EAAE,MAAM,EACpB,mBAAmB,CAAC,EAAE,eAAe,EACrC,UAAU,CAAC,EAAE,SAAS,EAAE,GACvB;IACD,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAAC,CAAC;IAC1B,mBAAmB,EAAE,aAAa,CAAC;CACpC,CAkHA"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useArgs, useChannel } from "@storybook/preview-api";
|
|
4
|
-
import { baseCreateDocument
|
|
5
|
-
import React, { useState } from "react";
|
|
2
|
+
import { useSelectedDocument, } from "@powerhousedao/reactor-browser";
|
|
3
|
+
import { useArgs, useChannel, useEffect } from "@storybook/preview-api";
|
|
4
|
+
import { baseCreateDocument } from "document-model";
|
|
6
5
|
import { useInterval } from "usehooks-ts";
|
|
7
|
-
|
|
8
|
-
const defaultPHDocumentCreateState = (state) => {
|
|
9
|
-
return state;
|
|
10
|
-
};
|
|
11
|
-
export function createDocumentStory(Editor, reducer, initialState, additionalStoryArgs, decorators) {
|
|
6
|
+
export function createDocumentStory(Editor, initialState, additionalStoryArgs, decorators) {
|
|
12
7
|
const meta = {
|
|
8
|
+
includeStories: ["All"],
|
|
13
9
|
component: Editor,
|
|
14
10
|
decorators: [
|
|
15
11
|
(Story, { args }) => {
|
|
@@ -32,12 +28,9 @@ export function createDocumentStory(Editor, reducer, initialState, additionalSto
|
|
|
32
28
|
...(decorators ?? []),
|
|
33
29
|
],
|
|
34
30
|
render: function Render(args) {
|
|
35
|
-
const [error, setError] = useState();
|
|
36
31
|
const emit = useChannel({});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
setError(error);
|
|
40
|
-
});
|
|
32
|
+
// TODO: make args.document the selected document
|
|
33
|
+
const [document, _dispatch] = useSelectedDocument();
|
|
41
34
|
function dispatch(action) {
|
|
42
35
|
const context = {};
|
|
43
36
|
if (args.user) {
|
|
@@ -59,12 +52,11 @@ export function createDocumentStory(Editor, reducer, initialState, additionalSto
|
|
|
59
52
|
context,
|
|
60
53
|
});
|
|
61
54
|
}
|
|
62
|
-
//
|
|
63
|
-
|
|
55
|
+
// TODO: allow changing document on storybook
|
|
56
|
+
useEffect(() => {
|
|
64
57
|
if (document) {
|
|
65
58
|
emit("DOCUMENT", document);
|
|
66
59
|
}
|
|
67
|
-
setError(undefined);
|
|
68
60
|
}, [document, emit]);
|
|
69
61
|
useInterval(() => {
|
|
70
62
|
if (args.simulateBackgroundUpdates) {
|
|
@@ -74,25 +66,22 @@ export function createDocumentStory(Editor, reducer, initialState, additionalSto
|
|
|
74
66
|
});
|
|
75
67
|
}
|
|
76
68
|
}, args.simulateBackgroundUpdates?.backgroundUpdateRate ?? null);
|
|
77
|
-
return _jsx(Editor, { ...args
|
|
69
|
+
return _jsx(Editor, { ...args });
|
|
78
70
|
},
|
|
79
71
|
argTypes: {
|
|
80
72
|
document: {
|
|
81
73
|
control: "object",
|
|
82
74
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
options: ["light", "dark"],
|
|
87
|
-
defaultValue: "light",
|
|
88
|
-
control: "inline-radio",
|
|
89
|
-
},
|
|
90
|
-
user: {
|
|
91
|
-
control: "object",
|
|
92
|
-
},
|
|
75
|
+
// documentId: "string", TODO allow setting document
|
|
76
|
+
user: {
|
|
77
|
+
control: "object",
|
|
93
78
|
},
|
|
94
79
|
},
|
|
95
80
|
};
|
|
81
|
+
// Default createState function for PHDocument
|
|
82
|
+
const defaultPHDocumentCreateState = (state) => {
|
|
83
|
+
return state;
|
|
84
|
+
};
|
|
96
85
|
const CreateDocumentStory = {
|
|
97
86
|
name: "New document",
|
|
98
87
|
args: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybook.js","sourceRoot":"","sources":["../../editor-utils/storybook.tsx"],"names":[],"mappings":";AAAA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I,GAAI,CAAC;QAC9B,CAAC;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;aAClB;YACD,oDAAoD;YACpD,IAAI,EAAE;gBACJ,OAAO,EAAE,QAAQ;aAClB;SACF;KAC4B,CAAC;IAEhC,8CAA8C;IAC9C,MAAM,4BAA4B,GAAgB,CAAC,KAAK,EAAE,EAAE;QAC1D,OAAO,KAAe,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAkB;QACzC,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE;YACJ,QAAQ,EAAE,kBAAkB,CAC1B,4BAA4B,EAC5B,YAAoC,CACrC;YACD,IAAI,EAAE;gBACJ,OAAO,EAAE,4CAA4C;gBACrD,SAAS,EAAE,QAAQ;gBACnB,OAAO,EAAE,CAAC;gBACV,GAAG,EAAE;oBACH,IAAI,EAAE,aAAa;oBACnB,SAAS,EACP,+EAA+E;iBAClF;aACF;YACD,GAAG,mBAAmB;SACvB;KACF,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAW,CAAC;AAChD,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -1379,6 +1379,95 @@ input[type="number"] {
|
|
|
1379
1379
|
cursor: pointer;
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
|
+
.ph-default-styles h1 {
|
|
1383
|
+
font-family: "Inter", sans-serif;
|
|
1384
|
+
font-style: normal;
|
|
1385
|
+
font-weight: 600;
|
|
1386
|
+
font-size: 32px;
|
|
1387
|
+
line-height: 120%;
|
|
1388
|
+
color: #343839;
|
|
1389
|
+
}
|
|
1390
|
+
.ph-default-styles h2 {
|
|
1391
|
+
font-family: "Inter", sans-serif;
|
|
1392
|
+
font-style: normal;
|
|
1393
|
+
font-weight: 600;
|
|
1394
|
+
font-size: 24px;
|
|
1395
|
+
line-height: 120%;
|
|
1396
|
+
color: #343839;
|
|
1397
|
+
}
|
|
1398
|
+
.ph-default-styles h3 {
|
|
1399
|
+
font-family: "Inter", sans-serif;
|
|
1400
|
+
font-style: normal;
|
|
1401
|
+
font-weight: 600;
|
|
1402
|
+
font-size: 20px;
|
|
1403
|
+
line-height: 120%;
|
|
1404
|
+
color: #343839;
|
|
1405
|
+
}
|
|
1406
|
+
.ph-default-styles p {
|
|
1407
|
+
font-family: "Inter", sans-serif;
|
|
1408
|
+
font-style: normal;
|
|
1409
|
+
font-weight: 400;
|
|
1410
|
+
font-size: 16px;
|
|
1411
|
+
line-height: 120%;
|
|
1412
|
+
color: #343839;
|
|
1413
|
+
}
|
|
1414
|
+
.ph-default-styles small {
|
|
1415
|
+
font-family: "Inter", sans-serif;
|
|
1416
|
+
font-style: normal;
|
|
1417
|
+
font-weight: 400;
|
|
1418
|
+
font-size: 14px;
|
|
1419
|
+
line-height: 100%;
|
|
1420
|
+
color: #474d4e;
|
|
1421
|
+
}
|
|
1422
|
+
.ph-default-styles input[type="text"], .ph-default-styles input[type="email"], .ph-default-styles input[type="password"], .ph-default-styles input[type="search"], .ph-default-styles input[type="tel"], .ph-default-styles input[type="url"], .ph-default-styles input[type="number"], .ph-default-styles textarea {
|
|
1423
|
+
font-family: "Inter", sans-serif;
|
|
1424
|
+
font-size: 0.875rem;
|
|
1425
|
+
font-weight: 400;
|
|
1426
|
+
line-height: 1.25rem;
|
|
1427
|
+
color: #343839;
|
|
1428
|
+
background-color: #ffffff;
|
|
1429
|
+
border: 1px solid #ced4da;
|
|
1430
|
+
border-radius: 0.375rem;
|
|
1431
|
+
padding: 7px 0.75rem;
|
|
1432
|
+
width: 100%;
|
|
1433
|
+
box-sizing: border-box;
|
|
1434
|
+
margin-bottom: 10px;
|
|
1435
|
+
}
|
|
1436
|
+
.ph-default-styles textarea {
|
|
1437
|
+
min-height: 2.25rem;
|
|
1438
|
+
resize: vertical;
|
|
1439
|
+
}
|
|
1440
|
+
.ph-default-styles a {
|
|
1441
|
+
color: #007bff;
|
|
1442
|
+
text-decoration: none;
|
|
1443
|
+
}
|
|
1444
|
+
.ph-default-styles a:hover {
|
|
1445
|
+
text-decoration: underline;
|
|
1446
|
+
color: #0056b3;
|
|
1447
|
+
}
|
|
1448
|
+
.ph-default-styles a:focus {
|
|
1449
|
+
outline: 2px solid transparent;
|
|
1450
|
+
outline-offset: 2px;
|
|
1451
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 123, 255, 0.5);
|
|
1452
|
+
}
|
|
1453
|
+
.ph-default-styles ul, .ph-default-styles ol {
|
|
1454
|
+
padding-left: 0px;
|
|
1455
|
+
margin-top: 0;
|
|
1456
|
+
margin-bottom: 0;
|
|
1457
|
+
}
|
|
1458
|
+
.ph-default-styles label {
|
|
1459
|
+
display: block;
|
|
1460
|
+
font-family: "Inter", sans-serif;
|
|
1461
|
+
font-weight: 500;
|
|
1462
|
+
color: #343839;
|
|
1463
|
+
}
|
|
1464
|
+
.ph-default-styles hr {
|
|
1465
|
+
border: 0;
|
|
1466
|
+
height: 1px;
|
|
1467
|
+
background-color: #ced4da;
|
|
1468
|
+
margin-top: 1rem;
|
|
1469
|
+
margin-bottom: 1rem;
|
|
1470
|
+
}
|
|
1382
1471
|
@layer theme, base, components, utilities;
|
|
1383
1472
|
@layer theme;
|
|
1384
1473
|
@layer base {
|