@popcraft/cli 0.17.0 → 0.18.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/popcraft.mjs +302 -70
- package/package.json +2 -2
package/dist/popcraft.mjs
CHANGED
|
@@ -1186,7 +1186,7 @@ function operations(spec = openapi) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
async function call(target2, method, path, opts = {}) {
|
|
1188
1188
|
const qs = new URLSearchParams(opts.query ?? {}).toString();
|
|
1189
|
-
const headers = { "user-agent": `popcraft-cli/${"0.
|
|
1189
|
+
const headers = { "user-agent": `popcraft-cli/${"0.18.0"}`, ...opts.headers };
|
|
1190
1190
|
if (target2.token) headers.authorization = `Bearer ${target2.token}`;
|
|
1191
1191
|
if (opts.contentType) headers["content-type"] = opts.contentType;
|
|
1192
1192
|
try {
|
|
@@ -8597,6 +8597,8 @@ var init_headless = __esm({
|
|
|
8597
8597
|
"publish.site",
|
|
8598
8598
|
"publish.setVersion",
|
|
8599
8599
|
"publish.status",
|
|
8600
|
+
"publish.listSites",
|
|
8601
|
+
"publish.deleteSite",
|
|
8600
8602
|
"integration.open"
|
|
8601
8603
|
]);
|
|
8602
8604
|
UNAVAILABLE = /* @__PURE__ */ new Set(["meta.manageTodos", "meta.askUser", "plugin.run"]);
|
|
@@ -32427,6 +32429,9 @@ var init_en2 = __esm({
|
|
|
32427
32429
|
"cloudFiles.rename": "Rename",
|
|
32428
32430
|
"cloudFiles.restore": "Restore",
|
|
32429
32431
|
"cloudFiles.sharedWithMe": "Shared with me",
|
|
32432
|
+
"cloudFiles.tabDesigns": "Designs",
|
|
32433
|
+
"cloudFiles.tabLibrary": "Library",
|
|
32434
|
+
"cloudFiles.tabMarket": "Market",
|
|
32430
32435
|
"cloudFiles.thisBuildHasNoCloud": "This build has no cloud account configured, so there are no files to show.",
|
|
32431
32436
|
"cloudFiles.today": "Today",
|
|
32432
32437
|
"cloudFiles.trash": "Trash",
|
|
@@ -33695,6 +33700,39 @@ var init_en2 = __esm({
|
|
|
33695
33700
|
"homePage.surfacePro": "Surface Pro",
|
|
33696
33701
|
"homePage.viewingVersionHistory": "Viewing version history",
|
|
33697
33702
|
"homePage.workspace": "Workspace",
|
|
33703
|
+
"homeTeam.browseMarketplace": "Browse the marketplace",
|
|
33704
|
+
"homeTeam.deleteSite": "Delete website",
|
|
33705
|
+
"homeTeam.deleteSiteConfirm": "Delete the website at {slug}? Every version is deleted and its address is freed. The file stays, and so does anything sent to GitHub or Vercel.",
|
|
33706
|
+
"homeTeam.fileInTrash": "File in trash",
|
|
33707
|
+
"homeTeam.inReview": "In review",
|
|
33708
|
+
"homeTeam.libraries": "Libraries",
|
|
33709
|
+
"homeTeam.libraryHint": "Publish a file's components, styles and variables as a library from Assets \u203A Libraries in the file.",
|
|
33710
|
+
"homeTeam.librarySummary": "Version {version} \xB7 {components, plural, one {# component} other {# components}} \xB7 {styles, plural, one {# style} other {# styles}} \xB7 {variables, plural, one {# variable} other {# variables}}",
|
|
33711
|
+
"homeTeam.marketHint": "Everything this team has published: its websites, plugins and theme packs, templates, brushes and shaders.",
|
|
33712
|
+
"homeTeam.noLibraries": "This team has no libraries yet.",
|
|
33713
|
+
"homeTeam.noPacks": "No brush or shader packs published yet.",
|
|
33714
|
+
"homeTeam.noPlugins": "No plugins or theme packs published yet.",
|
|
33715
|
+
"homeTeam.noSites": "No websites published yet. Publish one from a file's Publish button.",
|
|
33716
|
+
"homeTeam.noTemplates": "No team templates yet.",
|
|
33717
|
+
"homeTeam.offline": "Offline",
|
|
33718
|
+
"homeTeam.online": "Online \xB7 version {version}",
|
|
33719
|
+
"homeTeam.openFile": "Open file",
|
|
33720
|
+
"homeTeam.packs": "Brushes and shaders",
|
|
33721
|
+
"homeTeam.packSummary": "{items, plural, one {# item} other {# items}} \xB7 {installs, plural, one {# install} other {# installs}}",
|
|
33722
|
+
"homeTeam.plugins": "Plugins and theme packs",
|
|
33723
|
+
"homeTeam.pluginSummary": "{id} \xB7 version {version} \xB7 {installs, plural, one {# install} other {# installs}}",
|
|
33724
|
+
"homeTeam.public": "Public",
|
|
33725
|
+
"homeTeam.putOnline": "Put online",
|
|
33726
|
+
"homeTeam.rejected": "Rejected",
|
|
33727
|
+
"homeTeam.sites": "Websites",
|
|
33728
|
+
"homeTeam.sitesOfLimit": "{used} of {limit} on this plan",
|
|
33729
|
+
"homeTeam.sitesUnlimited": "{used, plural, one {# website} other {# websites}}",
|
|
33730
|
+
"homeTeam.takeOffline": "Take offline",
|
|
33731
|
+
"homeTeam.templates": "Templates",
|
|
33732
|
+
"homeTeam.templateSummary": "{installs, plural, one {Used once} other {Used # times}}",
|
|
33733
|
+
"homeTeam.themes": "{count, plural, one {# theme} other {# themes}}",
|
|
33734
|
+
"homeTeam.unlisted": "Unlisted",
|
|
33735
|
+
"homeTeam.viewListing": "View its marketplace listing",
|
|
33698
33736
|
"homeTemplates.browseAll": "Browse all templates",
|
|
33699
33737
|
"homeTemplates.couldNotLoad": "Templates couldn't load. Browse all templates to try again.",
|
|
33700
33738
|
"homeTemplates.loading": "Loading templates\u2026",
|
|
@@ -96927,8 +96965,8 @@ function clockOf(nodes, inst, elapsed, run4) {
|
|
|
96927
96965
|
if (!comp) return null;
|
|
96928
96966
|
if (run4?.scrub !== void 0) return { comp, ct: run4.scrub, live: !!run4.gliding || !!run4.from };
|
|
96929
96967
|
const m = playbackOf(nodes, inst, comp);
|
|
96930
|
-
const
|
|
96931
|
-
return { comp, ct: instanceTime(
|
|
96968
|
+
const started7 = startedAt(m, elapsed, run4);
|
|
96969
|
+
return { comp, ct: instanceTime(started7, m), live: playbackLive(started7, m) || !!run4?.from };
|
|
96932
96970
|
}
|
|
96933
96971
|
function poseInstance(w, vid, inst, elapsed, depth2, clock2 = clockOf(w.nodes, inst, elapsed, w.runtime.get(vid))) {
|
|
96934
96972
|
const { nodes } = w;
|
|
@@ -256020,6 +256058,21 @@ var init_api4 = __esm({
|
|
|
256020
256058
|
});
|
|
256021
256059
|
|
|
256022
256060
|
// lib/client/cloud/team.ts
|
|
256061
|
+
var team_exports = {};
|
|
256062
|
+
__export(team_exports, {
|
|
256063
|
+
TEAM_PROMPTED_KEY: () => TEAM_PROMPTED_KEY,
|
|
256064
|
+
activeHyperyTeamId: () => activeHyperyTeamId,
|
|
256065
|
+
activeTeamWorkspaceId: () => activeTeamWorkspaceId,
|
|
256066
|
+
markTeamPrompted: () => markTeamPrompted,
|
|
256067
|
+
openTeamPrompt: () => openTeamPrompt,
|
|
256068
|
+
planDialogScope: () => planDialogScope,
|
|
256069
|
+
planEntryAction: () => planEntryAction,
|
|
256070
|
+
refreshHyperyTeams: () => refreshHyperyTeams,
|
|
256071
|
+
selectHyperyTeam: () => selectHyperyTeam,
|
|
256072
|
+
startHyperyTeams: () => startHyperyTeams,
|
|
256073
|
+
useHyperyTeam: () => useHyperyTeam,
|
|
256074
|
+
useTeamPrompt: () => useTeamPrompt
|
|
256075
|
+
});
|
|
256023
256076
|
function load() {
|
|
256024
256077
|
try {
|
|
256025
256078
|
const raw = JSON.parse(localStorage.getItem(STORAGE_KEY2) ?? "null");
|
|
@@ -256028,6 +256081,36 @@ function load() {
|
|
|
256028
256081
|
}
|
|
256029
256082
|
return { teamId: "", teamName: "" };
|
|
256030
256083
|
}
|
|
256084
|
+
function selectHyperyTeam(teamId, teamName) {
|
|
256085
|
+
useHyperyTeam.setState({ teamId, teamName });
|
|
256086
|
+
try {
|
|
256087
|
+
localStorage.setItem(STORAGE_KEY2, JSON.stringify({ teamId, teamName }));
|
|
256088
|
+
} catch {
|
|
256089
|
+
}
|
|
256090
|
+
}
|
|
256091
|
+
async function refreshHyperyTeams(opts = {}) {
|
|
256092
|
+
if (!cloudUser()) {
|
|
256093
|
+
useHyperyTeam.setState({ teams: null, personalWorkspaceId: null });
|
|
256094
|
+
return;
|
|
256095
|
+
}
|
|
256096
|
+
useHyperyTeam.setState({ loading: true, error: null });
|
|
256097
|
+
try {
|
|
256098
|
+
if (opts.force) invalidateMe();
|
|
256099
|
+
if (opts.force) await cloudApi.signedIn();
|
|
256100
|
+
else void cloudApi.signedIn().catch(() => {
|
|
256101
|
+
});
|
|
256102
|
+
const me = await cloudApi.me();
|
|
256103
|
+
const teams = me.workspaces.filter((w) => !w.personal && w.hyperyTeamId && w.role !== "guest").map((w) => ({ teamId: w.hyperyTeamId, name: w.name, workspaceId: w.id, ...w.tier ? { tier: w.tier, pastDue: !!w.pastDue } : {} }));
|
|
256104
|
+
const personal = me.workspaces.find((w) => w.id === me.personalWorkspaceId);
|
|
256105
|
+
useHyperyTeam.setState({ teams, personalWorkspaceId: me.personalWorkspaceId, personalTier: personal?.tier ? { tier: personal.tier, pastDue: !!personal.pastDue } : null });
|
|
256106
|
+
const { teamId } = useHyperyTeam.getState();
|
|
256107
|
+
if (teamId && !teams.some((t3) => t3.teamId === teamId)) selectHyperyTeam("", "");
|
|
256108
|
+
} catch (e) {
|
|
256109
|
+
useHyperyTeam.setState({ error: e.message });
|
|
256110
|
+
} finally {
|
|
256111
|
+
useHyperyTeam.setState({ loading: false });
|
|
256112
|
+
}
|
|
256113
|
+
}
|
|
256031
256114
|
function activeHyperyTeamId() {
|
|
256032
256115
|
if (typeof window !== "undefined") {
|
|
256033
256116
|
const stored = load().teamId;
|
|
@@ -256040,7 +256123,103 @@ function activeTeamWorkspaceId() {
|
|
|
256040
256123
|
const { teamId, teams } = useHyperyTeam.getState();
|
|
256041
256124
|
return teamId ? teams?.find((t3) => t3.teamId === teamId)?.workspaceId : void 0;
|
|
256042
256125
|
}
|
|
256043
|
-
|
|
256126
|
+
function promptedFor() {
|
|
256127
|
+
try {
|
|
256128
|
+
return sessionStorage.getItem(PROMPTED_KEY);
|
|
256129
|
+
} catch {
|
|
256130
|
+
return null;
|
|
256131
|
+
}
|
|
256132
|
+
}
|
|
256133
|
+
function maybePromptForTeam() {
|
|
256134
|
+
if (!TEAM_PROMPT_ENABLED) return;
|
|
256135
|
+
const user2 = cloudUser();
|
|
256136
|
+
if (!user2) return;
|
|
256137
|
+
if (promptedFor() === user2.id) return;
|
|
256138
|
+
const { teams } = useHyperyTeam.getState();
|
|
256139
|
+
if (!teams) return;
|
|
256140
|
+
if (teams.length === 0) {
|
|
256141
|
+
markTeamPrompted();
|
|
256142
|
+
return;
|
|
256143
|
+
}
|
|
256144
|
+
useTeamPrompt.setState({ open: true, purpose: null });
|
|
256145
|
+
}
|
|
256146
|
+
function markTeamPrompted() {
|
|
256147
|
+
const user2 = cloudUser();
|
|
256148
|
+
try {
|
|
256149
|
+
if (user2) sessionStorage.setItem(PROMPTED_KEY, user2.id);
|
|
256150
|
+
} catch {
|
|
256151
|
+
}
|
|
256152
|
+
useTeamPrompt.setState({ open: false, purpose: null });
|
|
256153
|
+
}
|
|
256154
|
+
function openTeamPrompt(purpose = null) {
|
|
256155
|
+
useTeamPrompt.setState({ open: true, purpose });
|
|
256156
|
+
}
|
|
256157
|
+
async function followFileTeam(key5) {
|
|
256158
|
+
if (!key5 || !cloudUser()) return;
|
|
256159
|
+
const { teams, personalWorkspaceId } = useHyperyTeam.getState();
|
|
256160
|
+
if (!teams) return;
|
|
256161
|
+
try {
|
|
256162
|
+
const { cloudApi: cloudApi2 } = await Promise.resolve().then(() => (init_api4(), api_exports));
|
|
256163
|
+
const { file: file2 } = await cloudApi2.getFile(key5);
|
|
256164
|
+
if (file2.workspaceId === personalWorkspaceId) {
|
|
256165
|
+
selectHyperyTeam("", "");
|
|
256166
|
+
return;
|
|
256167
|
+
}
|
|
256168
|
+
const team = teams.find((t3) => t3.workspaceId === file2.workspaceId);
|
|
256169
|
+
if (team) selectHyperyTeam(team.teamId, team.name);
|
|
256170
|
+
} catch {
|
|
256171
|
+
}
|
|
256172
|
+
}
|
|
256173
|
+
function startHyperyTeams() {
|
|
256174
|
+
if (started || typeof window === "undefined") return;
|
|
256175
|
+
started = true;
|
|
256176
|
+
let linkedKey = null;
|
|
256177
|
+
void refreshHyperyTeams().then(() => {
|
|
256178
|
+
maybePromptForTeam();
|
|
256179
|
+
void followFileTeam(linkedKey);
|
|
256180
|
+
});
|
|
256181
|
+
void Promise.resolve().then(() => (init_sync2(), sync_exports2)).then(({ onSyncStatus: onSyncStatus2, syncStatus: syncStatus2 }) => {
|
|
256182
|
+
linkedKey = syncStatus2().link?.key ?? null;
|
|
256183
|
+
void followFileTeam(linkedKey);
|
|
256184
|
+
onSyncStatus2((_s, link2) => {
|
|
256185
|
+
const key5 = link2?.key ?? null;
|
|
256186
|
+
if (key5 !== linkedKey) {
|
|
256187
|
+
linkedKey = key5;
|
|
256188
|
+
void followFileTeam(key5);
|
|
256189
|
+
}
|
|
256190
|
+
});
|
|
256191
|
+
});
|
|
256192
|
+
window.addEventListener("storage", (e) => {
|
|
256193
|
+
if (e.key === STORAGE_KEY2) useHyperyTeam.setState(load());
|
|
256194
|
+
});
|
|
256195
|
+
onCloudSessionChange(() => {
|
|
256196
|
+
if (!cloudUser()) {
|
|
256197
|
+
selectHyperyTeam("", "");
|
|
256198
|
+
useTeamPrompt.setState({ open: false, purpose: null });
|
|
256199
|
+
try {
|
|
256200
|
+
sessionStorage.removeItem(PROMPTED_KEY);
|
|
256201
|
+
} catch {
|
|
256202
|
+
}
|
|
256203
|
+
}
|
|
256204
|
+
void refreshHyperyTeams().then(() => {
|
|
256205
|
+
maybePromptForTeam();
|
|
256206
|
+
void followFileTeam(linkedKey);
|
|
256207
|
+
});
|
|
256208
|
+
});
|
|
256209
|
+
}
|
|
256210
|
+
function planDialogScope(s, target2) {
|
|
256211
|
+
if (target2 !== null) {
|
|
256212
|
+
if (target2 === "" || target2 === s.personalWorkspaceId) return { teamId: "", teamName: "", workspaceId: s.personalWorkspaceId ?? "" };
|
|
256213
|
+
const team = s.teams?.find((t3) => t3.workspaceId === target2);
|
|
256214
|
+
if (team) return { teamId: team.teamId, teamName: team.name, workspaceId: team.workspaceId };
|
|
256215
|
+
}
|
|
256216
|
+
const active3 = s.teamId ? s.teams?.find((t3) => t3.teamId === s.teamId) : null;
|
|
256217
|
+
return { teamId: s.teamId, teamName: s.teamName, workspaceId: (s.teamId ? active3?.workspaceId : s.personalWorkspaceId) ?? void 0 };
|
|
256218
|
+
}
|
|
256219
|
+
function planEntryAction({ home }) {
|
|
256220
|
+
return home ? "choose-team" : "plan";
|
|
256221
|
+
}
|
|
256222
|
+
var STORAGE_KEY2, useHyperyTeam, TEAM_PROMPT_ENABLED, TEAM_PROMPTED_KEY, PROMPTED_KEY, useTeamPrompt, started;
|
|
256044
256223
|
var init_team = __esm({
|
|
256045
256224
|
"lib/client/cloud/team.ts"() {
|
|
256046
256225
|
"use strict";
|
|
@@ -256056,7 +256235,11 @@ var init_team = __esm({
|
|
|
256056
256235
|
loading: false,
|
|
256057
256236
|
error: null
|
|
256058
256237
|
}));
|
|
256238
|
+
TEAM_PROMPT_ENABLED = false;
|
|
256239
|
+
TEAM_PROMPTED_KEY = "popcraft-team-prompted";
|
|
256240
|
+
PROMPTED_KEY = TEAM_PROMPTED_KEY;
|
|
256059
256241
|
useTeamPrompt = create2(() => ({ open: false, purpose: null }));
|
|
256242
|
+
started = false;
|
|
256060
256243
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
256061
256244
|
}
|
|
256062
256245
|
});
|
|
@@ -303167,7 +303350,7 @@ function sampleIndices(count2, n) {
|
|
|
303167
303350
|
async function exportAnimation(renderer, doc2, spec, dest, opts = {}) {
|
|
303168
303351
|
const { signal, onProgress } = opts;
|
|
303169
303352
|
const { range: range3, width, height } = spec;
|
|
303170
|
-
const
|
|
303353
|
+
const started7 = performance.now();
|
|
303171
303354
|
const heap0 = heapUsed();
|
|
303172
303355
|
let peak = heap0 ?? 0;
|
|
303173
303356
|
const noteHeap = () => {
|
|
@@ -303242,7 +303425,7 @@ async function exportAnimation(renderer, doc2, spec, dest, opts = {}) {
|
|
|
303242
303425
|
});
|
|
303243
303426
|
throw e;
|
|
303244
303427
|
}
|
|
303245
|
-
const ms2 = performance.now() -
|
|
303428
|
+
const ms2 = performance.now() - started7;
|
|
303246
303429
|
const heap1 = heapUsed();
|
|
303247
303430
|
return {
|
|
303248
303431
|
frames: range3.count,
|
|
@@ -304176,8 +304359,8 @@ function applyReadOnly(role) {
|
|
|
304176
304359
|
readOnlyDoc = canEdit(role) ? null : useEditorStore.getState().document;
|
|
304177
304360
|
}
|
|
304178
304361
|
function startCloudSync() {
|
|
304179
|
-
if (
|
|
304180
|
-
|
|
304362
|
+
if (started2 || typeof window === "undefined") return;
|
|
304363
|
+
started2 = true;
|
|
304181
304364
|
setRemoteMediaResolver(async (hash3) => {
|
|
304182
304365
|
const link2 = activeLink;
|
|
304183
304366
|
if (!link2) return null;
|
|
@@ -304250,7 +304433,7 @@ function startCloudSync() {
|
|
|
304250
304433
|
setStatus(liveStatus());
|
|
304251
304434
|
});
|
|
304252
304435
|
}
|
|
304253
|
-
var status, readOnlyDoc, activeLink, statusListeners, notice, urlArmed, opening, syncStatus, canEdit, uploaded, MEDIA_UPLOAD_PARALLEL, pushTimer, pushing, dirty, pendingMedia, collab, collabSession, collabAnonymous, uploadedThumbs, thumbCheckedAt, THUMB_EVERY_MS, putThumbnail, openingFiles, mediaHealed,
|
|
304436
|
+
var status, readOnlyDoc, activeLink, statusListeners, notice, urlArmed, opening, syncStatus, canEdit, uploaded, MEDIA_UPLOAD_PARALLEL, pushTimer, pushing, dirty, pendingMedia, collab, collabSession, collabAnonymous, uploadedThumbs, thumbCheckedAt, THUMB_EVERY_MS, putThumbnail, openingFiles, mediaHealed, started2;
|
|
304254
304437
|
var init_sync2 = __esm({
|
|
304255
304438
|
"lib/client/cloud/sync.ts"() {
|
|
304256
304439
|
init_paint_repair();
|
|
@@ -304299,7 +304482,7 @@ var init_sync2 = __esm({
|
|
|
304299
304482
|
});
|
|
304300
304483
|
openingFiles = /* @__PURE__ */ new Map();
|
|
304301
304484
|
mediaHealed = /* @__PURE__ */ new Set();
|
|
304302
|
-
|
|
304485
|
+
started2 = false;
|
|
304303
304486
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
304304
304487
|
}
|
|
304305
304488
|
});
|
|
@@ -304458,7 +304641,6 @@ async function dispatchShaped(key5, options) {
|
|
|
304458
304641
|
var onViolation;
|
|
304459
304642
|
var init_dispatch = __esm({
|
|
304460
304643
|
"lib/commands/dispatch.ts"() {
|
|
304461
|
-
"use strict";
|
|
304462
304644
|
init_errors();
|
|
304463
304645
|
init_registry();
|
|
304464
304646
|
init_confirm();
|
|
@@ -310448,9 +310630,9 @@ async function requestVideo(req, opts = {}, rt = {}) {
|
|
|
310448
310630
|
const t0 = now2();
|
|
310449
310631
|
const report2 = (phase, spec2) => opts.onProgress?.({ phase, elapsed: now2() - t0, spec: spec2 });
|
|
310450
310632
|
report2("starting");
|
|
310451
|
-
const
|
|
310452
|
-
const { job, spec } =
|
|
310453
|
-
const warnings = [...
|
|
310633
|
+
const started7 = await (await aiFetch("/api/ai/video", { json: req, signal: opts.signal })).json();
|
|
310634
|
+
const { job, spec } = started7;
|
|
310635
|
+
const warnings = [...started7.warnings ?? []];
|
|
310454
310636
|
let misses = 0;
|
|
310455
310637
|
try {
|
|
310456
310638
|
for (; ; ) {
|
|
@@ -320386,7 +320568,7 @@ var init_package = __esm({
|
|
|
320386
320568
|
"packages/runtime/package.json"() {
|
|
320387
320569
|
package_default = {
|
|
320388
320570
|
name: "@popcraft/runtime",
|
|
320389
|
-
version: "0.
|
|
320571
|
+
version: "0.18.0",
|
|
320390
320572
|
description: "What code exported from PopCraft shares: the meaning of expressions (operators and functions) and, as it grows, the parts of a design's behaviour that are common code rather than generated React.",
|
|
320391
320573
|
license: "MIT",
|
|
320392
320574
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -345045,7 +345227,6 @@ function exportsOf(source3) {
|
|
|
345045
345227
|
var CODE_LIMITS, packageOf;
|
|
345046
345228
|
var init_source2 = __esm({
|
|
345047
345229
|
"lib/code/source.ts"() {
|
|
345048
|
-
"use strict";
|
|
345049
345230
|
CODE_LIMITS = { modules: 100, sourceLength: 2e5, packages: 12 };
|
|
345050
345231
|
packageOf = (spec) => spec.split("/").slice(0, spec.startsWith("@") ? 2 : 1).join("/");
|
|
345051
345232
|
}
|
|
@@ -345088,7 +345269,6 @@ function compileModule(module2) {
|
|
|
345088
345269
|
var import_sucrase, BUILT_IN, memo4;
|
|
345089
345270
|
var init_compile2 = __esm({
|
|
345090
345271
|
"lib/code/compile.ts"() {
|
|
345091
|
-
"use strict";
|
|
345092
345272
|
import_sucrase = __toESM(require_dist2());
|
|
345093
345273
|
init_source2();
|
|
345094
345274
|
init_source2();
|
|
@@ -347090,7 +347270,7 @@ async function runLottieExport(renderer, doc2, spec, filename, ctx2, memoryDesti
|
|
|
347090
347270
|
const support = lottieSupport2(doc2, spec.target);
|
|
347091
347271
|
if (!support.ok) throw new ToolError(`Lottie cannot carry this animation: ${support.blockers.join("; ")}. Export MP4, WebM or GIF instead.`);
|
|
347092
347272
|
ctx2.progress?.(0, spec.range.count, "Writing Lottie");
|
|
347093
|
-
const
|
|
347273
|
+
const started7 = performance.now();
|
|
347094
347274
|
const out = await exportLottie3(renderer, doc2, spec, filename.replace(/\.[^.]+$/, ""), { stateMachine });
|
|
347095
347275
|
if (ctx2.signal?.aborted) throw new ToolError("Export cancelled.");
|
|
347096
347276
|
const dest = ctx2.destination ? await ctx2.destination(filename, FORMAT_MIME2[spec.format]) : memoryDestination2(filename, FORMAT_MIME2[spec.format]);
|
|
@@ -347108,7 +347288,7 @@ async function runLottieExport(renderer, doc2, spec, filename, ctx2, memoryDesti
|
|
|
347108
347288
|
const notes = [.../* @__PURE__ */ new Set([...support.warnings, ...out.notes])];
|
|
347109
347289
|
return {
|
|
347110
347290
|
summary: `Exported ${plural2(spec.range.count, "frame")} (${secs} s at ${spec.range.fps} fps, ${spec.width}\xD7${spec.height}) as ${dest.name}${notes.length ? ` \u2014 ${notes.join("; ")}` : ""}`,
|
|
347111
|
-
data: { filename: dest.name, frames: spec.range.count, fps: spec.range.fps, width: spec.width, height: spec.height, bytes: out.bytes.length, ms: Math.round(performance.now() -
|
|
347291
|
+
data: { filename: dest.name, frames: spec.range.count, fps: spec.range.fps, width: spec.width, height: spec.height, bytes: out.bytes.length, ms: Math.round(performance.now() - started7), msPerFrame: (performance.now() - started7) / spec.range.count, keys: out.stats, warnings: notes }
|
|
347112
347292
|
};
|
|
347113
347293
|
}
|
|
347114
347294
|
async function exportSite(doc2, pageId2, packaging, styling = "css") {
|
|
@@ -353357,10 +353537,12 @@ var init_upload2 = __esm({
|
|
|
353357
353537
|
// lib/client/cloud/sites.ts
|
|
353358
353538
|
var sites_exports = {};
|
|
353359
353539
|
__export(sites_exports, {
|
|
353540
|
+
deleteSite: () => deleteSite,
|
|
353360
353541
|
publishSite: () => publishSite,
|
|
353361
353542
|
renameSite: () => renameSite,
|
|
353362
353543
|
setSiteVersion: () => setSiteVersion,
|
|
353363
|
-
siteStatus: () => siteStatus
|
|
353544
|
+
siteStatus: () => siteStatus,
|
|
353545
|
+
workspaceSites: () => workspaceSites
|
|
353364
353546
|
});
|
|
353365
353547
|
function publishSite(key5, files, opts = {}) {
|
|
353366
353548
|
return publishFiles({
|
|
@@ -353370,7 +353552,7 @@ function publishSite(key5, files, opts = {}) {
|
|
|
353370
353552
|
}
|
|
353371
353553
|
}, files.map((f2) => ({ path: f2.path, bytes: bytesOf(f2) })), opts);
|
|
353372
353554
|
}
|
|
353373
|
-
var siteStatus, setSiteVersion, renameSite;
|
|
353555
|
+
var siteStatus, setSiteVersion, workspaceSites, deleteSite, renameSite;
|
|
353374
353556
|
var init_sites = __esm({
|
|
353375
353557
|
"lib/client/cloud/sites.ts"() {
|
|
353376
353558
|
"use strict";
|
|
@@ -353379,6 +353561,8 @@ var init_sites = __esm({
|
|
|
353379
353561
|
init_api4();
|
|
353380
353562
|
siteStatus = (key5) => api(`/api/sites${key5 ? `/${key5}` : ""}?t=${Date.now()}`);
|
|
353381
353563
|
setSiteVersion = (key5, version7) => api(`/api/sites/${key5}`, { method: "PATCH", json: { currentVersion: version7 } });
|
|
353564
|
+
workspaceSites = (workspaceId) => api(`/api/workspaces/${encodeURIComponent(workspaceId)}/sites?t=${Date.now()}`);
|
|
353565
|
+
deleteSite = (key5) => api(`/api/sites/${key5}`, { method: "DELETE" });
|
|
353382
353566
|
renameSite = (key5, slug3) => api(`/api/sites/${key5}`, { method: "PATCH", json: { slug: slug3 } });
|
|
353383
353567
|
}
|
|
353384
353568
|
});
|
|
@@ -353632,7 +353816,7 @@ async function publishedFile() {
|
|
|
353632
353816
|
if (!key5) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
353633
353817
|
return key5;
|
|
353634
353818
|
}
|
|
353635
|
-
var statusData, publishSite2, publishSetVersion, publishStatus, publishStore, publishCommands;
|
|
353819
|
+
var statusData, publishSite2, publishSetVersion, publishListSites, publishDeleteSite, publishStatus, publishStore, publishCommands;
|
|
353636
353820
|
var init_publish = __esm({
|
|
353637
353821
|
"lib/commands/publish.ts"() {
|
|
353638
353822
|
"use strict";
|
|
@@ -353709,6 +353893,53 @@ var init_publish = __esm({
|
|
|
353709
353893
|
return { summary: version7 === null ? "Took the site offline" : `Version ${version7} is online at ${status3.site?.url ?? "the site's address"}`, data: statusData(status3) };
|
|
353710
353894
|
}
|
|
353711
353895
|
});
|
|
353896
|
+
publishListSites = defineCommand({
|
|
353897
|
+
id: "publish.listSites",
|
|
353898
|
+
title: "List published websites",
|
|
353899
|
+
domain: "publish",
|
|
353900
|
+
effect: "none",
|
|
353901
|
+
permission: null,
|
|
353902
|
+
params: external_exports.object({
|
|
353903
|
+
workspaceId: external_exports.string().optional().describe("The team (workspace) whose sites to list; default: the selected team, else your own.")
|
|
353904
|
+
}),
|
|
353905
|
+
expose: {
|
|
353906
|
+
agent: { name: "list_published_sites", readOnly: true, description: "Every website a team has published: each one's file, address, whether it is online, and how many websites the team's plan allows (Home \u203A Market \u203A Sites shows the same)." }
|
|
353907
|
+
},
|
|
353908
|
+
run: async (p2) => {
|
|
353909
|
+
await signedIn();
|
|
353910
|
+
const [{ workspaceSites: workspaceSites2 }, { activeTeamWorkspaceId: activeTeamWorkspaceId2, useHyperyTeam: useHyperyTeam2 }] = await Promise.all([Promise.resolve().then(() => (init_sites(), sites_exports)), Promise.resolve().then(() => (init_team(), team_exports))]);
|
|
353911
|
+
const workspaceId = p2.workspaceId ?? activeTeamWorkspaceId2() ?? useHyperyTeam2.getState().personalWorkspaceId;
|
|
353912
|
+
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
353913
|
+
const out = await workspaceSites2(workspaceId);
|
|
353914
|
+
return { summary: `${out.sites.length} website${out.sites.length === 1 ? "" : "s"}${out.limit !== null ? ` of ${out.limit}` : ""}: ${out.sites.map((s) => `${s.slug} (${s.currentVersion ? "online" : "offline"})`).join(", ") || "none"}`, data: out };
|
|
353915
|
+
}
|
|
353916
|
+
});
|
|
353917
|
+
publishDeleteSite = defineCommand({
|
|
353918
|
+
id: "publish.deleteSite",
|
|
353919
|
+
title: "Delete a published website",
|
|
353920
|
+
domain: "publish",
|
|
353921
|
+
effect: "none",
|
|
353922
|
+
permission: null,
|
|
353923
|
+
params: external_exports.object({
|
|
353924
|
+
fileKey: external_exports.string().optional().describe("The file whose website to delete (from list_published_sites); default: the open file's.")
|
|
353925
|
+
}),
|
|
353926
|
+
confirm: {
|
|
353927
|
+
level: "confirm",
|
|
353928
|
+
summary: (p2) => p2.fileKey ? "Delete that file's published website" : "Delete this file's published website",
|
|
353929
|
+
detail: () => "Every version is deleted and the address is free for anyone. The file stays, and so does anything sent to GitHub or Vercel. It no longer counts toward the plan's websites."
|
|
353930
|
+
},
|
|
353931
|
+
expose: {
|
|
353932
|
+
agent: { name: "delete_published_site", description: "Delete a file's published website for good: every version, and its address. The file and anything sent to a repository or host stay. Frees a place in the plan's websites. The user approves every call." }
|
|
353933
|
+
},
|
|
353934
|
+
run: async (p2, ctx2) => {
|
|
353935
|
+
const key5 = p2.fileKey ?? await publishedFile();
|
|
353936
|
+
await signedIn();
|
|
353937
|
+
const { deleteSite: deleteSite2 } = await Promise.resolve().then(() => (init_sites(), sites_exports));
|
|
353938
|
+
await deleteSite2(key5);
|
|
353939
|
+
ctx2.notice("The website is deleted.");
|
|
353940
|
+
return { summary: "Deleted the published website", data: { fileKey: key5 } };
|
|
353941
|
+
}
|
|
353942
|
+
});
|
|
353712
353943
|
publishStatus = defineCommand({
|
|
353713
353944
|
id: "publish.status",
|
|
353714
353945
|
title: "Website status",
|
|
@@ -353769,7 +354000,7 @@ var init_publish = __esm({
|
|
|
353769
354000
|
return { summary: `Store ${done.status === "ready" ? "is live" : done.status === "building" ? "is building" : "failed"} at ${done.url} (${done.project}, ${done.pages.length} ${done.pages.length === 1 ? "page" : "pages"}, ${done.files} files)`, data: { url: done.url, status: done.status, destinationId: done.destinationId, project: done.project, files: done.files, pages: done.pages } };
|
|
353770
354001
|
}
|
|
353771
354002
|
});
|
|
353772
|
-
publishCommands = [publishSite2, publishSetVersion, publishStore];
|
|
354003
|
+
publishCommands = [publishSite2, publishSetVersion, publishStore, publishDeleteSite];
|
|
353773
354004
|
}
|
|
353774
354005
|
});
|
|
353775
354006
|
|
|
@@ -358129,8 +358360,8 @@ async function unpublishLibrary(libraryId) {
|
|
|
358129
358360
|
await refreshLibraries();
|
|
358130
358361
|
}
|
|
358131
358362
|
function startLibraries() {
|
|
358132
|
-
if (
|
|
358133
|
-
|
|
358363
|
+
if (started3 || typeof window === "undefined") return;
|
|
358364
|
+
started3 = true;
|
|
358134
358365
|
void refreshLibraries();
|
|
358135
358366
|
onCloudSessionChange(() => void refreshLibraries());
|
|
358136
358367
|
let lastKey = null;
|
|
@@ -358150,7 +358381,7 @@ function startLibraries() {
|
|
|
358150
358381
|
}
|
|
358151
358382
|
});
|
|
358152
358383
|
}
|
|
358153
|
-
var useLibraries, liveDoc, payloadCache, motionCache,
|
|
358384
|
+
var useLibraries, liveDoc, payloadCache, motionCache, started3;
|
|
358154
358385
|
var init_libraries2 = __esm({
|
|
358155
358386
|
"lib/client/libraries.ts"() {
|
|
358156
358387
|
init_esm();
|
|
@@ -358165,7 +358396,7 @@ var init_libraries2 = __esm({
|
|
|
358165
358396
|
liveDoc = () => useEditorStore.getState().document;
|
|
358166
358397
|
payloadCache = /* @__PURE__ */ new Map();
|
|
358167
358398
|
motionCache = /* @__PURE__ */ new Map();
|
|
358168
|
-
|
|
358399
|
+
started3 = false;
|
|
358169
358400
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
358170
358401
|
}
|
|
358171
358402
|
});
|
|
@@ -371916,8 +372147,8 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
371916
372147
|
}
|
|
371917
372148
|
return true;
|
|
371918
372149
|
}
|
|
371919
|
-
#endKnockoutElement(
|
|
371920
|
-
if (!
|
|
372150
|
+
#endKnockoutElement(started7) {
|
|
372151
|
+
if (!started7) {
|
|
371921
372152
|
return;
|
|
371922
372153
|
}
|
|
371923
372154
|
const tempEntry = this.#knockoutTempCanvasEntry;
|
|
@@ -372132,7 +372363,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372132
372363
|
this.ctx.closePath();
|
|
372133
372364
|
}
|
|
372134
372365
|
stroke(opIdx, path, consumePath = true) {
|
|
372135
|
-
const
|
|
372366
|
+
const started7 = consumePath && this.#beginKnockoutElement(this.current.strokeAlpha);
|
|
372136
372367
|
const ctx2 = this.ctx;
|
|
372137
372368
|
const strokeColor = this.current.strokeColor;
|
|
372138
372369
|
ctx2.globalAlpha = this.current.strokeAlpha;
|
|
@@ -372157,13 +372388,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372157
372388
|
this.consumePath(opIdx, path, this.current.getClippedPathBoundingBox(PathType.STROKE, getCurrentTransform(this.ctx)));
|
|
372158
372389
|
}
|
|
372159
372390
|
ctx2.globalAlpha = this.current.fillAlpha;
|
|
372160
|
-
this.#endKnockoutElement(
|
|
372391
|
+
this.#endKnockoutElement(started7);
|
|
372161
372392
|
}
|
|
372162
372393
|
closeStroke(opIdx, path) {
|
|
372163
372394
|
this.stroke(opIdx, path);
|
|
372164
372395
|
}
|
|
372165
372396
|
fill(opIdx, path, consumePath = true) {
|
|
372166
|
-
const
|
|
372397
|
+
const started7 = consumePath && this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372167
372398
|
const ctx2 = this.ctx;
|
|
372168
372399
|
const fillColor = this.current.fillColor;
|
|
372169
372400
|
const isPatternFill = this.current.patternFill;
|
|
@@ -372180,7 +372411,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372180
372411
|
this.consumePath(opIdx, path, intersect2);
|
|
372181
372412
|
}
|
|
372182
372413
|
this.current.tilingPatternDims = null;
|
|
372183
|
-
this.#endKnockoutElement(
|
|
372414
|
+
this.#endKnockoutElement(started7);
|
|
372184
372415
|
return;
|
|
372185
372416
|
}
|
|
372186
372417
|
const baseTransform = fillColor.isModifyingCurrentTransform() ? ctx2.getTransform() : null;
|
|
@@ -372209,18 +372440,18 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372209
372440
|
if (consumePath) {
|
|
372210
372441
|
this.consumePath(opIdx, path, intersect2);
|
|
372211
372442
|
}
|
|
372212
|
-
this.#endKnockoutElement(
|
|
372443
|
+
this.#endKnockoutElement(started7);
|
|
372213
372444
|
}
|
|
372214
372445
|
eoFill(opIdx, path) {
|
|
372215
372446
|
this.pendingEOFill = true;
|
|
372216
372447
|
this.fill(opIdx, path);
|
|
372217
372448
|
}
|
|
372218
372449
|
fillStroke(opIdx, path) {
|
|
372219
|
-
const
|
|
372450
|
+
const started7 = this.#beginKnockoutElement(Math.min(this.current.fillAlpha, this.current.strokeAlpha));
|
|
372220
372451
|
this.fill(opIdx, path, false);
|
|
372221
372452
|
this.stroke(opIdx, path, false);
|
|
372222
372453
|
this.consumePath(opIdx, path);
|
|
372223
|
-
this.#endKnockoutElement(
|
|
372454
|
+
this.#endKnockoutElement(started7);
|
|
372224
372455
|
}
|
|
372225
372456
|
eoFillStroke(opIdx, path) {
|
|
372226
372457
|
this.pendingEOFill = true;
|
|
@@ -372237,10 +372468,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372237
372468
|
this.consumePath(opIdx, path);
|
|
372238
372469
|
}
|
|
372239
372470
|
rawFillPath(opIdx, path) {
|
|
372240
|
-
const
|
|
372471
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372241
372472
|
this.ctx.fill(path);
|
|
372242
372473
|
this.dependencyTracker?.recordDependencies(opIdx, Dependencies.rawFillPath).recordOperation(opIdx);
|
|
372243
|
-
this.#endKnockoutElement(
|
|
372474
|
+
this.#endKnockoutElement(started7);
|
|
372244
372475
|
}
|
|
372245
372476
|
clip(opIdx) {
|
|
372246
372477
|
this.dependencyTracker?.recordFutureForcedDependency("clipMode", opIdx);
|
|
@@ -372476,10 +372707,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372476
372707
|
const current3 = this.current;
|
|
372477
372708
|
const font = current3.font;
|
|
372478
372709
|
if (font.isType3Font) {
|
|
372479
|
-
const
|
|
372710
|
+
const started8 = this.#beginKnockoutElement(current3.fillAlpha);
|
|
372480
372711
|
this.showType3Text(opIdx, glyphs);
|
|
372481
372712
|
this.dependencyTracker?.recordShowTextOperation(opIdx);
|
|
372482
|
-
this.#endKnockoutElement(
|
|
372713
|
+
this.#endKnockoutElement(started8);
|
|
372483
372714
|
return;
|
|
372484
372715
|
}
|
|
372485
372716
|
const fontSize = current3.fontSize;
|
|
@@ -372487,7 +372718,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372487
372718
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
372488
372719
|
return;
|
|
372489
372720
|
}
|
|
372490
|
-
const
|
|
372721
|
+
const started7 = this.#beginKnockoutElement(current3.fillAlpha);
|
|
372491
372722
|
const ctx2 = this.ctx;
|
|
372492
372723
|
const fontSizeScale = current3.fontSizeScale;
|
|
372493
372724
|
const charSpacing = current3.charSpacing;
|
|
@@ -372558,7 +372789,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372558
372789
|
current3.x += width * widthAdvanceScale * textHScale;
|
|
372559
372790
|
ctx2.restore();
|
|
372560
372791
|
this.compose();
|
|
372561
|
-
this.#endKnockoutElement(
|
|
372792
|
+
this.#endKnockoutElement(started7);
|
|
372562
372793
|
return;
|
|
372563
372794
|
}
|
|
372564
372795
|
let x2 = 0, i2;
|
|
@@ -372628,7 +372859,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372628
372859
|
ctx2.restore();
|
|
372629
372860
|
this.compose();
|
|
372630
372861
|
this.dependencyTracker?.recordShowTextOperation(opIdx);
|
|
372631
|
-
this.#endKnockoutElement(
|
|
372862
|
+
this.#endKnockoutElement(started7);
|
|
372632
372863
|
}
|
|
372633
372864
|
showType3Text(opIdx, glyphs) {
|
|
372634
372865
|
const ctx2 = this.ctx;
|
|
@@ -372760,7 +372991,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372760
372991
|
if (!this.contentVisible) {
|
|
372761
372992
|
return;
|
|
372762
372993
|
}
|
|
372763
|
-
const
|
|
372994
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372764
372995
|
const ctx2 = this.ctx;
|
|
372765
372996
|
this.save(opIdx);
|
|
372766
372997
|
const pattern = this._getPattern(opIdx, objId2);
|
|
@@ -372781,7 +373012,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372781
373012
|
this.dependencyTracker?.resetBBox(opIdx).recordFullPageBBox(opIdx).recordDependencies(opIdx, Dependencies.transform).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx);
|
|
372782
373013
|
this.compose(this.current.getClippedPathBoundingBox());
|
|
372783
373014
|
this.restore(opIdx);
|
|
372784
|
-
this.#endKnockoutElement(
|
|
373015
|
+
this.#endKnockoutElement(started7);
|
|
372785
373016
|
}
|
|
372786
373017
|
beginInlineImage() {
|
|
372787
373018
|
unreachable("Should not call beginInlineImage");
|
|
@@ -373157,7 +373388,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373157
373388
|
const count2 = img.count;
|
|
373158
373389
|
img = this.getObject(opIdx, img.data, img);
|
|
373159
373390
|
img.count = count2;
|
|
373160
|
-
const
|
|
373391
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373161
373392
|
const ctx2 = this.ctx;
|
|
373162
373393
|
const mask = this._createMaskCanvas(opIdx, img);
|
|
373163
373394
|
const maskCanvas = mask.canvas;
|
|
@@ -373170,14 +373401,14 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373170
373401
|
this.canvasFactory.destroy(mask.canvasEntry);
|
|
373171
373402
|
}
|
|
373172
373403
|
this.compose();
|
|
373173
|
-
this.#endKnockoutElement(
|
|
373404
|
+
this.#endKnockoutElement(started7);
|
|
373174
373405
|
}
|
|
373175
373406
|
paintImageMaskXObjectRepeat(opIdx, img, scaleX, skewX = 0, skewY = 0, scaleY, positions) {
|
|
373176
373407
|
if (!this.contentVisible) {
|
|
373177
373408
|
return;
|
|
373178
373409
|
}
|
|
373179
373410
|
img = this.getObject(opIdx, img.data, img);
|
|
373180
|
-
const
|
|
373411
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373181
373412
|
const ctx2 = this.ctx;
|
|
373182
373413
|
ctx2.save();
|
|
373183
373414
|
const currentTransform = getCurrentTransform(ctx2);
|
|
@@ -373196,13 +373427,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373196
373427
|
}
|
|
373197
373428
|
this.compose();
|
|
373198
373429
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373199
|
-
this.#endKnockoutElement(
|
|
373430
|
+
this.#endKnockoutElement(started7);
|
|
373200
373431
|
}
|
|
373201
373432
|
paintImageMaskXObjectGroup(opIdx, images) {
|
|
373202
373433
|
if (!this.contentVisible) {
|
|
373203
373434
|
return;
|
|
373204
373435
|
}
|
|
373205
|
-
const
|
|
373436
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373206
373437
|
const ctx2 = this.ctx;
|
|
373207
373438
|
const fillColor = this.current.fillColor;
|
|
373208
373439
|
const isPatternFill = this.current.patternFill;
|
|
@@ -373233,7 +373464,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373233
373464
|
}
|
|
373234
373465
|
this.compose();
|
|
373235
373466
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373236
|
-
this.#endKnockoutElement(
|
|
373467
|
+
this.#endKnockoutElement(started7);
|
|
373237
373468
|
}
|
|
373238
373469
|
paintImageXObject(opIdx, objId2) {
|
|
373239
373470
|
if (!this.contentVisible) {
|
|
@@ -373305,7 +373536,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373305
373536
|
}
|
|
373306
373537
|
const width = imgData.width;
|
|
373307
373538
|
const height = imgData.height;
|
|
373308
|
-
const
|
|
373539
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373309
373540
|
const ctx2 = this.ctx;
|
|
373310
373541
|
this.save(opIdx);
|
|
373311
373542
|
const {
|
|
@@ -373342,13 +373573,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373342
373573
|
}
|
|
373343
373574
|
this.compose();
|
|
373344
373575
|
this.restore(opIdx);
|
|
373345
|
-
this.#endKnockoutElement(
|
|
373576
|
+
this.#endKnockoutElement(started7);
|
|
373346
373577
|
}
|
|
373347
373578
|
paintInlineImageXObjectGroup(opIdx, imgData, map2) {
|
|
373348
373579
|
if (!this.contentVisible) {
|
|
373349
373580
|
return;
|
|
373350
373581
|
}
|
|
373351
|
-
const
|
|
373582
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373352
373583
|
const ctx2 = this.ctx;
|
|
373353
373584
|
let imgToPaint;
|
|
373354
373585
|
let inlineImgCanvas = null;
|
|
@@ -373376,17 +373607,17 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373376
373607
|
}
|
|
373377
373608
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373378
373609
|
this.compose();
|
|
373379
|
-
this.#endKnockoutElement(
|
|
373610
|
+
this.#endKnockoutElement(started7);
|
|
373380
373611
|
}
|
|
373381
373612
|
paintSolidColorImageMask(opIdx) {
|
|
373382
373613
|
if (!this.contentVisible) {
|
|
373383
373614
|
return;
|
|
373384
373615
|
}
|
|
373385
|
-
const
|
|
373616
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373386
373617
|
this.dependencyTracker?.resetBBox(opIdx).recordBBox(opIdx, this.ctx, 0, 1, 0, 1).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx);
|
|
373387
373618
|
this.ctx.fillRect(0, 0, 1, 1);
|
|
373388
373619
|
this.compose();
|
|
373389
|
-
this.#endKnockoutElement(
|
|
373620
|
+
this.#endKnockoutElement(started7);
|
|
373390
373621
|
}
|
|
373391
373622
|
markPoint(opIdx, tag) {
|
|
373392
373623
|
}
|
|
@@ -389772,8 +390003,8 @@ function versionLabel(v) {
|
|
|
389772
390003
|
return `Autosave ${formatDate(v.createdAt, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" })}`;
|
|
389773
390004
|
}
|
|
389774
390005
|
function startLocalCheckpoints() {
|
|
389775
|
-
if (
|
|
389776
|
-
|
|
390006
|
+
if (started4 || typeof window === "undefined") return;
|
|
390007
|
+
started4 = true;
|
|
389777
390008
|
let editingSince = null;
|
|
389778
390009
|
let lastDocId = useEditorStore.getState().document.id;
|
|
389779
390010
|
let checkedBeforeEditing = false;
|
|
@@ -389807,7 +390038,7 @@ function startLocalCheckpoints() {
|
|
|
389807
390038
|
});
|
|
389808
390039
|
}, 6e4);
|
|
389809
390040
|
}
|
|
389810
|
-
var CHECKPOINT_EVERY_MS, KEEP_LOCAL_AUTO, listKey, snapKey, fromServer, docCache,
|
|
390041
|
+
var CHECKPOINT_EVERY_MS, KEEP_LOCAL_AUTO, listKey, snapKey, fromServer, docCache, started4;
|
|
389811
390042
|
var init_versions3 = __esm({
|
|
389812
390043
|
"lib/client/versions.ts"() {
|
|
389813
390044
|
init_format();
|
|
@@ -389832,7 +390063,7 @@ var init_versions3 = __esm({
|
|
|
389832
390063
|
authorImage: v.author?.image ?? null
|
|
389833
390064
|
});
|
|
389834
390065
|
docCache = /* @__PURE__ */ new Map();
|
|
389835
|
-
|
|
390066
|
+
started4 = false;
|
|
389836
390067
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
389837
390068
|
}
|
|
389838
390069
|
});
|
|
@@ -391764,8 +391995,8 @@ function pluginCommand(plugins) {
|
|
|
391764
391995
|
}
|
|
391765
391996
|
function registerAppCommands() {
|
|
391766
391997
|
registerCommand(...appCommands);
|
|
391767
|
-
if (
|
|
391768
|
-
|
|
391998
|
+
if (started5 || typeof window === "undefined") return;
|
|
391999
|
+
started5 = true;
|
|
391769
392000
|
void Promise.resolve().then(() => (init_theme_store(), theme_store_exports)).then(({ useThemeStore: useThemeStore2, pickableThemes: pickableThemes2 }) => {
|
|
391770
392001
|
const sync = () => registerCommand(themeCommand(pickableThemes2(useThemeStore2.getState())));
|
|
391771
392002
|
sync();
|
|
@@ -391777,7 +392008,7 @@ function registerAppCommands() {
|
|
|
391777
392008
|
usePluginStore2.subscribe(sync);
|
|
391778
392009
|
});
|
|
391779
392010
|
}
|
|
391780
|
-
var none, emit6, store5, MODE_IDS, MODE_ALIASES, modeSet, modeEdit, PANELS, panelOpen, panelToggle, dialogOpen, aiOpen, docAction, TOOLS, toolSet, toolPlace, nodeRasterize, nodeOps, canvasToggle, popcornOpen, viewSetBreakpoint, appCommands,
|
|
392011
|
+
var none, emit6, store5, MODE_IDS, MODE_ALIASES, modeSet, modeEdit, PANELS, panelOpen, panelToggle, dialogOpen, aiOpen, docAction, TOOLS, toolSet, toolPlace, nodeRasterize, nodeOps, canvasToggle, popcornOpen, viewSetBreakpoint, appCommands, started5;
|
|
391781
392012
|
var init_app = __esm({
|
|
391782
392013
|
"lib/commands/app.ts"() {
|
|
391783
392014
|
init_zod();
|
|
@@ -392173,7 +392404,7 @@ var init_app = __esm({
|
|
|
392173
392404
|
}
|
|
392174
392405
|
});
|
|
392175
392406
|
appCommands = [modeSet, modeEdit, nodeRasterize, panelOpen, panelToggle, dialogOpen, aiOpen, docAction, toolSet, toolPlace, nodeOps, canvasToggle, viewSetBreakpoint, popcornOpen, pageGo];
|
|
392176
|
-
|
|
392407
|
+
started5 = false;
|
|
392177
392408
|
}
|
|
392178
392409
|
});
|
|
392179
392410
|
|
|
@@ -392419,8 +392650,8 @@ function reportToolbarWidth() {
|
|
|
392419
392650
|
}, 250);
|
|
392420
392651
|
}
|
|
392421
392652
|
function startDesktopTab() {
|
|
392422
|
-
if (
|
|
392423
|
-
|
|
392653
|
+
if (started6 || !isDesktopTabs()) return;
|
|
392654
|
+
started6 = true;
|
|
392424
392655
|
const html = document.documentElement;
|
|
392425
392656
|
const mark2 = () => {
|
|
392426
392657
|
if (html.dataset.desktop !== "tabs") html.dataset.desktop = "tabs";
|
|
@@ -392456,7 +392687,7 @@ function startDesktopTab() {
|
|
|
392456
392687
|
if (msg.type === "deleted") window.location.replace(EDITOR_HOME);
|
|
392457
392688
|
});
|
|
392458
392689
|
}
|
|
392459
|
-
var openTab, openCloudFileTab, isHomeTab,
|
|
392690
|
+
var openTab, openCloudFileTab, isHomeTab, started6;
|
|
392460
392691
|
var init_tabs = __esm({
|
|
392461
392692
|
"lib/desktop/tabs.ts"() {
|
|
392462
392693
|
init_editor_store();
|
|
@@ -392467,7 +392698,7 @@ var init_tabs = __esm({
|
|
|
392467
392698
|
openTab = (path, title) => invoke("tab_open", { url: path, activate: true, title });
|
|
392468
392699
|
openCloudFileTab = (key5, name2) => openTab(cloudFilePath(key5), name2);
|
|
392469
392700
|
isHomeTab = () => isDesktopTabs() && tabTarget(window.location.pathname, window.location.search).kind === "home";
|
|
392470
|
-
|
|
392701
|
+
started6 = false;
|
|
392471
392702
|
}
|
|
392472
392703
|
});
|
|
392473
392704
|
|
|
@@ -395502,6 +395733,7 @@ var init_builtin4 = __esm({
|
|
|
395502
395733
|
siteSetGpuTransitions,
|
|
395503
395734
|
// the file as a website online (lib/client/cloud/publish-site.ts): what is published (appended, as above)
|
|
395504
395735
|
publishStatus,
|
|
395736
|
+
publishListSites,
|
|
395505
395737
|
// designs as code (lib/agent/design-script): a whole design from one template-kit script (appended, as above)
|
|
395506
395738
|
designWriteScript,
|
|
395507
395739
|
designGetScript,
|
|
@@ -402796,7 +403028,7 @@ init_resources();
|
|
|
402796
403028
|
init_desktop();
|
|
402797
403029
|
init_hypery();
|
|
402798
403030
|
import { createInterface } from "node:readline";
|
|
402799
|
-
var VERSION2 = "0.
|
|
403031
|
+
var VERSION2 = "0.18.0";
|
|
402800
403032
|
var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
|
|
402801
403033
|
|
|
402802
403034
|
Files (headless, on .popcraft files):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popcraft/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "The PopCraft command line: edit .popcraft files headlessly, call the REST API, publish to the marketplace and manage the desktop app's local plugins, themes, fonts, skills and agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://popcraft.app/docs/api/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"esbuild": "0.28.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@popcraft/kit": "0.
|
|
37
|
+
"@popcraft/kit": "0.18.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "node build.mjs",
|