@popcraft/cli 0.17.0 → 0.19.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 +327 -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.19.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,62 @@ var init_en2 = __esm({
|
|
|
33695
33700
|
"homePage.surfacePro": "Surface Pro",
|
|
33696
33701
|
"homePage.viewingVersionHistory": "Viewing version history",
|
|
33697
33702
|
"homePage.workspace": "Workspace",
|
|
33703
|
+
"homeTeam.approve": "Approve",
|
|
33704
|
+
"homeTeam.browseMarketplace": "Browse the marketplace",
|
|
33705
|
+
"homeTeam.cancel": "Cancel",
|
|
33706
|
+
"homeTeam.delete": "Delete",
|
|
33707
|
+
"homeTeam.deleteSite": "Delete website",
|
|
33708
|
+
"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.",
|
|
33709
|
+
"homeTeam.edit": "Edit",
|
|
33710
|
+
"homeTeam.editTitle": "Edit {name}",
|
|
33711
|
+
"homeTeam.fileInTrash": "File in trash",
|
|
33712
|
+
"homeTeam.inReview": "In review",
|
|
33713
|
+
"homeTeam.libraries": "Libraries",
|
|
33714
|
+
"homeTeam.libraryHint": "Publish a file's components, styles and variables as a library from Assets \u203A Libraries in the file.",
|
|
33715
|
+
"homeTeam.libraryVersion": "Version {version} \xB7 {installs, plural, one {# install} other {# installs}}",
|
|
33716
|
+
"homeTeam.listedInMarketplace": "Listed in the marketplace",
|
|
33717
|
+
"homeTeam.marketHint": "Everything this team has published: its websites, plugins and theme packs, templates, brushes and shaders.",
|
|
33718
|
+
"homeTeam.name": "Name",
|
|
33719
|
+
"homeTeam.noLibraries": "This team has no libraries yet.",
|
|
33720
|
+
"homeTeam.noPacks": "No brush or shader packs published yet.",
|
|
33721
|
+
"homeTeam.noPermissions": "no permissions",
|
|
33722
|
+
"homeTeam.noPlugins": "No plugins or theme packs published yet.",
|
|
33723
|
+
"homeTeam.noSites": "No websites published yet. Publish one from a file's Publish button.",
|
|
33724
|
+
"homeTeam.noTemplates": "No team templates yet.",
|
|
33725
|
+
"homeTeam.nothingToReview": "Nothing is waiting for review.",
|
|
33726
|
+
"homeTeam.offline": "Offline",
|
|
33727
|
+
"homeTeam.online": "Online \xB7 version {version}",
|
|
33728
|
+
"homeTeam.openFile": "Open file",
|
|
33729
|
+
"homeTeam.packs": "Brushes and shaders",
|
|
33730
|
+
"homeTeam.packSummary": "{items, plural, one {# item} other {# items}} \xB7 {installs, plural, one {# install} other {# installs}}",
|
|
33731
|
+
"homeTeam.plugin": "Plugin",
|
|
33732
|
+
"homeTeam.plugins": "Plugins and theme packs",
|
|
33733
|
+
"homeTeam.pluginSummary": "{id} \xB7 version {version} \xB7 {installs, plural, one {# install} other {# installs}}",
|
|
33734
|
+
"homeTeam.private": "Private",
|
|
33735
|
+
"homeTeam.public": "Public",
|
|
33736
|
+
"homeTeam.publicInMarketplace": "Public in the marketplace",
|
|
33737
|
+
"homeTeam.putOnline": "Put online",
|
|
33738
|
+
"homeTeam.reject": "Reject",
|
|
33739
|
+
"homeTeam.rejectNote": "Why (for the publisher)",
|
|
33740
|
+
"homeTeam.rejected": "Rejected",
|
|
33741
|
+
"homeTeam.rejectedBecause": "Rejected: {note}",
|
|
33742
|
+
"homeTeam.removeConfirm": "Take {name} off the marketplace? A plugin is unlisted (those who installed it keep it); anything else is deleted.",
|
|
33743
|
+
"homeTeam.review": "Review",
|
|
33744
|
+
"homeTeam.reviewHint": "Every version waiting for a reviewer, from every team. Only marketplace reviewers see this.",
|
|
33745
|
+
"homeTeam.reviewSummary": "{id} \xB7 version {version} \xB7 by {author} \xB7 asks for {permissions}",
|
|
33746
|
+
"homeTeam.save": "Save",
|
|
33747
|
+
"homeTeam.sites": "Websites",
|
|
33748
|
+
"homeTeam.sitesOfLimit": "{used} of {limit} on this plan",
|
|
33749
|
+
"homeTeam.sitesUnlimited": "{used, plural, one {# website} other {# websites}}",
|
|
33750
|
+
"homeTeam.takeOffline": "Take offline",
|
|
33751
|
+
"homeTeam.templates": "Templates",
|
|
33752
|
+
"homeTeam.templateSummary": "{installs, plural, one {Used once} other {Used # times}}",
|
|
33753
|
+
"homeTeam.themePack": "Theme pack",
|
|
33754
|
+
"homeTeam.themes": "{count, plural, one {# theme} other {# themes}}",
|
|
33755
|
+
"homeTeam.unlist": "Unlist",
|
|
33756
|
+
"homeTeam.unlisted": "Unlisted",
|
|
33757
|
+
"homeTeam.unpublish": "Unpublish",
|
|
33758
|
+
"homeTeam.viewListing": "View its marketplace listing",
|
|
33698
33759
|
"homeTemplates.browseAll": "Browse all templates",
|
|
33699
33760
|
"homeTemplates.couldNotLoad": "Templates couldn't load. Browse all templates to try again.",
|
|
33700
33761
|
"homeTemplates.loading": "Loading templates\u2026",
|
|
@@ -96927,8 +96988,8 @@ function clockOf(nodes, inst, elapsed, run4) {
|
|
|
96927
96988
|
if (!comp) return null;
|
|
96928
96989
|
if (run4?.scrub !== void 0) return { comp, ct: run4.scrub, live: !!run4.gliding || !!run4.from };
|
|
96929
96990
|
const m = playbackOf(nodes, inst, comp);
|
|
96930
|
-
const
|
|
96931
|
-
return { comp, ct: instanceTime(
|
|
96991
|
+
const started7 = startedAt(m, elapsed, run4);
|
|
96992
|
+
return { comp, ct: instanceTime(started7, m), live: playbackLive(started7, m) || !!run4?.from };
|
|
96932
96993
|
}
|
|
96933
96994
|
function poseInstance(w, vid, inst, elapsed, depth2, clock2 = clockOf(w.nodes, inst, elapsed, w.runtime.get(vid))) {
|
|
96934
96995
|
const { nodes } = w;
|
|
@@ -256020,6 +256081,21 @@ var init_api4 = __esm({
|
|
|
256020
256081
|
});
|
|
256021
256082
|
|
|
256022
256083
|
// lib/client/cloud/team.ts
|
|
256084
|
+
var team_exports = {};
|
|
256085
|
+
__export(team_exports, {
|
|
256086
|
+
TEAM_PROMPTED_KEY: () => TEAM_PROMPTED_KEY,
|
|
256087
|
+
activeHyperyTeamId: () => activeHyperyTeamId,
|
|
256088
|
+
activeTeamWorkspaceId: () => activeTeamWorkspaceId,
|
|
256089
|
+
markTeamPrompted: () => markTeamPrompted,
|
|
256090
|
+
openTeamPrompt: () => openTeamPrompt,
|
|
256091
|
+
planDialogScope: () => planDialogScope,
|
|
256092
|
+
planEntryAction: () => planEntryAction,
|
|
256093
|
+
refreshHyperyTeams: () => refreshHyperyTeams,
|
|
256094
|
+
selectHyperyTeam: () => selectHyperyTeam,
|
|
256095
|
+
startHyperyTeams: () => startHyperyTeams,
|
|
256096
|
+
useHyperyTeam: () => useHyperyTeam,
|
|
256097
|
+
useTeamPrompt: () => useTeamPrompt
|
|
256098
|
+
});
|
|
256023
256099
|
function load() {
|
|
256024
256100
|
try {
|
|
256025
256101
|
const raw = JSON.parse(localStorage.getItem(STORAGE_KEY2) ?? "null");
|
|
@@ -256028,6 +256104,36 @@ function load() {
|
|
|
256028
256104
|
}
|
|
256029
256105
|
return { teamId: "", teamName: "" };
|
|
256030
256106
|
}
|
|
256107
|
+
function selectHyperyTeam(teamId, teamName) {
|
|
256108
|
+
useHyperyTeam.setState({ teamId, teamName });
|
|
256109
|
+
try {
|
|
256110
|
+
localStorage.setItem(STORAGE_KEY2, JSON.stringify({ teamId, teamName }));
|
|
256111
|
+
} catch {
|
|
256112
|
+
}
|
|
256113
|
+
}
|
|
256114
|
+
async function refreshHyperyTeams(opts = {}) {
|
|
256115
|
+
if (!cloudUser()) {
|
|
256116
|
+
useHyperyTeam.setState({ teams: null, personalWorkspaceId: null });
|
|
256117
|
+
return;
|
|
256118
|
+
}
|
|
256119
|
+
useHyperyTeam.setState({ loading: true, error: null });
|
|
256120
|
+
try {
|
|
256121
|
+
if (opts.force) invalidateMe();
|
|
256122
|
+
if (opts.force) await cloudApi.signedIn();
|
|
256123
|
+
else void cloudApi.signedIn().catch(() => {
|
|
256124
|
+
});
|
|
256125
|
+
const me = await cloudApi.me();
|
|
256126
|
+
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 } : {} }));
|
|
256127
|
+
const personal = me.workspaces.find((w) => w.id === me.personalWorkspaceId);
|
|
256128
|
+
useHyperyTeam.setState({ teams, personalWorkspaceId: me.personalWorkspaceId, personalTier: personal?.tier ? { tier: personal.tier, pastDue: !!personal.pastDue } : null });
|
|
256129
|
+
const { teamId } = useHyperyTeam.getState();
|
|
256130
|
+
if (teamId && !teams.some((t3) => t3.teamId === teamId)) selectHyperyTeam("", "");
|
|
256131
|
+
} catch (e) {
|
|
256132
|
+
useHyperyTeam.setState({ error: e.message });
|
|
256133
|
+
} finally {
|
|
256134
|
+
useHyperyTeam.setState({ loading: false });
|
|
256135
|
+
}
|
|
256136
|
+
}
|
|
256031
256137
|
function activeHyperyTeamId() {
|
|
256032
256138
|
if (typeof window !== "undefined") {
|
|
256033
256139
|
const stored = load().teamId;
|
|
@@ -256040,10 +256146,105 @@ function activeTeamWorkspaceId() {
|
|
|
256040
256146
|
const { teamId, teams } = useHyperyTeam.getState();
|
|
256041
256147
|
return teamId ? teams?.find((t3) => t3.teamId === teamId)?.workspaceId : void 0;
|
|
256042
256148
|
}
|
|
256043
|
-
|
|
256149
|
+
function promptedFor() {
|
|
256150
|
+
try {
|
|
256151
|
+
return sessionStorage.getItem(PROMPTED_KEY);
|
|
256152
|
+
} catch {
|
|
256153
|
+
return null;
|
|
256154
|
+
}
|
|
256155
|
+
}
|
|
256156
|
+
function maybePromptForTeam() {
|
|
256157
|
+
if (!TEAM_PROMPT_ENABLED) return;
|
|
256158
|
+
const user2 = cloudUser();
|
|
256159
|
+
if (!user2) return;
|
|
256160
|
+
if (promptedFor() === user2.id) return;
|
|
256161
|
+
const { teams } = useHyperyTeam.getState();
|
|
256162
|
+
if (!teams) return;
|
|
256163
|
+
if (teams.length === 0) {
|
|
256164
|
+
markTeamPrompted();
|
|
256165
|
+
return;
|
|
256166
|
+
}
|
|
256167
|
+
useTeamPrompt.setState({ open: true, purpose: null });
|
|
256168
|
+
}
|
|
256169
|
+
function markTeamPrompted() {
|
|
256170
|
+
const user2 = cloudUser();
|
|
256171
|
+
try {
|
|
256172
|
+
if (user2) sessionStorage.setItem(PROMPTED_KEY, user2.id);
|
|
256173
|
+
} catch {
|
|
256174
|
+
}
|
|
256175
|
+
useTeamPrompt.setState({ open: false, purpose: null });
|
|
256176
|
+
}
|
|
256177
|
+
function openTeamPrompt(purpose = null) {
|
|
256178
|
+
useTeamPrompt.setState({ open: true, purpose });
|
|
256179
|
+
}
|
|
256180
|
+
async function followFileTeam(key5) {
|
|
256181
|
+
if (!key5 || !cloudUser()) return;
|
|
256182
|
+
const { teams, personalWorkspaceId } = useHyperyTeam.getState();
|
|
256183
|
+
if (!teams) return;
|
|
256184
|
+
try {
|
|
256185
|
+
const { cloudApi: cloudApi2 } = await Promise.resolve().then(() => (init_api4(), api_exports));
|
|
256186
|
+
const { file: file2 } = await cloudApi2.getFile(key5);
|
|
256187
|
+
if (file2.workspaceId === personalWorkspaceId) {
|
|
256188
|
+
selectHyperyTeam("", "");
|
|
256189
|
+
return;
|
|
256190
|
+
}
|
|
256191
|
+
const team = teams.find((t3) => t3.workspaceId === file2.workspaceId);
|
|
256192
|
+
if (team) selectHyperyTeam(team.teamId, team.name);
|
|
256193
|
+
} catch {
|
|
256194
|
+
}
|
|
256195
|
+
}
|
|
256196
|
+
function startHyperyTeams() {
|
|
256197
|
+
if (started || typeof window === "undefined") return;
|
|
256198
|
+
started = true;
|
|
256199
|
+
let linkedKey = null;
|
|
256200
|
+
void refreshHyperyTeams().then(() => {
|
|
256201
|
+
maybePromptForTeam();
|
|
256202
|
+
void followFileTeam(linkedKey);
|
|
256203
|
+
});
|
|
256204
|
+
void Promise.resolve().then(() => (init_sync2(), sync_exports2)).then(({ onSyncStatus: onSyncStatus2, syncStatus: syncStatus2 }) => {
|
|
256205
|
+
linkedKey = syncStatus2().link?.key ?? null;
|
|
256206
|
+
void followFileTeam(linkedKey);
|
|
256207
|
+
onSyncStatus2((_s, link2) => {
|
|
256208
|
+
const key5 = link2?.key ?? null;
|
|
256209
|
+
if (key5 !== linkedKey) {
|
|
256210
|
+
linkedKey = key5;
|
|
256211
|
+
void followFileTeam(key5);
|
|
256212
|
+
}
|
|
256213
|
+
});
|
|
256214
|
+
});
|
|
256215
|
+
window.addEventListener("storage", (e) => {
|
|
256216
|
+
if (e.key === STORAGE_KEY2) useHyperyTeam.setState(load());
|
|
256217
|
+
});
|
|
256218
|
+
onCloudSessionChange(() => {
|
|
256219
|
+
if (!cloudUser()) {
|
|
256220
|
+
selectHyperyTeam("", "");
|
|
256221
|
+
useTeamPrompt.setState({ open: false, purpose: null });
|
|
256222
|
+
try {
|
|
256223
|
+
sessionStorage.removeItem(PROMPTED_KEY);
|
|
256224
|
+
} catch {
|
|
256225
|
+
}
|
|
256226
|
+
}
|
|
256227
|
+
void refreshHyperyTeams().then(() => {
|
|
256228
|
+
maybePromptForTeam();
|
|
256229
|
+
void followFileTeam(linkedKey);
|
|
256230
|
+
});
|
|
256231
|
+
});
|
|
256232
|
+
}
|
|
256233
|
+
function planDialogScope(s, target2) {
|
|
256234
|
+
if (target2 !== null) {
|
|
256235
|
+
if (target2 === "" || target2 === s.personalWorkspaceId) return { teamId: "", teamName: "", workspaceId: s.personalWorkspaceId ?? "" };
|
|
256236
|
+
const team = s.teams?.find((t3) => t3.workspaceId === target2);
|
|
256237
|
+
if (team) return { teamId: team.teamId, teamName: team.name, workspaceId: team.workspaceId };
|
|
256238
|
+
}
|
|
256239
|
+
const active3 = s.teamId ? s.teams?.find((t3) => t3.teamId === s.teamId) : null;
|
|
256240
|
+
return { teamId: s.teamId, teamName: s.teamName, workspaceId: (s.teamId ? active3?.workspaceId : s.personalWorkspaceId) ?? void 0 };
|
|
256241
|
+
}
|
|
256242
|
+
function planEntryAction({ home }) {
|
|
256243
|
+
return home ? "choose-team" : "plan";
|
|
256244
|
+
}
|
|
256245
|
+
var STORAGE_KEY2, useHyperyTeam, TEAM_PROMPT_ENABLED, TEAM_PROMPTED_KEY, PROMPTED_KEY, useTeamPrompt, started;
|
|
256044
256246
|
var init_team = __esm({
|
|
256045
256247
|
"lib/client/cloud/team.ts"() {
|
|
256046
|
-
"use strict";
|
|
256047
256248
|
init_esm();
|
|
256048
256249
|
init_api4();
|
|
256049
256250
|
init_session();
|
|
@@ -256056,7 +256257,11 @@ var init_team = __esm({
|
|
|
256056
256257
|
loading: false,
|
|
256057
256258
|
error: null
|
|
256058
256259
|
}));
|
|
256260
|
+
TEAM_PROMPT_ENABLED = false;
|
|
256261
|
+
TEAM_PROMPTED_KEY = "popcraft-team-prompted";
|
|
256262
|
+
PROMPTED_KEY = TEAM_PROMPTED_KEY;
|
|
256059
256263
|
useTeamPrompt = create2(() => ({ open: false, purpose: null }));
|
|
256264
|
+
started = false;
|
|
256060
256265
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
256061
256266
|
}
|
|
256062
256267
|
});
|
|
@@ -303167,7 +303372,7 @@ function sampleIndices(count2, n) {
|
|
|
303167
303372
|
async function exportAnimation(renderer, doc2, spec, dest, opts = {}) {
|
|
303168
303373
|
const { signal, onProgress } = opts;
|
|
303169
303374
|
const { range: range3, width, height } = spec;
|
|
303170
|
-
const
|
|
303375
|
+
const started7 = performance.now();
|
|
303171
303376
|
const heap0 = heapUsed();
|
|
303172
303377
|
let peak = heap0 ?? 0;
|
|
303173
303378
|
const noteHeap = () => {
|
|
@@ -303242,7 +303447,7 @@ async function exportAnimation(renderer, doc2, spec, dest, opts = {}) {
|
|
|
303242
303447
|
});
|
|
303243
303448
|
throw e;
|
|
303244
303449
|
}
|
|
303245
|
-
const ms2 = performance.now() -
|
|
303450
|
+
const ms2 = performance.now() - started7;
|
|
303246
303451
|
const heap1 = heapUsed();
|
|
303247
303452
|
return {
|
|
303248
303453
|
frames: range3.count,
|
|
@@ -303740,6 +303945,7 @@ async function createFreshFileOrExplain(place4 = {}, seed2 = {}) {
|
|
|
303740
303945
|
var online, goesLocal;
|
|
303741
303946
|
var init_new_file = __esm({
|
|
303742
303947
|
"lib/client/cloud/new-file.ts"() {
|
|
303948
|
+
"use strict";
|
|
303743
303949
|
init_scene_graph();
|
|
303744
303950
|
init_print_pages();
|
|
303745
303951
|
init_page_presets();
|
|
@@ -304176,8 +304382,8 @@ function applyReadOnly(role) {
|
|
|
304176
304382
|
readOnlyDoc = canEdit(role) ? null : useEditorStore.getState().document;
|
|
304177
304383
|
}
|
|
304178
304384
|
function startCloudSync() {
|
|
304179
|
-
if (
|
|
304180
|
-
|
|
304385
|
+
if (started2 || typeof window === "undefined") return;
|
|
304386
|
+
started2 = true;
|
|
304181
304387
|
setRemoteMediaResolver(async (hash3) => {
|
|
304182
304388
|
const link2 = activeLink;
|
|
304183
304389
|
if (!link2) return null;
|
|
@@ -304250,7 +304456,7 @@ function startCloudSync() {
|
|
|
304250
304456
|
setStatus(liveStatus());
|
|
304251
304457
|
});
|
|
304252
304458
|
}
|
|
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,
|
|
304459
|
+
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
304460
|
var init_sync2 = __esm({
|
|
304255
304461
|
"lib/client/cloud/sync.ts"() {
|
|
304256
304462
|
init_paint_repair();
|
|
@@ -304299,7 +304505,7 @@ var init_sync2 = __esm({
|
|
|
304299
304505
|
});
|
|
304300
304506
|
openingFiles = /* @__PURE__ */ new Map();
|
|
304301
304507
|
mediaHealed = /* @__PURE__ */ new Set();
|
|
304302
|
-
|
|
304508
|
+
started2 = false;
|
|
304303
304509
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
304304
304510
|
}
|
|
304305
304511
|
});
|
|
@@ -304458,7 +304664,6 @@ async function dispatchShaped(key5, options) {
|
|
|
304458
304664
|
var onViolation;
|
|
304459
304665
|
var init_dispatch = __esm({
|
|
304460
304666
|
"lib/commands/dispatch.ts"() {
|
|
304461
|
-
"use strict";
|
|
304462
304667
|
init_errors();
|
|
304463
304668
|
init_registry();
|
|
304464
304669
|
init_confirm();
|
|
@@ -310295,6 +310500,7 @@ function videoPixelSize(resolution, aspect) {
|
|
|
310295
310500
|
var VIDEO_ASPECTS, VIDEO_RESOLUTIONS, SEEDANCE_ASPECTS, range, VIDEO_MODELS, DEFAULT_VIDEO_MODEL, videoModel, VIDEO_LIMITS;
|
|
310296
310501
|
var init_video_models = __esm({
|
|
310297
310502
|
"lib/ai/video-models.ts"() {
|
|
310503
|
+
"use strict";
|
|
310298
310504
|
VIDEO_ASPECTS = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"];
|
|
310299
310505
|
VIDEO_RESOLUTIONS = ["480p", "720p", "1080p"];
|
|
310300
310506
|
SEEDANCE_ASPECTS = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"];
|
|
@@ -310448,9 +310654,9 @@ async function requestVideo(req, opts = {}, rt = {}) {
|
|
|
310448
310654
|
const t0 = now2();
|
|
310449
310655
|
const report2 = (phase, spec2) => opts.onProgress?.({ phase, elapsed: now2() - t0, spec: spec2 });
|
|
310450
310656
|
report2("starting");
|
|
310451
|
-
const
|
|
310452
|
-
const { job, spec } =
|
|
310453
|
-
const warnings = [...
|
|
310657
|
+
const started7 = await (await aiFetch("/api/ai/video", { json: req, signal: opts.signal })).json();
|
|
310658
|
+
const { job, spec } = started7;
|
|
310659
|
+
const warnings = [...started7.warnings ?? []];
|
|
310454
310660
|
let misses = 0;
|
|
310455
310661
|
try {
|
|
310456
310662
|
for (; ; ) {
|
|
@@ -320386,7 +320592,7 @@ var init_package = __esm({
|
|
|
320386
320592
|
"packages/runtime/package.json"() {
|
|
320387
320593
|
package_default = {
|
|
320388
320594
|
name: "@popcraft/runtime",
|
|
320389
|
-
version: "0.
|
|
320595
|
+
version: "0.19.0",
|
|
320390
320596
|
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
320597
|
license: "MIT",
|
|
320392
320598
|
homepage: "https://popcraft.app/docs/exporting/nextjs",
|
|
@@ -347090,7 +347296,7 @@ async function runLottieExport(renderer, doc2, spec, filename, ctx2, memoryDesti
|
|
|
347090
347296
|
const support = lottieSupport2(doc2, spec.target);
|
|
347091
347297
|
if (!support.ok) throw new ToolError(`Lottie cannot carry this animation: ${support.blockers.join("; ")}. Export MP4, WebM or GIF instead.`);
|
|
347092
347298
|
ctx2.progress?.(0, spec.range.count, "Writing Lottie");
|
|
347093
|
-
const
|
|
347299
|
+
const started7 = performance.now();
|
|
347094
347300
|
const out = await exportLottie3(renderer, doc2, spec, filename.replace(/\.[^.]+$/, ""), { stateMachine });
|
|
347095
347301
|
if (ctx2.signal?.aborted) throw new ToolError("Export cancelled.");
|
|
347096
347302
|
const dest = ctx2.destination ? await ctx2.destination(filename, FORMAT_MIME2[spec.format]) : memoryDestination2(filename, FORMAT_MIME2[spec.format]);
|
|
@@ -347108,7 +347314,7 @@ async function runLottieExport(renderer, doc2, spec, filename, ctx2, memoryDesti
|
|
|
347108
347314
|
const notes = [.../* @__PURE__ */ new Set([...support.warnings, ...out.notes])];
|
|
347109
347315
|
return {
|
|
347110
347316
|
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() -
|
|
347317
|
+
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
347318
|
};
|
|
347113
347319
|
}
|
|
347114
347320
|
async function exportSite(doc2, pageId2, packaging, styling = "css") {
|
|
@@ -353357,10 +353563,12 @@ var init_upload2 = __esm({
|
|
|
353357
353563
|
// lib/client/cloud/sites.ts
|
|
353358
353564
|
var sites_exports = {};
|
|
353359
353565
|
__export(sites_exports, {
|
|
353566
|
+
deleteSite: () => deleteSite,
|
|
353360
353567
|
publishSite: () => publishSite,
|
|
353361
353568
|
renameSite: () => renameSite,
|
|
353362
353569
|
setSiteVersion: () => setSiteVersion,
|
|
353363
|
-
siteStatus: () => siteStatus
|
|
353570
|
+
siteStatus: () => siteStatus,
|
|
353571
|
+
workspaceSites: () => workspaceSites
|
|
353364
353572
|
});
|
|
353365
353573
|
function publishSite(key5, files, opts = {}) {
|
|
353366
353574
|
return publishFiles({
|
|
@@ -353370,7 +353578,7 @@ function publishSite(key5, files, opts = {}) {
|
|
|
353370
353578
|
}
|
|
353371
353579
|
}, files.map((f2) => ({ path: f2.path, bytes: bytesOf(f2) })), opts);
|
|
353372
353580
|
}
|
|
353373
|
-
var siteStatus, setSiteVersion, renameSite;
|
|
353581
|
+
var siteStatus, setSiteVersion, workspaceSites, deleteSite, renameSite;
|
|
353374
353582
|
var init_sites = __esm({
|
|
353375
353583
|
"lib/client/cloud/sites.ts"() {
|
|
353376
353584
|
"use strict";
|
|
@@ -353379,6 +353587,8 @@ var init_sites = __esm({
|
|
|
353379
353587
|
init_api4();
|
|
353380
353588
|
siteStatus = (key5) => api(`/api/sites${key5 ? `/${key5}` : ""}?t=${Date.now()}`);
|
|
353381
353589
|
setSiteVersion = (key5, version7) => api(`/api/sites/${key5}`, { method: "PATCH", json: { currentVersion: version7 } });
|
|
353590
|
+
workspaceSites = (workspaceId) => api(`/api/workspaces/${encodeURIComponent(workspaceId)}/sites?t=${Date.now()}`);
|
|
353591
|
+
deleteSite = (key5) => api(`/api/sites/${key5}`, { method: "DELETE" });
|
|
353382
353592
|
renameSite = (key5, slug3) => api(`/api/sites/${key5}`, { method: "PATCH", json: { slug: slug3 } });
|
|
353383
353593
|
}
|
|
353384
353594
|
});
|
|
@@ -353632,7 +353842,7 @@ async function publishedFile() {
|
|
|
353632
353842
|
if (!key5) throw new CommandError("This file is not saved to the cloud yet, so it has no site. Publish it first.", "failed");
|
|
353633
353843
|
return key5;
|
|
353634
353844
|
}
|
|
353635
|
-
var statusData, publishSite2, publishSetVersion, publishStatus, publishStore, publishCommands;
|
|
353845
|
+
var statusData, publishSite2, publishSetVersion, publishListSites, publishDeleteSite, publishStatus, publishStore, publishCommands;
|
|
353636
353846
|
var init_publish = __esm({
|
|
353637
353847
|
"lib/commands/publish.ts"() {
|
|
353638
353848
|
"use strict";
|
|
@@ -353709,6 +353919,53 @@ var init_publish = __esm({
|
|
|
353709
353919
|
return { summary: version7 === null ? "Took the site offline" : `Version ${version7} is online at ${status3.site?.url ?? "the site's address"}`, data: statusData(status3) };
|
|
353710
353920
|
}
|
|
353711
353921
|
});
|
|
353922
|
+
publishListSites = defineCommand({
|
|
353923
|
+
id: "publish.listSites",
|
|
353924
|
+
title: "List published websites",
|
|
353925
|
+
domain: "publish",
|
|
353926
|
+
effect: "none",
|
|
353927
|
+
permission: null,
|
|
353928
|
+
params: external_exports.object({
|
|
353929
|
+
workspaceId: external_exports.string().optional().describe("The team (workspace) whose sites to list; default: the selected team, else your own.")
|
|
353930
|
+
}),
|
|
353931
|
+
expose: {
|
|
353932
|
+
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)." }
|
|
353933
|
+
},
|
|
353934
|
+
run: async (p2) => {
|
|
353935
|
+
await signedIn();
|
|
353936
|
+
const [{ workspaceSites: workspaceSites2 }, { activeTeamWorkspaceId: activeTeamWorkspaceId2, useHyperyTeam: useHyperyTeam2 }] = await Promise.all([Promise.resolve().then(() => (init_sites(), sites_exports)), Promise.resolve().then(() => (init_team(), team_exports))]);
|
|
353937
|
+
const workspaceId = p2.workspaceId ?? activeTeamWorkspaceId2() ?? useHyperyTeam2.getState().personalWorkspaceId;
|
|
353938
|
+
if (!workspaceId) throw new CommandError("Your workspaces have not loaded yet. Try again in a moment.", "failed");
|
|
353939
|
+
const out = await workspaceSites2(workspaceId);
|
|
353940
|
+
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 };
|
|
353941
|
+
}
|
|
353942
|
+
});
|
|
353943
|
+
publishDeleteSite = defineCommand({
|
|
353944
|
+
id: "publish.deleteSite",
|
|
353945
|
+
title: "Delete a published website",
|
|
353946
|
+
domain: "publish",
|
|
353947
|
+
effect: "none",
|
|
353948
|
+
permission: null,
|
|
353949
|
+
params: external_exports.object({
|
|
353950
|
+
fileKey: external_exports.string().optional().describe("The file whose website to delete (from list_published_sites); default: the open file's.")
|
|
353951
|
+
}),
|
|
353952
|
+
confirm: {
|
|
353953
|
+
level: "confirm",
|
|
353954
|
+
summary: (p2) => p2.fileKey ? "Delete that file's published website" : "Delete this file's published website",
|
|
353955
|
+
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."
|
|
353956
|
+
},
|
|
353957
|
+
expose: {
|
|
353958
|
+
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." }
|
|
353959
|
+
},
|
|
353960
|
+
run: async (p2, ctx2) => {
|
|
353961
|
+
const key5 = p2.fileKey ?? await publishedFile();
|
|
353962
|
+
await signedIn();
|
|
353963
|
+
const { deleteSite: deleteSite2 } = await Promise.resolve().then(() => (init_sites(), sites_exports));
|
|
353964
|
+
await deleteSite2(key5);
|
|
353965
|
+
ctx2.notice("The website is deleted.");
|
|
353966
|
+
return { summary: "Deleted the published website", data: { fileKey: key5 } };
|
|
353967
|
+
}
|
|
353968
|
+
});
|
|
353712
353969
|
publishStatus = defineCommand({
|
|
353713
353970
|
id: "publish.status",
|
|
353714
353971
|
title: "Website status",
|
|
@@ -353769,7 +354026,7 @@ var init_publish = __esm({
|
|
|
353769
354026
|
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
354027
|
}
|
|
353771
354028
|
});
|
|
353772
|
-
publishCommands = [publishSite2, publishSetVersion, publishStore];
|
|
354029
|
+
publishCommands = [publishSite2, publishSetVersion, publishStore, publishDeleteSite];
|
|
353773
354030
|
}
|
|
353774
354031
|
});
|
|
353775
354032
|
|
|
@@ -353777,7 +354034,6 @@ var init_publish = __esm({
|
|
|
353777
354034
|
var storeOpsSeam;
|
|
353778
354035
|
var init_seams = __esm({
|
|
353779
354036
|
"lib/commands/seams.ts"() {
|
|
353780
|
-
"use strict";
|
|
353781
354037
|
storeOpsSeam = (st) => ({
|
|
353782
354038
|
booleanOperation: (op4) => st().booleanOperation(op4),
|
|
353783
354039
|
flatten: () => st().flattenSelection(),
|
|
@@ -358129,8 +358385,8 @@ async function unpublishLibrary(libraryId) {
|
|
|
358129
358385
|
await refreshLibraries();
|
|
358130
358386
|
}
|
|
358131
358387
|
function startLibraries() {
|
|
358132
|
-
if (
|
|
358133
|
-
|
|
358388
|
+
if (started3 || typeof window === "undefined") return;
|
|
358389
|
+
started3 = true;
|
|
358134
358390
|
void refreshLibraries();
|
|
358135
358391
|
onCloudSessionChange(() => void refreshLibraries());
|
|
358136
358392
|
let lastKey = null;
|
|
@@ -358150,7 +358406,7 @@ function startLibraries() {
|
|
|
358150
358406
|
}
|
|
358151
358407
|
});
|
|
358152
358408
|
}
|
|
358153
|
-
var useLibraries, liveDoc, payloadCache, motionCache,
|
|
358409
|
+
var useLibraries, liveDoc, payloadCache, motionCache, started3;
|
|
358154
358410
|
var init_libraries2 = __esm({
|
|
358155
358411
|
"lib/client/libraries.ts"() {
|
|
358156
358412
|
init_esm();
|
|
@@ -358165,7 +358421,7 @@ var init_libraries2 = __esm({
|
|
|
358165
358421
|
liveDoc = () => useEditorStore.getState().document;
|
|
358166
358422
|
payloadCache = /* @__PURE__ */ new Map();
|
|
358167
358423
|
motionCache = /* @__PURE__ */ new Map();
|
|
358168
|
-
|
|
358424
|
+
started3 = false;
|
|
358169
358425
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
358170
358426
|
}
|
|
358171
358427
|
});
|
|
@@ -371916,8 +372172,8 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
371916
372172
|
}
|
|
371917
372173
|
return true;
|
|
371918
372174
|
}
|
|
371919
|
-
#endKnockoutElement(
|
|
371920
|
-
if (!
|
|
372175
|
+
#endKnockoutElement(started7) {
|
|
372176
|
+
if (!started7) {
|
|
371921
372177
|
return;
|
|
371922
372178
|
}
|
|
371923
372179
|
const tempEntry = this.#knockoutTempCanvasEntry;
|
|
@@ -372132,7 +372388,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372132
372388
|
this.ctx.closePath();
|
|
372133
372389
|
}
|
|
372134
372390
|
stroke(opIdx, path, consumePath = true) {
|
|
372135
|
-
const
|
|
372391
|
+
const started7 = consumePath && this.#beginKnockoutElement(this.current.strokeAlpha);
|
|
372136
372392
|
const ctx2 = this.ctx;
|
|
372137
372393
|
const strokeColor = this.current.strokeColor;
|
|
372138
372394
|
ctx2.globalAlpha = this.current.strokeAlpha;
|
|
@@ -372157,13 +372413,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372157
372413
|
this.consumePath(opIdx, path, this.current.getClippedPathBoundingBox(PathType.STROKE, getCurrentTransform(this.ctx)));
|
|
372158
372414
|
}
|
|
372159
372415
|
ctx2.globalAlpha = this.current.fillAlpha;
|
|
372160
|
-
this.#endKnockoutElement(
|
|
372416
|
+
this.#endKnockoutElement(started7);
|
|
372161
372417
|
}
|
|
372162
372418
|
closeStroke(opIdx, path) {
|
|
372163
372419
|
this.stroke(opIdx, path);
|
|
372164
372420
|
}
|
|
372165
372421
|
fill(opIdx, path, consumePath = true) {
|
|
372166
|
-
const
|
|
372422
|
+
const started7 = consumePath && this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372167
372423
|
const ctx2 = this.ctx;
|
|
372168
372424
|
const fillColor = this.current.fillColor;
|
|
372169
372425
|
const isPatternFill = this.current.patternFill;
|
|
@@ -372180,7 +372436,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372180
372436
|
this.consumePath(opIdx, path, intersect2);
|
|
372181
372437
|
}
|
|
372182
372438
|
this.current.tilingPatternDims = null;
|
|
372183
|
-
this.#endKnockoutElement(
|
|
372439
|
+
this.#endKnockoutElement(started7);
|
|
372184
372440
|
return;
|
|
372185
372441
|
}
|
|
372186
372442
|
const baseTransform = fillColor.isModifyingCurrentTransform() ? ctx2.getTransform() : null;
|
|
@@ -372209,18 +372465,18 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372209
372465
|
if (consumePath) {
|
|
372210
372466
|
this.consumePath(opIdx, path, intersect2);
|
|
372211
372467
|
}
|
|
372212
|
-
this.#endKnockoutElement(
|
|
372468
|
+
this.#endKnockoutElement(started7);
|
|
372213
372469
|
}
|
|
372214
372470
|
eoFill(opIdx, path) {
|
|
372215
372471
|
this.pendingEOFill = true;
|
|
372216
372472
|
this.fill(opIdx, path);
|
|
372217
372473
|
}
|
|
372218
372474
|
fillStroke(opIdx, path) {
|
|
372219
|
-
const
|
|
372475
|
+
const started7 = this.#beginKnockoutElement(Math.min(this.current.fillAlpha, this.current.strokeAlpha));
|
|
372220
372476
|
this.fill(opIdx, path, false);
|
|
372221
372477
|
this.stroke(opIdx, path, false);
|
|
372222
372478
|
this.consumePath(opIdx, path);
|
|
372223
|
-
this.#endKnockoutElement(
|
|
372479
|
+
this.#endKnockoutElement(started7);
|
|
372224
372480
|
}
|
|
372225
372481
|
eoFillStroke(opIdx, path) {
|
|
372226
372482
|
this.pendingEOFill = true;
|
|
@@ -372237,10 +372493,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372237
372493
|
this.consumePath(opIdx, path);
|
|
372238
372494
|
}
|
|
372239
372495
|
rawFillPath(opIdx, path) {
|
|
372240
|
-
const
|
|
372496
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372241
372497
|
this.ctx.fill(path);
|
|
372242
372498
|
this.dependencyTracker?.recordDependencies(opIdx, Dependencies.rawFillPath).recordOperation(opIdx);
|
|
372243
|
-
this.#endKnockoutElement(
|
|
372499
|
+
this.#endKnockoutElement(started7);
|
|
372244
372500
|
}
|
|
372245
372501
|
clip(opIdx) {
|
|
372246
372502
|
this.dependencyTracker?.recordFutureForcedDependency("clipMode", opIdx);
|
|
@@ -372476,10 +372732,10 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372476
372732
|
const current3 = this.current;
|
|
372477
372733
|
const font = current3.font;
|
|
372478
372734
|
if (font.isType3Font) {
|
|
372479
|
-
const
|
|
372735
|
+
const started8 = this.#beginKnockoutElement(current3.fillAlpha);
|
|
372480
372736
|
this.showType3Text(opIdx, glyphs);
|
|
372481
372737
|
this.dependencyTracker?.recordShowTextOperation(opIdx);
|
|
372482
|
-
this.#endKnockoutElement(
|
|
372738
|
+
this.#endKnockoutElement(started8);
|
|
372483
372739
|
return;
|
|
372484
372740
|
}
|
|
372485
372741
|
const fontSize = current3.fontSize;
|
|
@@ -372487,7 +372743,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372487
372743
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
372488
372744
|
return;
|
|
372489
372745
|
}
|
|
372490
|
-
const
|
|
372746
|
+
const started7 = this.#beginKnockoutElement(current3.fillAlpha);
|
|
372491
372747
|
const ctx2 = this.ctx;
|
|
372492
372748
|
const fontSizeScale = current3.fontSizeScale;
|
|
372493
372749
|
const charSpacing = current3.charSpacing;
|
|
@@ -372558,7 +372814,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372558
372814
|
current3.x += width * widthAdvanceScale * textHScale;
|
|
372559
372815
|
ctx2.restore();
|
|
372560
372816
|
this.compose();
|
|
372561
|
-
this.#endKnockoutElement(
|
|
372817
|
+
this.#endKnockoutElement(started7);
|
|
372562
372818
|
return;
|
|
372563
372819
|
}
|
|
372564
372820
|
let x2 = 0, i2;
|
|
@@ -372628,7 +372884,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372628
372884
|
ctx2.restore();
|
|
372629
372885
|
this.compose();
|
|
372630
372886
|
this.dependencyTracker?.recordShowTextOperation(opIdx);
|
|
372631
|
-
this.#endKnockoutElement(
|
|
372887
|
+
this.#endKnockoutElement(started7);
|
|
372632
372888
|
}
|
|
372633
372889
|
showType3Text(opIdx, glyphs) {
|
|
372634
372890
|
const ctx2 = this.ctx;
|
|
@@ -372760,7 +373016,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372760
373016
|
if (!this.contentVisible) {
|
|
372761
373017
|
return;
|
|
372762
373018
|
}
|
|
372763
|
-
const
|
|
373019
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
372764
373020
|
const ctx2 = this.ctx;
|
|
372765
373021
|
this.save(opIdx);
|
|
372766
373022
|
const pattern = this._getPattern(opIdx, objId2);
|
|
@@ -372781,7 +373037,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
372781
373037
|
this.dependencyTracker?.resetBBox(opIdx).recordFullPageBBox(opIdx).recordDependencies(opIdx, Dependencies.transform).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx);
|
|
372782
373038
|
this.compose(this.current.getClippedPathBoundingBox());
|
|
372783
373039
|
this.restore(opIdx);
|
|
372784
|
-
this.#endKnockoutElement(
|
|
373040
|
+
this.#endKnockoutElement(started7);
|
|
372785
373041
|
}
|
|
372786
373042
|
beginInlineImage() {
|
|
372787
373043
|
unreachable("Should not call beginInlineImage");
|
|
@@ -373157,7 +373413,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373157
373413
|
const count2 = img.count;
|
|
373158
373414
|
img = this.getObject(opIdx, img.data, img);
|
|
373159
373415
|
img.count = count2;
|
|
373160
|
-
const
|
|
373416
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373161
373417
|
const ctx2 = this.ctx;
|
|
373162
373418
|
const mask = this._createMaskCanvas(opIdx, img);
|
|
373163
373419
|
const maskCanvas = mask.canvas;
|
|
@@ -373170,14 +373426,14 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373170
373426
|
this.canvasFactory.destroy(mask.canvasEntry);
|
|
373171
373427
|
}
|
|
373172
373428
|
this.compose();
|
|
373173
|
-
this.#endKnockoutElement(
|
|
373429
|
+
this.#endKnockoutElement(started7);
|
|
373174
373430
|
}
|
|
373175
373431
|
paintImageMaskXObjectRepeat(opIdx, img, scaleX, skewX = 0, skewY = 0, scaleY, positions) {
|
|
373176
373432
|
if (!this.contentVisible) {
|
|
373177
373433
|
return;
|
|
373178
373434
|
}
|
|
373179
373435
|
img = this.getObject(opIdx, img.data, img);
|
|
373180
|
-
const
|
|
373436
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373181
373437
|
const ctx2 = this.ctx;
|
|
373182
373438
|
ctx2.save();
|
|
373183
373439
|
const currentTransform = getCurrentTransform(ctx2);
|
|
@@ -373196,13 +373452,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373196
373452
|
}
|
|
373197
373453
|
this.compose();
|
|
373198
373454
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373199
|
-
this.#endKnockoutElement(
|
|
373455
|
+
this.#endKnockoutElement(started7);
|
|
373200
373456
|
}
|
|
373201
373457
|
paintImageMaskXObjectGroup(opIdx, images) {
|
|
373202
373458
|
if (!this.contentVisible) {
|
|
373203
373459
|
return;
|
|
373204
373460
|
}
|
|
373205
|
-
const
|
|
373461
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373206
373462
|
const ctx2 = this.ctx;
|
|
373207
373463
|
const fillColor = this.current.fillColor;
|
|
373208
373464
|
const isPatternFill = this.current.patternFill;
|
|
@@ -373233,7 +373489,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373233
373489
|
}
|
|
373234
373490
|
this.compose();
|
|
373235
373491
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373236
|
-
this.#endKnockoutElement(
|
|
373492
|
+
this.#endKnockoutElement(started7);
|
|
373237
373493
|
}
|
|
373238
373494
|
paintImageXObject(opIdx, objId2) {
|
|
373239
373495
|
if (!this.contentVisible) {
|
|
@@ -373305,7 +373561,7 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373305
373561
|
}
|
|
373306
373562
|
const width = imgData.width;
|
|
373307
373563
|
const height = imgData.height;
|
|
373308
|
-
const
|
|
373564
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373309
373565
|
const ctx2 = this.ctx;
|
|
373310
373566
|
this.save(opIdx);
|
|
373311
373567
|
const {
|
|
@@ -373342,13 +373598,13 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373342
373598
|
}
|
|
373343
373599
|
this.compose();
|
|
373344
373600
|
this.restore(opIdx);
|
|
373345
|
-
this.#endKnockoutElement(
|
|
373601
|
+
this.#endKnockoutElement(started7);
|
|
373346
373602
|
}
|
|
373347
373603
|
paintInlineImageXObjectGroup(opIdx, imgData, map2) {
|
|
373348
373604
|
if (!this.contentVisible) {
|
|
373349
373605
|
return;
|
|
373350
373606
|
}
|
|
373351
|
-
const
|
|
373607
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373352
373608
|
const ctx2 = this.ctx;
|
|
373353
373609
|
let imgToPaint;
|
|
373354
373610
|
let inlineImgCanvas = null;
|
|
@@ -373376,17 +373632,17 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
373376
373632
|
}
|
|
373377
373633
|
this.dependencyTracker?.recordOperation(opIdx);
|
|
373378
373634
|
this.compose();
|
|
373379
|
-
this.#endKnockoutElement(
|
|
373635
|
+
this.#endKnockoutElement(started7);
|
|
373380
373636
|
}
|
|
373381
373637
|
paintSolidColorImageMask(opIdx) {
|
|
373382
373638
|
if (!this.contentVisible) {
|
|
373383
373639
|
return;
|
|
373384
373640
|
}
|
|
373385
|
-
const
|
|
373641
|
+
const started7 = this.#beginKnockoutElement(this.current.fillAlpha);
|
|
373386
373642
|
this.dependencyTracker?.resetBBox(opIdx).recordBBox(opIdx, this.ctx, 0, 1, 0, 1).recordDependencies(opIdx, Dependencies.fill).recordOperation(opIdx);
|
|
373387
373643
|
this.ctx.fillRect(0, 0, 1, 1);
|
|
373388
373644
|
this.compose();
|
|
373389
|
-
this.#endKnockoutElement(
|
|
373645
|
+
this.#endKnockoutElement(started7);
|
|
373390
373646
|
}
|
|
373391
373647
|
markPoint(opIdx, tag) {
|
|
373392
373648
|
}
|
|
@@ -389772,8 +390028,8 @@ function versionLabel(v) {
|
|
|
389772
390028
|
return `Autosave ${formatDate(v.createdAt, { month: "short", day: "numeric", hour: "numeric", minute: "2-digit" })}`;
|
|
389773
390029
|
}
|
|
389774
390030
|
function startLocalCheckpoints() {
|
|
389775
|
-
if (
|
|
389776
|
-
|
|
390031
|
+
if (started4 || typeof window === "undefined") return;
|
|
390032
|
+
started4 = true;
|
|
389777
390033
|
let editingSince = null;
|
|
389778
390034
|
let lastDocId = useEditorStore.getState().document.id;
|
|
389779
390035
|
let checkedBeforeEditing = false;
|
|
@@ -389807,7 +390063,7 @@ function startLocalCheckpoints() {
|
|
|
389807
390063
|
});
|
|
389808
390064
|
}, 6e4);
|
|
389809
390065
|
}
|
|
389810
|
-
var CHECKPOINT_EVERY_MS, KEEP_LOCAL_AUTO, listKey, snapKey, fromServer, docCache,
|
|
390066
|
+
var CHECKPOINT_EVERY_MS, KEEP_LOCAL_AUTO, listKey, snapKey, fromServer, docCache, started4;
|
|
389811
390067
|
var init_versions3 = __esm({
|
|
389812
390068
|
"lib/client/versions.ts"() {
|
|
389813
390069
|
init_format();
|
|
@@ -389832,7 +390088,7 @@ var init_versions3 = __esm({
|
|
|
389832
390088
|
authorImage: v.author?.image ?? null
|
|
389833
390089
|
});
|
|
389834
390090
|
docCache = /* @__PURE__ */ new Map();
|
|
389835
|
-
|
|
390091
|
+
started4 = false;
|
|
389836
390092
|
if (typeof module !== "undefined") module.hot?.decline();
|
|
389837
390093
|
}
|
|
389838
390094
|
});
|
|
@@ -391764,8 +392020,8 @@ function pluginCommand(plugins) {
|
|
|
391764
392020
|
}
|
|
391765
392021
|
function registerAppCommands() {
|
|
391766
392022
|
registerCommand(...appCommands);
|
|
391767
|
-
if (
|
|
391768
|
-
|
|
392023
|
+
if (started5 || typeof window === "undefined") return;
|
|
392024
|
+
started5 = true;
|
|
391769
392025
|
void Promise.resolve().then(() => (init_theme_store(), theme_store_exports)).then(({ useThemeStore: useThemeStore2, pickableThemes: pickableThemes2 }) => {
|
|
391770
392026
|
const sync = () => registerCommand(themeCommand(pickableThemes2(useThemeStore2.getState())));
|
|
391771
392027
|
sync();
|
|
@@ -391777,7 +392033,7 @@ function registerAppCommands() {
|
|
|
391777
392033
|
usePluginStore2.subscribe(sync);
|
|
391778
392034
|
});
|
|
391779
392035
|
}
|
|
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,
|
|
392036
|
+
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
392037
|
var init_app = __esm({
|
|
391782
392038
|
"lib/commands/app.ts"() {
|
|
391783
392039
|
init_zod();
|
|
@@ -392173,7 +392429,7 @@ var init_app = __esm({
|
|
|
392173
392429
|
}
|
|
392174
392430
|
});
|
|
392175
392431
|
appCommands = [modeSet, modeEdit, nodeRasterize, panelOpen, panelToggle, dialogOpen, aiOpen, docAction, toolSet, toolPlace, nodeOps, canvasToggle, viewSetBreakpoint, popcornOpen, pageGo];
|
|
392176
|
-
|
|
392432
|
+
started5 = false;
|
|
392177
392433
|
}
|
|
392178
392434
|
});
|
|
392179
392435
|
|
|
@@ -392419,8 +392675,8 @@ function reportToolbarWidth() {
|
|
|
392419
392675
|
}, 250);
|
|
392420
392676
|
}
|
|
392421
392677
|
function startDesktopTab() {
|
|
392422
|
-
if (
|
|
392423
|
-
|
|
392678
|
+
if (started6 || !isDesktopTabs()) return;
|
|
392679
|
+
started6 = true;
|
|
392424
392680
|
const html = document.documentElement;
|
|
392425
392681
|
const mark2 = () => {
|
|
392426
392682
|
if (html.dataset.desktop !== "tabs") html.dataset.desktop = "tabs";
|
|
@@ -392456,7 +392712,7 @@ function startDesktopTab() {
|
|
|
392456
392712
|
if (msg.type === "deleted") window.location.replace(EDITOR_HOME);
|
|
392457
392713
|
});
|
|
392458
392714
|
}
|
|
392459
|
-
var openTab, openCloudFileTab, isHomeTab,
|
|
392715
|
+
var openTab, openCloudFileTab, isHomeTab, started6;
|
|
392460
392716
|
var init_tabs = __esm({
|
|
392461
392717
|
"lib/desktop/tabs.ts"() {
|
|
392462
392718
|
init_editor_store();
|
|
@@ -392467,7 +392723,7 @@ var init_tabs = __esm({
|
|
|
392467
392723
|
openTab = (path, title) => invoke("tab_open", { url: path, activate: true, title });
|
|
392468
392724
|
openCloudFileTab = (key5, name2) => openTab(cloudFilePath(key5), name2);
|
|
392469
392725
|
isHomeTab = () => isDesktopTabs() && tabTarget(window.location.pathname, window.location.search).kind === "home";
|
|
392470
|
-
|
|
392726
|
+
started6 = false;
|
|
392471
392727
|
}
|
|
392472
392728
|
});
|
|
392473
392729
|
|
|
@@ -395502,6 +395758,7 @@ var init_builtin4 = __esm({
|
|
|
395502
395758
|
siteSetGpuTransitions,
|
|
395503
395759
|
// the file as a website online (lib/client/cloud/publish-site.ts): what is published (appended, as above)
|
|
395504
395760
|
publishStatus,
|
|
395761
|
+
publishListSites,
|
|
395505
395762
|
// designs as code (lib/agent/design-script): a whole design from one template-kit script (appended, as above)
|
|
395506
395763
|
designWriteScript,
|
|
395507
395764
|
designGetScript,
|
|
@@ -402796,7 +403053,7 @@ init_resources();
|
|
|
402796
403053
|
init_desktop();
|
|
402797
403054
|
init_hypery();
|
|
402798
403055
|
import { createInterface } from "node:readline";
|
|
402799
|
-
var VERSION2 = "0.
|
|
403056
|
+
var VERSION2 = "0.19.0";
|
|
402800
403057
|
var HELP = `popcraft ${VERSION2} \u2014 the PopCraft command line
|
|
402801
403058
|
|
|
402802
403059
|
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.19.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.19.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "node build.mjs",
|