meadow-integration 1.0.40 → 1.0.41

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.
Files changed (30) hide show
  1. package/Dockerfile +1 -1
  2. package/docs/_brand.json +18 -0
  3. package/docs/_version.json +3 -3
  4. package/docs/data-clone/configuration.md +9 -1
  5. package/docs/index.html +6 -7
  6. package/docs/retold-catalog.json +18 -13
  7. package/docs/retold-keyword-index.json +4937 -4775
  8. package/example-applications/mapping-demo/package.json +25 -1
  9. package/example-applications/mapping-demo/server.js +28 -0
  10. package/example-applications/mapping-demo/source/MappingDemoApp.js +42 -3
  11. package/example-applications/mapping-demo/source/MappingDemoBrand.js +17 -0
  12. package/example-applications/mapping-demo/web/favicons/apple-touch-icon.png +0 -0
  13. package/example-applications/mapping-demo/web/favicons/favicon-16.png +0 -0
  14. package/example-applications/mapping-demo/web/favicons/favicon-192.png +0 -0
  15. package/example-applications/mapping-demo/web/favicons/favicon-32.png +0 -0
  16. package/example-applications/mapping-demo/web/favicons/favicon-48.png +0 -0
  17. package/example-applications/mapping-demo/web/favicons/favicon-512.png +0 -0
  18. package/example-applications/mapping-demo/web/favicons/favicon-64.png +0 -0
  19. package/example-applications/mapping-demo/web/favicons/favicon-dark.svg +30 -0
  20. package/example-applications/mapping-demo/web/favicons/favicon-light.svg +30 -0
  21. package/example-applications/mapping-demo/web/favicons/favicon.svg +30 -0
  22. package/example-applications/mapping-demo/web/index.html +40 -26
  23. package/example-applications/mapping-demo/web/mapping-demo-editor.js +3267 -398
  24. package/example-applications/mapping-demo/web/mapping-demo-editor.js.map +1 -1
  25. package/example-applications/mapping-demo/web/mapping-demo-editor.min.js +34 -1
  26. package/example-applications/mapping-demo/web/mapping-demo-editor.min.js.map +1 -1
  27. package/example-applications/mapping-demo/web/pict.min.js +2 -2
  28. package/package.json +9 -6
  29. package/source/views/PictView-MeadowMappingEditor.js +30 -30
  30. package/docs/css/docuserve.css +0 -327
@@ -5,10 +5,34 @@
5
5
  "main": "server.js",
6
6
  "scripts": {
7
7
  "start": "node server.js",
8
+ "brand": "node ../../node_modules/pict-section-theme/bin/pict-section-theme-brand.js --palette forest --display-name \"Mapping Demo\" --tagline \"Meadow-Integration mapping editor showcase\" --favicons web/favicons",
9
+ "prebuild": "npm run brand",
8
10
  "build": "node generate-build-config.js && ../../node_modules/.bin/quack build",
9
11
  "demo": "npm run build && node server.js"
10
12
  },
11
13
  "author": "steven velozo <steven@velozo.com>",
12
14
  "license": "MIT",
