@nodegx/preview 0.0.0-stage → 0.1.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/LICENSE +674 -0
- package/README.md +161 -2
- package/bin/noodl-preview.js +14 -0
- package/dist/browser/noodl-graph-target.js +491 -0
- package/dist/browser/noodl-preview-in-page.js +101 -0
- package/dist/external/deploy/index.html +90 -0
- package/dist/external/deploy/index.js +23 -0
- package/dist/external/deploy/index.json +9 -0
- package/dist/external/deploy/load_terminator.js +1 -0
- package/dist/external/deploy/noodl-app.png +0 -0
- package/dist/external/deploy/noodl.deploy.js +2 -0
- package/dist/external/deploy/noodl.deploy.js.LICENSE.txt +20 -0
- package/dist/external/deploy/react-dom.production.min.js +267 -0
- package/dist/external/deploy/react.production.min.js +31 -0
- package/dist/external/deploy/react19/VERSION +2 -0
- package/dist/external/deploy/react19/react-dom.production.min.js +51 -0
- package/dist/external/deploy/react19/react.production.min.js +21 -0
- package/dist/nodegx-deploy.cjs +194141 -0
- package/dist/nodegx-deploy.inputs.json +978 -0
- package/dist/noodl-preview.cjs +193141 -0
- package/dist/noodl-preview.inputs.json +964 -0
- package/dist/package.json +6 -0
- package/package.json +40 -4
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
7
|
+
<meta
|
|
8
|
+
name="apple-mobile-web-app-status-bar-style"
|
|
9
|
+
content="black-translucent"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<title>{{#title#}}</title>
|
|
13
|
+
{{#customHeadCode#}}
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
background-color: white;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.body-scroll {
|
|
23
|
+
overflow: hidden auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
img {
|
|
27
|
+
-webkit-user-drag: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
* {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#root {
|
|
36
|
+
display: flex;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
/* NDA-008: defensive, and honestly labelled — this element is NOT the one
|
|
40
|
+
that caused the reported scroll jump. Measured live: with the app root
|
|
41
|
+
inside it set to `clip`, focusing an input 2018px below the fold moved
|
|
42
|
+
this element 0px, because its only child is `height: 100%` so its content
|
|
43
|
+
never exceeds it. The active fix is in viewer.jsx.
|
|
44
|
+
|
|
45
|
+
Kept anyway because it is the same trap one layout change away: `hidden`
|
|
46
|
+
around taller content is a scroll container the *browser* can scroll (any
|
|
47
|
+
real DOM focus does) and the user cannot scroll back, since hidden only
|
|
48
|
+
removes the scrollbars. `clip` creates no scroll container at all.
|
|
49
|
+
|
|
50
|
+
Both declared: browsers without `clip` (Safari < 16) keep exactly today's
|
|
51
|
+
behaviour rather than falling back to `visible` and letting content escape.
|
|
52
|
+
Dropping `hidden` also drops the block formatting context it implied;
|
|
53
|
+
`position: fixed` below already provides the positional containment. */
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
overflow: clip;
|
|
56
|
+
position: fixed;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.body-scroll > #root {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: auto;
|
|
62
|
+
min-height: 100vh;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
overflow: initial;
|
|
65
|
+
position: initial;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
68
|
+
</head>
|
|
69
|
+
<body>
|
|
70
|
+
<noscript> You need to enable JavaScript to run this app. </noscript>
|
|
71
|
+
|
|
72
|
+
<div id="root"></div>
|
|
73
|
+
|
|
74
|
+
<script src="%baseUrl%react.production.min.js"></script>
|
|
75
|
+
<script src="%baseUrl%react-dom.production.min.js"></script>
|
|
76
|
+
|
|
77
|
+
<%modules_dependencies%>
|
|
78
|
+
<%index_js%>
|
|
79
|
+
|
|
80
|
+
<%modules_main%>
|
|
81
|
+
|
|
82
|
+
<script src="%baseUrl%noodl.deploy.js"></script>
|
|
83
|
+
<script type="application/javascript">
|
|
84
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
85
|
+
const root = document.getElementById("root");
|
|
86
|
+
window.Noodl._viewerReact.renderDeployed(root, __noodl_modules, window.projectData);
|
|
87
|
+
});
|
|
88
|
+
</script>
|
|
89
|
+
</body>
|
|
90
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
window.__noodl_modules = [];
|
|
2
|
+
window.Noodl = {
|
|
3
|
+
defineModule:function(m) {
|
|
4
|
+
// CN-003: adopt the manifest name the injector set just before this
|
|
5
|
+
// kit's script. Must happen here, not in `registerModule` — see the
|
|
6
|
+
// viewer's copy of this bootstrap for why.
|
|
7
|
+
if (m && !m.name && window.__noodl_module_name) m.name = window.__noodl_module_name;
|
|
8
|
+
// ISL-013: a kit another kit requires is told its folder too, so `getModule` finds it by either
|
|
9
|
+
if (m && !m.folder && window.__noodl_module_folder) m.folder = window.__noodl_module_folder;
|
|
10
|
+
window.__noodl_modules.push(m);
|
|
11
|
+
},
|
|
12
|
+
// ISL-013: what a kit you `require` shares (its module's `exports`), by its name or folder; undefined when it is not loaded
|
|
13
|
+
getModule:function(id) {
|
|
14
|
+
for (var i = window.__noodl_modules.length - 1; i >= 0; i--) {
|
|
15
|
+
var m = window.__noodl_modules[i];
|
|
16
|
+
if (m && (m.name === id || m.folder === id)) return m.exports;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
deployed: true,
|
|
20
|
+
Env: {}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
window.projectData = {{#export#}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Empty file, used to know when script elements are fully loaded
|
|
Binary file
|