diff --git a/admin/settings/index.php b/admin/settings/index.php index c1135d6b..8596597a 100644 --- a/admin/settings/index.php +++ b/admin/settings/index.php @@ -74,9 +74,9 @@ ], [ - 'name' => 'builder', + 'name' => 'view', 'field_type' => 'checkbox', - 'label' => 'Builder: Integrated authoring environment for all template types - See Tangible -> Builder', + 'label' => 'View: Integrated authoring environment for all template types - See Tangible -> View', 'default_value' => false, 'beta' => true, 'reload' => true, diff --git a/builder/readme.md b/builder/readme.md deleted file mode 100644 index 7039d1bf..00000000 --- a/builder/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Builder - -The Builder module is an integrated development environment (IDE), a unified interface to edit and manage all template types - layouts, scripts, styles, assets, libraries. It aims to bring together admin features into one place, instead of separate screens. - -- React mini-application -- API to manage templates, local and cloud libraries -- Template archive and edit screens -- Support new template type `view` that is stored in a custom database table diff --git a/core.php b/core.php index 3f872a8c..cb3191dd 100644 --- a/core.php +++ b/core.php @@ -45,7 +45,7 @@ class template_system { // Features that depend on above modules require_once __DIR__ . '/admin/index.php'; -require_once __DIR__ . '/builder/index.php'; require_once __DIR__ . '/editor/index.php'; require_once __DIR__ . '/content/index.php'; require_once __DIR__ . '/form/index.php'; +require_once __DIR__ . '/view/index.php'; diff --git a/elandel/.gitrepo b/elandel/.gitrepo index fedaae83..52b7f621 100644 --- a/elandel/.gitrepo +++ b/elandel/.gitrepo @@ -4,8 +4,8 @@ ; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme ; [subrepo] - remote = git@github.com:tangibleinc/elandel - branch = master + remote = git@github.com:expreva/elandel + branch = main commit = 1f5b8641761692258cc46bcfee7b7fb5d6c956cc method = merge cmdver = 0.4.6 diff --git a/builder/admin.php b/view/admin.php similarity index 70% rename from builder/admin.php rename to view/admin.php index 53985654..0a0c485e 100644 --- a/builder/admin.php +++ b/view/admin.php @@ -1,5 +1,5 @@ base==='tangible_page_tangible-builder') { + if (!empty($screen) && $screen->base==='tangible_page_tangible-view') { remove_all_actions('admin_notices'); remove_all_actions('all_admin_notices'); } }, 999); framework\register_admin_menu([ - 'name' => 'tangible-builder', - 'title' => 'Builder', + 'name' => 'tangible-view', + 'title' => 'View', 'capability' => 'manage_options', - 'callback' => 'tangible\\template_system\\builder\\load', + 'callback' => 'tangible\\template_system\\view\\load', // See ./enqueue 'position' => 50, // After template post types ]); diff --git a/builder/build/builder.min.css b/view/build/view.min.css similarity index 100% rename from builder/build/builder.min.css rename to view/build/view.min.css diff --git a/builder/build/builder.min.js b/view/build/view.min.js similarity index 100% rename from builder/build/builder.min.js rename to view/build/view.min.js diff --git a/builder/enqueue.php b/view/enqueue.php similarity index 60% rename from builder/enqueue.php rename to view/enqueue.php index 3e6b13f5..2f07e775 100644 --- a/builder/enqueue.php +++ b/view/enqueue.php @@ -1,16 +1,16 @@
url; - $version = builder::$state->version; + $url = view::$state->url; + $version = view::$state->version; wp_enqueue_script( - 'tangible-template-system-builder', - $url . '/build/builder.min.js', + 'tangible-template-system-view', + $url . '/build/view.min.js', [ // 'tangible-ajax', // TODO: Replace with new REST Client module 'tangible-module-loader', @@ -38,8 +38,8 @@ function enqueue() { ); wp_enqueue_style( - 'tangible-template-system-builder', - $url . '/build/builder.min.css', + 'tangible-template-system-view', + $url . '/build/view.min.css', [], $version ); diff --git a/builder/index.php b/view/index.php similarity index 62% rename from builder/index.php rename to view/index.php index fbb4cfe3..b81c76b6 100644 --- a/builder/index.php +++ b/view/index.php @@ -1,17 +1,17 @@ template_system::$state->version, 'url' => untrailingslashit( plugins_url('/', __FILE__) ), ]; diff --git a/view/readme.md b/view/readme.md new file mode 100644 index 00000000..5184733f --- /dev/null +++ b/view/readme.md @@ -0,0 +1,8 @@ +# View + +The View module is an integrated development environment (IDE), a unified interface to edit and manage all template types - layouts, scripts, styles, assets, libraries. It aims to bring together admin features into one place, instead of separate screens. + +- React mini-application +- API to manage templates, local and cloud libraries +- Template archive and edit screens +- Support new template type `view` that is stored in a custom database table diff --git a/builder/src/Assets/index.tsx b/view/src/Assets/index.tsx similarity index 100% rename from builder/src/Assets/index.tsx rename to view/src/Assets/index.tsx diff --git a/builder/src/Editor/index.tsx b/view/src/Editor/index.tsx similarity index 100% rename from builder/src/Editor/index.tsx rename to view/src/Editor/index.tsx diff --git a/builder/src/Header/index.tsx b/view/src/Header/index.tsx similarity index 100% rename from builder/src/Header/index.tsx rename to view/src/Header/index.tsx diff --git a/builder/src/Layout/base.scss b/view/src/Layout/base.scss similarity index 100% rename from builder/src/Layout/base.scss rename to view/src/Layout/base.scss diff --git a/builder/src/Layout/dark.scss b/view/src/Layout/dark.scss similarity index 100% rename from builder/src/Layout/dark.scss rename to view/src/Layout/dark.scss diff --git a/builder/src/Layout/index.ts b/view/src/Layout/index.ts similarity index 100% rename from builder/src/Layout/index.ts rename to view/src/Layout/index.ts diff --git a/builder/src/Layout/light.scss b/view/src/Layout/light.scss similarity index 100% rename from builder/src/Layout/light.scss rename to view/src/Layout/light.scss diff --git a/builder/src/Layout/src/Attribute.ts b/view/src/Layout/src/Attribute.ts similarity index 100% rename from builder/src/Layout/src/Attribute.ts rename to view/src/Layout/src/Attribute.ts diff --git a/builder/src/Layout/src/AttributeDefinitions.ts b/view/src/Layout/src/AttributeDefinitions.ts similarity index 100% rename from builder/src/Layout/src/AttributeDefinitions.ts rename to view/src/Layout/src/AttributeDefinitions.ts diff --git a/builder/src/Layout/src/DockLocation.ts b/view/src/Layout/src/DockLocation.ts similarity index 100% rename from builder/src/Layout/src/DockLocation.ts rename to view/src/Layout/src/DockLocation.ts diff --git a/builder/src/Layout/src/DragDrop.ts b/view/src/Layout/src/DragDrop.ts similarity index 100% rename from builder/src/Layout/src/DragDrop.ts rename to view/src/Layout/src/DragDrop.ts diff --git a/builder/src/Layout/src/DropInfo.ts b/view/src/Layout/src/DropInfo.ts similarity index 100% rename from builder/src/Layout/src/DropInfo.ts rename to view/src/Layout/src/DropInfo.ts diff --git a/builder/src/Layout/src/I18nLabel.ts b/view/src/Layout/src/I18nLabel.ts similarity index 100% rename from builder/src/Layout/src/I18nLabel.ts rename to view/src/Layout/src/I18nLabel.ts diff --git a/builder/src/Layout/src/Orientation.ts b/view/src/Layout/src/Orientation.ts similarity index 100% rename from builder/src/Layout/src/Orientation.ts rename to view/src/Layout/src/Orientation.ts diff --git a/builder/src/Layout/src/PopupMenu.tsx b/view/src/Layout/src/PopupMenu.tsx similarity index 100% rename from builder/src/Layout/src/PopupMenu.tsx rename to view/src/Layout/src/PopupMenu.tsx diff --git a/builder/src/Layout/src/Rect.ts b/view/src/Layout/src/Rect.ts similarity index 100% rename from builder/src/Layout/src/Rect.ts rename to view/src/Layout/src/Rect.ts diff --git a/builder/src/Layout/src/Types.ts b/view/src/Layout/src/Types.ts similarity index 100% rename from builder/src/Layout/src/Types.ts rename to view/src/Layout/src/Types.ts diff --git a/builder/src/Layout/src/index.ts b/view/src/Layout/src/index.ts similarity index 100% rename from builder/src/Layout/src/index.ts rename to view/src/Layout/src/index.ts diff --git a/builder/src/Layout/src/model/Action.ts b/view/src/Layout/src/model/Action.ts similarity index 100% rename from builder/src/Layout/src/model/Action.ts rename to view/src/Layout/src/model/Action.ts diff --git a/builder/src/Layout/src/model/Actions.ts b/view/src/Layout/src/model/Actions.ts similarity index 100% rename from builder/src/Layout/src/model/Actions.ts rename to view/src/Layout/src/model/Actions.ts diff --git a/builder/src/Layout/src/model/BorderNode.ts b/view/src/Layout/src/model/BorderNode.ts similarity index 100% rename from builder/src/Layout/src/model/BorderNode.ts rename to view/src/Layout/src/model/BorderNode.ts diff --git a/builder/src/Layout/src/model/BorderSet.ts b/view/src/Layout/src/model/BorderSet.ts similarity index 100% rename from builder/src/Layout/src/model/BorderSet.ts rename to view/src/Layout/src/model/BorderSet.ts diff --git a/builder/src/Layout/src/model/ICloseType.ts b/view/src/Layout/src/model/ICloseType.ts similarity index 100% rename from builder/src/Layout/src/model/ICloseType.ts rename to view/src/Layout/src/model/ICloseType.ts diff --git a/builder/src/Layout/src/model/IDraggable.ts b/view/src/Layout/src/model/IDraggable.ts similarity index 100% rename from builder/src/Layout/src/model/IDraggable.ts rename to view/src/Layout/src/model/IDraggable.ts diff --git a/builder/src/Layout/src/model/IDropTarget.ts b/view/src/Layout/src/model/IDropTarget.ts similarity index 100% rename from builder/src/Layout/src/model/IDropTarget.ts rename to view/src/Layout/src/model/IDropTarget.ts diff --git a/builder/src/Layout/src/model/IJsonModel.ts b/view/src/Layout/src/model/IJsonModel.ts similarity index 100% rename from builder/src/Layout/src/model/IJsonModel.ts rename to view/src/Layout/src/model/IJsonModel.ts diff --git a/builder/src/Layout/src/model/Model.ts b/view/src/Layout/src/model/Model.ts similarity index 100% rename from builder/src/Layout/src/model/Model.ts rename to view/src/Layout/src/model/Model.ts diff --git a/builder/src/Layout/src/model/Node.ts b/view/src/Layout/src/model/Node.ts similarity index 100% rename from builder/src/Layout/src/model/Node.ts rename to view/src/Layout/src/model/Node.ts diff --git a/builder/src/Layout/src/model/RowNode.ts b/view/src/Layout/src/model/RowNode.ts similarity index 100% rename from builder/src/Layout/src/model/RowNode.ts rename to view/src/Layout/src/model/RowNode.ts diff --git a/builder/src/Layout/src/model/SplitterNode.ts b/view/src/Layout/src/model/SplitterNode.ts similarity index 100% rename from builder/src/Layout/src/model/SplitterNode.ts rename to view/src/Layout/src/model/SplitterNode.ts diff --git a/builder/src/Layout/src/model/TabNode.ts b/view/src/Layout/src/model/TabNode.ts similarity index 100% rename from builder/src/Layout/src/model/TabNode.ts rename to view/src/Layout/src/model/TabNode.ts diff --git a/builder/src/Layout/src/model/TabSetNode.ts b/view/src/Layout/src/model/TabSetNode.ts similarity index 100% rename from builder/src/Layout/src/model/TabSetNode.ts rename to view/src/Layout/src/model/TabSetNode.ts diff --git a/builder/src/Layout/src/model/Utils.ts b/view/src/Layout/src/model/Utils.ts similarity index 100% rename from builder/src/Layout/src/model/Utils.ts rename to view/src/Layout/src/model/Utils.ts diff --git a/builder/src/Layout/src/view/BorderButton.tsx b/view/src/Layout/src/view/BorderButton.tsx similarity index 100% rename from builder/src/Layout/src/view/BorderButton.tsx rename to view/src/Layout/src/view/BorderButton.tsx diff --git a/builder/src/Layout/src/view/BorderTabSet.tsx b/view/src/Layout/src/view/BorderTabSet.tsx similarity index 100% rename from builder/src/Layout/src/view/BorderTabSet.tsx rename to view/src/Layout/src/view/BorderTabSet.tsx diff --git a/builder/src/Layout/src/view/ErrorBoundary.tsx b/view/src/Layout/src/view/ErrorBoundary.tsx similarity index 100% rename from builder/src/Layout/src/view/ErrorBoundary.tsx rename to view/src/Layout/src/view/ErrorBoundary.tsx diff --git a/builder/src/Layout/src/view/FloatingWindow.tsx b/view/src/Layout/src/view/FloatingWindow.tsx similarity index 100% rename from builder/src/Layout/src/view/FloatingWindow.tsx rename to view/src/Layout/src/view/FloatingWindow.tsx diff --git a/builder/src/Layout/src/view/FloatingWindowTab.tsx b/view/src/Layout/src/view/FloatingWindowTab.tsx similarity index 100% rename from builder/src/Layout/src/view/FloatingWindowTab.tsx rename to view/src/Layout/src/view/FloatingWindowTab.tsx diff --git a/builder/src/Layout/src/view/Icons.tsx b/view/src/Layout/src/view/Icons.tsx similarity index 100% rename from builder/src/Layout/src/view/Icons.tsx rename to view/src/Layout/src/view/Icons.tsx diff --git a/builder/src/Layout/src/view/Layout.tsx b/view/src/Layout/src/view/Layout.tsx similarity index 100% rename from builder/src/Layout/src/view/Layout.tsx rename to view/src/Layout/src/view/Layout.tsx diff --git a/builder/src/Layout/src/view/Splitter.tsx b/view/src/Layout/src/view/Splitter.tsx similarity index 100% rename from builder/src/Layout/src/view/Splitter.tsx rename to view/src/Layout/src/view/Splitter.tsx diff --git a/builder/src/Layout/src/view/Tab.tsx b/view/src/Layout/src/view/Tab.tsx similarity index 100% rename from builder/src/Layout/src/view/Tab.tsx rename to view/src/Layout/src/view/Tab.tsx diff --git a/builder/src/Layout/src/view/TabButton.tsx b/view/src/Layout/src/view/TabButton.tsx similarity index 100% rename from builder/src/Layout/src/view/TabButton.tsx rename to view/src/Layout/src/view/TabButton.tsx diff --git a/builder/src/Layout/src/view/TabButtonStamp.tsx b/view/src/Layout/src/view/TabButtonStamp.tsx similarity index 100% rename from builder/src/Layout/src/view/TabButtonStamp.tsx rename to view/src/Layout/src/view/TabButtonStamp.tsx diff --git a/builder/src/Layout/src/view/TabFloating.tsx b/view/src/Layout/src/view/TabFloating.tsx similarity index 100% rename from builder/src/Layout/src/view/TabFloating.tsx rename to view/src/Layout/src/view/TabFloating.tsx diff --git a/builder/src/Layout/src/view/TabOverflowHook.tsx b/view/src/Layout/src/view/TabOverflowHook.tsx similarity index 100% rename from builder/src/Layout/src/view/TabOverflowHook.tsx rename to view/src/Layout/src/view/TabOverflowHook.tsx diff --git a/builder/src/Layout/src/view/TabSet.tsx b/view/src/Layout/src/view/TabSet.tsx similarity index 100% rename from builder/src/Layout/src/view/TabSet.tsx rename to view/src/Layout/src/view/TabSet.tsx diff --git a/builder/src/Layout/src/view/Utils.tsx b/view/src/Layout/src/view/Utils.tsx similarity index 100% rename from builder/src/Layout/src/view/Utils.tsx rename to view/src/Layout/src/view/Utils.tsx diff --git a/builder/src/Library/index.tsx b/view/src/Library/index.tsx similarity index 100% rename from builder/src/Library/index.tsx rename to view/src/Library/index.tsx diff --git a/builder/src/Location/index.tsx b/view/src/Location/index.tsx similarity index 100% rename from builder/src/Location/index.tsx rename to view/src/Location/index.tsx diff --git a/builder/src/Preview/index.tsx b/view/src/Preview/index.tsx similarity index 100% rename from builder/src/Preview/index.tsx rename to view/src/Preview/index.tsx diff --git a/builder/src/Support/index.tsx b/view/src/Support/index.tsx similarity index 100% rename from builder/src/Support/index.tsx rename to view/src/Support/index.tsx diff --git a/builder/src/icons.tsx b/view/src/icons.tsx similarity index 100% rename from builder/src/icons.tsx rename to view/src/icons.tsx diff --git a/builder/src/index.scss b/view/src/index.scss similarity index 100% rename from builder/src/index.scss rename to view/src/index.scss diff --git a/builder/src/index.tsx b/view/src/index.tsx similarity index 100% rename from builder/src/index.tsx rename to view/src/index.tsx diff --git a/builder/src/model.ts b/view/src/model.ts similarity index 100% rename from builder/src/model.ts rename to view/src/model.ts diff --git a/builder/tangible.config.js b/view/tangible.config.js similarity index 79% rename from builder/tangible.config.js rename to view/tangible.config.js index a30ab1ed..4b9d6c1f 100644 --- a/builder/tangible.config.js +++ b/view/tangible.config.js @@ -3,12 +3,12 @@ export default { // IDE: Integrated development environment for Template, Style, Script { src: 'src/index.tsx', - dest: 'build/builder.min.js', + dest: 'build/view.min.js', react: 'wp' }, { src: 'src/index.scss', - dest: 'build/builder.min.css' + dest: 'build/view.min.css' }, ], format: ['**/*.{php,js,ts,jsx,tsx,json,scss}', '!build'],