13
- "dependencies": {}
15
+ "retold": {
16
+ "brand": {
17
+ "Hash": "mapping-demo",
18
+ "Name": "Mapping Demo",
19
+ "Tagline": "Meadow-Integration mapping editor showcase",
20
+ "Palette": "forest",
21
+ "Icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"frame-mapping-demo-filled-light\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#55af3b\"/>\n\t\t<g clip-path=\"url(#frame-mapping-demo-filled-light)\"><circle cx=\"37.5\" cy=\"48\" r=\"30\" fill=\"#ddc536\" opacity=\"0.85\"/>\n\t\t\t\t\t<circle cx=\"58.5\" cy=\"48\" r=\"30\" fill=\"rgba(255,255,255,0.32)\" opacity=\"0.95\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"38\" font-weight=\"600\"\n\t\t\tfill=\"#ffffff\" letter-spacing=\"-1\">MD</text>\n\t</svg>",
22
+ "IconType": "svg",
23
+ "Favicon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"fav-mapping-demo-light\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#55af3b\"/>\n\t\t<g clip-path=\"url(#fav-mapping-demo-light)\"><circle cx=\"37.5\" cy=\"48\" r=\"34\" fill=\"#ddc536\"/>\n\t\t\t\t\t<circle cx=\"58.5\" cy=\"48\" r=\"34\" fill=\"rgba(255,255,255,0.22)\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"60\" font-weight=\"800\"\n\t\t\tfill=\"#ffffff\" letter-spacing=\"-1\">M</text>\n\t</svg>",
24
+ "FaviconDark": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" width=\"96\" height=\"96\">\n\t\t<defs>\n\t\t\t<clipPath id=\"fav-mapping-demo-dark\">\n\t\t\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\"/>\n\t\t\t</clipPath>\n\t\t</defs>\n\t\t<path d=\"M 24 2\n\t\tH 72\n\t\tQ 94 2 94 24\n\t\tV 72\n\t\tQ 94 94 72 94\n\t\tH 24\n\t\tQ 2 94 2 72\n\t\tV 24\n\t\tQ 2 2 24 2 Z\" fill=\"#8dcb7b\"/>\n\t\t<g clip-path=\"url(#fav-mapping-demo-dark)\"><circle cx=\"37.5\" cy=\"48\" r=\"34\" fill=\"#e6d989\"/>\n\t\t\t\t\t<circle cx=\"58.5\" cy=\"48\" r=\"34\" fill=\"rgba(255,255,255,0.22)\"/></g>\n\t\t<text x=\"48\" y=\"50\" text-anchor=\"middle\" dominant-baseline=\"central\"\n\t\t\tfont-family=\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\"\n\t\t\tfont-size=\"60\" font-weight=\"800\"\n\t\t\tfill=\"#101418\" letter-spacing=\"-1\">M</text>\n\t</svg>",
25
+ "Colors": {
26
+ "Primary": "#55af3b",
27
+ "Secondary": "#ddc536",
28
+ "PrimaryLight": "#55af3b",
29
+ "PrimaryDark": "#8dcb7b",
30
+ "SecondaryLight": "#ddc536",
31
+ "SecondaryDark": "#e6d989"
32
+ }
33
+ }
34
+ },
35
+ "devDependencies": {
36
+ "retold-sharp": "^1.0.0"
37
+ }
14
38
  }
@@ -317,6 +317,34 @@ function registerStaticRoutes(pOrator)
317
317
  pResponse.end(tmpContent);
318
318
  return fNext();
319
319
  });
320
+
321
+ // ── Favicons (generated by `npm run brand` into web/favicons/) ──
322
+ let tmpFaviconDir = libPath.join(WEB_DIR, 'favicons');
323
+ let fServeFavicon = (pFileName, pContentType) =>
324
+ {
325
+ return function(pRequest, pResponse, fNext)
326
+ {
327
+ let tmpFile = libPath.join(tmpFaviconDir, pFileName);
328
+ if (!libFS.existsSync(tmpFile))
329
+ {
330
+ pResponse.send(404, { Success: false, Error: 'Favicon not found: ' + pFileName });
331
+ return fNext();
332
+ }
333
+ let tmpIsBinary = !/\.svg$/i.test(pFileName);
334
+ let tmpContent = libFS.readFileSync(tmpFile, tmpIsBinary ? null : 'utf8');
335
+ pResponse.setHeader('Content-Type', pContentType);
336
+ pResponse.end(tmpContent);
337
+ return fNext();
338
+ };
339
+ };
340
+ pOrator.serviceServer.get('/favicons/favicon.svg', fServeFavicon('favicon.svg', 'image/svg+xml'));
341
+ pOrator.serviceServer.get('/favicons/favicon-light.svg', fServeFavicon('favicon-light.svg', 'image/svg+xml'));
342
+ pOrator.serviceServer.get('/favicons/favicon-dark.svg', fServeFavicon('favicon-dark.svg', 'image/svg+xml'));
343
+ pOrator.serviceServer.get('/favicons/favicon-16.png', fServeFavicon('favicon-16.png', 'image/png'));
344
+ pOrator.serviceServer.get('/favicons/favicon-32.png', fServeFavicon('favicon-32.png', 'image/png'));
345
+ pOrator.serviceServer.get('/favicons/favicon-192.png', fServeFavicon('favicon-192.png', 'image/png'));
346
+ pOrator.serviceServer.get('/favicons/favicon-512.png', fServeFavicon('favicon-512.png', 'image/png'));
347
+ pOrator.serviceServer.get('/favicons/apple-touch-icon.png', fServeFavicon('apple-touch-icon.png', 'image/png'));
320
348
  }
