@bendyline/gilde 0.2.5 → 0.2.6
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/authoring/LICENSE-HankenGrotesk-OFL-1.1.txt +94 -0
- package/authoring/LICENSE-PTSerif-OFL-1.1.txt +94 -0
- package/authoring/page-demo-bootstrap.js +209 -0
- package/authoring/page-demo-injector.mjs +7 -0
- package/authoring/page-demo-typography.css +88 -0
- package/data/craftbook-templates/ch/character-sheet/versions/1.0.4/craftbook.json +213 -0
- package/data/craftbook-templates/ch/character-sheet/versions/1.0.4/test.json +143 -0
- package/data/craftbook-templates/ch/character-turnaround/versions/1.0.4/craftbook.json +254 -0
- package/data/craftbook-templates/ch/character-turnaround/versions/1.0.4/test.json +189 -0
- package/data/craftbook-templates/fa/favicon-set/versions/1.0.5/craftbook.json +282 -0
- package/data/craftbook-templates/fa/favicon-set/versions/1.0.5/test.json +94 -0
- package/data/craftbook-templates/he/hero-image/versions/1.0.5/craftbook.json +287 -0
- package/data/craftbook-templates/he/hero-image/versions/1.0.5/test.json +94 -0
- package/data/craftbook-templates/ic/icon-pack/versions/1.0.5/craftbook.json +279 -0
- package/data/craftbook-templates/ic/icon-pack/versions/1.0.5/test.json +94 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/lo/logo-set/versions/1.0.5/craftbook.json +279 -0
- package/data/craftbook-templates/lo/logo-set/versions/1.0.5/test.json +94 -0
- package/data/craftbook-templates/mo/moodboard/versions/1.0.5/craftbook.json +219 -0
- package/data/craftbook-templates/mo/moodboard/versions/1.0.5/test.json +89 -0
- package/data/craftbook-templates/pa/page-spread/versions/1.0.4/craftbook.json +214 -0
- package/data/craftbook-templates/pa/page-spread/versions/1.0.4/test.json +132 -0
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/sp/sprite-sheet/versions/1.0.5/craftbook.json +269 -0
- package/data/craftbook-templates/sp/sprite-sheet/versions/1.0.5/test.json +94 -0
- package/data/craftbook-templates/ti/tileset-batch/versions/1.0.4/craftbook.json +319 -0
- package/data/craftbook-templates/ti/tileset-batch/versions/1.0.4/test.json +162 -0
- package/data/gezel-templates/il/illustrator/manifest.json +21 -0
- package/data/gezel-templates/il/illustrator/versions/1.0.0/about.md +28 -0
- package/data/gezel-templates/il/illustrator/versions/1.0.0/manifest.json +9 -0
- package/data/gezel-templates/index.json +1 -1
- package/data/gezel-templates/raw-index.json +1 -1
- package/data/image-models/an/animagine-xl-4/manifest.json +2 -0
- package/data/image-models/fl/flux-2-klein-4b-q4/manifest.json +3 -1
- package/data/image-models/index.json +1 -1
- package/data/image-models/ir/iris-3b-f32/manifest.json +4 -2
- package/data/image-models/ir/iris-3b-f32/versions/1.0.2/manifest.json +25 -0
- package/data/image-models/kr/krea-2-turbo-q4/manifest.json +2 -0
- package/data/image-models/kr/krea-2-turbo-q6/manifest.json +2 -0
- package/data/image-models/kr/krea-2-turbo-q8/manifest.json +2 -0
- package/data/image-models/mi/ming-image-0.1-design-bf16/manifest.json +2 -0
- package/data/image-models/mi/ming-image-0.1-design-bf16/versions/1.0.2/manifest.json +50 -0
- package/data/image-models/mo/moss-image-sft-q4/manifest.json +3 -1
- package/data/image-models/mo/moss-image-sft-q4/versions/1.0.0/manifest.json +1 -1
- package/data/image-models/mo/moss-image-sft-q4/versions/1.0.1/manifest.json +37 -0
- package/data/image-models/raw-index.json +1 -1
- package/data/image-models/sd/sd-1.5/manifest.json +2 -0
- package/data/image-models/sd/sd-turbo/manifest.json +2 -0
- package/data/image-models/sd/sdxl-base-1.0/manifest.json +2 -0
- package/data/image-models/sd/sdxl-lightning-4step/manifest.json +2 -0
- package/data/image-models/sd/sdxl-turbo/manifest.json +2 -0
- package/data/project-types/da/data-analysis/versions/1.0.0/about.md +2 -0
- package/data/project-types/da/data-analysis/versions/1.0.0/manifest.json +44 -0
- package/data/project-types/da/data-analysis/versions/1.0.0/pages/dashboard.css +5 -8
- package/data/project-types/da/data-analysis/versions/1.0.0/pages/dashboard.js +11 -31
- package/data/project-types/da/data-analysis/versions/1.0.0/pages/demo.js +9 -0
- package/data/project-types/da/data-analysis/versions/1.0.0/pages/index.html +3 -91
- package/data/project-types/index.json +1 -1
- package/data/project-types/me/media-library/versions/1.0.0/about.md +1 -1
- package/data/project-types/me/media-library/versions/1.0.0/manifest.json +53 -0
- package/data/project-types/me/media-library/versions/1.0.0/pages/gallery.css +3 -14
- package/data/project-types/me/media-library/versions/1.0.0/pages/gallery.js +16 -28
- package/data/project-types/me/media-library/versions/1.0.0/pages/index.html +3 -90
- package/data/project-types/raw-index.json +1 -1
- package/package.json +3 -2
- package/schemas/image-model-identity.schema.json +10 -0
- package/schemas/project-type-version.schema.json +40 -0
|
@@ -16,3 +16,5 @@ Unindexed files remain browsable; missing query support is explained on the page
|
|
|
16
16
|
Hidden folders, document companion
|
|
17
17
|
folders, and dependency folders are omitted. Large or partly unreadable folders
|
|
18
18
|
are explicitly labeled as incomplete.
|
|
19
|
+
|
|
20
|
+
The shared Add files control imports selected datasets and reports into the workspace when managed writes are enabled, preserving existing files. New files appear before background table indexing may be ready. Standalone demo additions stay in memory; charts remain explicitly labeled sample data.
|
|
@@ -21,6 +21,50 @@
|
|
|
21
21
|
"path": ".",
|
|
22
22
|
"subtree": true
|
|
23
23
|
}
|
|
24
|
+
],
|
|
25
|
+
"imports": [
|
|
26
|
+
{
|
|
27
|
+
"id": "data",
|
|
28
|
+
"source": "workspace",
|
|
29
|
+
"path": ".",
|
|
30
|
+
"accept": [
|
|
31
|
+
".csv",
|
|
32
|
+
".tsv",
|
|
33
|
+
".tab",
|
|
34
|
+
".xlsx",
|
|
35
|
+
".xls",
|
|
36
|
+
".xlsm",
|
|
37
|
+
".xlsb",
|
|
38
|
+
".ods",
|
|
39
|
+
".numbers",
|
|
40
|
+
".json",
|
|
41
|
+
".jsonl",
|
|
42
|
+
".ndjson",
|
|
43
|
+
".parquet",
|
|
44
|
+
".arrow",
|
|
45
|
+
".feather",
|
|
46
|
+
".sqlite",
|
|
47
|
+
".sqlite3",
|
|
48
|
+
".db",
|
|
49
|
+
".duckdb",
|
|
50
|
+
".h5",
|
|
51
|
+
".hdf5",
|
|
52
|
+
".rds",
|
|
53
|
+
".rdata",
|
|
54
|
+
".sav",
|
|
55
|
+
".dta",
|
|
56
|
+
".sas7bdat",
|
|
57
|
+
".xml",
|
|
58
|
+
".html",
|
|
59
|
+
".htm",
|
|
60
|
+
".pdf",
|
|
61
|
+
".md",
|
|
62
|
+
".docx",
|
|
63
|
+
".pptx",
|
|
64
|
+
".ipynb"
|
|
65
|
+
],
|
|
66
|
+
"maxFileBytes": 268435456
|
|
67
|
+
}
|
|
24
68
|
]
|
|
25
69
|
}
|
|
26
70
|
}
|
|
@@ -40,12 +40,7 @@ dd { margin: 4px 0 0; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
|
|
|
40
40
|
.filters label:first-child { flex: 3 1 200px; }
|
|
41
41
|
input, select { display: block; width: 100%; margin-top: 5px; font-size: .9rem; }
|
|
42
42
|
.file-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
|
|
43
|
-
.file-list li { display:
|
|
44
|
-
.file-format { font-size: .72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-md); padding: 10px 6px; min-width: 56px; text-align: center; }
|
|
45
|
-
.file-info { flex: 1; min-width: 0; }
|
|
46
|
-
.file-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
|
|
47
|
-
.file-detail { color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; }
|
|
48
|
-
.file-open { color: var(--accent); flex-shrink: 0; font-size: .85rem; }
|
|
43
|
+
.file-list li { display: block; padding: 8px 0; }
|
|
49
44
|
.empty { text-align: center; padding: 32px 16px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-lg); color: var(--text-muted); }
|
|
50
45
|
.empty p { margin-bottom: 0; }
|
|
51
46
|
#error { color: var(--danger); }
|
|
@@ -81,9 +76,11 @@ dialog p { margin-top: 12px; }
|
|
|
81
76
|
table { border-collapse: collapse; width: 100%; margin-bottom: 20px; font-size: .85rem; }
|
|
82
77
|
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
|
|
83
78
|
@media (max-width: 480px) {
|
|
84
|
-
.file-
|
|
85
|
-
.file-list li { gap: 8px; }
|
|
79
|
+
.file-list li { display: block; padding: 8px 0; }
|
|
86
80
|
.section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
|
|
87
81
|
dd { font-size: 1.2rem; }
|
|
88
82
|
[data-gezel-demo-banner] { align-items: flex-start; flex-direction: column; }
|
|
89
83
|
}
|
|
84
|
+
|
|
85
|
+
/* Shared components own file presentation; the page owns its layout. */
|
|
86
|
+
#add-files { margin: 20px 0; }
|
|
@@ -11,15 +11,12 @@
|
|
|
11
11
|
let stopped = false;
|
|
12
12
|
let debounce;
|
|
13
13
|
const watches = new Map();
|
|
14
|
-
const sampleFiles =
|
|
15
|
-
{ path: 'sales/quarterly-sales.csv', size: 12480, mtime: 1791849600000 },
|
|
16
|
-
{ path: 'sales/revenue-plan.xlsx', size: 48210, mtime: 1791763200000 },
|
|
17
|
-
{ path: 'customers.json', size: 22680, mtime: 1791676800000 },
|
|
18
|
-
{ path: 'research/survey-responses.tsv', size: 8640, mtime: 1791590400000 },
|
|
19
|
-
{ path: 'archive/orders.parquet', size: 3145728, mtime: 1791504000000 },
|
|
20
|
-
{ path: 'reports/quarterly-summary.pdf', size: 128040, mtime: 1791849600000 },
|
|
21
|
-
];
|
|
14
|
+
const sampleFiles = window.dataAnalysisSampleFiles;
|
|
22
15
|
|
|
16
|
+
const components = api.ui.components;
|
|
17
|
+
const componentCards = [];
|
|
18
|
+
const mountAdder = () => components.fileAdder('#add-files', { target: 'data', onAdded: () => refresh() });
|
|
19
|
+
let adder = mountAdder();
|
|
23
20
|
function sizeLabel(size) {
|
|
24
21
|
if (size < 1024) return `${size} B`;
|
|
25
22
|
const units = ['KB', 'MB', 'GB', 'TB'];
|
|
@@ -71,30 +68,11 @@
|
|
|
71
68
|
}
|
|
72
69
|
function row(file) {
|
|
73
70
|
const li = document.createElement('li');
|
|
74
|
-
|
|
75
|
-
badge.className = 'file-format';
|
|
76
|
-
badge.textContent = extension(file.path).toUpperCase();
|
|
77
|
-
const info = document.createElement('div');
|
|
78
|
-
info.className = 'file-info';
|
|
79
|
-
const name = document.createElement('span');
|
|
80
|
-
name.className = 'file-name';
|
|
81
|
-
name.textContent = file.path.split('/').pop();
|
|
82
|
-
const detail = document.createElement('span');
|
|
83
|
-
detail.className = 'file-detail';
|
|
84
|
-
const folder = file.path.includes('/') ? file.path.slice(0, file.path.lastIndexOf('/')) : 'Project folder';
|
|
85
|
-
const date = file.mtime ? new Date(file.mtime).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' }) : 'Date unavailable';
|
|
86
|
-
detail.textContent = `${folder} · ${sizeLabel(file.size)} · ${date}`;
|
|
87
|
-
info.append(name, detail);
|
|
88
|
-
const open = document.createElement('button');
|
|
89
|
-
open.type = 'button';
|
|
90
|
-
open.className = 'file-open';
|
|
91
|
-
open.textContent = 'Open';
|
|
92
|
-
open.setAttribute('aria-label', `Open ${file.path}`);
|
|
93
|
-
open.addEventListener('click', () => { void openFile(file); });
|
|
94
|
-
li.append(badge, info, open);
|
|
71
|
+
componentCards.push(components.fileCard(li, { file: { ...file, source: 'workspace' }, variant: 'row', onActivate: () => openFile(file) }));
|
|
95
72
|
return li;
|
|
96
73
|
}
|
|
97
74
|
function render() {
|
|
75
|
+
componentCards.splice(0).forEach(card => card.destroy());
|
|
98
76
|
const datasets = files.filter((file) => DATA.has(extension(file.path)));
|
|
99
77
|
const formats = [...new Set(datasets.map((file) => extension(file.path)))].sort();
|
|
100
78
|
const chosen = $('format').value;
|
|
@@ -128,7 +106,7 @@
|
|
|
128
106
|
$('datasets').setAttribute('aria-busy', 'true');
|
|
129
107
|
message('error', '');
|
|
130
108
|
try {
|
|
131
|
-
const result = demo ? { files: sampleFiles.
|
|
109
|
+
const result = demo ? { files: sampleFiles.concat(components.demo.files()), notice: '' } : await discover();
|
|
132
110
|
if (stopped) return;
|
|
133
111
|
files = result.files;
|
|
134
112
|
message('notice', result.notice);
|
|
@@ -150,7 +128,9 @@
|
|
|
150
128
|
$('format').addEventListener('change', render);
|
|
151
129
|
$('sort').addEventListener('change', render);
|
|
152
130
|
$('refresh').addEventListener('click', () => { void refresh(); });
|
|
131
|
+
$('close-demo-preview').addEventListener('click', () => $('demo-preview').close());
|
|
153
132
|
$('reset-demo').addEventListener('click', () => {
|
|
133
|
+
components.demo.reset(); adder.destroy(); adder = mountAdder();
|
|
154
134
|
$('search').value = ''; $('format').value = ''; $('sort').value = 'name';
|
|
155
135
|
$('demo-preview').close();
|
|
156
136
|
window.dataAnalysisInsights.reset();
|
|
@@ -171,7 +151,7 @@
|
|
|
171
151
|
if (!demo && document.visibilityState !== 'hidden') scheduleRefresh();
|
|
172
152
|
});
|
|
173
153
|
window.addEventListener('pagehide', () => {
|
|
174
|
-
stopped = true;
|
|
154
|
+
stopped = true; adder.destroy(); componentCards.forEach(card => card.destroy());
|
|
175
155
|
clearTimeout(debounce); clearInterval(timer);
|
|
176
156
|
for (const stop of watches.values()) stop();
|
|
177
157
|
stopTheme?.();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
window.dataAnalysisSampleFiles = [
|
|
2
|
+
{ path: 'sales/quarterly-sales.csv', size: 12480, mtime: 1791849600000 },
|
|
3
|
+
{ path: 'sales/revenue-plan.xlsx', size: 48210, mtime: 1791763200000 },
|
|
4
|
+
{ path: 'customers.json', size: 22680, mtime: 1791676800000 },
|
|
5
|
+
{ path: 'research/survey-responses.tsv', size: 8640, mtime: 1791590400000 },
|
|
6
|
+
{ path: 'archive/orders.parquet', size: 3145728, mtime: 1791504000000 },
|
|
7
|
+
{ path: 'reports/quarterly-summary.pdf', size: 128040, mtime: 1791849600000 },
|
|
8
|
+
];
|
|
9
|
+
const demoMode = (window.gezel || window.makeDemoGezel({ page: { typeName: 'Data Analysis' }, existingPaths: window.dataAnalysisSampleFiles.map(file => file.path) })).page.mode === 'demo';
|
|
@@ -10,96 +10,7 @@
|
|
|
10
10
|
:root { color-scheme: light dark; }
|
|
11
11
|
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }
|
|
12
12
|
</style>
|
|
13
|
-
<script>
|
|
14
|
-
/* gezel-page-demo-stub v1 */
|
|
15
|
-
/*
|
|
16
|
-
* The canonical demo stub for Gezel type pages. MIT License.
|
|
17
|
-
*
|
|
18
|
-
* Paste this file's bytes verbatim into a <script> block ahead of the
|
|
19
|
-
* page's own code, then call makeDemoGezel({ page, tools, data }) with the
|
|
20
|
-
* page's demo handlers. Served by Gezel, the real window.gezel is already
|
|
21
|
-
* injected and the stub steps aside; opened as a raw file (the live demos
|
|
22
|
-
* on gezelgilde.com), it installs a window.gezel whose tools and data are
|
|
23
|
-
* the page-supplied handler maps — one code path in every mode. `tools`
|
|
24
|
-
* and `data` map a tool name / declared read path to a function; data
|
|
25
|
-
* handlers back read() and list(), and url() returns the handler's value
|
|
26
|
-
* or passes a data: URI through. See docs/page-authoring.md.
|
|
27
|
-
*/
|
|
28
|
-
(function () {
|
|
29
|
-
'use strict';
|
|
30
|
-
window.makeDemoGezel = function (opts) {
|
|
31
|
-
if (window.gezel) return window.gezel;
|
|
32
|
-
var page = (opts && opts.page) || {};
|
|
33
|
-
var tools = (opts && opts.tools) || {};
|
|
34
|
-
var data = (opts && opts.data) || {};
|
|
35
|
-
var themeListeners = [];
|
|
36
|
-
var media = window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;
|
|
37
|
-
var ui = {
|
|
38
|
-
theme: { mode: media && media.matches ? 'dark' : 'light' },
|
|
39
|
-
onTheme: function (cb) {
|
|
40
|
-
themeListeners.push(cb);
|
|
41
|
-
return function () {
|
|
42
|
-
var at = themeListeners.indexOf(cb);
|
|
43
|
-
if (at >= 0) themeListeners.splice(at, 1);
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
if (media && media.addEventListener) {
|
|
48
|
-
media.addEventListener('change', function (ev) {
|
|
49
|
-
ui.theme = { mode: ev.matches ? 'dark' : 'light' };
|
|
50
|
-
themeListeners.slice().forEach(function (cb) { cb(ui.theme); });
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function fail(code, message) {
|
|
54
|
-
var err = new Error(message);
|
|
55
|
-
err.code = code;
|
|
56
|
-
return Promise.reject(err);
|
|
57
|
-
}
|
|
58
|
-
function run(map, key, arg) {
|
|
59
|
-
if (!Object.prototype.hasOwnProperty.call(map, key)) return null;
|
|
60
|
-
return Promise.resolve().then(function () { return map[key](arg); });
|
|
61
|
-
}
|
|
62
|
-
window.gezel = {
|
|
63
|
-
page: {
|
|
64
|
-
api: 1,
|
|
65
|
-
projectId: 'demo',
|
|
66
|
-
source: 'type',
|
|
67
|
-
entry: page.entry || 'index.html',
|
|
68
|
-
typeName: page.typeName || 'demo',
|
|
69
|
-
params: page.params || {},
|
|
70
|
-
mode: 'demo',
|
|
71
|
-
},
|
|
72
|
-
tools: {
|
|
73
|
-
list: function () { return Promise.resolve(Object.keys(tools)); },
|
|
74
|
-
invoke: function (name, input) {
|
|
75
|
-
var call = run(tools, name, input || {});
|
|
76
|
-
if (!call) return fail('not-allowed', "The demo does not handle the tool '" + name + "'.");
|
|
77
|
-
return call.then(function (output) { return { output: output }; });
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
data: {
|
|
81
|
-
read: function (path, o) {
|
|
82
|
-
return run(data, path, o || {}) || fail('not-allowed', "The demo has no data for '" + path + "'.");
|
|
83
|
-
},
|
|
84
|
-
list: function (path, o) {
|
|
85
|
-
return run(data, path, o || {}) || Promise.resolve([]);
|
|
86
|
-
},
|
|
87
|
-
watch: function () { return function () {}; },
|
|
88
|
-
url: function (path) {
|
|
89
|
-
if (Object.prototype.hasOwnProperty.call(data, path)) return String(data[path]({}));
|
|
90
|
-
return typeof path === 'string' && path.indexOf('data:') === 0 ? path : '';
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
ui: ui,
|
|
94
|
-
refresh: function () {},
|
|
95
|
-
};
|
|
96
|
-
return window.gezel;
|
|
97
|
-
};
|
|
98
|
-
})();
|
|
99
|
-
</script>
|
|
100
|
-
<script>
|
|
101
|
-
const demoMode = window.makeDemoGezel({ page: { typeName: 'Data Analysis' } }).page.mode === 'demo';
|
|
102
|
-
</script>
|
|
13
|
+
<script src="demo.js" defer></script>
|
|
103
14
|
<script src="datasets.js" defer></script>
|
|
104
15
|
<script src="analytics.js" defer></script>
|
|
105
16
|
<script src="insights.js" defer></script>
|
|
@@ -162,6 +73,7 @@
|
|
|
162
73
|
</details>
|
|
163
74
|
</div>
|
|
164
75
|
</section>
|
|
76
|
+
<div id="add-files"></div>
|
|
165
77
|
<section aria-labelledby="datasets-heading">
|
|
166
78
|
<div class="section-heading">
|
|
167
79
|
<h2 id="datasets-heading">Datasets</h2>
|
|
@@ -193,7 +105,7 @@
|
|
|
193
105
|
<h2 id="demo-title">Sample file</h2>
|
|
194
106
|
<p>In Gezel, this opens the file's existing viewer. This is a sample table.</p>
|
|
195
107
|
<table><thead><tr><th>Month</th><th>Revenue</th><th>Orders</th></tr></thead><tbody><tr><td>July</td><td>12,480</td><td>156</td></tr><tr><td>August</td><td>14,560</td><td>182</td></tr><tr><td>September</td><td>16,240</td><td>203</td></tr></tbody></table>
|
|
196
|
-
<
|
|
108
|
+
<button type="button" id="close-demo-preview">Close preview</button>
|
|
197
109
|
</dialog>
|
|
198
110
|
</body>
|
|
199
111
|
</html>
|