create-middag-ui 0.26.2 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/scaffold.js
CHANGED
|
@@ -2050,7 +2050,7 @@ function readTemplate(relativePath) {
|
|
|
2050
2050
|
// ── Shared: register, page-resolver, route helper, demo page ────────────
|
|
2051
2051
|
|
|
2052
2052
|
/**
|
|
2053
|
-
* Scaffold FREE register: src/app/register.ts — the
|
|
2053
|
+
* Scaffold FREE register: src/app/register.ts — the 13 standard blocks.
|
|
2054
2054
|
*/
|
|
2055
2055
|
export function scaffoldFreeRegister(targetDir) {
|
|
2056
2056
|
ensureDir(join(targetDir, "src", "app"));
|
package/lib/scaffoldPRO.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Only available when installed from GitHub Packages.
|
|
6
6
|
*
|
|
7
7
|
* Generates the extended mock harness (mock/, src/app/register.ts)
|
|
8
|
-
* with 19 blocks (
|
|
8
|
+
* with 19 blocks (13 standard + 6 premium), extracted navigation/data/entities/routes files,
|
|
9
9
|
* and the slim app.tsx that delegates to mock/.
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -54,7 +54,7 @@ function skipIfExists(filePath, label) {
|
|
|
54
54
|
// ── 1. PRO register (19 blocks) ────────────────────────────────────────
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* Scaffold `src/app/register.ts` — PRO version with 19 blocks (
|
|
57
|
+
* Scaffold `src/app/register.ts` — PRO version with 19 blocks (13 standard + 6 premium).
|
|
58
58
|
* Overrides any FREE register that may have been scaffolded.
|
|
59
59
|
*
|
|
60
60
|
* @param {string} targetDir - Absolute path to UI project root
|
|
@@ -12,8 +12,8 @@ import "./theme.css";
|
|
|
12
12
|
import "@fontsource-variable/figtree";
|
|
13
13
|
import { App } from "./app";
|
|
14
14
|
|
|
15
|
-
// Dev mode: register the free engine defaults (
|
|
16
|
-
// icons + cells) plus the premium runtime (the
|
|
15
|
+
// Dev mode: register the free engine defaults (13 standard blocks + fields +
|
|
16
|
+
// icons + cells) plus the premium runtime (the 6 heavy blocks). Then override
|
|
17
17
|
// the "product" shell with the host-sim MockProductShell inherited from
|
|
18
18
|
// @middag-io/react-demo (Moodle/WP chrome, host switcher, theme/locale toggles).
|
|
19
19
|
// Dev-only — in production, entry-*.tsx uses the selective register from ./app/register.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* register — selective registration for this plugin's UI (PRO).
|
|
3
3
|
*
|
|
4
|
-
* Registers the
|
|
4
|
+
* Registers the 13 standard blocks (plus shells, layouts, cell renderers, form
|
|
5
5
|
* fields and icons) from @middag-io/react, then calls registerProDefaults()
|
|
6
6
|
* from @middag-io/react-pro to add the premium runtime: the rich ProductShell
|
|
7
|
-
* + chrome panels and the
|
|
8
|
-
*
|
|
7
|
+
* + chrome panels and the 6 interactive blocks (chart_panel, flow_editor,
|
|
8
|
+
* condition_tree, sentence_builder, form_builder, kanban_board).
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Note: `form_panel` is a standard Community block (registered below); only
|
|
11
|
+
* `form_builder` is premium.
|
|
12
|
+
*
|
|
13
|
+
* Total: 19 blocks (13 standard + 6 premium).
|
|
11
14
|
*
|
|
12
15
|
* Full catalog: https://docs.middag.io/blocks
|
|
13
16
|
*/
|
|
@@ -26,7 +29,7 @@ import {
|
|
|
26
29
|
SidebarLayout,
|
|
27
30
|
DashboardLayout,
|
|
28
31
|
WizardLayout,
|
|
29
|
-
// Blocks (the
|
|
32
|
+
// Blocks (the 13 standard barrel exports)
|
|
30
33
|
DenseTableBlock,
|
|
31
34
|
MetricCardBlock,
|
|
32
35
|
EmptyStateBlock,
|
|
@@ -39,6 +42,7 @@ import {
|
|
|
39
42
|
CardGridBlock,
|
|
40
43
|
ActionGridBlock,
|
|
41
44
|
LinkListBlock,
|
|
45
|
+
FormPanelBlock,
|
|
42
46
|
} from "@middag-io/react";
|
|
43
47
|
import { registerProDefaults } from "@middag-io/react-pro/runtime";
|
|
44
48
|
|
|
@@ -57,7 +61,7 @@ export function registerDefaults(): void {
|
|
|
57
61
|
registerLayout("dashboard", DashboardLayout);
|
|
58
62
|
registerLayout("wizard", WizardLayout);
|
|
59
63
|
|
|
60
|
-
// Blocks — the
|
|
64
|
+
// Blocks — the 13 standard blocks from the barrel
|
|
61
65
|
registerBlock("dense_table", DenseTableBlock);
|
|
62
66
|
registerBlock("metric_card", MetricCardBlock);
|
|
63
67
|
registerBlock("empty_state", EmptyStateBlock);
|
|
@@ -70,6 +74,9 @@ export function registerDefaults(): void {
|
|
|
70
74
|
registerBlock("card_grid", CardGridBlock);
|
|
71
75
|
registerBlock("action_grid", ActionGridBlock);
|
|
72
76
|
registerBlock("link_list", LinkListBlock);
|
|
77
|
+
// form_panel pulls react-hook-form + zod (lazy-loaded); it is a standard
|
|
78
|
+
// Community block — drop it if this bundle has no forms.
|
|
79
|
+
registerBlock("form_panel", FormPanelBlock);
|
|
73
80
|
|
|
74
81
|
// Cell renderers (status, timestamp, link, boolean, etc.)
|
|
75
82
|
registerDefaultCells();
|
|
@@ -80,7 +87,7 @@ export function registerDefaults(): void {
|
|
|
80
87
|
// Icons (navigation, block, entity type icons)
|
|
81
88
|
registerDefaultIcons();
|
|
82
89
|
|
|
83
|
-
// Premium runtime — the rich ProductShell + chrome and the
|
|
90
|
+
// Premium runtime — the rich ProductShell + chrome and the 6 interactive
|
|
84
91
|
// blocks. Ships in @middag-io/react-pro (GitHub Packages, PRO tier).
|
|
85
92
|
registerProDefaults();
|
|
86
93
|
}
|