321
349
 
322
350
  // ── Route: GET /1.0/Demo/SourceSchema ────────────────────────────────────────
@@ -1,16 +1,25 @@
1
1
  'use strict';
2
2
 
3
3
  const libPictApplication = require('pict-application');
4
+
5
+ const libPictSectionModal = require('pict-section-modal');
6
+ const libPictSectionTheme = require('pict-section-theme');
7
+
8
+ const libMappingDemoBrand = require('./MappingDemoBrand.js');
4
9
  const libMappingDemoEditorView = require('./views/MappingDemoEditorView.js');
5
10
 
6
11
  /**
7
12
  * MappingDemoApplication
8
13
  *
9
- * Minimal pict application that hosts the MappingDemoEditorView.
14
+ * Pict application that hosts the MappingDemoEditorView and brings up
15
+ * the unified pict-section-theme stack so visitors can flip themes and
16
+ * watch the embedded MeadowMappingEditor library view reskin live.
17
+ *
10
18
  * Loaded client-side by Pict.safeLoadPictApplication(MappingDemoApplication, 2).
11
19
  *
12
- * After initialization it exposes window.openMappingEditor() so the static
13
- * HTML pipeline UI can activate the visual editor from a plain onclick handler.
20
+ * After initialization it exposes window.openMappingEditor() so the
21
+ * static HTML pipeline UI can activate the visual editor from a plain
22
+ * onclick handler.
14
23
  */
15
24
  class MappingDemoApplication extends libPictApplication
