@powerhousedao/builder-tools 6.0.0-dev.8 → 6.0.0-dev.80
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/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/connect-utils/helpers.d.ts +1 -1
- package/dist/connect-utils/helpers.d.ts.map +1 -1
- package/dist/connect-utils/index.d.ts +0 -1
- package/dist/connect-utils/index.d.ts.map +1 -1
- package/dist/connect-utils/types.d.ts +0 -1
- package/dist/connect-utils/types.d.ts.map +1 -1
- package/dist/connect-utils/vite-config.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +111925 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -114
- package/dist/browser.d.ts +0 -2
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.js +0 -2
- package/dist/browser.js.map +0 -1
- package/dist/connect-build/build.d.ts +0 -6
- package/dist/connect-build/build.d.ts.map +0 -1
- package/dist/connect-build/build.js +0 -54
- package/dist/connect-build/build.js.map +0 -1
- package/dist/connect-build/constants.d.ts +0 -11
- package/dist/connect-build/constants.d.ts.map +0 -1
- package/dist/connect-build/constants.js +0 -11
- package/dist/connect-build/constants.js.map +0 -1
- package/dist/connect-build/helpers.d.ts +0 -37
- package/dist/connect-build/helpers.d.ts.map +0 -1
- package/dist/connect-build/helpers.js +0 -111
- package/dist/connect-build/helpers.js.map +0 -1
- package/dist/connect-build/index.d.ts +0 -5
- package/dist/connect-build/index.d.ts.map +0 -1
- package/dist/connect-build/index.js +0 -4
- package/dist/connect-build/index.js.map +0 -1
- package/dist/connect-build/preview.d.ts +0 -3
- package/dist/connect-build/preview.d.ts.map +0 -1
- package/dist/connect-build/preview.js +0 -19
- package/dist/connect-build/preview.js.map +0 -1
- package/dist/connect-build/types.d.ts +0 -27
- package/dist/connect-build/types.d.ts.map +0 -1
- package/dist/connect-build/types.js +0 -2
- package/dist/connect-build/types.js.map +0 -1
- package/dist/connect-studio/index.d.ts +0 -3
- package/dist/connect-studio/index.d.ts.map +0 -1
- package/dist/connect-studio/index.js +0 -2
- package/dist/connect-studio/index.js.map +0 -1
- package/dist/connect-studio/server.d.ts +0 -3
- package/dist/connect-studio/server.d.ts.map +0 -1
- package/dist/connect-studio/server.js +0 -234
- package/dist/connect-studio/server.js.map +0 -1
- package/dist/connect-studio/studio.d.ts +0 -3
- package/dist/connect-studio/studio.d.ts.map +0 -1
- package/dist/connect-studio/studio.js +0 -66
- package/dist/connect-studio/studio.js.map +0 -1
- package/dist/connect-studio/types.d.ts +0 -28
- package/dist/connect-studio/types.d.ts.map +0 -1
- package/dist/connect-studio/types.js +0 -2
- package/dist/connect-studio/types.js.map +0 -1
- package/dist/connect-utils/build.js +0 -21
- package/dist/connect-utils/build.js.map +0 -1
- package/dist/connect-utils/constants.js +0 -5
- package/dist/connect-utils/constants.js.map +0 -1
- package/dist/connect-utils/env-config.d.ts +0 -844
- package/dist/connect-utils/env-config.d.ts.map +0 -1
- package/dist/connect-utils/env-config.js +0 -518
- package/dist/connect-utils/env-config.js.map +0 -1
- package/dist/connect-utils/helpers.js +0 -265
- package/dist/connect-utils/helpers.js.map +0 -1
- package/dist/connect-utils/index.js +0 -16
- package/dist/connect-utils/index.js.map +0 -1
- package/dist/connect-utils/preview.js +0 -33
- package/dist/connect-utils/preview.js.map +0 -1
- package/dist/connect-utils/studio.js +0 -30
- package/dist/connect-utils/studio.js.map +0 -1
- package/dist/connect-utils/types.js +0 -2
- package/dist/connect-utils/types.js.map +0 -1
- package/dist/connect-utils/vite-config.js +0 -267
- package/dist/connect-utils/vite-config.js.map +0 -1
- package/dist/connect-utils/vite-plugins/base.js +0 -130
- package/dist/connect-utils/vite-plugins/base.js.map +0 -1
- package/dist/connect-utils/vite-plugins/document-models-hmr.js +0 -62
- package/dist/connect-utils/vite-plugins/document-models-hmr.js.map +0 -1
- package/dist/connect-utils/vite-plugins/editors-hmr.js +0 -61
- package/dist/connect-utils/vite-plugins/editors-hmr.js.map +0 -1
- package/dist/connect-utils/vite-plugins/external-packages.js +0 -127
- package/dist/connect-utils/vite-plugins/external-packages.js.map +0 -1
- package/dist/connect-utils/vite-plugins/importmap.js +0 -243
- package/dist/connect-utils/vite-plugins/importmap.js.map +0 -1
- package/dist/connect-utils/vite-plugins/ph-external-packages.js +0 -88
- package/dist/connect-utils/vite-plugins/ph-external-packages.js.map +0 -1
- package/dist/connect-utils/vite-plugins/studio.js +0 -33
- package/dist/connect-utils/vite-plugins/studio.js.map +0 -1
- package/dist/document-model-editor/components/button.d.ts +0 -2
- package/dist/document-model-editor/components/button.d.ts.map +0 -1
- package/dist/document-model-editor/components/button.js +0 -8
- package/dist/document-model-editor/components/button.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/constants.d.ts +0 -3
- package/dist/document-model-editor/components/code-editors/constants.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/constants.js +0 -38
- package/dist/document-model-editor/components/code-editors/constants.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/factories.d.ts +0 -4
- package/dist/document-model-editor/components/code-editors/factories.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/factories.js +0 -47
- package/dist/document-model-editor/components/code-editors/factories.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts +0 -10
- package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/graphql-editor.js +0 -73
- package/dist/document-model-editor/components/code-editors/graphql-editor.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/hooks.d.ts +0 -23
- package/dist/document-model-editor/components/code-editors/hooks.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/hooks.js +0 -59
- package/dist/document-model-editor/components/code-editors/hooks.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/json-editor.d.ts +0 -8
- package/dist/document-model-editor/components/code-editors/json-editor.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/json-editor.js +0 -47
- package/dist/document-model-editor/components/code-editors/json-editor.js.map +0 -1
- package/dist/document-model-editor/components/code-editors/linting.d.ts +0 -6
- package/dist/document-model-editor/components/code-editors/linting.d.ts.map +0 -1
- package/dist/document-model-editor/components/code-editors/linting.js +0 -59
- package/dist/document-model-editor/components/code-editors/linting.js.map +0 -1
- package/dist/document-model-editor/components/divider.d.ts +0 -8
- package/dist/document-model-editor/components/divider.d.ts.map +0 -1
- package/dist/document-model-editor/components/divider.js +0 -22
- package/dist/document-model-editor/components/divider.js.map +0 -1
- package/dist/document-model-editor/components/errors.d.ts +0 -6
- package/dist/document-model-editor/components/errors.d.ts.map +0 -1
- package/dist/document-model-editor/components/errors.js +0 -5
- package/dist/document-model-editor/components/errors.js.map +0 -1
- package/dist/document-model-editor/components/form.d.ts +0 -12
- package/dist/document-model-editor/components/form.d.ts.map +0 -1
- package/dist/document-model-editor/components/form.js +0 -43
- package/dist/document-model-editor/components/form.js.map +0 -1
- package/dist/document-model-editor/components/input.d.ts +0 -6
- package/dist/document-model-editor/components/input.d.ts.map +0 -1
- package/dist/document-model-editor/components/input.js +0 -9
- package/dist/document-model-editor/components/input.js.map +0 -1
- package/dist/document-model-editor/components/label.d.ts +0 -6
- package/dist/document-model-editor/components/label.d.ts.map +0 -1
- package/dist/document-model-editor/components/label.js +0 -10
- package/dist/document-model-editor/components/label.js.map +0 -1
- package/dist/document-model-editor/components/model-metadata-form.d.ts +0 -31
- package/dist/document-model-editor/components/model-metadata-form.d.ts.map +0 -1
- package/dist/document-model-editor/components/model-metadata-form.js +0 -70
- package/dist/document-model-editor/components/model-metadata-form.js.map +0 -1
- package/dist/document-model-editor/components/module-form.d.ts +0 -10
- package/dist/document-model-editor/components/module-form.d.ts.map +0 -1
- package/dist/document-model-editor/components/module-form.js +0 -22
- package/dist/document-model-editor/components/module-form.js.map +0 -1
- package/dist/document-model-editor/components/module.d.ts +0 -22
- package/dist/document-model-editor/components/module.d.ts.map +0 -1
- package/dist/document-model-editor/components/module.js +0 -10
- package/dist/document-model-editor/components/module.js.map +0 -1
- package/dist/document-model-editor/components/modules.d.ts +0 -20
- package/dist/document-model-editor/components/modules.d.ts.map +0 -1
- package/dist/document-model-editor/components/modules.js +0 -17
- package/dist/document-model-editor/components/modules.js.map +0 -1
- package/dist/document-model-editor/components/operation-description-form.d.ts +0 -9
- package/dist/document-model-editor/components/operation-description-form.d.ts.map +0 -1
- package/dist/document-model-editor/components/operation-description-form.js +0 -13
- package/dist/document-model-editor/components/operation-description-form.js.map +0 -1
- package/dist/document-model-editor/components/operation-error-form.d.ts +0 -13
- package/dist/document-model-editor/components/operation-error-form.d.ts.map +0 -1
- package/dist/document-model-editor/components/operation-error-form.js +0 -40
- package/dist/document-model-editor/components/operation-error-form.js.map +0 -1
- package/dist/document-model-editor/components/operation-errors.d.ts +0 -10
- package/dist/document-model-editor/components/operation-errors.d.ts.map +0 -1
- package/dist/document-model-editor/components/operation-errors.js +0 -17
- package/dist/document-model-editor/components/operation-errors.js.map +0 -1
- package/dist/document-model-editor/components/operation-form.d.ts +0 -13
- package/dist/document-model-editor/components/operation-form.d.ts.map +0 -1
- package/dist/document-model-editor/components/operation-form.js +0 -37
- package/dist/document-model-editor/components/operation-form.js.map +0 -1
- package/dist/document-model-editor/components/operation.d.ts +0 -23
- package/dist/document-model-editor/components/operation.d.ts.map +0 -1
- package/dist/document-model-editor/components/operation.js +0 -25
- package/dist/document-model-editor/components/operation.js.map +0 -1
- package/dist/document-model-editor/components/operations.d.ts +0 -18
- package/dist/document-model-editor/components/operations.d.ts.map +0 -1
- package/dist/document-model-editor/components/operations.js +0 -20
- package/dist/document-model-editor/components/operations.js.map +0 -1
- package/dist/document-model-editor/components/state-error.d.ts +0 -5
- package/dist/document-model-editor/components/state-error.d.ts.map +0 -1
- package/dist/document-model-editor/components/state-error.js +0 -21
- package/dist/document-model-editor/components/state-error.js.map +0 -1
- package/dist/document-model-editor/components/state-schemas.d.ts +0 -15
- package/dist/document-model-editor/components/state-schemas.d.ts.map +0 -1
- package/dist/document-model-editor/components/state-schemas.js +0 -81
- package/dist/document-model-editor/components/state-schemas.js.map +0 -1
- package/dist/document-model-editor/components/tabs.d.ts +0 -8
- package/dist/document-model-editor/components/tabs.d.ts.map +0 -1
- package/dist/document-model-editor/components/tabs.js +0 -13
- package/dist/document-model-editor/components/tabs.js.map +0 -1
- package/dist/document-model-editor/components/text-area.d.ts +0 -9
- package/dist/document-model-editor/components/text-area.d.ts.map +0 -1
- package/dist/document-model-editor/components/text-area.js +0 -27
- package/dist/document-model-editor/components/text-area.js.map +0 -1
- package/dist/document-model-editor/components/text-field.d.ts +0 -21
- package/dist/document-model-editor/components/text-field.d.ts.map +0 -1
- package/dist/document-model-editor/components/text-field.js +0 -80
- package/dist/document-model-editor/components/text-field.js.map +0 -1
- package/dist/document-model-editor/config.d.ts +0 -3
- package/dist/document-model-editor/config.d.ts.map +0 -1
- package/dist/document-model-editor/config.js +0 -4
- package/dist/document-model-editor/config.js.map +0 -1
- package/dist/document-model-editor/constants/documents.d.ts +0 -13
- package/dist/document-model-editor/constants/documents.d.ts.map +0 -1
- package/dist/document-model-editor/constants/documents.js +0 -18
- package/dist/document-model-editor/constants/documents.js.map +0 -1
- package/dist/document-model-editor/constants/graphql-kinds.d.ts +0 -9
- package/dist/document-model-editor/constants/graphql-kinds.d.ts.map +0 -1
- package/dist/document-model-editor/constants/graphql-kinds.js +0 -13
- package/dist/document-model-editor/constants/graphql-kinds.js.map +0 -1
- package/dist/document-model-editor/context/form-context.d.ts +0 -11
- package/dist/document-model-editor/context/form-context.d.ts.map +0 -1
- package/dist/document-model-editor/context/form-context.js +0 -4
- package/dist/document-model-editor/context/form-context.js.map +0 -1
- package/dist/document-model-editor/context/schema-context.d.ts +0 -18
- package/dist/document-model-editor/context/schema-context.d.ts.map +0 -1
- package/dist/document-model-editor/context/schema-context.js +0 -129
- package/dist/document-model-editor/context/schema-context.js.map +0 -1
- package/dist/document-model-editor/document-model-editor.stories.d.ts +0 -8
- package/dist/document-model-editor/document-model-editor.stories.d.ts.map +0 -1
- package/dist/document-model-editor/document-model-editor.stories.js +0 -267
- package/dist/document-model-editor/document-model-editor.stories.js.map +0 -1
- package/dist/document-model-editor/editor.d.ts +0 -2
- package/dist/document-model-editor/editor.d.ts.map +0 -1
- package/dist/document-model-editor/editor.js +0 -217
- package/dist/document-model-editor/editor.js.map +0 -1
- package/dist/document-model-editor/hooks/index.d.ts +0 -3
- package/dist/document-model-editor/hooks/index.d.ts.map +0 -1
- package/dist/document-model-editor/hooks/index.js +0 -3
- package/dist/document-model-editor/hooks/index.js.map +0 -1
- package/dist/document-model-editor/hooks/useDocumentModelDocument.d.ts +0 -5
- package/dist/document-model-editor/hooks/useDocumentModelDocument.d.ts.map +0 -1
- package/dist/document-model-editor/hooks/useDocumentModelDocument.js +0 -8
- package/dist/document-model-editor/hooks/useDocumentModelDocument.js.map +0 -1
- package/dist/document-model-editor/hooks/useFormField.d.ts +0 -13
- package/dist/document-model-editor/hooks/useFormField.d.ts.map +0 -1
- package/dist/document-model-editor/hooks/useFormField.js +0 -22
- package/dist/document-model-editor/hooks/useFormField.js.map +0 -1
- package/dist/document-model-editor/index.d.ts +0 -2
- package/dist/document-model-editor/index.d.ts.map +0 -1
- package/dist/document-model-editor/index.js +0 -2
- package/dist/document-model-editor/index.js.map +0 -1
- package/dist/document-model-editor/module.d.ts +0 -3
- package/dist/document-model-editor/module.d.ts.map +0 -1
- package/dist/document-model-editor/module.js +0 -10
- package/dist/document-model-editor/module.js.map +0 -1
- package/dist/document-model-editor/schemas/inputs.d.ts +0 -25
- package/dist/document-model-editor/schemas/inputs.d.ts.map +0 -1
- package/dist/document-model-editor/schemas/inputs.js +0 -71
- package/dist/document-model-editor/schemas/inputs.js.map +0 -1
- package/dist/document-model-editor/schemas/utils.d.ts +0 -3
- package/dist/document-model-editor/schemas/utils.d.ts.map +0 -1
- package/dist/document-model-editor/schemas/utils.js +0 -3
- package/dist/document-model-editor/schemas/utils.js.map +0 -1
- package/dist/document-model-editor/types/documents.d.ts +0 -26
- package/dist/document-model-editor/types/documents.d.ts.map +0 -1
- package/dist/document-model-editor/types/documents.js +0 -2
- package/dist/document-model-editor/types/documents.js.map +0 -1
- package/dist/document-model-editor/types.d.ts +0 -2
- package/dist/document-model-editor/types.d.ts.map +0 -1
- package/dist/document-model-editor/types.js +0 -2
- package/dist/document-model-editor/types.js.map +0 -1
- package/dist/document-model-editor/utils/helpers.d.ts +0 -112
- package/dist/document-model-editor/utils/helpers.d.ts.map +0 -1
- package/dist/document-model-editor/utils/helpers.js +0 -920
- package/dist/document-model-editor/utils/helpers.js.map +0 -1
- package/dist/document-model-editor/utils/linting.d.ts +0 -7
- package/dist/document-model-editor/utils/linting.d.ts.map +0 -1
- package/dist/document-model-editor/utils/linting.js +0 -49
- package/dist/document-model-editor/utils/linting.js.map +0 -1
- package/dist/document-model-editor/utils/style.d.ts +0 -3
- package/dist/document-model-editor/utils/style.d.ts.map +0 -1
- package/dist/document-model-editor/utils/style.js +0 -6
- package/dist/document-model-editor/utils/style.js.map +0 -1
- package/dist/editor-utils/components/documentEditor.d.ts +0 -7
- package/dist/editor-utils/components/documentEditor.d.ts.map +0 -1
- package/dist/editor-utils/components/documentEditor.js +0 -6
- package/dist/editor-utils/components/documentEditor.js.map +0 -1
- package/dist/editor-utils/components/editorToolbar.d.ts +0 -11
- package/dist/editor-utils/components/editorToolbar.d.ts.map +0 -1
- package/dist/editor-utils/components/editorToolbar.js +0 -6
- package/dist/editor-utils/components/editorToolbar.js.map +0 -1
- package/dist/editor-utils/components/editorWorksheet.d.ts +0 -7
- package/dist/editor-utils/components/editorWorksheet.d.ts.map +0 -1
- package/dist/editor-utils/components/editorWorksheet.js +0 -5
- package/dist/editor-utils/components/editorWorksheet.js.map +0 -1
- package/dist/editor-utils/components/index.d.ts +0 -9
- package/dist/editor-utils/components/index.d.ts.map +0 -1
- package/dist/editor-utils/components/index.js +0 -10
- package/dist/editor-utils/components/index.js.map +0 -1
- package/dist/editor-utils/components/styles.d.ts +0 -40
- package/dist/editor-utils/components/styles.d.ts.map +0 -1
- package/dist/editor-utils/components/styles.js +0 -79
- package/dist/editor-utils/components/styles.js.map +0 -1
- package/dist/editor-utils/components/stylesVariant.d.ts +0 -40
- package/dist/editor-utils/components/stylesVariant.d.ts.map +0 -1
- package/dist/editor-utils/components/stylesVariant.js +0 -89
- package/dist/editor-utils/components/stylesVariant.js.map +0 -1
- package/dist/editor-utils/components/textInput.d.ts +0 -20
- package/dist/editor-utils/components/textInput.d.ts.map +0 -1
- package/dist/editor-utils/components/textInput.js +0 -84
- package/dist/editor-utils/components/textInput.js.map +0 -1
- package/dist/editor-utils/components/textInputVariant.d.ts +0 -21
- package/dist/editor-utils/components/textInputVariant.d.ts.map +0 -1
- package/dist/editor-utils/components/textInputVariant.js +0 -93
- package/dist/editor-utils/components/textInputVariant.js.map +0 -1
- package/dist/editor-utils/components/toolbarButton.d.ts +0 -7
- package/dist/editor-utils/components/toolbarButton.d.ts.map +0 -1
- package/dist/editor-utils/components/toolbarButton.js +0 -9
- package/dist/editor-utils/components/toolbarButton.js.map +0 -1
- package/dist/editor-utils/hooks/index.d.ts +0 -2
- package/dist/editor-utils/hooks/index.d.ts.map +0 -1
- package/dist/editor-utils/hooks/index.js +0 -2
- package/dist/editor-utils/hooks/index.js.map +0 -1
- package/dist/editor-utils/hooks/useEnsInfo.d.ts +0 -15
- package/dist/editor-utils/hooks/useEnsInfo.d.ts.map +0 -1
- package/dist/editor-utils/hooks/useEnsInfo.js +0 -64
- package/dist/editor-utils/hooks/useEnsInfo.js.map +0 -1
- package/dist/editor-utils/index.d.ts +0 -5
- package/dist/editor-utils/index.d.ts.map +0 -1
- package/dist/editor-utils/index.js +0 -5
- package/dist/editor-utils/index.js.map +0 -1
- package/dist/editor-utils/reducer.d.ts +0 -3
- package/dist/editor-utils/reducer.d.ts.map +0 -1
- package/dist/editor-utils/reducer.js +0 -25
- package/dist/editor-utils/reducer.js.map +0 -1
- package/dist/editor-utils/storybook.d.ts +0 -32
- package/dist/editor-utils/storybook.d.ts.map +0 -1
- package/dist/editor-utils/storybook.js +0 -104
- package/dist/editor-utils/storybook.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/style.css +0 -890
- package/dist/test/helpers.test.d.ts +0 -2
- package/dist/test/helpers.test.d.ts.map +0 -1
- package/dist/test/helpers.test.js +0 -805
- package/dist/test/helpers.test.js.map +0 -1
- package/dist/test/index.d.ts +0 -2
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/index.js +0 -2
- package/dist/test/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linting.js","sourceRoot":"","sources":["../../../../document-model-editor/components/code-editors/linting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;EAEE;AACF,MAAM,UAAU,+BAA+B,CAC7C,KAAmB;IAEnB,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,KAAK,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,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO;wBAC3B,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI;wBACrD,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,CAC5D,CACJ,CAAC;gBAEJ,WAAW,GAAG,WAAW,CAAC,MAAM,CAC9B,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAC5C,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;oBAClC,WAAW,CAAC,IAAI,CAAC,+BAA+B,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
className?: string;
|
|
3
|
-
size?: "sm" | "md" | "lg";
|
|
4
|
-
margin?: "sm" | "md" | "lg";
|
|
5
|
-
};
|
|
6
|
-
export declare function Divider({ className, size, margin }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/divider.tsx"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC7B,CAAC;AACF,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,IAAW,EAAE,MAAa,EAAE,EAAE,KAAK,2CAkBvE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@powerhousedao/design-system";
|
|
3
|
-
export function Divider({ className, size = "sm", margin = "md" }) {
|
|
4
|
-
function getSize() {
|
|
5
|
-
if (size === "sm")
|
|
6
|
-
return "h-px";
|
|
7
|
-
if (size === "md")
|
|
8
|
-
return "h-1";
|
|
9
|
-
return "h-1.5";
|
|
10
|
-
}
|
|
11
|
-
function getMargin() {
|
|
12
|
-
if (margin === "sm")
|
|
13
|
-
return "my-4";
|
|
14
|
-
if (margin === "md")
|
|
15
|
-
return "my-6";
|
|
16
|
-
return "my-8";
|
|
17
|
-
}
|
|
18
|
-
const sizeClass = getSize();
|
|
19
|
-
const marginClass = getMargin();
|
|
20
|
-
return (_jsx("div", { className: cn("bg-gray-200", sizeClass, marginClass, className) }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=divider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../document-model-editor/components/divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,8BAA8B,CAAC;AAOlD,MAAM,UAAU,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,EAAS;IACtE,SAAS,OAAO;QACd,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;QACjC,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,SAAS;QAChB,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;QACnC,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;QACnC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,EAAE,CAAC;IAC5B,MAAM,WAAW,GAAG,SAAS,EAAE,CAAC;IAChC,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,GAAI,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/errors.tsx"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,2CAUvC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function Errors({ errors }) {
|
|
3
|
-
return (_jsx("div", { className: "mt-1", children: Array.from(new Set(errors.split("\n"))).map((error) => (_jsx("p", { className: "text-sm font-semibold text-red-900", children: error }, error))) }));
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../document-model-editor/components/errors.tsx"],"names":[],"mappings":";AAIA,MAAM,UAAU,MAAM,CAAC,EAAE,MAAM,EAAS;IACtC,OAAO,CACL,cAAK,SAAS,EAAC,MAAM,YAClB,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtD,YAAG,SAAS,EAAC,oCAAoC,YAC9C,KAAK,IAD+C,KAAK,CAExD,CACL,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import type { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
4
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
8
|
-
declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
9
|
-
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
-
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
-
export { Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
12
|
-
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO/E,QAAA,MAAM,IAAI,4MAAe,CAAC;AAE1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,QAAQ,6GAWZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAkBf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAcnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAqBf,CAAC;AAGH,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { Controller, FormProvider } from "react-hook-form";
|
|
5
|
-
import { FormFieldContext, FormItemContext } from "../context/form-context.js";
|
|
6
|
-
import { useFormField } from "../hooks/useFormField.js";
|
|
7
|
-
import { cn } from "../utils/style.js";
|
|
8
|
-
import { Label } from "./label.js";
|
|
9
|
-
const Form = FormProvider;
|
|
10
|
-
const FormField = ({ ...props }) => {
|
|
11
|
-
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, { ...props }) }));
|
|
12
|
-
};
|
|
13
|
-
const FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
14
|
-
const id = React.useId();
|
|
15
|
-
return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", { ref: ref, className: cn("", className), ...props }) }));
|
|
16
|
-
});
|
|
17
|
-
FormItem.displayName = "FormItem";
|
|
18
|
-
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
19
|
-
const { error, formItemId } = useFormField();
|
|
20
|
-
return (_jsx(Label, { ref: ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props }));
|
|
21
|
-
});
|
|
22
|
-
FormLabel.displayName = "FormLabel";
|
|
23
|
-
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
24
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
25
|
-
return (_jsx(Slot, { ref: ref, id: formItemId, "aria-describedby": !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error, ...props }));
|
|
26
|
-
});
|
|
27
|
-
FormControl.displayName = "FormControl";
|
|
28
|
-
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
29
|
-
const { formDescriptionId } = useFormField();
|
|
30
|
-
return (_jsx("p", { ref: ref, id: formDescriptionId, className: cn("text-[0.8rem] text-gray-600", className), ...props }));
|
|
31
|
-
});
|
|
32
|
-
FormDescription.displayName = "FormDescription";
|
|
33
|
-
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
34
|
-
const { error, formMessageId } = useFormField();
|
|
35
|
-
const body = error ? String(error.message) : children;
|
|
36
|
-
if (!body) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
return (_jsx("p", { ref: ref, id: formMessageId, className: cn("text-[0.8rem] font-medium text-red-800", className), ...props, children: body }));
|
|
40
|
-
});
|
|
41
|
-
FormMessage.displayName = "FormMessage";
|
|
42
|
-
export { Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
43
|
-
//# sourceMappingURL=form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../document-model-editor/components/form.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,UAAU,E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CAAC;IAChD,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEtD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,YACE,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,aAAa,EACjB,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,KAC9D,KAAK,YAER,IAAI,GACH,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
}
|
|
4
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
export { Input };
|
|
6
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAAG;AAExD,QAAA,MAAM,KAAK,qFAcV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { cn } from "../utils/style.js";
|
|
4
|
-
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
|
-
return (_jsx("input", { type: type, className: cn("flex h-9 w-full rounded-md border border-gray-400 bg-transparent px-3 py-1 text-sm transition-colors hover:bg-gray-100 focus-visible:bg-gray-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
|
|
6
|
-
});
|
|
7
|
-
Input.displayName = "Input";
|
|
8
|
-
export { Input };
|
|
9
|
-
//# sourceMappingURL=input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../document-model-editor/components/input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAKvC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACrC,OAAO,CACL,gBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,6NAA6N,EAC7N,SAAS,CACV,EACD,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import type { VariantProps } from "class-variance-authority";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
export { Label };
|
|
6
|
-
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQ7D,QAAA,MAAM,KAAK,4PAUT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "../utils/style.js";
|
|
6
|
-
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
7
|
-
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
|
|
8
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
9
|
-
export { Label };
|
|
10
|
-
//# sourceMappingURL=label.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../document-model-editor/components/label.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,MAAM,aAAa,GAAG,GAAG,CACvB,4FAA4F,CAC7F,CAAC;AAEF,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAI5B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,cAAc,CAAC,IAAI,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,EAAE,SAAS,CAAC,KACrC,KAAK,GACT,CACH,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { Scope } from "../types/documents.js";
|
|
3
|
-
export declare const MetadataFormSchema: z.ZodObject<{
|
|
4
|
-
name: z.ZodString;
|
|
5
|
-
documentType: z.ZodString;
|
|
6
|
-
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
7
|
-
description: z.ZodString;
|
|
8
|
-
authorName: z.ZodString;
|
|
9
|
-
authorWebsite: z.ZodString;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export type MetadataFormValues = z.infer<typeof MetadataFormSchema>;
|
|
12
|
-
type Props = MetadataFormValues & {
|
|
13
|
-
globalStateSchema: string;
|
|
14
|
-
localStateSchema: string;
|
|
15
|
-
setModelName: (name: string) => void;
|
|
16
|
-
setModelId: (id: string) => void;
|
|
17
|
-
setModelExtension: (extension: string) => void;
|
|
18
|
-
setModelDescription: (description: string) => void;
|
|
19
|
-
setAuthorName: (authorName: string) => void;
|
|
20
|
-
setAuthorWebsite: (authorWebsite: string) => void;
|
|
21
|
-
setStateSchema: (schema: string, scope: Scope) => void;
|
|
22
|
-
};
|
|
23
|
-
export default function ModelMetadata(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function ModelNameForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function DocumentTypeForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare function ModelExtensionForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare function DescriptionForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare function AuthorNameForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export declare function AuthorWebsiteForm(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=model-metadata-form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-metadata-form.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/model-metadata-form.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQnD,eAAO,MAAM,kBAAkB;;;;;;;iBAO7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,KAAK,KAAK,GAAG,kBAAkB,GAAG;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,2CAuBjD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,2CA8DzC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,2CAa5C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,2CAa9C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,2CAc3C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,2CAa1C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,2CAgB7C"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import { handleModelNameChange, makeInitialSchemaDoc, renameSchemaType, } from "../utils/helpers.js";
|
|
5
|
-
import { TextField } from "./text-field.js";
|
|
6
|
-
export const MetadataFormSchema = z.object({
|
|
7
|
-
name: z.string(),
|
|
8
|
-
documentType: z.string(),
|
|
9
|
-
extension: z.string().optional().default(""),
|
|
10
|
-
description: z.string(),
|
|
11
|
-
authorName: z.string(),
|
|
12
|
-
authorWebsite: z.string(),
|
|
13
|
-
});
|
|
14
|
-
export default function ModelMetadata(props) {
|
|
15
|
-
return (_jsxs("div", { children: [_jsx(ModelNameForm, { ...props }), _jsx("div", { className: "flex h-full flex-col gap-4", children: _jsxs("div", { className: "grid flex-1 grid-cols-3 items-start gap-4", children: [_jsxs("div", { className: "col-span-2 flex h-full flex-col gap-4", children: [_jsx("div", { className: "shrink-0", children: _jsx(DocumentTypeForm, { ...props }) }), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(DescriptionForm, { ...props }) })] }), _jsxs("div", { className: "col-span-1 flex flex-col gap-4", children: [_jsx(AuthorNameForm, { ...props }), _jsx(AuthorWebsiteForm, { ...props }), _jsx(ModelExtensionForm, { ...props })] })] }) })] }));
|
|
16
|
-
}
|
|
17
|
-
export function ModelNameForm(props) {
|
|
18
|
-
const { name, globalStateSchema, localStateSchema, setModelName, setStateSchema, } = props;
|
|
19
|
-
const onSubmit = useCallback((newName) => {
|
|
20
|
-
if (name === newName) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
setModelName(newName);
|
|
24
|
-
const hasExistingSchema = !!globalStateSchema;
|
|
25
|
-
if (!hasExistingSchema) {
|
|
26
|
-
const initialSchemaDoc = makeInitialSchemaDoc(newName, "global");
|
|
27
|
-
setStateSchema(initialSchemaDoc, "global");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const newSchema = renameSchemaType(globalStateSchema, name, newName, "global");
|
|
31
|
-
setStateSchema(newSchema, "global");
|
|
32
|
-
if (localStateSchema) {
|
|
33
|
-
const newLocalStateSchema = renameSchemaType(localStateSchema, name, newName, "local");
|
|
34
|
-
setStateSchema(newLocalStateSchema, "local");
|
|
35
|
-
}
|
|
36
|
-
handleModelNameChange({
|
|
37
|
-
oldName: name,
|
|
38
|
-
newName,
|
|
39
|
-
globalStateSchema,
|
|
40
|
-
localStateSchema,
|
|
41
|
-
setStateSchema,
|
|
42
|
-
});
|
|
43
|
-
}, [name, globalStateSchema, localStateSchema, setStateSchema]);
|
|
44
|
-
return (_jsx(TextField, { name: "name", value: name, onSubmit: onSubmit, placeholder: "Model name", className: "border-none pl-0 text-xl font-bold text-gray-900", required: true, focusOnMount: true }));
|
|
45
|
-
}
|
|
46
|
-
export function DocumentTypeForm(props) {
|
|
47
|
-
const { documentType, setModelId } = props;
|
|
48
|
-
return (_jsx(TextField, { label: "Document Type *", name: "powerhouse/document-model", value: documentType, onSubmit: setModelId, placeholder: "Document Type", required: true }));
|
|
49
|
-
}
|
|
50
|
-
export function ModelExtensionForm(props) {
|
|
51
|
-
const { extension, setModelExtension } = props;
|
|
52
|
-
return (_jsx(TextField, { name: "extension", value: extension, onSubmit: setModelExtension, label: "Model Extension", placeholder: "Example .phdm", allowEmpty: true }));
|
|
53
|
-
}
|
|
54
|
-
export function DescriptionForm(props) {
|
|
55
|
-
const { description, setModelDescription } = props;
|
|
56
|
-
return (_jsx(TextField, { name: "description", label: "Model Description", value: description, onSubmit: setModelDescription, placeholder: "Describe your document to others", allowEmpty: true, className: "h-full" }));
|
|
57
|
-
}
|
|
58
|
-
export function AuthorNameForm(props) {
|
|
59
|
-
const { authorName, setAuthorName } = props;
|
|
60
|
-
return (_jsx(TextField, { name: "authorName", value: authorName, onSubmit: setAuthorName, label: "Author Name", placeholder: "Username or organisation", allowEmpty: true }));
|
|
61
|
-
}
|
|
62
|
-
export function AuthorWebsiteForm(props) {
|
|
63
|
-
const { authorWebsite, setAuthorWebsite } = props;
|
|
64
|
-
return (_jsx(TextField, { name: "authorWebsite", value: authorWebsite, label: "Website URL", onSubmit: (newAuthorWebsite) => {
|
|
65
|
-
if (!!authorWebsite && !newAuthorWebsite)
|
|
66
|
-
return;
|
|
67
|
-
setAuthorWebsite(newAuthorWebsite);
|
|
68
|
-
}, placeholder: "https://www.powerhouse.inc/", allowEmpty: true }));
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=model-metadata-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-metadata-form.js","sourceRoot":"","sources":["../../../document-model-editor/components/model-metadata-form.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5C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ules?: ModuleSpecification[];
|
|
4
|
-
module?: ModuleSpecification;
|
|
5
|
-
onAddModule: (name: string) => Promise<string | undefined>;
|
|
6
|
-
updateModuleName: (id: string, name: string) => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function ModuleForm({ module, onAddModule, updateModuleName, modules, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=module-form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-form.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/module-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3D,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,OAAY,GACb,EAAE,KAAK,2CA8BP"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { toLowercaseSnakeCase } from "../schemas/inputs.js";
|
|
3
|
-
import { TextField } from "./text-field.js";
|
|
4
|
-
export function ModuleForm({ module, onAddModule, updateModuleName, modules = [], }) {
|
|
5
|
-
const isEdit = !!module;
|
|
6
|
-
const moduleNames = modules.map((m) => m.name);
|
|
7
|
-
const handleSubmit = async (name) => {
|
|
8
|
-
const formattedName = toLowercaseSnakeCase(name);
|
|
9
|
-
if (!formattedName.length)
|
|
10
|
-
return;
|
|
11
|
-
if (isEdit) {
|
|
12
|
-
if (formattedName !== module.name) {
|
|
13
|
-
updateModuleName(module.id, formattedName);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
await onAddModule(formattedName);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return (_jsx(TextField, { name: "name", label: isEdit ? "Module name *" : "Add module *", value: module?.name, onSubmit: handleSubmit, placeholder: "Add module", unique: moduleNames, shouldReset: !isEdit, required: true }, module?.id ?? "new"));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=module-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-form.js","sourceRoot":"","sources":["../../../document-model-editor/components/module-form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,OAAO,GAAG,EAAE,GACN;IACN,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;QAC1C,MAAM,aAAa,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,aAAa,CAAC,MAAM;YAAE,OAAO;QAElC,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,aAAa,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;gBAClC,gBAAgB,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,WAAW,CAAC,aAAa,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IAER,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,EAChD,KAAK,EAAE,MAAM,EAAE,IAAI,EACnB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,YAAY,EACxB,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,CAAC,MAAM,EACpB,QAAQ,UARH,MAAM,EAAE,EAAE,IAAI,KAAK,CASxB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ModuleSpecification as TModule } from "document-model";
|
|
2
|
-
type Props = {
|
|
3
|
-
module?: TModule;
|
|
4
|
-
modules?: TModule[];
|
|
5
|
-
allOperations: TModule["operations"];
|
|
6
|
-
lastCreatedModuleId: string | null;
|
|
7
|
-
onAddModule: (name: string) => Promise<string | undefined>;
|
|
8
|
-
updateModuleName: (id: string, name: string) => void;
|
|
9
|
-
deleteModule: (id: string) => void;
|
|
10
|
-
updateOperationName: (id: string, name: string) => void;
|
|
11
|
-
deleteOperation: (id: string) => void;
|
|
12
|
-
addOperationAndInitialSchema: (moduleId: string, name: string) => Promise<string | undefined>;
|
|
13
|
-
updateOperationSchema: (id: string, newDoc: string) => void;
|
|
14
|
-
setOperationDescription: (id: string, description: string) => void;
|
|
15
|
-
addOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
|
|
16
|
-
deleteOperationError: (id: string) => void;
|
|
17
|
-
setOperationErrorName: (operationId: string, errorId: string, name: string) => void;
|
|
18
|
-
toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;
|
|
19
|
-
};
|
|
20
|
-
export declare function Module(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/module.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,KACT,IAAI,CAAC;IACV,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;CACvE,CAAC;AACF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,2CAiElC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ModuleForm } from "./module-form.js";
|
|
3
|
-
import { Operations } from "./operations.js";
|
|
4
|
-
export function Module(props) {
|
|
5
|
-
const { module, modules, allOperations, lastCreatedModuleId, onAddModule, updateModuleName, deleteModule, updateOperationName, deleteOperation, addOperationAndInitialSchema, updateOperationSchema, setOperationDescription, addOperationError, deleteOperationError, setOperationErrorName, toggleNoInputRequired, } = props;
|
|
6
|
-
return (_jsxs("div", { className: "relative rounded-3xl bg-gray-100 p-6", children: [_jsxs("div", { className: "mb-2 w-1/2 pr-6", children: [_jsx(ModuleForm, { modules: modules, module: module, onAddModule: onAddModule, updateModuleName: updateModuleName }), !!module && (_jsx("button", { "aria-label": "Delete module", tabIndex: -1, className: "absolute right-1 top-1 p-2 text-gray-800 transition-colors hover:text-gray-500", onClick: () => {
|
|
7
|
-
deleteModule(module.id);
|
|
8
|
-
}, children: _jsx("svg", { className: "size-6", viewBox: "0 0 24 24", fill: "currentcolor", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.9993 8.51506L15.4844 7L11.9994 10.4852L8.51497 7.00057L7 8.51562L10.4844 12.0003L7.00056 15.4843L8.51552 16.9994L11.9994 13.5153L15.4838 17L16.9988 15.4849L13.5144 12.0003L16.9993 8.51506Z" }) }) }))] }), !!module && (_jsx(Operations, { module: module, allOperations: allOperations, shouldFocusNewOperation: module.id === lastCreatedModuleId, updateOperationName: updateOperationName, deleteOperation: deleteOperation, addOperationAndInitialSchema: addOperationAndInitialSchema, updateOperationSchema: updateOperationSchema, setOperationDescription: setOperationDescription, addOperationError: addOperationError, deleteOperationError: deleteOperationError, setOperationErrorName: setOperationErrorName, toggleNoInputRequired: toggleNoInputRequired }))] }));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../document-model-editor/components/module.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA6B7C,MAAM,UAAU,MAAM,CAAC,KAAY;IACjC,MAAM,EACJ,MAAM,EACN,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,GAAG,KAAK,CAAC;IACV,OAAO,CACL,eAAK,SAAS,EAAC,sCAAsC,aACnD,eAAK,SAAS,EAAC,iBAAiB,aAC9B,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,GAClC,EACD,CAAC,CAAC,MAAM,IAAI,CACX,+BACa,eAAe,EAC1B,QAAQ,EAAE,CAAC,CAAC,EACZ,SAAS,EAAC,gFAAgF,EAC1F,OAAO,EAAE,GAAG,EAAE;4BACZ,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;wBAC1B,CAAC,YAED,cAAK,SAAS,EAAC,QAAQ,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,YAC7D,eACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,kMAAkM,GACpM,GACE,GACC,CACV,IACG,EACL,CAAC,CAAC,MAAM,IAAI,CACX,KAAC,UAAU,IACT,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,uBAAuB,EAAE,MAAM,CAAC,EAAE,KAAK,mBAAmB,EAC1D,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,eAAe,EAChC,4BAA4B,EAAE,4BAA4B,EAC1D,qBAAqB,EAAE,qBAAqB,EAC5C,uBAAuB,EAAE,uBAAuB,EAChD,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,qBAAqB,EAC5C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ModuleSpecification as TModule } from "document-model";
|
|
2
|
-
type Props = {
|
|
3
|
-
modules: TModule[];
|
|
4
|
-
allOperations: TModule["operations"];
|
|
5
|
-
addModule: (name: string) => Promise<string | undefined>;
|
|
6
|
-
updateModuleName: (id: string, name: string) => void;
|
|
7
|
-
deleteModule: (id: string) => void;
|
|
8
|
-
updateOperationName: (id: string, name: string) => void;
|
|
9
|
-
deleteOperation: (id: string) => void;
|
|
10
|
-
addOperationAndInitialSchema: (moduleId: string, name: string) => Promise<string | undefined>;
|
|
11
|
-
updateOperationSchema: (id: string, newDoc: string) => void;
|
|
12
|
-
setOperationDescription: (id: string, description: string) => void;
|
|
13
|
-
addOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
|
|
14
|
-
deleteOperationError: (id: string) => void;
|
|
15
|
-
setOperationErrorName: (operationId: string, errorId: string, name: string) => void;
|
|
16
|
-
toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;
|
|
17
|
-
};
|
|
18
|
-
export default function Modules({ modules, allOperations, addModule, updateModuleName, deleteModule, updateOperationName, deleteOperation, addOperationAndInitialSchema, updateOperationSchema, setOperationDescription, addOperationError, deleteOperationError, setOperationErrorName, toggleNoInputRequired, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/modules.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAIrE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzD,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,4BAA4B,EAAE,CAC5B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,iBAAiB,EAAE,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,EAAE,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;IACV,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;CACvE,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,OAAO,EACP,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,EAAE,KAAK,2CAoEP"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useRef, useState } from "react";
|
|
3
|
-
import { Module } from "./module.js";
|
|
4
|
-
export default function Modules({ modules, allOperations, addModule, updateModuleName, deleteModule, updateOperationName, deleteOperation, addOperationAndInitialSchema, updateOperationSchema, setOperationDescription, addOperationError, deleteOperationError, setOperationErrorName, toggleNoInputRequired, }) {
|
|
5
|
-
const [lastCreatedModuleId, setLastCreatedModuleId] = useState(null);
|
|
6
|
-
const focusTrapRef = useRef(null);
|
|
7
|
-
const onAddModule = useCallback(async (name) => {
|
|
8
|
-
const moduleId = await addModule(name);
|
|
9
|
-
if (moduleId) {
|
|
10
|
-
setLastCreatedModuleId(moduleId);
|
|
11
|
-
focusTrapRef.current?.focus();
|
|
12
|
-
}
|
|
13
|
-
return moduleId;
|
|
14
|
-
}, [addModule, setLastCreatedModuleId]);
|
|
15
|
-
return (_jsxs("div", { className: "flex flex-col gap-2", children: [modules.map((module) => (_jsx(Module, { module: module, modules: modules, allOperations: allOperations, lastCreatedModuleId: lastCreatedModuleId, onAddModule: onAddModule, updateModuleName: updateModuleName, deleteModule: deleteModule, updateOperationName: updateOperationName, deleteOperation: deleteOperation, addOperationAndInitialSchema: addOperationAndInitialSchema, updateOperationSchema: updateOperationSchema, setOperationDescription: setOperationDescription, addOperationError: addOperationError, deleteOperationError: deleteOperationError, setOperationErrorName: setOperationErrorName, toggleNoInputRequired: toggleNoInputRequired }, module.id))), _jsx(Module, { modules: modules, allOperations: allOperations, lastCreatedModuleId: lastCreatedModuleId, onAddModule: onAddModule, updateModuleName: updateModuleName, deleteModule: deleteModule, updateOperationName: updateOperationName, deleteOperation: deleteOperation, addOperationAndInitialSchema: addOperationAndInitialSchema, updateOperationSchema: updateOperationSchema, setOperationDescription: setOperationDescription, addOperationError: addOperationError, deleteOperationError: deleteOperationError, setOperationErrorName: setOperationErrorName, toggleNoInputRequired: toggleNoInputRequired }, "add-module"), _jsx("div", { ref: focusTrapRef, tabIndex: 0, className: "size-0 overflow-hidden", "aria-hidden": "true" })] }));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=modules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../document-model-editor/components/modules.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA4BrC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,OAAO,EACP,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACf;IACN,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAC5D,IAAI,CACL,CAAC;IACF,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,MAAM,WAAW,GAAG,WAAW,CAC7B,KAAK,EAAE,IAAY,E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AiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,qBAAqB,EAC5C,qBAAqB,EAAE,qBAAqB,IAfxC,YAAY,CAgBhB,EAEF,cACE,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,wBAAwB,iBACtB,MAAM,GAClB,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ModuleSpecification } from "document-model";
|
|
2
|
-
type Props = {
|
|
3
|
-
operation: ModuleSpecification["operations"][number];
|
|
4
|
-
focusOnMount?: boolean;
|
|
5
|
-
setOperationDescription: (id: string, description: string) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare function OperationDescriptionForm({ operation, focusOnMount, setOperationDescription, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=operation-description-form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-description-form.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/operation-description-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACpE,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,YAAY,EACZ,uBAAuB,GACxB,EAAE,KAAK,2CAsBP"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useRef } from "react";
|
|
3
|
-
import { TextField } from "./text-field.js";
|
|
4
|
-
export function OperationDescriptionForm({ operation, focusOnMount, setOperationDescription, }) {
|
|
5
|
-
const textFieldRef = useRef(null);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (focusOnMount && textFieldRef.current) {
|
|
8
|
-
textFieldRef.current.focus();
|
|
9
|
-
}
|
|
10
|
-
}, [focusOnMount]);
|
|
11
|
-
return (_jsx(TextField, { ref: textFieldRef, name: "description", value: operation.description, onSubmit: (newDescription) => setOperationDescription(operation.id, newDescription), label: "Operation description", allowEmpty: true, placeholder: "Operation Description" }));
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=operation-description-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-description-form.js","sourceRoot":"","sources":["../../../document-model-editor/components/operation-description-form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,UAAU,wBAAwB,CAAC,EACvC,SAAS,EACT,YAAY,EACZ,uBAAuB,GACjB;IACN,MAAM,YAAY,GAAG,MAAM,CAA+B,IAAI,CAAC,CAAC;IAEhE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YACzC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,KAAC,SAAS,IACR,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,SAAS,CAAC,WAAW,EAC5B,QAAQ,EAAE,CAAC,cAAc,EAAE,EAAE,CAC3B,uBAAuB,CAAC,SAAS,CAAC,EAAE,EAAE,cAAc,CAAC,EAEvD,KAAK,EAAC,uBAAuB,EAC7B,UAAU,QACV,WAAW,EAAC,uBAAuB,GACnC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { OperationErrorSpecification, ModuleSpecification } from "document-model";
|
|
2
|
-
type Props = {
|
|
3
|
-
operation: ModuleSpecification["operations"][number];
|
|
4
|
-
error?: OperationErrorSpecification;
|
|
5
|
-
focusOnMount?: boolean;
|
|
6
|
-
onSubmit?: () => void;
|
|
7
|
-
onAddOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
|
|
8
|
-
deleteOperationError: (id: string) => void;
|
|
9
|
-
setOperationErrorName: (operationId: string, errorId: string, name: string) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare function OperationErrorForm({ operation, error, focusOnMount, onSubmit, onAddOperationError, deleteOperationError, setOperationErrorName, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=operation-error-form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-error-form.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/operation-error-form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAIxB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB,EAAE,CACnB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,EAAE,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;CACX,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,EAAE,KAAK,2CA0DP"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { pascalCase } from "change-case";
|
|
3
|
-
import { useCallback, useRef } from "react";
|
|
4
|
-
import { TextField } from "./text-field.js";
|
|
5
|
-
export function OperationErrorForm({ operation, error, focusOnMount, onSubmit, onAddOperationError, deleteOperationError, setOperationErrorName, }) {
|
|
6
|
-
const textFieldRef = useRef(null);
|
|
7
|
-
const isEdit = !!error;
|
|
8
|
-
const allOperationErrorNames = operation.errors
|
|
9
|
-
.map((o) => o.name)
|
|
10
|
-
.filter((n) => n !== null);
|
|
11
|
-
const handleSubmit = useCallback((name) => {
|
|
12
|
-
if (isEdit && name === "") {
|
|
13
|
-
deleteOperationError(error.id);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const formattedName = pascalCase(name);
|
|
17
|
-
if (isEdit) {
|
|
18
|
-
setOperationErrorName(operation.id, error.id, formattedName);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
onAddOperationError(operation.id, formattedName);
|
|
22
|
-
}
|
|
23
|
-
onSubmit?.();
|
|
24
|
-
}, [
|
|
25
|
-
isEdit,
|
|
26
|
-
error?.id,
|
|
27
|
-
operation.id,
|
|
28
|
-
deleteOperationError,
|
|
29
|
-
setOperationErrorName,
|
|
30
|
-
onAddOperationError,
|
|
31
|
-
onSubmit,
|
|
32
|
-
]);
|
|
33
|
-
const handleChange = useCallback((value) => {
|
|
34
|
-
if (isEdit && value === "") {
|
|
35
|
-
deleteOperationError(error.id);
|
|
36
|
-
}
|
|
37
|
-
}, [isEdit, error?.id, deleteOperationError]);
|
|
38
|
-
return (_jsx(TextField, { ref: textFieldRef, name: "name", value: error?.name, onSubmit: handleSubmit, onChange: handleChange, placeholder: "Add exception", required: !isEdit, allowEmpty: !isEdit, shouldReset: !isEdit, unique: allOperationErrorNames, focusOnMount: focusOnMount }));
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=operation-error-form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-error-form.js","sourceRoot":"","sources":["../../../document-model-editor/components/operation-error-form.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAmB5C,MAAM,UAAU,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACf;IACN,MAAM,YAAY,GAAG,MAAM,CAA+B,IAAI,CAAC,CAAC;IAChE,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC;IACvB,MAAM,sBAAsB,GAAG,SAAS,CAAC,MAAM;SAC5C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAClB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAE7B,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,IAAY,EAAE,EAAE;QACf,IAAI,MAAM,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YAC1B,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC/B,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,MAAM,EAAE,CAAC;YACX,qBAAqB,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,mBAAmB,CAAC,SAAS,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QACnD,CAAC;QACD,QAAQ,EAAE,EAAE,CAAC;IACf,CAAC,EACD;QACE,MAAM;QACN,KAAK,EAAE,EAAE;QACT,SAAS,CAAC,EAAE;QACZ,oBAAoB;QACpB,qBAAqB;QACrB,mBAAmB;QACnB,QAAQ;KACT,CACF,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE;QAChB,IAAI,MAAM,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YAC3B,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,EACD,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,oBAAoB,CAAC,CAC1C,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,IACR,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EAAE,IAAI,EAClB,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,eAAe,EAC3B,QAAQ,EAAE,CAAC,MAAM,EACjB,UAAU,EAAE,CAAC,MAAM,EACnB,WAAW,EAAE,CAAC,MAAM,EACpB,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,YAAY,GAC1B,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ModuleSpecification } from "document-model";
|
|
2
|
-
type Props = {
|
|
3
|
-
operation: ModuleSpecification["operations"][number];
|
|
4
|
-
addOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
|
|
5
|
-
deleteOperationError: (id: string) => void;
|
|
6
|
-
setOperationErrorName: (operationId: string, errorId: string, name: string) => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function OperationErrors({ operation, addOperationError, deleteOperationError, setOperationErrorName, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=operation-errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-errors.d.ts","sourceRoot":"","sources":["../../../document-model-editor/components/operation-errors.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;IACrD,iBAAiB,EAAE,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,EAAE,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;CACX,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,GACtB,EAAE,KAAK,2CA8CP"}
|