pict-section-form 1.1.2 → 1.1.3

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 (27) hide show
  1. package/docs/_version.json +3 -3
  2. package/docs/examples/change_tracking/change_tracking.js +18 -2
  3. package/docs/examples/diagram_form/diagram_form_example.min.js +1 -1
  4. package/docs/examples/diagram_form/index.html +5 -0
  5. package/docs/examples/dynamic_analysis/dynamic_analysis_application.js +2 -2
  6. package/docs/examples/gradebook/gradebook_application.min.js +1 -1
  7. package/docs/examples/ndt_field_test/ndt_field_test.js +18 -2
  8. package/docs/examples/richtext_form/codemirror-bundle.js +29982 -0
  9. package/docs/examples/richtext_form/index.html +3 -0
  10. package/docs/examples/richtext_form/richtext_form_example.min.js +1 -1
  11. package/docs/examples/scope_mathematics/scope_mathematics.js +18 -2
  12. package/docs/examples/simple_table/simple_tabular_application.min.js +1 -1
  13. package/docs/examples/superhero_studio/codemirror-bundle.js +29982 -0
  14. package/docs/examples/superhero_studio/index.html +8 -0
  15. package/docs/examples/superhero_studio/superhero_studio_example.min.js +1 -1
  16. package/docs/index.html +2 -2
  17. package/docs/retold-catalog.json +3 -6
  18. package/docs/retold-keyword-index.json +1 -1
  19. package/example_applications/diagram_form/html/index.html +5 -0
  20. package/example_applications/diagram_form/package.json +4 -3
  21. package/example_applications/richtext_form/html/codemirror-bundle.js +29982 -0
  22. package/example_applications/richtext_form/html/index.html +3 -0
  23. package/example_applications/superhero_studio/html/codemirror-bundle.js +29982 -0
  24. package/example_applications/superhero_studio/html/index.html +8 -0
  25. package/example_applications/superhero_studio/package.json +4 -3
  26. package/package.json +1 -1
  27. package/source/providers/inputs/Pict-Provider-Input-Diagram-CSS.js +17 -1
@@ -127,12 +127,20 @@
127
127
  </main>
128
128
 
129
129
  <link rel="stylesheet" href="./excalidraw-wrapper.css">
130
+ <script>
131
+ // Tell Excalidraw where to fetch its fonts + locale chunks from. Must be
132
+ // set BEFORE the wrapper bundle loads.
133
+ window.EXCALIDRAW_ASSET_PATH = './excalidraw-assets/';
134
+ </script>
130
135
  <script src="./pict.min.js"></script>
131
136
  <!-- Excalidraw vendor bundle (React + Excalidraw). The Diagram InputType
132
137
  looks for window.PictSectionExcalidrawVendor when the Portrait field
133
138
  flips to edit; without these tags Excalidraw won't mount. -->
134
139
  <script src="./react-vendor.min.js"></script>
135
140
  <script src="./excalidraw-wrapper.min.js"></script>
141
+ <!-- CodeMirror bundle — the markdown editor auto-detects window.CodeMirrorModules
142
+ when the Origin Story field flips to edit. -->
143
+ <script src="./codemirror-bundle.js"></script>
136
144
  <script src="./superhero_studio_example.min.js"></script>
137
145
  <script>
138
146
  const _Themes =
@@ -14,9 +14,10 @@
14
14
  "whenFileExists": "overwrite"
15
15
  },
16
16
  "copyFiles": [
17
- { "from": "./html/*", "to": "./dist/" },
18
- { "from": "../../node_modules/pict/dist/*", "to": "./dist/" },
19
- { "from": "../../node_modules/pict-section-excalidraw/vendor/excalidraw-built/*", "to": "./dist/" }
17
+ { "from": "./html/*", "to": "./dist/" },
18
+ { "from": "../../node_modules/pict/dist/*", "to": "./dist/" },
19
+ { "from": "../../node_modules/pict-section-excalidraw/vendor/excalidraw-built/*", "to": "./dist/" },
20
+ { "from": "../../node_modules/pict-section-excalidraw/vendor/excalidraw-built/assets/**/*", "to": "./dist/excalidraw-assets/" }
20
21
  ],
21
22
  "retold": {
22
23
  "ExampleApplication": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -60,9 +60,25 @@ module.exports = /*css*/`
60
60
  {
61
61
  padding: 0;
62
62
  min-height: 420px;
63
+ display: flex;
64
+ }
65
+
66
+ /* The Excalidraw view brings its own chrome inside the slot. Force the wrap
67
+ * and the Excalidraw root to fill so the canvas doesn't collapse to 0
68
+ * height inside the form slot. */
69
+ .pict-section-form-diagram-edit > .pict-excalidraw-wrap,
70
+ .pict-section-form-diagram-edit > .pict-excalidraw-wrap > .pict-excalidraw-mount
71
+ {
72
+ flex: 1 1 auto;
73
+ min-height: 420px;
63
74
  }
64
75
 
65
- /* The Excalidraw view brings its own chrome inside the slot. */
76
+ .pict-section-form-diagram-edit .excalidraw
77
+ {
78
+ width: 100%;
79
+ height: 100%;
80
+ min-height: 420px;
81
+ }
66
82
 
67
83
  .pict-section-form-diagram-toggle
68
84
  {