@jxsuite/studio 3.0.0 → 4.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/README.md +5 -5
- package/dist/chunks/{2020-xp8vnwma.js → 2020-n6tfwnda.js} +2 -2
- package/dist/chunks/Overlay.dev-etqjwyf9.js +23 -0
- package/dist/chunks/cf-account-picker-en86v7x7.js +163 -0
- package/dist/chunks/{cf-settings-zj2cj1ar.js → cf-settings-45fgyx8y.js} +6 -5
- package/dist/chunks/{components-z6cnkyy1.js → components-zmx10t62.js} +6 -5
- package/dist/chunks/content-source-48xg86wj.js +49 -0
- package/dist/chunks/{convert-to-repeater-6vvx96n2.js → convert-to-repeater-43tfn7cs.js} +33 -25
- package/dist/chunks/entry-commands-e63f1xc0.js +46 -0
- package/dist/chunks/{extension-sections-kwzvpemr.js → extension-sections-txv08xxg.js} +34 -26
- package/dist/chunks/file-ops-wbh4hhsx.js +48 -0
- package/dist/chunks/files-3kfkwhk4.js +93 -0
- package/dist/chunks/{focus-trap.esm-ggawf1hy.js → focus-trap.esm-9t2drp0g.js} +6 -5
- package/dist/chunks/{format-host-8fr3545e.js → format-host-w16q81tf.js} +3 -3
- package/dist/chunks/fs-events-hrrg328g.js +21 -0
- package/dist/chunks/{git-panel-g01d93vc.js → git-panel-532whr1y.js} +22 -16
- package/dist/chunks/{index-nj44jpzj.js → index-wcnt3r9g.js} +2 -2
- package/dist/chunks/{jx-validate-jj9rnt4n.js → jx-validate-8er6gbxy.js} +6 -4
- package/dist/chunks/layers-panel-07hm7g5j.js +67 -0
- package/dist/chunks/layers-q75tj2mf.js +45 -0
- package/dist/chunks/lit-html-j055mkh8.js +22 -0
- package/dist/chunks/monaco-buffer-dqw0xxpx.js +25 -0
- package/dist/chunks/{monaco-setup-a5wkmbgh.js → monaco-setup-vx9bhp1d.js} +4 -4
- package/dist/chunks/notify-yjm79n4s.js +30 -0
- package/dist/chunks/parse-24d0gay3.js +19 -0
- package/dist/chunks/platform-ba1j1gbh.js +16 -0
- package/dist/chunks/publish-panel-v9st96ja.js +29 -0
- package/dist/chunks/quick-search-zccjp6gv.js +66 -0
- package/dist/chunks/references-3qx8fkyp.js +29 -0
- package/dist/chunks/right-panel-vm3b6kwy.js +46 -0
- package/dist/chunks/sp-overlay.dev-qgvhnxf4.js +18 -0
- package/dist/chunks/sp-popover.dev-n2etmqdp.js +9 -0
- package/dist/chunks/sp-progress-circle.dev-hryhj0es.js +15 -0
- package/dist/chunks/sp-tooltip.dev-4sastdnw.js +15 -0
- package/dist/chunks/{sp-tray.dev-64v4pxw8.js → sp-tray.dev-tkbscm06.js} +5 -5
- package/dist/chunks/{studio-wdt9y92a.js → studio-0bq6eh7v.js} +2 -2
- package/dist/chunks/studio-1ngbejft.js +181 -0
- package/dist/chunks/studio-1wagb550.js +118 -0
- package/dist/chunks/{studio-j595e748.js → studio-2b946z26.js} +172 -95
- package/dist/chunks/{studio-pkp61mh8.js → studio-3bqpr0zh.js} +25 -17
- package/dist/chunks/{studio-k4jvjcfx.js → studio-4b5z1x43.js} +46 -12
- package/dist/chunks/{studio-ry1vz5sv.js → studio-4n2b5gzb.js} +15 -13
- package/dist/chunks/{studio-p5dja96s.js → studio-4r1pv6zf.js} +2 -2
- package/dist/chunks/{studio-kvfx9z2c.js → studio-4rzyrtjz.js} +70 -31
- package/dist/chunks/{studio-tzx3xmvx.js → studio-5fx3g9jg.js} +33 -52
- package/dist/chunks/{studio-rh1cnamv.js → studio-5myknm0a.js} +565 -135
- package/dist/chunks/studio-6yw4y3my.js +91 -0
- package/dist/chunks/{studio-0rqqhrdy.js → studio-7nte2hj4.js} +2 -2
- package/dist/chunks/studio-92ab2jqe.js +282 -0
- package/dist/chunks/{studio-6z5eyjwn.js → studio-950k0dx6.js} +72 -135
- package/dist/chunks/{studio-sas7mt3k.js → studio-9ab8gqsm.js} +2 -2
- package/dist/chunks/studio-9n4mrmnb.js +184 -0
- package/dist/chunks/{studio-hcxzyk3x.js → studio-ahn3pdgx.js} +6 -6
- package/dist/chunks/studio-b55y6ewx.js +498 -0
- package/dist/chunks/{studio-s519zc99.js → studio-bgxt93ga.js} +3 -3
- package/dist/chunks/studio-cft9r4r7.js +119 -0
- package/dist/chunks/{studio-dc8s8heb.js → studio-cmb03bg5.js} +6904 -8321
- package/dist/chunks/studio-dm19q43r.js +195 -0
- package/dist/chunks/{studio-2x9zbxmx.js → studio-ef49pnzx.js} +11 -9
- package/dist/chunks/{studio-ay8wcr2b.js → studio-eqq1w638.js} +7 -9
- package/dist/chunks/{studio-5efrtn1m.js → studio-ew0djmhg.js} +23 -19
- package/dist/chunks/{studio-tr20m8g8.js → studio-f3wqjtk5.js} +39 -3
- package/dist/chunks/{studio-xntfdy1x.js → studio-fbf92ckf.js} +36 -23
- package/dist/chunks/{studio-4q0wznzf.js → studio-gcye7qka.js} +442 -126
- package/dist/chunks/{studio-7p35254k.js → studio-gfgb8pe6.js} +36 -193
- package/dist/chunks/studio-jc994dnr.js +1066 -0
- package/dist/chunks/{studio-hj2se583.js → studio-jkftxyvz.js} +69 -3423
- package/dist/chunks/{studio-5x5774ak.js → studio-kryvsw6j.js} +3 -3
- package/dist/chunks/{studio-kfpek536.js → studio-kyh9avvv.js} +2 -2
- package/dist/chunks/{studio-twsafr1e.js → studio-m3hwn7y1.js} +3 -3
- package/dist/chunks/studio-msd847zn.js +1315 -0
- package/dist/chunks/{studio-g5gdqnyd.js → studio-mtfnaqs9.js} +19 -19
- package/dist/chunks/{studio-7ejemhej.js → studio-n6j9t10q.js} +6 -6
- package/dist/chunks/{studio-vhk5fmfv.js → studio-n8b9wqwy.js} +5 -5
- package/dist/chunks/{studio-cjm7fdjf.js → studio-p4ngc046.js} +8 -104
- package/dist/chunks/studio-q43a5y9h.js +394 -0
- package/dist/chunks/studio-q7v10cg2.js +106 -0
- package/dist/chunks/{studio-6kv3apa9.js → studio-q9jd1a60.js} +27 -11
- package/dist/chunks/studio-qcy05dp8.js +1743 -0
- package/dist/chunks/{studio-a0yp7syn.js → studio-qjy2z9bv.js} +29 -132
- package/dist/chunks/{studio-2w11grav.js → studio-qq6jym04.js} +3 -3
- package/dist/chunks/{studio-3fk1ac9z.js → studio-rdx8jcxy.js} +4 -4
- package/dist/chunks/{studio-4mqb9a0j.js → studio-rn9ta2mz.js} +4 -4
- package/dist/chunks/studio-t7qb9db8.js +665 -0
- package/dist/chunks/studio-tmc5emrw.js +8 -0
- package/dist/chunks/{studio-r5xbtctf.js → studio-trxrabqf.js} +292 -2297
- package/dist/chunks/studio-wcy8trfx.js +263 -0
- package/dist/chunks/{studio-3dkcd4c5.js → studio-x4qkdat5.js} +62 -57
- package/dist/chunks/studio-x813zp48.js +195 -0
- package/dist/chunks/{studio-qpfq7xhm.js → studio-xrapxwwc.js} +22 -285
- package/dist/chunks/{studio-xm3dbxvn.js → studio-zczps70q.js} +2 -2
- package/dist/chunks/{studio-8ezdegcx.js → studio-zqazsct2.js} +40 -36
- package/dist/chunks/workspace-fjx52ryv.js +89 -0
- package/dist/iframe-entry.js +141 -56
- package/dist/manifest.json +7 -0
- package/dist/studio.js +2605 -1950
- package/favicon.ico +0 -0
- package/index.html +1 -0
- package/package.json +20 -18
- package/src/about/about-modal.ts +4 -3
- package/src/browse/library-pane.ts +57 -3
- package/src/canvas/canvas-render.ts +23 -1
- package/src/canvas/iframe-patch.ts +47 -21
- package/src/canvas/iframe-render.ts +22 -6
- package/src/commands/app-commands.ts +4 -0
- package/src/commands/command-args.ts +29 -0
- package/src/commands/context.ts +15 -1
- package/src/commands/defaults.ts +29 -1
- package/src/commands/levels.ts +16 -0
- package/src/commands/live-context.ts +3 -0
- package/src/content/collection-match.ts +267 -0
- package/src/content/entry-commands.ts +38 -29
- package/src/content/entry-fields.ts +6 -0
- package/src/editor/shortcuts.ts +5 -0
- package/src/files/file-ops.ts +10 -42
- package/src/files/files.ts +487 -59
- package/src/files/fs-events.ts +9 -0
- package/src/files/gitignore.ts +432 -0
- package/src/files/media-paths.ts +13 -42
- package/src/files/media-usage.ts +41 -131
- package/src/files/serialize-document.ts +60 -0
- package/src/format/convert-file.ts +511 -0
- package/src/format/format-choices.ts +199 -0
- package/src/grid/grid-view.ts +16 -2
- package/src/hosting/document.ts +2 -0
- package/src/hosting/layout.ts +8 -0
- package/src/media/media-open.ts +58 -0
- package/src/media/media-pane.ts +310 -0
- package/src/new-project/import-tab.ts +357 -163
- package/src/new-project/location-fields.ts +8 -5
- package/src/new-project/new-project-modal.ts +27 -34
- package/src/packages/ensure-deps.ts +14 -7
- package/src/packages/jxsuite-update.ts +11 -11
- package/src/page-params.ts +10 -46
- package/src/panels/activity-bar.ts +45 -16
- package/src/panels/ai-chat/attached-context.ts +6 -1
- package/src/panels/ai-chat/chat-view.ts +255 -13
- package/src/panels/ai-chat/composer.ts +31 -97
- package/src/panels/ai-panel.ts +116 -2
- package/src/panels/navigator-panels.ts +7 -6
- package/src/panels/settings-menu.ts +799 -0
- package/src/panels/toolbar.ts +135 -15
- package/src/platforms/cloud.ts +261 -70
- package/src/platforms/devserver.ts +67 -33
- package/src/preview/preview-overlay.ts +226 -0
- package/src/publish/publish-panel.ts +62 -2
- package/src/services/ai-ask.ts +247 -0
- package/src/services/ai-import-tools.ts +532 -0
- package/src/services/ai-models.ts +108 -1
- package/src/services/ai-project-tools.ts +20 -26
- package/src/services/ai-system-prompt.ts +88 -2
- package/src/services/ai-turn-signal.ts +70 -0
- package/src/services/connection.ts +74 -0
- package/src/services/context-manager.ts +101 -1
- package/src/services/document-assistant.ts +45 -4
- package/src/services/import-client.ts +33 -6
- package/src/services/import-run.ts +158 -0
- package/src/services/import-seed.ts +120 -0
- package/src/services/jx-validate.ts +58 -6
- package/src/services/project-adoption.ts +71 -0
- package/src/services/references.ts +0 -0
- package/src/services/settings/definitions.ts +17 -0
- package/src/services/tool-executor.ts +45 -2
- package/src/settings/contexts-section.ts +45 -3
- package/src/settings/dependencies-editor.ts +43 -23
- package/src/settings/general-settings.ts +30 -12
- package/src/settings/preferences-accounts.ts +193 -12
- package/src/settings/preferences-dialog.ts +93 -59
- package/src/settings/preferences-sections.ts +57 -0
- package/src/settings/settings-document.ts +65 -9
- package/src/studio.ts +33 -6
- package/src/tabs/transact.ts +42 -19
- package/src/types.ts +129 -7
- package/src/ui/ai-managed-connect.ts +62 -13
- package/src/ui/ai-model-picker.ts +189 -0
- package/src/ui/cf-account-picker.ts +200 -0
- package/src/ui/choice-field.ts +72 -0
- package/src/ui/layers.ts +83 -5
- package/src/utils/studio-utils.ts +22 -52
- package/styles/forced-colors.css +7 -0
- package/styles/overlays.css +256 -0
- package/styles/panels.css +13 -1
- package/styles/shell.css +147 -0
- package/dist/chunks/Overlay.dev-d2ajy6sj.js +0 -23
- package/dist/chunks/content-source-7fy9qrm0.js +0 -40
- package/dist/chunks/files-xcybanxe.js +0 -70
- package/dist/chunks/layers-panel-27essgkc.js +0 -60
- package/dist/chunks/publish-panel-09sy2bab.js +0 -22
- package/dist/chunks/quick-search-sefb61v8.js +0 -55
- package/dist/chunks/right-panel-9r32jd5j.js +0 -39
- package/dist/chunks/sp-overlay.dev-s18hymn9.js +0 -18
- package/dist/chunks/sp-popover.dev-dj9x7e7a.js +0 -9
- package/dist/chunks/sp-progress-circle.dev-0zxcyz3r.js +0 -15
- package/dist/chunks/sp-tooltip.dev-5c6d1kjz.js +0 -15
- package/dist/chunks/studio-bw5dz6km.js +0 -608
- package/dist/chunks/studio-c31yb4t6.js +0 -55
- package/src/canvas/site-style-css.ts +0 -117
|
@@ -1,608 +0,0 @@
|
|
|
1
|
-
// src/services/cem-export.ts
|
|
2
|
-
function collectSlots(node, slots = []) {
|
|
3
|
-
if (node?.tagName === "slot") {
|
|
4
|
-
const name = node.attributes?.name;
|
|
5
|
-
slots.push(typeof name === "string" ? name.trim() : "");
|
|
6
|
-
}
|
|
7
|
-
if (Array.isArray(node?.children)) {
|
|
8
|
-
for (const c of node.children) {
|
|
9
|
-
collectSlots(typeof c === "string" ? undefined : c, slots);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return slots;
|
|
13
|
-
}
|
|
14
|
-
function validateComponentSlots(doc) {
|
|
15
|
-
const names = collectSlots(doc);
|
|
16
|
-
const unnamed = names.filter((n) => n === "").length;
|
|
17
|
-
if (unnamed > 1) {
|
|
18
|
-
return `Component has ${unnamed} unnamed <slot> elements — only one default slot is allowed. Give extra slots a name attribute.`;
|
|
19
|
-
}
|
|
20
|
-
const seen = new Set;
|
|
21
|
-
for (const n of names) {
|
|
22
|
-
if (n && seen.has(n)) {
|
|
23
|
-
return `Duplicate slot name "${n}" — slot names must be unique within a component.`;
|
|
24
|
-
}
|
|
25
|
-
seen.add(n);
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// ../../node_modules/hast-util-whitespace/lib/index.js
|
|
31
|
-
var re = /[ \t\n\f\r]/g;
|
|
32
|
-
function whitespace(thing) {
|
|
33
|
-
return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
|
|
34
|
-
}
|
|
35
|
-
function empty(value) {
|
|
36
|
-
return value.replace(re, "") === "";
|
|
37
|
-
}
|
|
38
|
-
// ../../node_modules/devlop/lib/development.js
|
|
39
|
-
var codesWarned = new Set;
|
|
40
|
-
|
|
41
|
-
class AssertionError extends Error {
|
|
42
|
-
name = "Assertion";
|
|
43
|
-
code = "ERR_ASSERTION";
|
|
44
|
-
constructor(message, actual, expected, operator, generated) {
|
|
45
|
-
super(message);
|
|
46
|
-
if (Error.captureStackTrace) {
|
|
47
|
-
Error.captureStackTrace(this, this.constructor);
|
|
48
|
-
}
|
|
49
|
-
this.actual = actual;
|
|
50
|
-
this.expected = expected;
|
|
51
|
-
this.generated = generated;
|
|
52
|
-
this.operator = operator;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function ok(value, message) {
|
|
56
|
-
assert(Boolean(value), false, true, "ok", "Expected value to be truthy", message);
|
|
57
|
-
}
|
|
58
|
-
function assert(bool, actual, expected, operator, defaultMessage, userMessage) {
|
|
59
|
-
if (!bool) {
|
|
60
|
-
throw userMessage instanceof Error ? userMessage : new AssertionError(userMessage || defaultMessage, actual, expected, operator, !userMessage);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// ../../node_modules/unist-util-stringify-position/lib/index.js
|
|
65
|
-
function stringifyPosition(value) {
|
|
66
|
-
if (!value || typeof value !== "object") {
|
|
67
|
-
return "";
|
|
68
|
-
}
|
|
69
|
-
if ("position" in value || "type" in value) {
|
|
70
|
-
return position(value.position);
|
|
71
|
-
}
|
|
72
|
-
if ("start" in value || "end" in value) {
|
|
73
|
-
return position(value);
|
|
74
|
-
}
|
|
75
|
-
if ("line" in value || "column" in value) {
|
|
76
|
-
return point(value);
|
|
77
|
-
}
|
|
78
|
-
return "";
|
|
79
|
-
}
|
|
80
|
-
function point(point2) {
|
|
81
|
-
return index(point2 && point2.line) + ":" + index(point2 && point2.column);
|
|
82
|
-
}
|
|
83
|
-
function position(pos) {
|
|
84
|
-
return point(pos && pos.start) + "-" + point(pos && pos.end);
|
|
85
|
-
}
|
|
86
|
-
function index(value) {
|
|
87
|
-
return value && typeof value === "number" ? value : 1;
|
|
88
|
-
}
|
|
89
|
-
// ../../node_modules/vfile-message/lib/index.js
|
|
90
|
-
class VFileMessage extends Error {
|
|
91
|
-
constructor(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
92
|
-
super();
|
|
93
|
-
if (typeof optionsOrParentOrPlace === "string") {
|
|
94
|
-
origin = optionsOrParentOrPlace;
|
|
95
|
-
optionsOrParentOrPlace = undefined;
|
|
96
|
-
}
|
|
97
|
-
let reason = "";
|
|
98
|
-
let options = {};
|
|
99
|
-
let legacyCause = false;
|
|
100
|
-
if (optionsOrParentOrPlace) {
|
|
101
|
-
if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
|
|
102
|
-
options = { place: optionsOrParentOrPlace };
|
|
103
|
-
} else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
|
|
104
|
-
options = { place: optionsOrParentOrPlace };
|
|
105
|
-
} else if ("type" in optionsOrParentOrPlace) {
|
|
106
|
-
options = {
|
|
107
|
-
ancestors: [optionsOrParentOrPlace],
|
|
108
|
-
place: optionsOrParentOrPlace.position
|
|
109
|
-
};
|
|
110
|
-
} else {
|
|
111
|
-
options = { ...optionsOrParentOrPlace };
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (typeof causeOrReason === "string") {
|
|
115
|
-
reason = causeOrReason;
|
|
116
|
-
} else if (!options.cause && causeOrReason) {
|
|
117
|
-
legacyCause = true;
|
|
118
|
-
reason = causeOrReason.message;
|
|
119
|
-
options.cause = causeOrReason;
|
|
120
|
-
}
|
|
121
|
-
if (!options.ruleId && !options.source && typeof origin === "string") {
|
|
122
|
-
const index2 = origin.indexOf(":");
|
|
123
|
-
if (index2 === -1) {
|
|
124
|
-
options.ruleId = origin;
|
|
125
|
-
} else {
|
|
126
|
-
options.source = origin.slice(0, index2);
|
|
127
|
-
options.ruleId = origin.slice(index2 + 1);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (!options.place && options.ancestors && options.ancestors) {
|
|
131
|
-
const parent = options.ancestors[options.ancestors.length - 1];
|
|
132
|
-
if (parent) {
|
|
133
|
-
options.place = parent.position;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const start = options.place && "start" in options.place ? options.place.start : options.place;
|
|
137
|
-
this.ancestors = options.ancestors || undefined;
|
|
138
|
-
this.cause = options.cause || undefined;
|
|
139
|
-
this.column = start ? start.column : undefined;
|
|
140
|
-
this.fatal = undefined;
|
|
141
|
-
this.file = "";
|
|
142
|
-
this.message = reason;
|
|
143
|
-
this.line = start ? start.line : undefined;
|
|
144
|
-
this.name = stringifyPosition(options.place) || "1:1";
|
|
145
|
-
this.place = options.place || undefined;
|
|
146
|
-
this.reason = this.message;
|
|
147
|
-
this.ruleId = options.ruleId || undefined;
|
|
148
|
-
this.source = options.source || undefined;
|
|
149
|
-
this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
|
|
150
|
-
this.actual = undefined;
|
|
151
|
-
this.expected = undefined;
|
|
152
|
-
this.note = undefined;
|
|
153
|
-
this.url = undefined;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
VFileMessage.prototype.file = "";
|
|
157
|
-
VFileMessage.prototype.name = "";
|
|
158
|
-
VFileMessage.prototype.reason = "";
|
|
159
|
-
VFileMessage.prototype.message = "";
|
|
160
|
-
VFileMessage.prototype.stack = "";
|
|
161
|
-
VFileMessage.prototype.column = undefined;
|
|
162
|
-
VFileMessage.prototype.line = undefined;
|
|
163
|
-
VFileMessage.prototype.ancestors = undefined;
|
|
164
|
-
VFileMessage.prototype.cause = undefined;
|
|
165
|
-
VFileMessage.prototype.fatal = undefined;
|
|
166
|
-
VFileMessage.prototype.place = undefined;
|
|
167
|
-
VFileMessage.prototype.ruleId = undefined;
|
|
168
|
-
VFileMessage.prototype.source = undefined;
|
|
169
|
-
// ../../node_modules/vfile/lib/minpath.browser.js
|
|
170
|
-
var minpath = { basename, dirname, extname, join, sep: "/" };
|
|
171
|
-
function basename(path, extname) {
|
|
172
|
-
if (extname !== undefined && typeof extname !== "string") {
|
|
173
|
-
throw new TypeError('"ext" argument must be a string');
|
|
174
|
-
}
|
|
175
|
-
assertPath(path);
|
|
176
|
-
let start = 0;
|
|
177
|
-
let end = -1;
|
|
178
|
-
let index2 = path.length;
|
|
179
|
-
let seenNonSlash;
|
|
180
|
-
if (extname === undefined || extname.length === 0 || extname.length > path.length) {
|
|
181
|
-
while (index2--) {
|
|
182
|
-
if (path.codePointAt(index2) === 47) {
|
|
183
|
-
if (seenNonSlash) {
|
|
184
|
-
start = index2 + 1;
|
|
185
|
-
break;
|
|
186
|
-
}
|
|
187
|
-
} else if (end < 0) {
|
|
188
|
-
seenNonSlash = true;
|
|
189
|
-
end = index2 + 1;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return end < 0 ? "" : path.slice(start, end);
|
|
193
|
-
}
|
|
194
|
-
if (extname === path) {
|
|
195
|
-
return "";
|
|
196
|
-
}
|
|
197
|
-
let firstNonSlashEnd = -1;
|
|
198
|
-
let extnameIndex = extname.length - 1;
|
|
199
|
-
while (index2--) {
|
|
200
|
-
if (path.codePointAt(index2) === 47) {
|
|
201
|
-
if (seenNonSlash) {
|
|
202
|
-
start = index2 + 1;
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
} else {
|
|
206
|
-
if (firstNonSlashEnd < 0) {
|
|
207
|
-
seenNonSlash = true;
|
|
208
|
-
firstNonSlashEnd = index2 + 1;
|
|
209
|
-
}
|
|
210
|
-
if (extnameIndex > -1) {
|
|
211
|
-
if (path.codePointAt(index2) === extname.codePointAt(extnameIndex--)) {
|
|
212
|
-
if (extnameIndex < 0) {
|
|
213
|
-
end = index2;
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
extnameIndex = -1;
|
|
217
|
-
end = firstNonSlashEnd;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
if (start === end) {
|
|
223
|
-
end = firstNonSlashEnd;
|
|
224
|
-
} else if (end < 0) {
|
|
225
|
-
end = path.length;
|
|
226
|
-
}
|
|
227
|
-
return path.slice(start, end);
|
|
228
|
-
}
|
|
229
|
-
function dirname(path) {
|
|
230
|
-
assertPath(path);
|
|
231
|
-
if (path.length === 0) {
|
|
232
|
-
return ".";
|
|
233
|
-
}
|
|
234
|
-
let end = -1;
|
|
235
|
-
let index2 = path.length;
|
|
236
|
-
let unmatchedSlash;
|
|
237
|
-
while (--index2) {
|
|
238
|
-
if (path.codePointAt(index2) === 47) {
|
|
239
|
-
if (unmatchedSlash) {
|
|
240
|
-
end = index2;
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
} else if (!unmatchedSlash) {
|
|
244
|
-
unmatchedSlash = true;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return end < 0 ? path.codePointAt(0) === 47 ? "/" : "." : end === 1 && path.codePointAt(0) === 47 ? "//" : path.slice(0, end);
|
|
248
|
-
}
|
|
249
|
-
function extname(path) {
|
|
250
|
-
assertPath(path);
|
|
251
|
-
let index2 = path.length;
|
|
252
|
-
let end = -1;
|
|
253
|
-
let startPart = 0;
|
|
254
|
-
let startDot = -1;
|
|
255
|
-
let preDotState = 0;
|
|
256
|
-
let unmatchedSlash;
|
|
257
|
-
while (index2--) {
|
|
258
|
-
const code = path.codePointAt(index2);
|
|
259
|
-
if (code === 47) {
|
|
260
|
-
if (unmatchedSlash) {
|
|
261
|
-
startPart = index2 + 1;
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
if (end < 0) {
|
|
267
|
-
unmatchedSlash = true;
|
|
268
|
-
end = index2 + 1;
|
|
269
|
-
}
|
|
270
|
-
if (code === 46) {
|
|
271
|
-
if (startDot < 0) {
|
|
272
|
-
startDot = index2;
|
|
273
|
-
} else if (preDotState !== 1) {
|
|
274
|
-
preDotState = 1;
|
|
275
|
-
}
|
|
276
|
-
} else if (startDot > -1) {
|
|
277
|
-
preDotState = -1;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
if (startDot < 0 || end < 0 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
281
|
-
return "";
|
|
282
|
-
}
|
|
283
|
-
return path.slice(startDot, end);
|
|
284
|
-
}
|
|
285
|
-
function join(...segments) {
|
|
286
|
-
let index2 = -1;
|
|
287
|
-
let joined;
|
|
288
|
-
while (++index2 < segments.length) {
|
|
289
|
-
assertPath(segments[index2]);
|
|
290
|
-
if (segments[index2]) {
|
|
291
|
-
joined = joined === undefined ? segments[index2] : joined + "/" + segments[index2];
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return joined === undefined ? "." : normalize(joined);
|
|
295
|
-
}
|
|
296
|
-
function normalize(path) {
|
|
297
|
-
assertPath(path);
|
|
298
|
-
const absolute = path.codePointAt(0) === 47;
|
|
299
|
-
let value = normalizeString(path, !absolute);
|
|
300
|
-
if (value.length === 0 && !absolute) {
|
|
301
|
-
value = ".";
|
|
302
|
-
}
|
|
303
|
-
if (value.length > 0 && path.codePointAt(path.length - 1) === 47) {
|
|
304
|
-
value += "/";
|
|
305
|
-
}
|
|
306
|
-
return absolute ? "/" + value : value;
|
|
307
|
-
}
|
|
308
|
-
function normalizeString(path, allowAboveRoot) {
|
|
309
|
-
let result = "";
|
|
310
|
-
let lastSegmentLength = 0;
|
|
311
|
-
let lastSlash = -1;
|
|
312
|
-
let dots = 0;
|
|
313
|
-
let index2 = -1;
|
|
314
|
-
let code;
|
|
315
|
-
let lastSlashIndex;
|
|
316
|
-
while (++index2 <= path.length) {
|
|
317
|
-
if (index2 < path.length) {
|
|
318
|
-
code = path.codePointAt(index2);
|
|
319
|
-
} else if (code === 47) {
|
|
320
|
-
break;
|
|
321
|
-
} else {
|
|
322
|
-
code = 47;
|
|
323
|
-
}
|
|
324
|
-
if (code === 47) {
|
|
325
|
-
if (lastSlash === index2 - 1 || dots === 1) {} else if (lastSlash !== index2 - 1 && dots === 2) {
|
|
326
|
-
if (result.length < 2 || lastSegmentLength !== 2 || result.codePointAt(result.length - 1) !== 46 || result.codePointAt(result.length - 2) !== 46) {
|
|
327
|
-
if (result.length > 2) {
|
|
328
|
-
lastSlashIndex = result.lastIndexOf("/");
|
|
329
|
-
if (lastSlashIndex !== result.length - 1) {
|
|
330
|
-
if (lastSlashIndex < 0) {
|
|
331
|
-
result = "";
|
|
332
|
-
lastSegmentLength = 0;
|
|
333
|
-
} else {
|
|
334
|
-
result = result.slice(0, lastSlashIndex);
|
|
335
|
-
lastSegmentLength = result.length - 1 - result.lastIndexOf("/");
|
|
336
|
-
}
|
|
337
|
-
lastSlash = index2;
|
|
338
|
-
dots = 0;
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
} else if (result.length > 0) {
|
|
342
|
-
result = "";
|
|
343
|
-
lastSegmentLength = 0;
|
|
344
|
-
lastSlash = index2;
|
|
345
|
-
dots = 0;
|
|
346
|
-
continue;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
if (allowAboveRoot) {
|
|
350
|
-
result = result.length > 0 ? result + "/.." : "..";
|
|
351
|
-
lastSegmentLength = 2;
|
|
352
|
-
}
|
|
353
|
-
} else {
|
|
354
|
-
if (result.length > 0) {
|
|
355
|
-
result += "/" + path.slice(lastSlash + 1, index2);
|
|
356
|
-
} else {
|
|
357
|
-
result = path.slice(lastSlash + 1, index2);
|
|
358
|
-
}
|
|
359
|
-
lastSegmentLength = index2 - lastSlash - 1;
|
|
360
|
-
}
|
|
361
|
-
lastSlash = index2;
|
|
362
|
-
dots = 0;
|
|
363
|
-
} else if (code === 46 && dots > -1) {
|
|
364
|
-
dots++;
|
|
365
|
-
} else {
|
|
366
|
-
dots = -1;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
return result;
|
|
370
|
-
}
|
|
371
|
-
function assertPath(path) {
|
|
372
|
-
if (typeof path !== "string") {
|
|
373
|
-
throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// ../../node_modules/vfile/lib/minproc.browser.js
|
|
378
|
-
var minproc = { cwd };
|
|
379
|
-
function cwd() {
|
|
380
|
-
return "/";
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
// ../../node_modules/vfile/lib/minurl.shared.js
|
|
384
|
-
function isUrl(fileUrlOrPath) {
|
|
385
|
-
return Boolean(fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && fileUrlOrPath.auth === undefined);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
// ../../node_modules/vfile/lib/minurl.browser.js
|
|
389
|
-
function urlToPath(path) {
|
|
390
|
-
if (typeof path === "string") {
|
|
391
|
-
path = new URL(path);
|
|
392
|
-
} else if (!isUrl(path)) {
|
|
393
|
-
const error = new TypeError('The "path" argument must be of type string or an instance of URL. Received `' + path + "`");
|
|
394
|
-
error.code = "ERR_INVALID_ARG_TYPE";
|
|
395
|
-
throw error;
|
|
396
|
-
}
|
|
397
|
-
if (path.protocol !== "file:") {
|
|
398
|
-
const error = new TypeError("The URL must be of scheme file");
|
|
399
|
-
error.code = "ERR_INVALID_URL_SCHEME";
|
|
400
|
-
throw error;
|
|
401
|
-
}
|
|
402
|
-
return getPathFromURLPosix(path);
|
|
403
|
-
}
|
|
404
|
-
function getPathFromURLPosix(url) {
|
|
405
|
-
if (url.hostname !== "") {
|
|
406
|
-
const error = new TypeError('File URL host must be "localhost" or empty on darwin');
|
|
407
|
-
error.code = "ERR_INVALID_FILE_URL_HOST";
|
|
408
|
-
throw error;
|
|
409
|
-
}
|
|
410
|
-
const pathname = url.pathname;
|
|
411
|
-
let index2 = -1;
|
|
412
|
-
while (++index2 < pathname.length) {
|
|
413
|
-
if (pathname.codePointAt(index2) === 37 && pathname.codePointAt(index2 + 1) === 50) {
|
|
414
|
-
const third = pathname.codePointAt(index2 + 2);
|
|
415
|
-
if (third === 70 || third === 102) {
|
|
416
|
-
const error = new TypeError("File URL path must not include encoded / characters");
|
|
417
|
-
error.code = "ERR_INVALID_FILE_URL_PATH";
|
|
418
|
-
throw error;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
return decodeURIComponent(pathname);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// ../../node_modules/vfile/lib/index.js
|
|
426
|
-
var order = [
|
|
427
|
-
"history",
|
|
428
|
-
"path",
|
|
429
|
-
"basename",
|
|
430
|
-
"stem",
|
|
431
|
-
"extname",
|
|
432
|
-
"dirname"
|
|
433
|
-
];
|
|
434
|
-
|
|
435
|
-
class VFile {
|
|
436
|
-
constructor(value) {
|
|
437
|
-
let options;
|
|
438
|
-
if (!value) {
|
|
439
|
-
options = {};
|
|
440
|
-
} else if (isUrl(value)) {
|
|
441
|
-
options = { path: value };
|
|
442
|
-
} else if (typeof value === "string" || isUint8Array(value)) {
|
|
443
|
-
options = { value };
|
|
444
|
-
} else {
|
|
445
|
-
options = value;
|
|
446
|
-
}
|
|
447
|
-
this.cwd = "cwd" in options ? "" : minproc.cwd();
|
|
448
|
-
this.data = {};
|
|
449
|
-
this.history = [];
|
|
450
|
-
this.messages = [];
|
|
451
|
-
this.value;
|
|
452
|
-
this.map;
|
|
453
|
-
this.result;
|
|
454
|
-
this.stored;
|
|
455
|
-
let index2 = -1;
|
|
456
|
-
while (++index2 < order.length) {
|
|
457
|
-
const field2 = order[index2];
|
|
458
|
-
if (field2 in options && options[field2] !== undefined && options[field2] !== null) {
|
|
459
|
-
this[field2] = field2 === "history" ? [...options[field2]] : options[field2];
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
let field;
|
|
463
|
-
for (field in options) {
|
|
464
|
-
if (!order.includes(field)) {
|
|
465
|
-
this[field] = options[field];
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
get basename() {
|
|
470
|
-
return typeof this.path === "string" ? minpath.basename(this.path) : undefined;
|
|
471
|
-
}
|
|
472
|
-
set basename(basename2) {
|
|
473
|
-
assertNonEmpty(basename2, "basename");
|
|
474
|
-
assertPart(basename2, "basename");
|
|
475
|
-
this.path = minpath.join(this.dirname || "", basename2);
|
|
476
|
-
}
|
|
477
|
-
get dirname() {
|
|
478
|
-
return typeof this.path === "string" ? minpath.dirname(this.path) : undefined;
|
|
479
|
-
}
|
|
480
|
-
set dirname(dirname2) {
|
|
481
|
-
assertPath2(this.basename, "dirname");
|
|
482
|
-
this.path = minpath.join(dirname2 || "", this.basename);
|
|
483
|
-
}
|
|
484
|
-
get extname() {
|
|
485
|
-
return typeof this.path === "string" ? minpath.extname(this.path) : undefined;
|
|
486
|
-
}
|
|
487
|
-
set extname(extname2) {
|
|
488
|
-
assertPart(extname2, "extname");
|
|
489
|
-
assertPath2(this.dirname, "extname");
|
|
490
|
-
if (extname2) {
|
|
491
|
-
if (extname2.codePointAt(0) !== 46) {
|
|
492
|
-
throw new Error("`extname` must start with `.`");
|
|
493
|
-
}
|
|
494
|
-
if (extname2.includes(".", 1)) {
|
|
495
|
-
throw new Error("`extname` cannot contain multiple dots");
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
this.path = minpath.join(this.dirname, this.stem + (extname2 || ""));
|
|
499
|
-
}
|
|
500
|
-
get path() {
|
|
501
|
-
return this.history[this.history.length - 1];
|
|
502
|
-
}
|
|
503
|
-
set path(path) {
|
|
504
|
-
if (isUrl(path)) {
|
|
505
|
-
path = urlToPath(path);
|
|
506
|
-
}
|
|
507
|
-
assertNonEmpty(path, "path");
|
|
508
|
-
if (this.path !== path) {
|
|
509
|
-
this.history.push(path);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
get stem() {
|
|
513
|
-
return typeof this.path === "string" ? minpath.basename(this.path, this.extname) : undefined;
|
|
514
|
-
}
|
|
515
|
-
set stem(stem) {
|
|
516
|
-
assertNonEmpty(stem, "stem");
|
|
517
|
-
assertPart(stem, "stem");
|
|
518
|
-
this.path = minpath.join(this.dirname || "", stem + (this.extname || ""));
|
|
519
|
-
}
|
|
520
|
-
fail(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
521
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
522
|
-
message.fatal = true;
|
|
523
|
-
throw message;
|
|
524
|
-
}
|
|
525
|
-
info(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
526
|
-
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
527
|
-
message.fatal = undefined;
|
|
528
|
-
return message;
|
|
529
|
-
}
|
|
530
|
-
message(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
531
|
-
const message = new VFileMessage(causeOrReason, optionsOrParentOrPlace, origin);
|
|
532
|
-
if (this.path) {
|
|
533
|
-
message.name = this.path + ":" + message.name;
|
|
534
|
-
message.file = this.path;
|
|
535
|
-
}
|
|
536
|
-
message.fatal = false;
|
|
537
|
-
this.messages.push(message);
|
|
538
|
-
return message;
|
|
539
|
-
}
|
|
540
|
-
toString(encoding) {
|
|
541
|
-
if (this.value === undefined) {
|
|
542
|
-
return "";
|
|
543
|
-
}
|
|
544
|
-
if (typeof this.value === "string") {
|
|
545
|
-
return this.value;
|
|
546
|
-
}
|
|
547
|
-
const decoder = new TextDecoder(encoding || undefined);
|
|
548
|
-
return decoder.decode(this.value);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
function assertPart(part, name) {
|
|
552
|
-
if (part && part.includes(minpath.sep)) {
|
|
553
|
-
throw new Error("`" + name + "` cannot be a path: did not expect `" + minpath.sep + "`");
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
function assertNonEmpty(part, name) {
|
|
557
|
-
if (!part) {
|
|
558
|
-
throw new Error("`" + name + "` cannot be empty");
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
function assertPath2(path, name) {
|
|
562
|
-
if (!path) {
|
|
563
|
-
throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
function isUint8Array(value) {
|
|
567
|
-
return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
|
|
568
|
-
}
|
|
569
|
-
// ../../node_modules/comma-separated-tokens/index.js
|
|
570
|
-
function parse(value) {
|
|
571
|
-
const tokens = [];
|
|
572
|
-
const input = String(value || "");
|
|
573
|
-
let index2 = input.indexOf(",");
|
|
574
|
-
let start = 0;
|
|
575
|
-
let end = false;
|
|
576
|
-
while (!end) {
|
|
577
|
-
if (index2 === -1) {
|
|
578
|
-
index2 = input.length;
|
|
579
|
-
end = true;
|
|
580
|
-
}
|
|
581
|
-
const token = input.slice(start, index2).trim();
|
|
582
|
-
if (token || !end) {
|
|
583
|
-
tokens.push(token);
|
|
584
|
-
}
|
|
585
|
-
start = index2 + 1;
|
|
586
|
-
index2 = input.indexOf(",", start);
|
|
587
|
-
}
|
|
588
|
-
return tokens;
|
|
589
|
-
}
|
|
590
|
-
function stringify(values, options) {
|
|
591
|
-
const settings = options || {};
|
|
592
|
-
const input = values[values.length - 1] === "" ? [...values, ""] : values;
|
|
593
|
-
return input.join((settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")).trim();
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
// ../../node_modules/space-separated-tokens/index.js
|
|
597
|
-
function parse2(value) {
|
|
598
|
-
const input = String(value || "").trim();
|
|
599
|
-
return input ? input.split(/[ \t\n\r\f]+/g) : [];
|
|
600
|
-
}
|
|
601
|
-
function stringify2(values) {
|
|
602
|
-
return values.join(" ").trim();
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
export { parse, stringify, parse2 as parse1, stringify2 as stringify1, whitespace, ok, stringifyPosition, VFileMessage, VFile, validateComponentSlots };
|
|
606
|
-
|
|
607
|
-
//# debugId=19D84D704EAF18FF64756E2164756E21
|
|
608
|
-
//# sourceMappingURL=studio-bw5dz6km.js.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Directive,
|
|
3
|
-
PartType,
|
|
4
|
-
directive,
|
|
5
|
-
isSingleExpression,
|
|
6
|
-
setCommittedValue
|
|
7
|
-
} from "./studio-kvfx9z2c.js";
|
|
8
|
-
import {
|
|
9
|
-
noChange,
|
|
10
|
-
nothing
|
|
11
|
-
} from "./studio-5x5774ak.js";
|
|
12
|
-
|
|
13
|
-
// ../../node_modules/lit-html/development/directives/live.js
|
|
14
|
-
class LiveDirective extends Directive {
|
|
15
|
-
constructor(partInfo) {
|
|
16
|
-
super(partInfo);
|
|
17
|
-
if (!(partInfo.type === PartType.PROPERTY || partInfo.type === PartType.ATTRIBUTE || partInfo.type === PartType.BOOLEAN_ATTRIBUTE)) {
|
|
18
|
-
throw new Error("The `live` directive is not allowed on child or event bindings");
|
|
19
|
-
}
|
|
20
|
-
if (!isSingleExpression(partInfo)) {
|
|
21
|
-
throw new Error("`live` bindings can only contain a single expression");
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render(value) {
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
update(part, [value]) {
|
|
28
|
-
if (value === noChange || value === nothing) {
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
const element = part.element;
|
|
32
|
-
const name = part.name;
|
|
33
|
-
if (part.type === PartType.PROPERTY) {
|
|
34
|
-
if (value === element[name]) {
|
|
35
|
-
return noChange;
|
|
36
|
-
}
|
|
37
|
-
} else if (part.type === PartType.BOOLEAN_ATTRIBUTE) {
|
|
38
|
-
if (!!value === element.hasAttribute(name)) {
|
|
39
|
-
return noChange;
|
|
40
|
-
}
|
|
41
|
-
} else if (part.type === PartType.ATTRIBUTE) {
|
|
42
|
-
if (element.getAttribute(name) === String(value)) {
|
|
43
|
-
return noChange;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
setCommittedValue(part);
|
|
47
|
-
return value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
var live = directive(LiveDirective);
|
|
51
|
-
|
|
52
|
-
export { live };
|
|
53
|
-
|
|
54
|
-
//# debugId=D34FC2E2E606E1C064756E2164756E21
|
|
55
|
-
//# sourceMappingURL=studio-c31yb4t6.js.map
|