@jxsuite/studio 4.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/dist/chunks/{2020-xp8vnwma.js → 2020-n6tfwnda.js} +2 -2
- package/dist/chunks/{Overlay.dev-723bv0df.js → Overlay.dev-etqjwyf9.js} +4 -4
- package/dist/chunks/cf-account-picker-en86v7x7.js +163 -0
- package/dist/chunks/{content-source-t88vb2dr.js → content-source-48xg86wj.js} +17 -17
- package/dist/chunks/{convert-to-repeater-dhw1nrz9.js → convert-to-repeater-43tfn7cs.js} +24 -24
- package/dist/chunks/{entry-commands-6z6bhxg0.js → entry-commands-e63f1xc0.js} +20 -20
- package/dist/chunks/{extension-sections-3ydgjbdy.js → extension-sections-txv08xxg.js} +23 -23
- package/dist/chunks/{file-ops-rskmhxyq.js → file-ops-wbh4hhsx.js} +16 -16
- package/dist/chunks/{files-0cratsr0.js → files-3kfkwhk4.js} +25 -24
- package/dist/chunks/{focus-trap.esm-ggawf1hy.js → focus-trap.esm-9t2drp0g.js} +6 -5
- package/dist/chunks/{format-host-tgcmfs4p.js → format-host-w16q81tf.js} +2 -2
- package/dist/chunks/fs-events-hrrg328g.js +1 -1
- package/dist/chunks/{git-panel-0yywyk76.js → git-panel-532whr1y.js} +16 -15
- package/dist/chunks/{index-nj44jpzj.js → index-wcnt3r9g.js} +2 -2
- package/dist/chunks/{jx-validate-8q2g05x1.js → jx-validate-8er6gbxy.js} +3 -3
- package/dist/chunks/{layers-panel-z3tqe5cd.js → layers-panel-07hm7g5j.js} +19 -19
- package/dist/chunks/{monaco-setup-rws7k4br.js → monaco-setup-vx9bhp1d.js} +2 -2
- package/dist/chunks/{publish-panel-54jvhskq.js → publish-panel-v9st96ja.js} +11 -10
- package/dist/chunks/{quick-search-cgfmjwq5.js → quick-search-zccjp6gv.js} +26 -25
- package/dist/chunks/{right-panel-cqp8bc4v.js → right-panel-vm3b6kwy.js} +17 -17
- package/dist/chunks/{sp-overlay.dev-yztmtrs1.js → sp-overlay.dev-qgvhnxf4.js} +5 -5
- package/dist/chunks/{sp-tooltip.dev-xcvpnqr0.js → sp-tooltip.dev-4sastdnw.js} +3 -3
- package/dist/chunks/{studio-txwkm6p9.js → studio-0bq6eh7v.js} +2 -2
- package/dist/chunks/studio-1ngbejft.js +181 -0
- package/dist/chunks/{studio-gv8vvshc.js → studio-1wagb550.js} +3 -3
- package/dist/chunks/{studio-kjjsjak4.js → studio-2b946z26.js} +58 -57
- package/dist/chunks/{studio-4pqqxbrt.js → studio-3bqpr0zh.js} +16 -16
- package/dist/chunks/{studio-v38hmvx1.js → studio-4b5z1x43.js} +42 -8
- package/dist/chunks/{studio-9c4k4vhv.js → studio-4n2b5gzb.js} +4 -4
- package/dist/chunks/{studio-p8j86wag.js → studio-4r1pv6zf.js} +2 -2
- package/dist/chunks/{studio-mmv72a27.js → studio-5fx3g9jg.js} +29 -48
- package/dist/chunks/{studio-5rywrkxz.js → studio-5myknm0a.js} +42 -42
- package/dist/chunks/{studio-sf7zjgv1.js → studio-6yw4y3my.js} +3 -3
- package/dist/chunks/{studio-pdfjntbk.js → studio-950k0dx6.js} +35 -35
- package/dist/chunks/{studio-eenfkt4e.js → studio-ahn3pdgx.js} +5 -5
- package/dist/chunks/{studio-eesa1myv.js → studio-b55y6ewx.js} +9 -9
- package/dist/chunks/{studio-cb12yz9w.js → studio-cmb03bg5.js} +99 -1264
- package/dist/chunks/studio-dm19q43r.js +195 -0
- package/dist/chunks/{studio-ahjfdy6e.js → studio-ef49pnzx.js} +6 -6
- package/dist/chunks/{studio-wx5609xd.js → studio-ew0djmhg.js} +10 -10
- package/dist/chunks/{studio-9r6j5ev1.js → studio-f3wqjtk5.js} +4 -3
- package/dist/chunks/{studio-8swrjbny.js → studio-fbf92ckf.js} +14 -14
- package/dist/chunks/{studio-4q0wznzf.js → studio-gcye7qka.js} +442 -126
- package/dist/chunks/{studio-ex8zyp98.js → studio-gfgb8pe6.js} +23 -184
- package/dist/chunks/{studio-r1r7afxx.js → studio-jc994dnr.js} +24 -24
- package/dist/chunks/{studio-yxrkyv8a.js → studio-jkftxyvz.js} +52 -3416
- package/dist/chunks/{studio-hbtp0eh1.js → studio-msd847zn.js} +13 -13
- package/dist/chunks/{studio-kyk2v92a.js → studio-mtfnaqs9.js} +14 -14
- package/dist/chunks/{studio-vadzgkrz.js → studio-n6j9t10q.js} +2 -2
- package/dist/chunks/{studio-68n67094.js → studio-q9jd1a60.js} +4 -4
- package/dist/chunks/studio-qcy05dp8.js +1743 -0
- package/dist/chunks/{studio-htsf0w6m.js → studio-qjy2z9bv.js} +12 -30
- package/dist/chunks/{studio-2zkz8evn.js → studio-trxrabqf.js} +12 -12
- package/dist/chunks/{studio-5q69gfag.js → studio-x4qkdat5.js} +12 -11
- package/dist/chunks/studio-x813zp48.js +195 -0
- package/dist/chunks/{studio-1hbqnt19.js → studio-zqazsct2.js} +29 -29
- package/dist/chunks/{workspace-xpres40v.js → workspace-fjx52ryv.js} +4 -4
- package/dist/iframe-entry.js +34 -33
- package/dist/manifest.json +7 -0
- package/dist/studio.js +534 -546
- package/favicon.ico +0 -0
- package/index.html +1 -0
- package/package.json +15 -14
- package/src/about/about-modal.ts +4 -3
- package/src/files/files.ts +6 -4
- package/src/files/media-paths.ts +13 -42
- package/src/files/media-usage.ts +41 -131
- package/src/hosting/document.ts +2 -0
- package/src/hosting/layout.ts +8 -0
- package/src/new-project/import-tab.ts +37 -15
- package/src/new-project/location-fields.ts +8 -5
- package/src/panels/ai-chat/composer.ts +10 -0
- package/src/platforms/cloud.ts +241 -70
- package/src/publish/publish-panel.ts +62 -2
- package/src/services/ai-import-tools.ts +50 -12
- package/src/services/ai-models.ts +108 -1
- package/src/services/context-manager.ts +12 -1
- package/src/services/tool-executor.ts +11 -0
- package/src/settings/preferences-accounts.ts +193 -12
- package/src/settings/preferences-dialog.ts +75 -18
- package/src/types.ts +27 -3
- package/src/ui/ai-managed-connect.ts +62 -13
- package/src/ui/ai-model-picker.ts +29 -2
- package/src/ui/cf-account-picker.ts +200 -0
- package/styles/shell.css +36 -0
- package/dist/chunks/studio-bw5dz6km.js +0 -608
|
@@ -6,27 +6,27 @@ import {
|
|
|
6
6
|
loopbackAssetSrc,
|
|
7
7
|
normalizeProjectPath,
|
|
8
8
|
projectLocales
|
|
9
|
-
} from "./studio-
|
|
10
|
-
import {
|
|
11
|
-
errorMessage
|
|
12
|
-
} from "./studio-9n4mrmnb.js";
|
|
9
|
+
} from "./studio-2b946z26.js";
|
|
13
10
|
import {
|
|
14
11
|
activeTab
|
|
15
|
-
} from "./studio-
|
|
16
|
-
import {
|
|
17
|
-
notify
|
|
18
|
-
} from "./studio-xrapxwwc.js";
|
|
12
|
+
} from "./studio-trxrabqf.js";
|
|
19
13
|
import {
|
|
20
14
|
getNodeAtPath,
|
|
21
15
|
projectState
|
|
22
16
|
} from "./studio-p4ngc046.js";
|
|
17
|
+
import {
|
|
18
|
+
errorMessage
|
|
19
|
+
} from "./studio-9n4mrmnb.js";
|
|
20
|
+
import {
|
|
21
|
+
notify
|
|
22
|
+
} from "./studio-xrapxwwc.js";
|
|
23
23
|
import {
|
|
24
24
|
isJsonObject,
|
|
25
25
|
paramNames
|
|
26
26
|
} from "./studio-q7v10cg2.js";
|
|
27
27
|
import {
|
|
28
28
|
loadedMonaco
|
|
29
|
-
} from "./studio-
|
|
29
|
+
} from "./studio-ahn3pdgx.js";
|
|
30
30
|
import {
|
|
31
31
|
getPlatform,
|
|
32
32
|
hasPlatform
|
|
@@ -327,24 +327,6 @@ function mediaSiteUrl(path) {
|
|
|
327
327
|
const mount = mountOf(normalized);
|
|
328
328
|
return mount ? `/${mountedPath(normalized, mount)}` : `/${normalized}`;
|
|
329
329
|
}
|
|
330
|
-
function authoredRefTargets(path) {
|
|
331
|
-
const normalized = normalizeProjectPath(path);
|
|
332
|
-
if (normalized === "") {
|
|
333
|
-
return [];
|
|
334
|
-
}
|
|
335
|
-
const targets = [normalized];
|
|
336
|
-
if (normalized.startsWith(`${PUBLIC_DIR}/`)) {
|
|
337
|
-
targets.push(normalized.slice(PUBLIC_DIR.length + 1));
|
|
338
|
-
}
|
|
339
|
-
const mount = mountOf(normalized);
|
|
340
|
-
if (mount) {
|
|
341
|
-
const mounted = mountedPath(normalized, mount);
|
|
342
|
-
if (!targets.includes(mounted)) {
|
|
343
|
-
targets.push(mounted);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return targets;
|
|
347
|
-
}
|
|
348
330
|
function previewFileSrc(path) {
|
|
349
331
|
const normalized = normalizeProjectPath(path);
|
|
350
332
|
if (normalized === "") {
|
|
@@ -357,7 +339,7 @@ function previewFileSrc(path) {
|
|
|
357
339
|
return loopbackAssetSrc(mediaSiteUrl(normalized));
|
|
358
340
|
}
|
|
359
341
|
|
|
360
|
-
export { IMAGE_EXTENSIONS, MEDIA_EXTENSIONS, uploadAccept, extensionOf, isImage, isMediaFile, mediaKind, setMediaChangedHandler, uploadAssets, baseName, dirName, mediaSiteUrl,
|
|
342
|
+
export { IMAGE_EXTENSIONS, MEDIA_EXTENSIONS, uploadAccept, extensionOf, isImage, isMediaFile, mediaKind, setMediaChangedHandler, uploadAssets, baseName, dirName, mediaSiteUrl, previewFileSrc, codeService, locateDocument, pluginSchemaCache, fetchPluginSchema, setLintMarkers, getFunctionArgs };
|
|
361
343
|
|
|
362
|
-
//# debugId=
|
|
363
|
-
//# sourceMappingURL=studio-
|
|
344
|
+
//# debugId=2FA1FC61EEB22B4F64756E2164756E21
|
|
345
|
+
//# sourceMappingURL=studio-qjy2z9bv.js.map
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commitTabBuffers
|
|
3
3
|
} from "./studio-wcy8trfx.js";
|
|
4
|
-
import {
|
|
5
|
-
computed,
|
|
6
|
-
effect,
|
|
7
|
-
effectScope,
|
|
8
|
-
notify,
|
|
9
|
-
onScopeDispose,
|
|
10
|
-
reactive,
|
|
11
|
-
toRaw
|
|
12
|
-
} from "./studio-xrapxwwc.js";
|
|
13
4
|
import {
|
|
14
5
|
applyDocOpToDoc,
|
|
15
6
|
childArray,
|
|
@@ -24,6 +15,15 @@ import {
|
|
|
24
15
|
pathsEqual,
|
|
25
16
|
projectState
|
|
26
17
|
} from "./studio-p4ngc046.js";
|
|
18
|
+
import {
|
|
19
|
+
computed,
|
|
20
|
+
effect,
|
|
21
|
+
effectScope,
|
|
22
|
+
notify,
|
|
23
|
+
onScopeDispose,
|
|
24
|
+
reactive,
|
|
25
|
+
toRaw
|
|
26
|
+
} from "./studio-xrapxwwc.js";
|
|
27
27
|
import {
|
|
28
28
|
ensureNestedStyle,
|
|
29
29
|
getNestedStyle,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
defaultContentFormat,
|
|
34
34
|
formatByName,
|
|
35
35
|
formatForPath
|
|
36
|
-
} from "./studio-
|
|
36
|
+
} from "./studio-ahn3pdgx.js";
|
|
37
37
|
import {
|
|
38
38
|
getPlatform
|
|
39
39
|
} from "./studio-9ab8gqsm.js";
|
|
@@ -3159,5 +3159,5 @@ function runUnsplit() {
|
|
|
3159
3159
|
|
|
3160
3160
|
export { LANGUAGE_TAG_PATTERN, canonicalizeLocale, isWellFormedLocale, localeDirection, localeLabel, resolveI18n, localeOfPath, servedLocaleOfPath, translationKeyOfPath, translationPathFor, EDITOR_KIND_LABELS, editorKindForMode, canvasViewForMode, inCanvas, hasSelection, hasElementSelection, emptyContext, makeContext, keyScopeStack, PROJECT_CONFIG_PATH, createTab, editorKindOf, editorKindsOf, modeForEditorKind, disposeTab, primarySelection, selectionAnchor, isSelected, cloneSelection, toggleSelected, rangeSelection, isSpliceablePath, structuralBatch, uniquePaths, unifyValues, setPatchConsumer, recordDocOp, transactDoc, transact, beginBatch, endBatch, isBatching, batchTab, setHistoryDelegate, canUndo, canRedo, undo, redo, mutateInsertNode, mutateRemoveNode, mutateDuplicateNode, mutateRemoveNodes, mutateDuplicateNodes, mutateWrapNode, mutateMoveNode, mutateUpdateProperty, mutateUpdateStyle, mutateUpdateAttribute, mutateUpdateMediaStyle, mutateUpdateNestedStyle, mutateUpdateMediaNestedStyle, mutateUpdateNestedStylePath, mutateUpdateMediaNestedStylePath, mutateReplaceStyle, mutateAddDef, mutateRemoveDef, mutateUpdateDef, mutateRenameDef, mutateUpdateProp, mutateAddSwitchCase, mutateRemoveSwitchCase, mutateRenameSwitchCase, mutateUpdateFrontmatter, collabState, isCollabPath, stringArg, optionalStringArg, boundedNumberArg, booleanArg, enumArg, pathArg, nullablePathArg, pathListArg, argsSchema, enumProperty, derivedEnumProperty, numberProperty, booleanProperty, pathProperty, pathListProperty, stringProperty, LOCALE_PLACEHOLDER, collectionForDirectory, collectionForFile, camelToKebab, camelToLabel, toCamelCase, kebabToLabel, propLabel, attrLabel, abbreviateValue, isMediaFormat, inferInputType, findContentTypeSchema, friendlyNameToVar, varDisplayName, parseCemType, jsonClone, configureCollabSerializer, configureCollabParser, configureCollabNotifier, collabSourceContext, collabReadOnly, collabSave, flushAllCollab, setCollabEnabled, isCollabEnabled, PRIMARY_PANE, SECONDARY_PANE, MAX_PANES, workspace, activeTab, activePane, paneById, paneOfTab, focusPane, isPaneFocused, focusOtherPane, splitRight, sidePane, receivingPane, closePane, detachTab, insertIntoPane, setWorkspaceProject, isTabActive, tabIsLive, openTab, promoteTab, promoteDirtyPreviewTabs, setTabPinned, moveTab, closeTab, closeAllTabs, takeClosedTabPath, cycleTab, endTabCycle, replaceAllTabs, activateTab, moveTabToPane, renameTab, registerTabCommands, tabCommands, paneCommands };
|
|
3161
3161
|
|
|
3162
|
-
//# debugId=
|
|
3163
|
-
//# sourceMappingURL=studio-
|
|
3162
|
+
//# debugId=B99EA2BC350882E464756E2164756E21
|
|
3163
|
+
//# sourceMappingURL=studio-trxrabqf.js.map
|
|
@@ -5,19 +5,22 @@ import {
|
|
|
5
5
|
intlHelpersClause,
|
|
6
6
|
rectOf,
|
|
7
7
|
renderEmptyState
|
|
8
|
-
} from "./studio-
|
|
9
|
-
import {
|
|
10
|
-
getLayerSlot
|
|
11
|
-
} from "./studio-t7qb9db8.js";
|
|
8
|
+
} from "./studio-2b946z26.js";
|
|
12
9
|
import {
|
|
13
10
|
LANGUAGE_TAG_PATTERN,
|
|
14
11
|
activeTab
|
|
15
|
-
} from "./studio-
|
|
12
|
+
} from "./studio-trxrabqf.js";
|
|
16
13
|
import {
|
|
17
14
|
classMap,
|
|
18
15
|
ifDefined,
|
|
19
16
|
styleMap
|
|
20
17
|
} from "./studio-m3hwn7y1.js";
|
|
18
|
+
import {
|
|
19
|
+
cloneValue
|
|
20
|
+
} from "./studio-5ehhackm.js";
|
|
21
|
+
import {
|
|
22
|
+
getLayerSlot
|
|
23
|
+
} from "./studio-t7qb9db8.js";
|
|
21
24
|
import {
|
|
22
25
|
live,
|
|
23
26
|
ref
|
|
@@ -27,9 +30,6 @@ import {
|
|
|
27
30
|
nothing,
|
|
28
31
|
render
|
|
29
32
|
} from "./studio-kryvsw6j.js";
|
|
30
|
-
import {
|
|
31
|
-
cloneValue
|
|
32
|
-
} from "./studio-5ehhackm.js";
|
|
33
33
|
import {
|
|
34
34
|
isFunctionDef,
|
|
35
35
|
isJsonObject,
|
|
@@ -2087,6 +2087,7 @@ var CLASS_METHOD_ROLES = [
|
|
|
2087
2087
|
"accessor",
|
|
2088
2088
|
"parse",
|
|
2089
2089
|
"serialize",
|
|
2090
|
+
"rewrite",
|
|
2090
2091
|
"discover",
|
|
2091
2092
|
"load",
|
|
2092
2093
|
"projectData",
|
|
@@ -2102,7 +2103,7 @@ var CLASS_METHOD_ROLES = [
|
|
|
2102
2103
|
"testConnection"
|
|
2103
2104
|
];
|
|
2104
2105
|
var classMethodDefSchema = {
|
|
2105
|
-
description: "A class method or accessor definition. Capability roles (parse, serialize, discover, load) " + "mark static methods that hosts (compiler, server, studio) invoke for format dispatch.",
|
|
2106
|
+
description: "A class method or accessor definition. Capability roles (parse, serialize, rewrite, discover, load) " + "mark static methods that hosts (compiler, server, studio) invoke for format dispatch.",
|
|
2106
2107
|
properties: {
|
|
2107
2108
|
$prototype: { const: "Function", type: "string" },
|
|
2108
2109
|
access: { enum: ["public", "private", "protected"], type: "string" },
|
|
@@ -4232,5 +4233,5 @@ function renderForm(schema, value, opts) {
|
|
|
4232
4233
|
|
|
4233
4234
|
export { renderProvenanceChip, countProvenance, renderProvenanceDots, renderFieldRow, renderKvRow, renderStaticKvRow, chipSummary, renderFormulaChips, applyCatalogPick, globalEntries, namedFormulaEntries, formulaCatalog, openFormulaPalette, REDIRECT_STATUSES, VALUE_SOURCE_LABELS, slotMode, capsForPosition, resolveContextPointer, isActionExpression, expressionHint, renderOperandEditor, renderExpressionEditor, switchSlotMode, renderDynamicSlot, registerFormControl, getFormControl, referenceTarget, NULL_FORM_CONTEXT, renderForm };
|
|
4234
4235
|
|
|
4235
|
-
//# debugId=
|
|
4236
|
-
//# sourceMappingURL=studio-
|
|
4236
|
+
//# debugId=DDC68693A8D15CAC64756E2164756E21
|
|
4237
|
+
//# sourceMappingURL=studio-x4qkdat5.js.map
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clearAiProvider,
|
|
3
|
+
getBaseUrl,
|
|
4
|
+
hasOpenAiKey,
|
|
5
|
+
preferredModel,
|
|
6
|
+
resetModelCache
|
|
7
|
+
} from "./studio-dm19q43r.js";
|
|
8
|
+
import {
|
|
9
|
+
clearCfConnection,
|
|
10
|
+
getCfAccountId,
|
|
11
|
+
getCfToken
|
|
12
|
+
} from "./studio-kyh9avvv.js";
|
|
13
|
+
import {
|
|
14
|
+
clearGithubToken,
|
|
15
|
+
githubTokenLocation,
|
|
16
|
+
githubTokenStored
|
|
17
|
+
} from "./studio-1ngbejft.js";
|
|
18
|
+
import {
|
|
19
|
+
getPlatform,
|
|
20
|
+
hasPlatform
|
|
21
|
+
} from "./studio-9ab8gqsm.js";
|
|
22
|
+
import {
|
|
23
|
+
__require
|
|
24
|
+
} from "./studio-a0tswy0w.js";
|
|
25
|
+
|
|
26
|
+
// src/settings/preferences-accounts.ts
|
|
27
|
+
var _cfState = "checking";
|
|
28
|
+
var _cfInFlight = null;
|
|
29
|
+
function platformBrokersCf() {
|
|
30
|
+
return hasPlatform() && Boolean(getPlatform().cfConnect);
|
|
31
|
+
}
|
|
32
|
+
async function refreshCfConnection() {
|
|
33
|
+
if (!platformBrokersCf()) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
_cfInFlight ??= (async () => {
|
|
37
|
+
try {
|
|
38
|
+
_cfState = await getPlatform().cfConnection?.() ?? null;
|
|
39
|
+
} catch {
|
|
40
|
+
_cfState = null;
|
|
41
|
+
}
|
|
42
|
+
_cfInFlight = null;
|
|
43
|
+
notifyCredentialsChanged();
|
|
44
|
+
})();
|
|
45
|
+
await _cfInFlight;
|
|
46
|
+
}
|
|
47
|
+
function ensureCfConnection() {
|
|
48
|
+
if (platformBrokersCf() && _cfState === "checking" && !_cfInFlight) {
|
|
49
|
+
refreshCfConnection();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function resetCfConnectionCache() {
|
|
53
|
+
_cfState = "checking";
|
|
54
|
+
_cfInFlight = null;
|
|
55
|
+
}
|
|
56
|
+
async function hostedConnect() {
|
|
57
|
+
const outcome = await getPlatform().cfConnect?.();
|
|
58
|
+
if (outcome?.status === "connected" && !outcome.connection.accountId) {
|
|
59
|
+
const { openCfAccountPicker } = await import("./cf-account-picker-en86v7x7.js");
|
|
60
|
+
await openCfAccountPicker();
|
|
61
|
+
}
|
|
62
|
+
resetModelCache();
|
|
63
|
+
await refreshCfConnection();
|
|
64
|
+
}
|
|
65
|
+
function brokeredCloudflareRecord() {
|
|
66
|
+
const disconnect = {
|
|
67
|
+
id: "disconnect",
|
|
68
|
+
label: "Disconnect",
|
|
69
|
+
run: async () => {
|
|
70
|
+
await getPlatform().cfDisconnect?.();
|
|
71
|
+
resetModelCache();
|
|
72
|
+
await refreshCfConnection();
|
|
73
|
+
},
|
|
74
|
+
variant: "negative"
|
|
75
|
+
};
|
|
76
|
+
const connect = (label) => ({
|
|
77
|
+
id: label === "Connect" ? "connect" : "reconnect",
|
|
78
|
+
label,
|
|
79
|
+
run: hostedConnect,
|
|
80
|
+
variant: "accent"
|
|
81
|
+
});
|
|
82
|
+
const base = { id: "cloudflare", label: "Cloudflare", revoke: () => {} };
|
|
83
|
+
if (_cfState === "checking") {
|
|
84
|
+
return { ...base, actions: [], connected: false, detail: "Checking your connection…" };
|
|
85
|
+
}
|
|
86
|
+
if (!_cfState?.connected) {
|
|
87
|
+
return {
|
|
88
|
+
...base,
|
|
89
|
+
actions: [connect("Connect")],
|
|
90
|
+
connected: false,
|
|
91
|
+
detail: "Not connected. Connecting publishes this site and runs the assistant on Workers AI."
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const revoke = () => {
|
|
95
|
+
disconnect.run();
|
|
96
|
+
};
|
|
97
|
+
if (_cfState.needsReconnect) {
|
|
98
|
+
return {
|
|
99
|
+
...base,
|
|
100
|
+
actions: [connect("Reconnect"), disconnect],
|
|
101
|
+
connected: true,
|
|
102
|
+
detail: "Connection expired. Reconnect to keep publishing and the assistant working.",
|
|
103
|
+
revoke
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (_cfState.needsAccount || !_cfState.accountId) {
|
|
107
|
+
return {
|
|
108
|
+
...base,
|
|
109
|
+
actions: [
|
|
110
|
+
{
|
|
111
|
+
id: "choose-account",
|
|
112
|
+
label: "Choose account",
|
|
113
|
+
run: async () => {
|
|
114
|
+
const { openCfAccountPicker } = await import("./cf-account-picker-en86v7x7.js");
|
|
115
|
+
if (await openCfAccountPicker()) {
|
|
116
|
+
resetModelCache();
|
|
117
|
+
await refreshCfConnection();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
variant: "accent"
|
|
121
|
+
},
|
|
122
|
+
disconnect
|
|
123
|
+
],
|
|
124
|
+
connected: true,
|
|
125
|
+
detail: "Connected, but no account is chosen yet — publishing and the assistant need one.",
|
|
126
|
+
revoke
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
...base,
|
|
131
|
+
actions: [disconnect],
|
|
132
|
+
connected: true,
|
|
133
|
+
detail: `Connected — ${_cfState.accountName ?? _cfState.accountId}.`,
|
|
134
|
+
revoke
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function localCloudflareRecord() {
|
|
138
|
+
const cfToken = getCfToken();
|
|
139
|
+
const cfAccount = getCfAccountId();
|
|
140
|
+
return {
|
|
141
|
+
connected: Boolean(cfToken),
|
|
142
|
+
detail: cfToken ? `Connected${cfAccount ? ` — account ${cfAccount}` : ""}.` : "Not connected. Publishing will ask when it needs it.",
|
|
143
|
+
id: "cloudflare",
|
|
144
|
+
label: "Cloudflare",
|
|
145
|
+
revoke: clearCfConnection
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function listAccounts() {
|
|
149
|
+
const githubToken = githubTokenStored();
|
|
150
|
+
const model = preferredModel();
|
|
151
|
+
const endpoint = getBaseUrl();
|
|
152
|
+
return [
|
|
153
|
+
{
|
|
154
|
+
id: "github",
|
|
155
|
+
label: "GitHub",
|
|
156
|
+
detail: githubToken ? githubTokenLocation() === "desktop" ? "Signed in — the token is in this app's config folder, readable only by you." : "Signed in — a device-flow token is stored in this browser." : "Not signed in. Cloning and pushing will ask when they need it.",
|
|
157
|
+
connected: Boolean(githubToken),
|
|
158
|
+
revoke: clearGithubToken
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "ai",
|
|
162
|
+
label: "AI provider",
|
|
163
|
+
detail: hasOpenAiKey() ? `Key stored. Model ${model}${endpoint ? ` via ${endpoint}` : ""}.` : "No key stored. The Assistant section is where one is entered.",
|
|
164
|
+
connected: hasOpenAiKey(),
|
|
165
|
+
revoke: clearAiProvider
|
|
166
|
+
},
|
|
167
|
+
platformBrokersCf() ? brokeredCloudflareRecord() : localCloudflareRecord()
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
function revokeAccount(id) {
|
|
171
|
+
const account = listAccounts().find((candidate) => candidate.id === id);
|
|
172
|
+
if (!account) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
account.revoke();
|
|
176
|
+
notifyCredentialsChanged();
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
var _listeners = new Set;
|
|
180
|
+
function onCredentialsChanged(listener) {
|
|
181
|
+
_listeners.add(listener);
|
|
182
|
+
return () => {
|
|
183
|
+
_listeners.delete(listener);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function notifyCredentialsChanged() {
|
|
187
|
+
for (const listener of _listeners) {
|
|
188
|
+
listener();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { platformBrokersCf, refreshCfConnection, ensureCfConnection, resetCfConnectionCache, listAccounts, revokeAccount, onCredentialsChanged, notifyCredentialsChanged };
|
|
193
|
+
|
|
194
|
+
//# debugId=ECD354251070A96664756E2164756E21
|
|
195
|
+
//# sourceMappingURL=studio-x813zp48.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
INSPECTOR_TABS,
|
|
3
3
|
selectStylebookTag
|
|
4
|
-
} from "./studio-
|
|
4
|
+
} from "./studio-fbf92ckf.js";
|
|
5
5
|
import {
|
|
6
6
|
allConditionsPass,
|
|
7
7
|
autoOpenSections,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
setInspectorSection,
|
|
29
29
|
spTextField,
|
|
30
30
|
widgetForType
|
|
31
|
-
} from "./studio-
|
|
31
|
+
} from "./studio-950k0dx6.js";
|
|
32
32
|
import {
|
|
33
33
|
createPanelScheduler
|
|
34
34
|
} from "./studio-8jpzqk5s.js";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
renderStaticKvRow,
|
|
45
45
|
slotMode,
|
|
46
46
|
switchSlotMode
|
|
47
|
-
} from "./studio-
|
|
47
|
+
} from "./studio-x4qkdat5.js";
|
|
48
48
|
import {
|
|
49
49
|
loadUsages,
|
|
50
50
|
peekUsages,
|
|
@@ -56,21 +56,14 @@ import {
|
|
|
56
56
|
openPageAction,
|
|
57
57
|
renderEmptyState,
|
|
58
58
|
staleSelectionMessage
|
|
59
|
-
} from "./studio-
|
|
59
|
+
} from "./studio-2b946z26.js";
|
|
60
60
|
import {
|
|
61
61
|
DEFAULT_INSPECTOR_TAB,
|
|
62
62
|
getEffectiveMedia,
|
|
63
63
|
getEffectiveStyle,
|
|
64
64
|
isInspectorTabId,
|
|
65
65
|
shell
|
|
66
|
-
} from "./studio-
|
|
67
|
-
import {
|
|
68
|
-
REGION_ATTR,
|
|
69
|
-
activeRegistry,
|
|
70
|
-
inspectorStatementsRegion,
|
|
71
|
-
inspectorTabRegion,
|
|
72
|
-
showPromptDialog
|
|
73
|
-
} from "./studio-t7qb9db8.js";
|
|
66
|
+
} from "./studio-msd847zn.js";
|
|
74
67
|
import {
|
|
75
68
|
activeTab,
|
|
76
69
|
inferInputType,
|
|
@@ -90,25 +83,11 @@ import {
|
|
|
90
83
|
stringArg,
|
|
91
84
|
transactDoc,
|
|
92
85
|
unifyValues
|
|
93
|
-
} from "./studio-
|
|
94
|
-
import {
|
|
95
|
-
effect,
|
|
96
|
-
effectScope,
|
|
97
|
-
reactive
|
|
98
|
-
} from "./studio-xrapxwwc.js";
|
|
86
|
+
} from "./studio-trxrabqf.js";
|
|
99
87
|
import {
|
|
100
88
|
classMap,
|
|
101
89
|
ifDefined
|
|
102
90
|
} from "./studio-m3hwn7y1.js";
|
|
103
|
-
import {
|
|
104
|
-
live,
|
|
105
|
-
ref
|
|
106
|
-
} from "./studio-4rzyrtjz.js";
|
|
107
|
-
import {
|
|
108
|
-
html,
|
|
109
|
-
nothing,
|
|
110
|
-
render
|
|
111
|
-
} from "./studio-kryvsw6j.js";
|
|
112
91
|
import {
|
|
113
92
|
COMMON_SELECTORS,
|
|
114
93
|
debouncedStyleCommit,
|
|
@@ -119,6 +98,27 @@ import {
|
|
|
119
98
|
rightPanel,
|
|
120
99
|
updateUi
|
|
121
100
|
} from "./studio-p4ngc046.js";
|
|
101
|
+
import {
|
|
102
|
+
REGION_ATTR,
|
|
103
|
+
activeRegistry,
|
|
104
|
+
inspectorStatementsRegion,
|
|
105
|
+
inspectorTabRegion,
|
|
106
|
+
showPromptDialog
|
|
107
|
+
} from "./studio-t7qb9db8.js";
|
|
108
|
+
import {
|
|
109
|
+
effect,
|
|
110
|
+
effectScope,
|
|
111
|
+
reactive
|
|
112
|
+
} from "./studio-xrapxwwc.js";
|
|
113
|
+
import {
|
|
114
|
+
live,
|
|
115
|
+
ref
|
|
116
|
+
} from "./studio-4rzyrtjz.js";
|
|
117
|
+
import {
|
|
118
|
+
html,
|
|
119
|
+
nothing,
|
|
120
|
+
render
|
|
121
|
+
} from "./studio-kryvsw6j.js";
|
|
122
122
|
import {
|
|
123
123
|
getEventBinding,
|
|
124
124
|
getNestedStyle,
|
|
@@ -1819,5 +1819,5 @@ function _doRender() {
|
|
|
1819
1819
|
|
|
1820
1820
|
export { registerStyleCommands, mount, unmount, render2 as render, inspectorTab, setInspectorTab };
|
|
1821
1821
|
|
|
1822
|
-
//# debugId=
|
|
1823
|
-
//# sourceMappingURL=studio-
|
|
1822
|
+
//# debugId=F77FC250B78B06BA64756E2164756E21
|
|
1823
|
+
//# sourceMappingURL=studio-zqazsct2.js.map
|
|
@@ -36,13 +36,13 @@ import {
|
|
|
36
36
|
tabIsLive,
|
|
37
37
|
takeClosedTabPath,
|
|
38
38
|
workspace
|
|
39
|
-
} from "./studio-
|
|
39
|
+
} from "./studio-trxrabqf.js";
|
|
40
40
|
import"./studio-wcy8trfx.js";
|
|
41
|
-
import"./studio-xrapxwwc.js";
|
|
42
41
|
import"./studio-5ehhackm.js";
|
|
43
42
|
import"./studio-p4ngc046.js";
|
|
43
|
+
import"./studio-xrapxwwc.js";
|
|
44
44
|
import"./studio-q7v10cg2.js";
|
|
45
|
-
import"./studio-
|
|
45
|
+
import"./studio-ahn3pdgx.js";
|
|
46
46
|
import"./studio-9ab8gqsm.js";
|
|
47
47
|
import"./studio-a0tswy0w.js";
|
|
48
48
|
export {
|
|
@@ -86,4 +86,4 @@ export {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
//# debugId=E6EEFAD4E898180964756E2164756E21
|
|
89
|
-
//# sourceMappingURL=workspace-
|
|
89
|
+
//# sourceMappingURL=workspace-fjx52ryv.js.map
|
package/dist/iframe-entry.js
CHANGED
|
@@ -1499,6 +1499,39 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1499
1499
|
return cRef;
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
|
+
// ../runtime/src/css.ts
|
|
1503
|
+
function camelToKebab(s) {
|
|
1504
|
+
return s.replaceAll(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
1505
|
+
}
|
|
1506
|
+
var MEDIA_TYPES = new Set(["all", "print", "screen", "speech"]);
|
|
1507
|
+
function resolveAtQuery(atKey, mediaQueries) {
|
|
1508
|
+
if (atKey.startsWith("@--")) {
|
|
1509
|
+
return mediaQueries[atKey.slice(1)] ?? atKey.slice(1);
|
|
1510
|
+
}
|
|
1511
|
+
if (atKey.startsWith("@(")) {
|
|
1512
|
+
const inner = atKey.slice(2, -1).trim();
|
|
1513
|
+
return MEDIA_TYPES.has(inner.toLowerCase()) ? inner : atKey.slice(1);
|
|
1514
|
+
}
|
|
1515
|
+
return null;
|
|
1516
|
+
}
|
|
1517
|
+
var COLOR_SCHEME_ATTR = "data-color-scheme";
|
|
1518
|
+
function pureSchemeOf(query) {
|
|
1519
|
+
const m = /^\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)$/.exec(query.trim());
|
|
1520
|
+
return m?.[1] ?? null;
|
|
1521
|
+
}
|
|
1522
|
+
function schemeSelectors(selector, scheme) {
|
|
1523
|
+
if (selector === ":root" || selector === "html") {
|
|
1524
|
+
return {
|
|
1525
|
+
auto: `${selector}:where(:not([${COLOR_SCHEME_ATTR}]))`,
|
|
1526
|
+
forced: `${selector}:where([${COLOR_SCHEME_ATTR}="${scheme}"])`
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
return {
|
|
1530
|
+
auto: `:where(:root:not([${COLOR_SCHEME_ATTR}])) ${selector}`,
|
|
1531
|
+
forced: `:where(:root[${COLOR_SCHEME_ATTR}="${scheme}"]) ${selector}`
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1502
1535
|
// ../schema/src/intl.ts
|
|
1503
1536
|
var DEFAULT_FORMAT_LOCALE = "en-US";
|
|
1504
1537
|
var DEFAULT_TIME_ZONE = "UTC";
|
|
@@ -2372,7 +2405,6 @@ function serializeCookie(name, value, options) {
|
|
|
2372
2405
|
}
|
|
2373
2406
|
return parts.join("; ");
|
|
2374
2407
|
}
|
|
2375
|
-
|
|
2376
2408
|
// ../runtime/src/runtime.ts
|
|
2377
2409
|
var _resolveCache = new Map;
|
|
2378
2410
|
async function resolve(source) {
|
|
@@ -3807,40 +3839,9 @@ function mergeProps(def2, parentState) {
|
|
|
3807
3839
|
}
|
|
3808
3840
|
return child;
|
|
3809
3841
|
}
|
|
3810
|
-
function camelToKebab(s) {
|
|
3811
|
-
return s.replaceAll(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
3812
|
-
}
|
|
3813
3842
|
function toCSSText(rules) {
|
|
3814
3843
|
return Object.entries(rules).filter(([k, v]) => !isNestedSelector(k) && (v === null || typeof v !== "object")).map(([p, v]) => `${camelToKebab(p)}: ${canvasStyleValue(String(v))}`).join("; ");
|
|
3815
3844
|
}
|
|
3816
|
-
var MEDIA_TYPES = new Set(["all", "print", "screen", "speech"]);
|
|
3817
|
-
function resolveAtQuery(atKey, mediaQueries) {
|
|
3818
|
-
if (atKey.startsWith("@--")) {
|
|
3819
|
-
return mediaQueries[atKey.slice(1)] ?? atKey.slice(1);
|
|
3820
|
-
}
|
|
3821
|
-
if (atKey.startsWith("@(")) {
|
|
3822
|
-
const inner = atKey.slice(2, -1).trim();
|
|
3823
|
-
return MEDIA_TYPES.has(inner.toLowerCase()) ? inner : atKey.slice(1);
|
|
3824
|
-
}
|
|
3825
|
-
return null;
|
|
3826
|
-
}
|
|
3827
|
-
var COLOR_SCHEME_ATTR = "data-color-scheme";
|
|
3828
|
-
function pureSchemeOf(query) {
|
|
3829
|
-
const m = /^\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)$/.exec(query.trim());
|
|
3830
|
-
return m?.[1] ?? null;
|
|
3831
|
-
}
|
|
3832
|
-
function schemeSelectors(selector, scheme) {
|
|
3833
|
-
if (selector === ":root" || selector === "html") {
|
|
3834
|
-
return {
|
|
3835
|
-
auto: `${selector}:where(:not([${COLOR_SCHEME_ATTR}]))`,
|
|
3836
|
-
forced: `${selector}:where([${COLOR_SCHEME_ATTR}="${scheme}"])`
|
|
3837
|
-
};
|
|
3838
|
-
}
|
|
3839
|
-
return {
|
|
3840
|
-
auto: `:where(:root:not([${COLOR_SCHEME_ATTR}])) ${selector}`,
|
|
3841
|
-
forced: `:where(:root[${COLOR_SCHEME_ATTR}="${scheme}"]) ${selector}`
|
|
3842
|
-
};
|
|
3843
|
-
}
|
|
3844
3845
|
var _rootMedia = {};
|
|
3845
3846
|
var _elementDefs = new Map;
|
|
3846
3847
|
function setRootMedia(map) {
|
|
@@ -8664,5 +8665,5 @@ export {
|
|
|
8664
8665
|
startCanvasIframe
|
|
8665
8666
|
};
|
|
8666
8667
|
|
|
8667
|
-
//# debugId=
|
|
8668
|
+
//# debugId=BF2F5E4A39B13F1864756E2164756E21
|
|
8668
8669
|
//# sourceMappingURL=iframe-entry.js.map
|
package/dist/manifest.json
CHANGED
|
@@ -14,6 +14,13 @@
|
|
|
14
14
|
"required": true,
|
|
15
15
|
"why": "the canvas iframe document. Without it every canvas frame 404s at boot."
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"dir": false,
|
|
19
|
+
"kind": "asset",
|
|
20
|
+
"path": "favicon.ico",
|
|
21
|
+
"required": true,
|
|
22
|
+
"why": "the shell document's <link rel=\"icon\">. A Chromium --app window (the NixOS desktop install) has no native title-bar icon of its own and falls back to the page's favicon, so without this the window chrome shows a generic icon even though the taskbar/dock entry is already branded via the .desktop file."
|
|
23
|
+
},
|
|
17
24
|
{
|
|
18
25
|
"dir": false,
|
|
19
26
|
"kind": "entry",
|