16
25
  {
@@ -18,14 +27,44 @@ class MappingDemoApplication extends libPictApplication
18
27
  {
19
28
  super(pFable, pOptions, pServiceHash);
20
29
 
30
+ // Modal system (confirm dialogs the editor may pop)
31
+ this.pict.addView('Pict-Section-Modal', libPictSectionModal.default_configuration, libPictSectionModal);
32
+
21
33
  this.pict.addView(
22
34
  'MappingDemoEditor',
23
35
  libMappingDemoEditorView.default_configuration,
24
36
  libMappingDemoEditorView);
37
+
38
+ // Unified theme stack — the demo's whole point is to prove the
39
+ // library view picks up theme tokens, so the picker is exposed
40
+ // inline in the page header (not behind a gear toggle). Just
41
+ // register the runtime here; mount the controls in onAfterInitializeAsync
42
+ // once the destination div exists in the DOM.
43
+ this.pict.addProvider('Theme-Section',
44
+ {
45
+ ApplyDefault: 'pict-default',
46
+ DefaultMode: 'system',
47
+ DefaultScale: 1.0,
48
+ Brand: libMappingDemoBrand,
49
+ Views: ['Picker', 'ModeToggle', 'ScaleSelect', 'BrandMark']
50
+ }, libPictSectionTheme);
25
51
  }
26
52
 
27
53
  onAfterInitializeAsync(fCallback)
28
54
  {
55
+ // Mount the theme controls directly into the header strip so users
56
+ // can switch themes and watch every surface (the static HTML
57
+ // pipeline UI + the embedded library editor) reskin in lockstep.
58
+ let tmpThemeProvider = this.pict.providers['Theme-Section'];
59
+ if (tmpThemeProvider && typeof tmpThemeProvider.mount === 'function')
60
+ {
61
+ tmpThemeProvider.mount(
62
+ {
63
+ Container: '#MappingDemo-Theme-Controls',
64
+ Views: ['Picker', 'ModeToggle', 'ScaleSelect']
65
+ });
66
+ }
67
+
29
68
  // Expose a global hook so the outer HTML can open the editor
30
69
  window.openMappingEditor = () =>
31
70
  {
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Brand wrapper for the mapping-demo Pict app. Reads the retold.brand
5
+ * block populated by `npm run brand` (which invokes
6
+ * pict-section-theme/bin/pict-section-theme-brand.js with the forest
7
+ * palette) and exposes it for the Theme-Section provider's BrandMark.
8
+ */
9
+ const tmpPackage = require('../package.json');
10
+
11
+ if (!tmpPackage.retold || !tmpPackage.retold.brand)
12
+ {
13
+ throw new Error('mapping-demo: package.json is missing retold.brand — '
14
+ + 'run `npm run brand` (chained from prebuild) before building');
15
+ }
16
+
17
+ module.exports = tmpPackage.retold.brand;
@@ -0,0 +1,30 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">
2
+ <defs>
3
+ <clipPath id="fav-mapping-demo-dark">
4
+ <path d="M 24 2
5
+ H 72
6
+ Q 94 2 94 24
7
+ V 72
8
+ Q 94 94 72 94
9
+ H 24
10
+ Q 2 94 2 72
11
+ V 24
12
+ Q 2 2 24 2 Z"/>
13
+ </clipPath>
14
+ </defs>
15
+ <path d="M 24 2
16
+ H 72
17
+ Q 94 2 94 24
18
+ V 72
19
+ Q 94 94 72 94
20
+ H 24
21
+ Q 2 94 2 72
22
+ V 24
23
+ Q 2 2 24 2 Z" fill="#8dcb7b"/>
24
+ <g clip-path="url(#fav-mapping-demo-dark)"><circle cx="37.5" cy="48" r="34" fill="#e6d989"/>
25
+ <circle cx="58.5" cy="48" r="34" fill="rgba(255,255,255,0.22)"/></g>
26
+ <text x="48" y="50" text-anchor="middle" dominant-baseline="central"
27
+ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
28
+ font-size="60" font-weight="800"
29
+ fill="#101418" letter-spacing="-1">M</text>
30
+ </svg>
@@ -0,0 +1,30 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">
2
+ <defs>
3
+ <clipPath id="fav-mapping-demo-light">
4
+ <path d="M 24 2
5
+ H 72
6
+ Q 94 2 94 24
7
+ V 72
8
+ Q 94 94 72 94
9
+ H 24
10
+ Q 2 94 2 72
11
+ V 24
12
+ Q 2 2 24 2 Z"/>
13
+ </clipPath>
14
+ </defs>
15
+ <path d="M 24 2
16
+ H 72
17
+ Q 94 2 94 24
18
+ V 72
19
+ Q 94 94 72 94
20
+ H 24
21
+ Q 2 94 2 72
22
+ V 24
23
+ Q 2 2 24 2 Z" fill="#55af3b"/>
24
+ <g clip-path="url(#fav-mapping-demo-light)"><circle cx="37.5" cy="48" r="34" fill="#ddc536"/>
25
+ <circle cx="58.5" cy="48" r="34" fill="rgba(255,255,255,0.22)"/></g>
26
+ <text x="48" y="50" text-anchor="middle" dominant-baseline="central"
27
+ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
28
+ font-size="60" font-weight="800"
29
+ fill="#ffffff" letter-spacing="-1">M</text>
30
+ </svg>
@@ -0,0 +1,30 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" width="96" height="96">
2
+ <defs>
3
+ <clipPath id="fav-mapping-demo-light">
4
+ <path d="M 24 2
5
+ H 72
6
+ Q 94 2 94 24
7
+ V 72
8
+ Q 94 94 72 94
9
+ H 24
10
+ Q 2 94 2 72
11
+ V 24
12
+ Q 2 2 24 2 Z"/>
13
+ </clipPath>
14
+ </defs>
15
+ <path d="M 24 2
16
+ H 72
17
+ Q 94 2 94 24
18
+ V 72
19
+ Q 94 94 72 94
20
+ H 24
21
+ Q 2 94 2 72
22
+ V 24
23
+ Q 2 2 24 2 Z" fill="#55af3b"/>
24
+ <g clip-path="url(#fav-mapping-demo-light)"><circle cx="37.5" cy="48" r="34" fill="#ddc536"/>
25
+ <circle cx="58.5" cy="48" r="34" fill="rgba(255,255,255,0.22)"/></g>
26
+ <text x="48" y="50" text-anchor="middle" dominant-baseline="central"
27
+ font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
28
+ font-size="60" font-weight="800"
29
+ fill="#ffffff" letter-spacing="-1">M</text>
30
+ </svg>
@@ -4,23 +4,35 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Meadow-Integration Pipeline Demo</title>
7
+ <!-- Favicons (generated by `npm run brand`) -->
8
+ <link rel="icon" type="image/svg+xml" href="favicons/favicon.svg">
9
+ <link rel="icon" type="image/svg+xml" href="favicons/favicon-light.svg" media="(prefers-color-scheme: light)">
10
+ <link rel="icon" type="image/svg+xml" href="favicons/favicon-dark.svg" media="(prefers-color-scheme: dark)">
7
11
  <style id="PICT-CSS"></style>
8
12
  <style>
13
+ /* :root bridge — alias the demo's local vocabulary onto the
14
+ --theme-color-* tokens driven by pict-section-theme so every
15
+ surface (this static HTML + the embedded MeadowMappingEditor
16
+ library view) reskins together when the user picks a theme.
17
+ Hex fallbacks preserve the original look when no provider is
18
+ mounted (e.g. when the bundle is served as a plain demo). */
9
19
  :root {
10
- --brand: #18a5a0;
11
- --brand-dark: #127b77;
12
- --bg: #f5efe4;
13
- --bg-surface: #fdf8f0;
14
- --bg-card: #ffffff;
15
- --text: #3a3020;
16
- --text-mid: #6b5c45;
17
- --text-dim: #a09070;
18
- --border: #d6c8ae;
19
- --border-sub: #ece3d0;
20
- --success: #2ecc71;
21
- --error: #e74c3c;
22
- --warn: #f39c12;
23
- --step-1: #18a5a0;
20
+ --brand: var(--theme-color-brand-primary, #18a5a0);
21
+ --brand-dark: var(--theme-color-brand-primary-hover, #127b77);
22
+ --bg: var(--theme-color-background-primary, #f5efe4);
23
+ --bg-surface: var(--theme-color-background-secondary, #fdf8f0);
24
+ --bg-card: var(--theme-color-background-panel, #ffffff);
25
+ --text: var(--theme-color-text-primary, #3a3020);
26
+ --text-mid: var(--theme-color-text-secondary, #6b5c45);
27
+ --text-dim: var(--theme-color-text-muted, #a09070);
28
+ --border: var(--theme-color-border-default, #d6c8ae);
29
+ --border-sub: var(--theme-color-border-light, #ece3d0);
30
+ --success: var(--theme-color-status-success, #2ecc71);
31
+ --error: var(--theme-color-status-error, #e74c3c);
32
+ --warn: var(--theme-color-status-warning, #f39c12);
33
+ /* Step colors stay distinct hex literals — they encode pipeline
34
+ stage identity, not theme palette. */
35
+ --step-1: var(--theme-color-brand-primary, #18a5a0);
24
36
  --step-2: #3498db;
25
37
  --step-3: #c0392b;
26
38
  --step-4: #9b59b6;
@@ -35,18 +47,19 @@
35
47
  .meadow-mapping-editor.active {
36
48
  display: block;
37
49
  }
38
- /* Override facto-specific CSS vars with demo theme equivalents */
39
- .meadow-mapping-editor,
40
- .meadow-flow-container,
41
- .meadow-mapping-btn,
42
- .meadow-mapping-json-editor {
43
- --facto-brand: var(--brand);
44
- --facto-border: var(--border);
45
- --facto-border-subtle: var(--border-sub);
46
- --facto-bg-surface: var(--bg-surface);
47
- --facto-bg-input: var(--bg-card);
48
- --facto-text: var(--text);
49
- --facto-text-tertiary: var(--text-dim);
50
+
51
+ /* ── Inline theme-controls strip in the header ── */
52
+ #MappingDemo-Theme-Controls {
53
+ display: flex;
54
+ align-items: center;
55
+ gap: 8px;
56
+ flex-wrap: wrap;
57
+ }
58
+ #MappingDemo-Theme-Controls .pict-theme-mount,
59
+ #MappingDemo-Theme-Controls .pict-theme-mount-row {
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 8px;
50
63
  }
51
64
 
52
65
  * { box-sizing: border-box; margin: 0; padding: 0; }
@@ -323,6 +336,7 @@
323
336
  <h1>Meadow-Integration Pipeline Demo</h1>
324
337
  <span class="subtitle">meadow-integration &rsaquo; example-applications/mapping-demo</span>
325
338
  </div>
339
+ <div id="MappingDemo-Theme-Controls" title="Switch themes to see the embedded library view reskin"></div>
326
340
  <span class="demo-badge">LIVE</span>
327
341
  </header>
328
342