@pinepaper.studio/mcp-server 1.6.28 → 1.6.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/SECURITY.md +2 -3
- package/dist/agent/export-manager.js +125 -125
- package/dist/assets/repositories/fontawesome.d.ts.map +1 -1
- package/dist/assets/repositories/fontawesome.js +2 -1
- package/dist/assets/repositories/fontawesome.js.map +1 -1
- package/dist/assets/repositories/iconify.d.ts.map +1 -1
- package/dist/assets/repositories/iconify.js +4 -3
- package/dist/assets/repositories/iconify.js.map +1 -1
- package/dist/browser/puppeteer-controller.js +38 -23
- package/dist/build-info.json +2 -2
- package/dist/cli.js +54 -54
- package/dist/execution/canvas-state.js +25 -25
- package/dist/i18n/locales/en.js +22 -22
- package/dist/i18n/locales/fil.js +44 -44
- package/dist/i18n/locales/is.js +22 -22
- package/dist/i18n/locales/ur.js +22 -22
- package/dist/index.js +5559 -5559
- package/dist/ontology/upstream-vocabulary.js +4 -4
- package/dist/tools/craft-tools.js +18 -18
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +2816 -2815
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/effect-check.js +68 -68
- package/dist/tools/engine-methods.d.ts.map +1 -1
- package/dist/tools/engine-methods.js +1 -1
- package/dist/tools/engine-methods.js.map +1 -1
- package/dist/tools/handlers/font.js +22 -22
- package/dist/tools/handlers/generate.d.ts.map +1 -1
- package/dist/tools/handlers/generate.js +2 -1
- package/dist/tools/handlers/generate.js.map +1 -1
- package/dist/tools/handlers.js +16 -16
- package/dist/tools/lane.js +64 -64
- package/dist/tools/p5-compat/p5-helpers.js +341 -341
- package/dist/tools/timeline.js +82 -82
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +6616 -5859
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +2 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +2 -0
- package/dist/types/schemas.js.map +1 -1
- package/dist/utils/safe-fetch.d.ts +8 -0
- package/dist/utils/safe-fetch.d.ts.map +1 -1
- package/dist/utils/safe-fetch.js +125 -34
- package/dist/utils/safe-fetch.js.map +1 -1
- package/dist/vendor/design/device-mockup-generator.js +167 -150
- package/dist/vendor/design/recursive-subdivision-generator.js +107 -107
- package/dist/vendor/design/textile-weave-generator.js +429 -429
- package/dist/vendor/design/ui-kit-runtime.js +674 -674
- package/manifest.json +1 -1
- package/package.json +7 -4
|
@@ -207,113 +207,113 @@ export function generateRecursiveSubdivisionCode(opts = {}) {
|
|
|
207
207
|
const { cells, dividers } = partitionSubdivision(opts);
|
|
208
208
|
const serializedCells = JSON.stringify(cells);
|
|
209
209
|
const serializedDividers = JSON.stringify(dividers);
|
|
210
|
-
return
|
|
211
|
-
(
|
|
212
|
-
const items = []
|
|
213
|
-
|
|
214
|
-
const cellInset =
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const cells =
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const cellId = prefix + "_cell_" + i;
|
|
248
|
-
if (typeof app.registerItem === "function") {
|
|
249
|
-
app.registerItem(rect, cellId, {
|
|
250
|
-
source: "recursive_subdivision",
|
|
251
|
-
depth: c.depth,
|
|
252
|
-
isRestCell: Boolean(c.isRestCell)
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
items.push(rect);
|
|
256
|
-
|
|
257
|
-
// Optional nested accent box
|
|
258
|
-
if (c.hasNested && c.nestedColor && iw > 24 && ih > 24) {
|
|
259
|
-
const nestInset = Math.min(iw, ih) * 0.22;
|
|
260
|
-
const nestRect = new paper.Path.Rectangle({
|
|
261
|
-
point: [ix + nestInset, iy + nestInset],
|
|
262
|
-
size: [iw - nestInset * 2, ih - nestInset * 2],
|
|
263
|
-
fillColor: c.nestedColor,
|
|
264
|
-
strokeColor: null
|
|
265
|
-
});
|
|
266
|
-
const nestId = prefix + "_cell_" + i + "_nested";
|
|
267
|
-
if (typeof app.registerItem === "function") {
|
|
268
|
-
app.registerItem(nestRect, nestId, { source: "recursive_subdivision", role: "nested" });
|
|
269
|
-
}
|
|
270
|
-
items.push(nestRect);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// 3. Orthogonal Divider Grid Lines
|
|
276
|
-
if (dividerWidth > 0) {
|
|
277
|
-
const dividers = ${serializedDividers};
|
|
278
|
-
for (let j = 0; j < dividers.length; j++) {
|
|
279
|
-
const d = dividers[j];
|
|
280
|
-
const line = new paper.Path.Line({
|
|
281
|
-
from: [d.x0, d.y0],
|
|
282
|
-
to: [d.x1, d.y1],
|
|
283
|
-
strokeColor: dividerColor,
|
|
284
|
-
strokeWidth: dividerWidth,
|
|
285
|
-
strokeCap: "square"
|
|
286
|
-
});
|
|
287
|
-
const divId = prefix + "_divider_" + j;
|
|
288
|
-
if (typeof app.registerItem === "function") {
|
|
289
|
-
app.registerItem(line, divId, { source: "recursive_subdivision", role: "divider" });
|
|
290
|
-
}
|
|
291
|
-
items.push(line);
|
|
292
|
-
}
|
|
210
|
+
return ("// Recursive Quadtree Subdivision Vector Generator (" +
|
|
211
|
+
String(presetName) +
|
|
212
|
+
")\n(function() {\n const items = [];\n const prefix = \"" +
|
|
213
|
+
String(prefix) +
|
|
214
|
+
"\";\n const cellInset = " +
|
|
215
|
+
String(cellInset) +
|
|
216
|
+
";\n const dividerWidth = " +
|
|
217
|
+
String(dividerWidth) +
|
|
218
|
+
";\n const dividerColor = \"" +
|
|
219
|
+
String(dividerColor) +
|
|
220
|
+
"\";\n const groundColor = \"" +
|
|
221
|
+
String(ground) +
|
|
222
|
+
"\";\n\n // 1. Solid Ground Backdrop\n const bg = new paper.Path.Rectangle({\n point: [" +
|
|
223
|
+
String(x) +
|
|
224
|
+
", " +
|
|
225
|
+
String(y) +
|
|
226
|
+
"],\n size: [" +
|
|
227
|
+
String(w) +
|
|
228
|
+
", " +
|
|
229
|
+
String(h) +
|
|
230
|
+
"],\n fillColor: groundColor,\n strokeColor: null\n });\n if (typeof app.registerItem === \"function\") {\n app.registerItem(bg, prefix + \"_backdrop\", { source: \"recursive_subdivision\", role: \"backdrop\" });\n }\n items.push(bg);\n\n // 2. Leaf Color Blocks & Nested Accents\n const cells = " +
|
|
231
|
+
String(serializedCells) +
|
|
232
|
+
";\n for (let i = 0; i < cells.length; i++) {\n const c = cells[i];\n const ix = c.x + cellInset;\n const iy = c.y + cellInset;\n const iw = Math.max(1, c.width - cellInset * 2);\n const ih = Math.max(1, c.height - cellInset * 2);\n\n if (c.color && c.color !== groundColor) {\n const rect = new paper.Path.Rectangle({\n point: [ix, iy],\n size: [iw, ih],\n fillColor: c.color,\n strokeColor: null\n });\n const cellId = prefix + \"_cell_\" + i;\n if (typeof app.registerItem === \"function\") {\n app.registerItem(rect, cellId, {\n source: \"recursive_subdivision\",\n depth: c.depth,\n isRestCell" +
|
|
233
|
+
": Boolean(c.isRestCell)\n });\n }\n items.push(rect);\n\n // Optional nested accent box\n if (c.hasNested && c.nestedColor && iw > 24 && ih > 24) {\n const nestInset = Math.min(iw, ih) * 0.22;\n const nestRect = new paper.Path.Rectangle({\n point: [ix + nestInset, iy + nestInset],\n size: [iw - nestInset * 2, ih - nestInset * 2],\n fillColor: c.nestedColor,\n strokeColor: null\n });\n const nestId = prefix + \"_cell_\" + i + \"_nested\";\n if (typeof app.registerItem === \"function\") {\n app.registerItem(nestRect, nestId, { source: \"recursive_subdivision\", role: \"nested\" });\n " +
|
|
234
|
+
" }\n items.push(nestRect);\n }\n }\n }\n\n // 3. Orthogonal Divider Grid Lines\n if (dividerWidth > 0) {\n const dividers = " +
|
|
235
|
+
String(serializedDividers) +
|
|
236
|
+
";\n for (let j = 0; j < dividers.length; j++) {\n const d = dividers[j];\n const line = new paper.Path.Line({\n from: [d.x0, d.y0],\n to: [d.x1, d.y1],\n strokeColor: dividerColor,\n strokeWidth: dividerWidth,\n strokeCap: \"square\"\n });\n const divId = prefix + \"_divider_\" + j;\n if (typeof app.registerItem === \"function\") {\n app.registerItem(line, divId, { source: \"recursive_subdivision\", role: \"divider\" });\n }\n items.push(line);\n }\n\n // Outer border frame\n const frame = new paper.Path.Rectangle({\n point: [" +
|
|
237
|
+
String(x) +
|
|
238
|
+
", " +
|
|
239
|
+
String(y) +
|
|
240
|
+
"],\n size: [" +
|
|
241
|
+
String(w) +
|
|
242
|
+
", " +
|
|
243
|
+
String(h) +
|
|
244
|
+
"],\n fillColor: null,\n strokeColor: dividerColor,\n strokeWidth: dividerWidth * 1.5\n });\n if (typeof app.registerItem === \"function\") {\n app.registerItem(frame, prefix + \"_frame\", { source: \"recursive_subdivision\", role: \"frame\" });\n }\n items.push(frame);\n }\n\n const group = new paper.Group(items);\n if (typeof app.registerItem === \"function\") {\n app.registerItem(group, prefix + \"_group\", {\n source: \"recursive_subdivision\",\n cellCount: cells.length,\n preset: \"" +
|
|
245
|
+
String(presetName) +
|
|
246
|
+
"\"\n });\n }\n return group;\n})();"
|
|
293
247
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
);
|
|
318
318
|
}
|
|
319
319
|
//# sourceMappingURL=recursive-subdivision-generator.js.map
|