@taloswork/ose-shared 0.1.2 → 0.1.4
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/package.json +3 -3
- package/skills/document/SKILL.md +56 -53
- package/skills/document/assets/fonts/Archivo-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Archivo-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/BigShouldersDisplay-Bold.woff2 +0 -0
- package/skills/document/assets/fonts/BodoniModa-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/ChakraPetch-600.woff2 +0 -0
- package/skills/document/assets/fonts/CormorantGaramond-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/DMSerifDisplay-400.woff2 +0 -0
- package/skills/document/assets/fonts/Fraunces-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/GochiHand-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/IBMPlexSans-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/Inter-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Jost-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Jost-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/Karla-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Lexend-500.woff2 +0 -0
- package/skills/document/assets/fonts/Lora-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Manrope-Bold.woff2 +0 -0
- package/skills/document/assets/fonts/Manrope-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Marcellus-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Nunito-700.woff2 +0 -0
- package/skills/document/assets/fonts/PlayfairDisplay-600.woff2 +0 -0
- package/skills/document/assets/fonts/PublicSans-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Quicksand-600.woff2 +0 -0
- package/skills/document/assets/fonts/Sora-Regular.woff2 +0 -0
- package/skills/document/assets/fonts/Sora-SemiBold.woff2 +0 -0
- package/skills/document/assets/fonts/SpaceGrotesk-500.woff2 +0 -0
- package/skills/document/assets/fonts/Syne-700.woff2 +0 -0
- package/skills/document/assets/fonts/ZillaSlab-600.woff2 +0 -0
- package/skills/document/assets/fonts/fonts.json +316 -0
- package/skills/document/bin/deck-build.cjs +273 -5
- package/skills/document/bin/doc-gen.cjs +108 -23
- package/skills/document/bin/html2pptx.cjs +284 -51
- package/skills/document/catalog.json +43 -0
- package/skills/document/deck-design.md +191 -0
- package/skills/document/layouts/README.md +33 -0
- package/skills/document/layouts/banner-columns.tpl +9 -9
- package/skills/document/layouts/bento.tpl +3 -3
- package/skills/document/layouts/big-stat.tpl +3 -3
- package/skills/document/layouts/blocks-2x2.tpl +12 -12
- package/skills/document/layouts/brand-values.tpl +5 -5
- package/skills/document/layouts/cards-3.tpl +3 -3
- package/skills/document/layouts/cards-grid.tpl +3 -3
- package/skills/document/layouts/chart-full.tpl +3 -3
- package/skills/document/layouts/chart-kpi.tpl +3 -3
- package/skills/document/layouts/color-palette.tpl +5 -5
- package/skills/document/layouts/comparison.tpl +3 -3
- package/skills/document/layouts/concept-hub.tpl +3 -3
- package/skills/document/layouts/cover-centered.tpl +1 -1
- package/skills/document/layouts/cover-image.tpl +1 -1
- package/skills/document/layouts/cover-minimal.tpl +3 -3
- package/skills/document/layouts/cover-statement.tpl +3 -3
- package/skills/document/layouts/cover.tpl +1 -1
- package/skills/document/layouts/data-table.tpl +3 -3
- package/skills/document/layouts/dos-donts.tpl +14 -14
- package/skills/document/layouts/editorial-panel.tpl +11 -11
- package/skills/document/layouts/ending-contact.tpl +1 -1
- package/skills/document/layouts/ending.tpl +1 -1
- package/skills/document/layouts/funnel.tpl +3 -3
- package/skills/document/layouts/gantt.tpl +3 -3
- package/skills/document/layouts/hero.tpl +3 -3
- package/skills/document/layouts/icon-row.tpl +3 -3
- package/skills/document/layouts/image-full.tpl +5 -5
- package/skills/document/layouts/image-grid.tpl +3 -3
- package/skills/document/layouts/image-left.tpl +3 -3
- package/skills/document/layouts/list.tpl +3 -3
- package/skills/document/layouts/logo-guidelines.tpl +8 -8
- package/skills/document/layouts/map-distribution.tpl +3 -3
- package/skills/document/layouts/map-quad.tpl +6 -6
- package/skills/document/layouts/matrix-2x2.tpl +3 -3
- package/skills/document/layouts/numbered-brief.tpl +12 -12
- package/skills/document/layouts/org-tree.tpl +3 -3
- package/skills/document/layouts/problem-solution-banner.tpl +7 -7
- package/skills/document/layouts/problem-solution.tpl +3 -3
- package/skills/document/layouts/pyramid.tpl +3 -3
- package/skills/document/layouts/quote-aside.tpl +11 -0
- package/skills/document/layouts/quote.tpl +1 -1
- package/skills/document/layouts/radar.tpl +3 -3
- package/skills/document/layouts/ring-progress.tpl +3 -3
- package/skills/document/layouts/section-fullbleed.tpl +3 -3
- package/skills/document/layouts/section-image.tpl +1 -1
- package/skills/document/layouts/section-stat.tpl +1 -1
- package/skills/document/layouts/section.tpl +1 -1
- package/skills/document/layouts/slots.json +1 -1
- package/skills/document/layouts/split-two-col.tpl +3 -3
- package/skills/document/layouts/stats-chart.tpl +3 -3
- package/skills/document/layouts/steps-serpentine.tpl +11 -11
- package/skills/document/layouts/steps-vertical.tpl +3 -3
- package/skills/document/layouts/steps.tpl +3 -3
- package/skills/document/layouts/team-row.tpl +4 -4
- package/skills/document/layouts/three-kpi.tpl +3 -3
- package/skills/document/layouts/timeline.tpl +3 -3
- package/skills/document/layouts/title-meta.tpl +5 -5
- package/skills/document/layouts/title.tpl +2 -2
- package/skills/document/layouts/toc-agenda.tpl +3 -3
- package/skills/document/layouts/toc-editorial.tpl +15 -0
- package/skills/document/layouts/toc-panel.tpl +4 -4
- package/skills/document/layouts/toc.tpl +3 -3
- package/skills/document/layouts/transition.tpl +1 -1
- package/skills/document/layouts/two-kpi.tpl +3 -3
- package/skills/document/layouts/type-specimen.tpl +10 -10
- package/skills/document/layouts/versus.tpl +3 -3
- package/skills/document/motion/README.md +29 -0
- package/skills/document/motion/anthropic.json +29 -0
- package/skills/document/motion/apple.json +41 -0
- package/skills/document/motion/bistro-warm.json +16 -0
- package/skills/document/motion/black-gold.json +29 -0
- package/skills/document/motion/board-brief.json +14 -0
- package/skills/document/motion/bold-clash.json +16 -0
- package/skills/document/motion/branding.json +22 -0
- package/skills/document/motion/campus-teal.json +22 -0
- package/skills/document/motion/cinereel.json +23 -0
- package/skills/document/motion/clinic-care.json +22 -0
- package/skills/document/motion/cool.json +41 -0
- package/skills/document/motion/dark-glass.json +22 -0
- package/skills/document/motion/gov-brief.json +14 -0
- package/skills/document/motion/grid-tech.json +16 -0
- package/skills/document/motion/hand-drawn.json +23 -0
- package/skills/document/motion/ivory-gold.json +22 -0
- package/skills/document/motion/legal-slate.json +15 -0
- package/skills/document/motion/magazine-ink.json +29 -0
- package/skills/document/motion/mckinsey.json +28 -0
- package/skills/document/motion/memphis.json +16 -0
- package/skills/document/motion/mono.json +21 -0
- package/skills/document/motion/neon-cyber.json +42 -0
- package/skills/document/motion/olive-gold.json +22 -0
- package/skills/document/motion/organic-earth.json +15 -0
- package/skills/document/motion/pastel-saas.json +15 -0
- package/skills/document/motion/portfolio-noir.json +21 -0
- package/skills/document/motion/press-room.json +14 -0
- package/skills/document/motion/retro-press.json +15 -0
- package/skills/document/motion/sport-arena.json +16 -0
- package/skills/document/motion/swiss-grid.json +34 -0
- package/skills/document/motion/wedding-blush.json +15 -0
- package/skills/document/packs/README.md +28 -0
- package/skills/document/packs/board-brief/backdrop.html +4 -0
- package/skills/document/packs/board-brief/layouts/cover.tpl +12 -0
- package/skills/document/packs/board-brief/layouts/toc-agenda.tpl +20 -0
- package/skills/document/packs/board-brief/pack.css +27 -0
- package/skills/document/packs/press-room/backdrop.html +4 -0
- package/skills/document/packs/press-room/layouts/cover.tpl +12 -0
- package/skills/document/packs/press-room/layouts/section.tpl +13 -0
- package/skills/document/packs/press-room/pack.css +27 -0
- package/skills/document/styles/README.md +65 -16
- package/skills/document/styles/_contract-defaults.css +55 -0
- package/skills/document/styles/_samples/_groups/biz-premium.webp +0 -0
- package/skills/document/styles/_samples/_groups/creative.webp +0 -0
- package/skills/document/styles/_samples/_groups/editorial.webp +0 -0
- package/skills/document/styles/_samples/_groups/minimal.webp +0 -0
- package/skills/document/styles/_samples/_groups/natural.webp +0 -0
- package/skills/document/styles/_samples/_groups/tech-future.webp +0 -0
- package/skills/document/styles/_samples/anthropic.webp +0 -0
- package/skills/document/styles/_samples/apple.webp +0 -0
- package/skills/document/styles/_samples/bistro-warm.webp +0 -0
- package/skills/document/styles/_samples/black-gold.webp +0 -0
- package/skills/document/styles/_samples/board-brief.webp +0 -0
- package/skills/document/styles/_samples/bold-clash.webp +0 -0
- package/skills/document/styles/_samples/branding.webp +0 -0
- package/skills/document/styles/_samples/campus-teal.webp +0 -0
- package/skills/document/styles/_samples/cinereel.webp +0 -0
- package/skills/document/styles/_samples/clinic-care.webp +0 -0
- package/skills/document/styles/_samples/cool.webp +0 -0
- package/skills/document/styles/_samples/dark-glass.webp +0 -0
- package/skills/document/styles/_samples/gov-brief.webp +0 -0
- package/skills/document/styles/_samples/grid-tech.webp +0 -0
- package/skills/document/styles/_samples/hand-drawn.webp +0 -0
- package/skills/document/styles/_samples/ivory-gold.webp +0 -0
- package/skills/document/styles/_samples/legal-slate.webp +0 -0
- package/skills/document/styles/_samples/magazine-ink.webp +0 -0
- package/skills/document/styles/_samples/mckinsey.webp +0 -0
- package/skills/document/styles/_samples/memphis.webp +0 -0
- package/skills/document/styles/_samples/mono.webp +0 -0
- package/skills/document/styles/_samples/neon-cyber.webp +0 -0
- package/skills/document/styles/_samples/olive-gold.webp +0 -0
- package/skills/document/styles/_samples/organic-earth.webp +0 -0
- package/skills/document/styles/_samples/pastel-saas.webp +0 -0
- package/skills/document/styles/_samples/portfolio-noir.webp +0 -0
- package/skills/document/styles/_samples/press-room.webp +0 -0
- package/skills/document/styles/_samples/retro-press.webp +0 -0
- package/skills/document/styles/_samples/sport-arena.webp +0 -0
- package/skills/document/styles/_samples/swiss-grid.webp +0 -0
- package/skills/document/styles/_samples/wedding-blush.webp +0 -0
- package/skills/document/styles/anthropic/backdrop.html +4 -0
- package/skills/document/styles/anthropic/skin.css +15 -8
- package/skills/document/styles/apple/backdrop.html +4 -1
- package/skills/document/styles/apple/skin.css +5 -2
- package/skills/document/styles/bistro-warm/backdrop.html +4 -0
- package/skills/document/styles/bistro-warm/skin.css +27 -0
- package/skills/document/styles/black-gold/backdrop.html +3 -0
- package/skills/document/styles/black-gold/skin.css +15 -8
- package/skills/document/styles/bold-clash/backdrop.html +4 -0
- package/skills/document/styles/bold-clash/skin.css +27 -0
- package/skills/document/styles/branding/backdrop.html +4 -0
- package/skills/document/styles/branding/skin.css +14 -7
- package/skills/document/styles/campus-teal/backdrop.html +3 -0
- package/skills/document/styles/campus-teal/skin.css +27 -0
- package/skills/document/styles/cinereel/skin.css +28 -10
- package/skills/document/styles/clinic-care/backdrop.html +4 -0
- package/skills/document/styles/clinic-care/skin.css +27 -0
- package/skills/document/styles/cool/backdrop.html +3 -0
- package/skills/document/styles/cool/skin.css +5 -2
- package/skills/document/styles/dark-glass/backdrop.html +4 -0
- package/skills/document/styles/dark-glass/skin.css +27 -0
- package/skills/document/styles/gov-brief/backdrop.html +4 -0
- package/skills/document/styles/gov-brief/skin.css +27 -0
- package/skills/document/styles/grid-tech/backdrop.html +37 -0
- package/skills/document/styles/grid-tech/skin.css +27 -0
- package/skills/document/styles/hand-drawn/skin.css +16 -8
- package/skills/document/styles/ivory-gold/skin.css +21 -8
- package/skills/document/styles/legal-slate/backdrop.html +6 -0
- package/skills/document/styles/legal-slate/skin.css +27 -0
- package/skills/document/styles/magazine-ink/skin.css +7 -2
- package/skills/document/styles/mckinsey/backdrop.html +5 -0
- package/skills/document/styles/mckinsey/skin.css +5 -2
- package/skills/document/styles/memphis/backdrop.html +5 -0
- package/skills/document/styles/memphis/skin.css +27 -0
- package/skills/document/styles/mono/backdrop.html +6 -0
- package/skills/document/styles/mono/skin.css +6 -3
- package/skills/document/styles/neon-cyber/backdrop.html +4 -0
- package/skills/document/styles/neon-cyber/skin.css +27 -0
- package/skills/document/styles/olive-gold/backdrop.html +5 -0
- package/skills/document/styles/olive-gold/skin.css +15 -8
- package/skills/document/styles/organic-earth/backdrop.html +4 -0
- package/skills/document/styles/organic-earth/skin.css +27 -0
- package/skills/document/styles/pastel-saas/backdrop.html +4 -0
- package/skills/document/styles/pastel-saas/skin.css +27 -0
- package/skills/document/styles/portfolio-noir/backdrop.html +4 -0
- package/skills/document/styles/portfolio-noir/skin.css +27 -0
- package/skills/document/styles/retro-press/backdrop.html +6 -0
- package/skills/document/styles/retro-press/skin.css +27 -0
- package/skills/document/styles/sport-arena/backdrop.html +4 -0
- package/skills/document/styles/sport-arena/skin.css +27 -0
- package/skills/document/styles/swiss-grid/skin.css +6 -1
- package/skills/document/styles/wedding-blush/backdrop.html +6 -0
- package/skills/document/styles/wedding-blush/skin.css +27 -0
|
@@ -9790,9 +9790,9 @@ var require_load = __commonJS({
|
|
|
9790
9790
|
var require_lib3 = __commonJS({
|
|
9791
9791
|
"node_modules/jszip/lib/index.js"(exports2, module2) {
|
|
9792
9792
|
"use strict";
|
|
9793
|
-
function
|
|
9794
|
-
if (!(this instanceof
|
|
9795
|
-
return new
|
|
9793
|
+
function JSZip5() {
|
|
9794
|
+
if (!(this instanceof JSZip5)) {
|
|
9795
|
+
return new JSZip5();
|
|
9796
9796
|
}
|
|
9797
9797
|
if (arguments.length) {
|
|
9798
9798
|
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -9801,7 +9801,7 @@ var require_lib3 = __commonJS({
|
|
|
9801
9801
|
this.comment = null;
|
|
9802
9802
|
this.root = "";
|
|
9803
9803
|
this.clone = function() {
|
|
9804
|
-
var newObj = new
|
|
9804
|
+
var newObj = new JSZip5();
|
|
9805
9805
|
for (var i in this) {
|
|
9806
9806
|
if (typeof this[i] !== "function") {
|
|
9807
9807
|
newObj[i] = this[i];
|
|
@@ -9810,16 +9810,16 @@ var require_lib3 = __commonJS({
|
|
|
9810
9810
|
return newObj;
|
|
9811
9811
|
};
|
|
9812
9812
|
}
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
return new
|
|
9813
|
+
JSZip5.prototype = require_object();
|
|
9814
|
+
JSZip5.prototype.loadAsync = require_load();
|
|
9815
|
+
JSZip5.support = require_support();
|
|
9816
|
+
JSZip5.defaults = require_defaults();
|
|
9817
|
+
JSZip5.version = "3.10.1";
|
|
9818
|
+
JSZip5.loadAsync = function(content, options) {
|
|
9819
|
+
return new JSZip5().loadAsync(content, options);
|
|
9820
9820
|
};
|
|
9821
|
-
|
|
9822
|
-
module2.exports =
|
|
9821
|
+
JSZip5.external = require_external();
|
|
9822
|
+
module2.exports = JSZip5;
|
|
9823
9823
|
}
|
|
9824
9824
|
});
|
|
9825
9825
|
|
|
@@ -16738,7 +16738,7 @@ var require_browser_buffer_encode = __commonJS({
|
|
|
16738
16738
|
var require_zip_stream = __commonJS({
|
|
16739
16739
|
"node_modules/exceljs/lib/utils/zip-stream.js"(exports2, module2) {
|
|
16740
16740
|
var events = require("events");
|
|
16741
|
-
var
|
|
16741
|
+
var JSZip5 = require_lib3();
|
|
16742
16742
|
var StreamBuf = require_stream_buf();
|
|
16743
16743
|
var { stringToBuffer } = require_browser_buffer_encode();
|
|
16744
16744
|
var ZipWriter = class extends events.EventEmitter {
|
|
@@ -16751,7 +16751,7 @@ var require_zip_stream = __commonJS({
|
|
|
16751
16751
|
},
|
|
16752
16752
|
options
|
|
16753
16753
|
);
|
|
16754
|
-
this.zip = new
|
|
16754
|
+
this.zip = new JSZip5();
|
|
16755
16755
|
this.stream = new StreamBuf();
|
|
16756
16756
|
}
|
|
16757
16757
|
append(data, options) {
|
|
@@ -28431,7 +28431,7 @@ var require_theme1 = __commonJS({
|
|
|
28431
28431
|
var require_xlsx = __commonJS({
|
|
28432
28432
|
"node_modules/exceljs/lib/xlsx/xlsx.js"(exports2, module2) {
|
|
28433
28433
|
var fs = require("fs");
|
|
28434
|
-
var
|
|
28434
|
+
var JSZip5 = require_lib3();
|
|
28435
28435
|
var { PassThrough } = require_readable2();
|
|
28436
28436
|
var ZipStream = require_zip_stream();
|
|
28437
28437
|
var StreamBuf = require_stream_buf();
|
|
@@ -28670,7 +28670,7 @@ var require_xlsx = __commonJS({
|
|
|
28670
28670
|
tables: {},
|
|
28671
28671
|
vmlDrawings: {}
|
|
28672
28672
|
};
|
|
28673
|
-
const zip = await
|
|
28673
|
+
const zip = await JSZip5.loadAsync(buffer);
|
|
28674
28674
|
for (const entry of Object.values(zip.files)) {
|
|
28675
28675
|
if (!entry.dir) {
|
|
28676
28676
|
let entryName = entry.name;
|
|
@@ -72933,11 +72933,11 @@ var require_excel = __commonJS({
|
|
|
72933
72933
|
var require_pptxgen_cjs = __commonJS({
|
|
72934
72934
|
"node_modules/pptxgenjs/dist/pptxgen.cjs.js"(exports2, module2) {
|
|
72935
72935
|
"use strict";
|
|
72936
|
-
var
|
|
72936
|
+
var JSZip5 = require_lib3();
|
|
72937
72937
|
function _interopDefaultLegacy(e) {
|
|
72938
72938
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
72939
72939
|
}
|
|
72940
|
-
var JSZip__default = /* @__PURE__ */ _interopDefaultLegacy(
|
|
72940
|
+
var JSZip__default = /* @__PURE__ */ _interopDefaultLegacy(JSZip5);
|
|
72941
72941
|
var __assign2 = function() {
|
|
72942
72942
|
__assign2 = Object.assign || function __assign3(t) {
|
|
72943
72943
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -132887,7 +132887,7 @@ var import_node_fs = require("node:fs");
|
|
|
132887
132887
|
var import_node_path = require("node:path");
|
|
132888
132888
|
|
|
132889
132889
|
// packages/core/dist/document/html-pptx.js
|
|
132890
|
-
var
|
|
132890
|
+
var import_jszip4 = __toESM(require_lib3(), 1);
|
|
132891
132891
|
|
|
132892
132892
|
// packages/core/dist/document/pptx-anim.js
|
|
132893
132893
|
var import_jszip = __toESM(require_lib3(), 1);
|
|
@@ -132928,11 +132928,15 @@ function buildSlideTiming(steps, spidOf) {
|
|
|
132928
132928
|
return "";
|
|
132929
132929
|
let id = 100;
|
|
132930
132930
|
const next = () => id++;
|
|
132931
|
+
const beatOpened = /* @__PURE__ */ new Set();
|
|
132931
132932
|
const stepPars = resolved.map(({ s, spid }, i) => {
|
|
132932
132933
|
const { id: pid, sub } = presetOf(s.effect);
|
|
132933
132934
|
const dur = Math.max(1, Math.round(s.durMs ?? 500));
|
|
132934
|
-
const
|
|
132935
|
-
|
|
132935
|
+
const ridesAlong = s.group !== void 0 && beatOpened.has(s.group);
|
|
132936
|
+
if (s.group !== void 0)
|
|
132937
|
+
beatOpened.add(s.group);
|
|
132938
|
+
const delay = ridesAlong ? 0 : Math.max(0, Math.round(s.delayMs ?? (i === 0 ? 0 : 200)));
|
|
132939
|
+
const node = ridesAlong ? "withEffect" : i === 0 ? "clickEffect" : s.start === "with" ? "withEffect" : "afterEffect";
|
|
132936
132940
|
const effectCtnId = next();
|
|
132937
132941
|
const beh = behaviorsOf(s.effect, next, spid, dur);
|
|
132938
132942
|
return `<p:par><p:cTn id="${effectCtnId}" presetID="${pid}" presetClass="entr" presetSubtype="${sub}" fill="hold" grpId="0" nodeType="${node}"><p:stCondLst><p:cond delay="${delay}"/></p:stCondLst><p:childTnLst>${beh}</p:childTnLst></p:cTn></p:par>`;
|
|
@@ -132966,6 +132970,84 @@ async function injectAnimations(buf, perSlide) {
|
|
|
132966
132970
|
return await zip.generateAsync({ type: "nodebuffer", compression: "DEFLATE" });
|
|
132967
132971
|
}
|
|
132968
132972
|
|
|
132973
|
+
// packages/core/dist/document/pptx-transition.js
|
|
132974
|
+
var import_jszip2 = __toESM(require_lib3(), 1);
|
|
132975
|
+
var MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
132976
|
+
var P14_NS = "http://schemas.microsoft.com/office/powerpoint/2010/main";
|
|
132977
|
+
var P159_NS = "http://schemas.microsoft.com/office/powerpoint/2015/09/main";
|
|
132978
|
+
var STANDARD = {
|
|
132979
|
+
cut: { tag: "cut", dirs: null },
|
|
132980
|
+
fade: { tag: "fade", dirs: null },
|
|
132981
|
+
dissolve: { tag: "dissolve", dirs: null },
|
|
132982
|
+
wedge: { tag: "wedge", dirs: null },
|
|
132983
|
+
wipe: { tag: "wipe", dirs: ["l", "r", "u", "d"], defaultDir: "l" },
|
|
132984
|
+
push: { tag: "push", dirs: ["l", "r", "u", "d"], defaultDir: "l" },
|
|
132985
|
+
cover: { tag: "cover", dirs: ["l", "r", "u", "d"], defaultDir: "l" },
|
|
132986
|
+
zoom: { tag: "zoom", dirs: ["in", "out"], defaultDir: "in" },
|
|
132987
|
+
split: { tag: "split", dirs: ["in", "out"], dirAttr: "dir", defaultDir: "in" }
|
|
132988
|
+
};
|
|
132989
|
+
var MORPH = "morph";
|
|
132990
|
+
var TRANSITION_EFFECTS = [...Object.keys(STANDARD), MORPH];
|
|
132991
|
+
function speedOf(durMs) {
|
|
132992
|
+
if (durMs === void 0)
|
|
132993
|
+
return "med";
|
|
132994
|
+
if (durMs >= 1e3)
|
|
132995
|
+
return "slow";
|
|
132996
|
+
if (durMs >= 500)
|
|
132997
|
+
return "med";
|
|
132998
|
+
return "fast";
|
|
132999
|
+
}
|
|
133000
|
+
function effectElement(effect, dir) {
|
|
133001
|
+
const def = STANDARD[effect];
|
|
133002
|
+
if (!def)
|
|
133003
|
+
return "<p:fade/>";
|
|
133004
|
+
if (!def.dirs)
|
|
133005
|
+
return `<p:${def.tag}/>`;
|
|
133006
|
+
const chosen = dir && def.dirs.includes(dir) ? dir : def.defaultDir;
|
|
133007
|
+
return `<p:${def.tag} ${def.dirAttr ?? "dir"}="${chosen}"/>`;
|
|
133008
|
+
}
|
|
133009
|
+
function buildTransition(spec) {
|
|
133010
|
+
const effect = (spec.effect || "").trim();
|
|
133011
|
+
if (!effect || effect === "none")
|
|
133012
|
+
return "";
|
|
133013
|
+
const spd = speedOf(spec.durMs);
|
|
133014
|
+
const dur = spec.durMs !== void 0 ? Math.max(1, Math.round(spec.durMs)) : void 0;
|
|
133015
|
+
const isMorph = effect === MORPH;
|
|
133016
|
+
const plain = `<p:transition spd="${spd}">${effectElement(isMorph ? "fade" : effect, spec.dir)}</p:transition>`;
|
|
133017
|
+
if (!isMorph && dur === void 0)
|
|
133018
|
+
return plain;
|
|
133019
|
+
const choiceNs = isMorph ? ` xmlns:p14="${P14_NS}" xmlns:p159="${P159_NS}" Requires="p159"` : ` xmlns:p14="${P14_NS}" Requires="p14"`;
|
|
133020
|
+
const inner = isMorph ? `<p159:morph option="byObject"/>` : effectElement(effect, spec.dir);
|
|
133021
|
+
const durAttr = dur !== void 0 ? ` p14:dur="${dur}"` : "";
|
|
133022
|
+
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice${choiceNs}><p:transition spd="${spd}"${durAttr}>${inner}</p:transition></mc:Choice><mc:Fallback>${plain}</mc:Fallback></mc:AlternateContent>`;
|
|
133023
|
+
}
|
|
133024
|
+
async function injectTransitions(buf, perSlide) {
|
|
133025
|
+
if (!perSlide.some((t) => t && t.effect && t.effect !== "none"))
|
|
133026
|
+
return buf;
|
|
133027
|
+
const zip = await import_jszip2.default.loadAsync(buf);
|
|
133028
|
+
const slidePaths = Object.keys(zip.files).filter((p) => /^ppt\/slides\/slide\d+\.xml$/.test(p)).sort((a, b) => parseInt(a.match(/(\d+)/)[1], 10) - parseInt(b.match(/(\d+)/)[1], 10));
|
|
133029
|
+
for (let i = 0; i < slidePaths.length; i++) {
|
|
133030
|
+
const spec = perSlide[i];
|
|
133031
|
+
if (!spec)
|
|
133032
|
+
continue;
|
|
133033
|
+
const xml0 = await zip.file(slidePaths[i]).async("string");
|
|
133034
|
+
if (xml0.includes("<p:transition") || xml0.includes("mc:AlternateContent"))
|
|
133035
|
+
continue;
|
|
133036
|
+
const frag = buildTransition(spec);
|
|
133037
|
+
if (!frag)
|
|
133038
|
+
continue;
|
|
133039
|
+
let xml;
|
|
133040
|
+
if (xml0.includes("</p:clrMapOvr>"))
|
|
133041
|
+
xml = xml0.replace("</p:clrMapOvr>", `</p:clrMapOvr>${frag}`);
|
|
133042
|
+
else if (xml0.includes("</p:cSld>"))
|
|
133043
|
+
xml = xml0.replace("</p:cSld>", `</p:cSld>${frag}`);
|
|
133044
|
+
else
|
|
133045
|
+
continue;
|
|
133046
|
+
zip.file(slidePaths[i], xml);
|
|
133047
|
+
}
|
|
133048
|
+
return await zip.generateAsync({ type: "nodebuffer", compression: "DEFLATE" });
|
|
133049
|
+
}
|
|
133050
|
+
|
|
132969
133051
|
// node_modules/docx/dist/index.mjs
|
|
132970
133052
|
var __create2 = Object.create;
|
|
132971
133053
|
var __defProp2 = Object.defineProperty;
|
|
@@ -146661,7 +146743,7 @@ var findPatchKeys = (text) => {
|
|
|
146661
146743
|
|
|
146662
146744
|
// packages/core/dist/document/doc-gen.js
|
|
146663
146745
|
var import_exceljs = __toESM(require_excel(), 1);
|
|
146664
|
-
var
|
|
146746
|
+
var import_jszip3 = __toESM(require_lib3(), 1);
|
|
146665
146747
|
var import_pptxgenjs = __toESM(require_pptxgen_cjs(), 1);
|
|
146666
146748
|
var import_pdf_lib = __toESM(require_cjs(), 1);
|
|
146667
146749
|
var import_fontkit = __toESM(require_fontkit_umd(), 1);
|
|
@@ -147060,7 +147142,7 @@ async function finalizePptx(bytes) {
|
|
|
147060
147142
|
return stripDanglingOverrides(await normalizeChartParts(bytes));
|
|
147061
147143
|
}
|
|
147062
147144
|
async function normalizeChartParts(bytes) {
|
|
147063
|
-
const zip = await
|
|
147145
|
+
const zip = await import_jszip3.default.loadAsync(Buffer.from(bytes));
|
|
147064
147146
|
const pres = zip.file("ppt/presentation.xml");
|
|
147065
147147
|
if (pres) {
|
|
147066
147148
|
let xml = await pres.async("string");
|
|
@@ -147113,7 +147195,7 @@ async function normalizeChartParts(bytes) {
|
|
|
147113
147195
|
return new Uint8Array(out);
|
|
147114
147196
|
}
|
|
147115
147197
|
async function stripDanglingOverrides(bytes) {
|
|
147116
|
-
const zip = await
|
|
147198
|
+
const zip = await import_jszip3.default.loadAsync(Buffer.from(bytes));
|
|
147117
147199
|
const ctFile = zip.file("[Content_Types].xml");
|
|
147118
147200
|
if (!ctFile)
|
|
147119
147201
|
return bytes;
|
|
@@ -147274,7 +147356,7 @@ function gradFillXml(g) {
|
|
|
147274
147356
|
return `<a:gradFill rotWithShape="1"><a:gsLst>${gs}</a:gsLst><a:lin ang="${Math.round(deg * 6e4)}" scaled="1"/></a:gradFill>`;
|
|
147275
147357
|
}
|
|
147276
147358
|
async function injectGradients(buf, grads) {
|
|
147277
|
-
const zip = await
|
|
147359
|
+
const zip = await import_jszip4.default.loadAsync(buf);
|
|
147278
147360
|
for (const path of Object.keys(zip.files).filter((p) => /^ppt\/slides\/slide\d+\.xml$/.test(p))) {
|
|
147279
147361
|
let xml = await zip.file(path).async("string");
|
|
147280
147362
|
let changed = false;
|
|
@@ -147342,6 +147424,7 @@ async function convertLayoutToPptx(snapshot) {
|
|
|
147342
147424
|
pptx.layout = "TALOS_HTML_WIDE";
|
|
147343
147425
|
const gradients = [];
|
|
147344
147426
|
const perSlideAnims = [];
|
|
147427
|
+
const perSlideTransitions = [];
|
|
147345
147428
|
for (const [slideNo, slideSpec] of snapshot.slides.entries()) {
|
|
147346
147429
|
const slide = pptx.addSlide();
|
|
147347
147430
|
const bg = cssColorToHex(slideSpec.background);
|
|
@@ -147549,10 +147632,12 @@ async function convertLayoutToPptx(snapshot) {
|
|
|
147549
147632
|
if (slideSpec.speakerNotes)
|
|
147550
147633
|
slide.addNotes(String(slideSpec.speakerNotes));
|
|
147551
147634
|
perSlideAnims.push(slideAnims);
|
|
147635
|
+
perSlideTransitions.push(slideSpec.transition);
|
|
147552
147636
|
}
|
|
147553
147637
|
let buf = await pptx.write("nodebuffer");
|
|
147554
147638
|
if (gradients.length)
|
|
147555
147639
|
buf = await injectGradients(buf, gradients);
|
|
147640
|
+
buf = await injectTransitions(buf, perSlideTransitions);
|
|
147556
147641
|
buf = await injectAnimations(buf, perSlideAnims);
|
|
147557
147642
|
return { bytes: await finalizePptx(new Uint8Array(buf)), warnings };
|
|
147558
147643
|
}
|
|
@@ -147585,15 +147670,20 @@ var LAYOUT_WALKER_JS = `
|
|
|
147585
147670
|
// Entrance-animation intent: an element (or, for text, its nearest ancestor)
|
|
147586
147671
|
// carrying data-anim="<effect>" [+ -seq/-start/-delay/-dur]. Emitted as {anim}
|
|
147587
147672
|
// on the element snapshot; turned into a native <p:timing> step post-write.
|
|
147673
|
+
// Every element resolving to the same host gets that host's group id, so the
|
|
147674
|
+
// builder can collapse them into one beat instead of one step per text run.
|
|
147675
|
+
const animHosts = [];
|
|
147588
147676
|
const animOf = (elm) => {
|
|
147589
147677
|
if (!elm || !elm.getAttribute) return undefined;
|
|
147590
147678
|
const host = elm.getAttribute("data-anim") ? elm : (elm.closest ? elm.closest("[data-anim]") : null);
|
|
147591
147679
|
if (!host) return undefined;
|
|
147592
147680
|
const effect = (host.getAttribute("data-anim") || "").trim();
|
|
147593
147681
|
if (!effect) return undefined;
|
|
147682
|
+
let group = animHosts.indexOf(host);
|
|
147683
|
+
if (group < 0) { group = animHosts.length; animHosts.push(host); }
|
|
147594
147684
|
const num = (a) => { const v = parseFloat(host.getAttribute(a)); return Number.isFinite(v) ? v : undefined; };
|
|
147595
147685
|
const start = host.getAttribute("data-anim-start");
|
|
147596
|
-
const o = { effect: effect };
|
|
147686
|
+
const o = { effect: effect, group: group };
|
|
147597
147687
|
const seq = num("data-anim-seq"); if (seq !== undefined) o.seq = seq;
|
|
147598
147688
|
if (start === "with" || start === "onclick" || start === "after") o.start = start;
|
|
147599
147689
|
const d = num("data-anim-delay"); if (d !== undefined) o.delayMs = d;
|
|
@@ -147716,7 +147806,17 @@ var LAYOUT_WALKER_JS = `
|
|
|
147716
147806
|
// data-notes attribute \u2192 pptx notesSlide (Stage B addNotes).
|
|
147717
147807
|
const notesEl = sec.querySelector(".talos-notes");
|
|
147718
147808
|
const speakerNotes = (((notesEl && notesEl.textContent) || sec.getAttribute("data-notes") || "").trim()) || undefined;
|
|
147719
|
-
|
|
147809
|
+
// Slide transition: how the deck moves INTO this slide \u2192 native <p:transition>.
|
|
147810
|
+
const trEffect = (sec.getAttribute("data-transition") || "").trim();
|
|
147811
|
+
let transition;
|
|
147812
|
+
if (trEffect) {
|
|
147813
|
+
transition = { effect: trEffect };
|
|
147814
|
+
const trDur = parseFloat(sec.getAttribute("data-transition-dur"));
|
|
147815
|
+
if (Number.isFinite(trDur)) transition.durMs = trDur;
|
|
147816
|
+
const trDir = (sec.getAttribute("data-transition-dir") || "").trim();
|
|
147817
|
+
if (trDir) transition.dir = trDir;
|
|
147818
|
+
}
|
|
147819
|
+
return { background: color(getComputedStyle(sec).backgroundColor) ?? "#ffffff", elements, ...(speakerNotes ? { speakerNotes } : {}), ...(transition ? { transition } : {}) };
|
|
147720
147820
|
});
|
|
147721
147821
|
return { width: 1280, height: 720, slides, notes };
|
|
147722
147822
|
})()
|
|
@@ -147844,6 +147944,90 @@ async function inlineHtmlImages(html, resolve) {
|
|
|
147844
147944
|
return { html: out, inlined, skipped };
|
|
147845
147945
|
}
|
|
147846
147946
|
|
|
147947
|
+
// packages/core/dist/document/deck-catalog.js
|
|
147948
|
+
var KINDS = ["skin", "pack"];
|
|
147949
|
+
var MODES = ["light", "dark"];
|
|
147950
|
+
var ID_RE = /^[a-z0-9][a-z0-9-]*$/;
|
|
147951
|
+
function isStr(v) {
|
|
147952
|
+
return typeof v === "string" && v.length > 0;
|
|
147953
|
+
}
|
|
147954
|
+
function isStrArr(v) {
|
|
147955
|
+
return Array.isArray(v) && v.every((x) => typeof x === "string");
|
|
147956
|
+
}
|
|
147957
|
+
function parseCatalog(raw) {
|
|
147958
|
+
const errors = [];
|
|
147959
|
+
const o = raw;
|
|
147960
|
+
if (!o || typeof o !== "object")
|
|
147961
|
+
return { catalog: null, errors: ["catalog is not an object"] };
|
|
147962
|
+
const groups = [];
|
|
147963
|
+
const rawGroups = Array.isArray(o.groups) ? o.groups : [];
|
|
147964
|
+
if (!Array.isArray(o.groups))
|
|
147965
|
+
errors.push("catalog.groups must be an array");
|
|
147966
|
+
rawGroups.forEach((g, i) => {
|
|
147967
|
+
const at = `group[${i}]`;
|
|
147968
|
+
if (!isStr(g?.id) || !ID_RE.test(g.id))
|
|
147969
|
+
errors.push(`${at}: bad id`);
|
|
147970
|
+
if (!isStr(g?.name_cn))
|
|
147971
|
+
errors.push(`${at}: missing name_cn`);
|
|
147972
|
+
if (!isStr(g?.sample))
|
|
147973
|
+
errors.push(`${at}: missing sample`);
|
|
147974
|
+
if (!isStrArr(g?.scenarios))
|
|
147975
|
+
errors.push(`${at}: scenarios must be a string array`);
|
|
147976
|
+
if (isStr(g?.id) && isStr(g?.name_cn) && isStr(g?.sample) && isStrArr(g?.scenarios)) {
|
|
147977
|
+
groups.push({ id: g.id, name_cn: g.name_cn, sample: g.sample, scenarios: g.scenarios });
|
|
147978
|
+
}
|
|
147979
|
+
});
|
|
147980
|
+
const entries = [];
|
|
147981
|
+
const rawEntries = Array.isArray(o.entries) ? o.entries : [];
|
|
147982
|
+
if (!Array.isArray(o.entries))
|
|
147983
|
+
errors.push("catalog.entries must be an array");
|
|
147984
|
+
rawEntries.forEach((e, i) => {
|
|
147985
|
+
const at = `entry[${i}]${isStr(e?.id) ? ` (${e.id})` : ""}`;
|
|
147986
|
+
const before = errors.length;
|
|
147987
|
+
if (!isStr(e?.id) || !ID_RE.test(e.id))
|
|
147988
|
+
errors.push(`${at}: bad id`);
|
|
147989
|
+
if (!isStr(e?.kind) || !KINDS.includes(e.kind))
|
|
147990
|
+
errors.push(`${at}: kind must be "skin" or "pack"`);
|
|
147991
|
+
if (!isStr(e?.group))
|
|
147992
|
+
errors.push(`${at}: missing group`);
|
|
147993
|
+
if (!isStr(e?.name_cn))
|
|
147994
|
+
errors.push(`${at}: missing name_cn`);
|
|
147995
|
+
if (!isStr(e?.oneliner))
|
|
147996
|
+
errors.push(`${at}: missing oneliner`);
|
|
147997
|
+
if (!isStrArr(e?.scenarios))
|
|
147998
|
+
errors.push(`${at}: scenarios must be a string array`);
|
|
147999
|
+
if (!isStr(e?.mode) || !MODES.includes(e.mode))
|
|
148000
|
+
errors.push(`${at}: mode must be "light" or "dark"`);
|
|
148001
|
+
if (!isStr(e?.sample))
|
|
148002
|
+
errors.push(`${at}: missing sample`);
|
|
148003
|
+
if (e?.motion !== void 0 && !isStr(e.motion))
|
|
148004
|
+
errors.push(`${at}: motion must be a string when present`);
|
|
148005
|
+
if (errors.length === before) {
|
|
148006
|
+
entries.push({
|
|
148007
|
+
id: e.id,
|
|
148008
|
+
kind: e.kind,
|
|
148009
|
+
group: e.group,
|
|
148010
|
+
name_cn: e.name_cn,
|
|
148011
|
+
oneliner: e.oneliner,
|
|
148012
|
+
scenarios: e.scenarios,
|
|
148013
|
+
mode: e.mode,
|
|
148014
|
+
sample: e.sample,
|
|
148015
|
+
...e.motion !== void 0 ? { motion: e.motion } : {}
|
|
148016
|
+
});
|
|
148017
|
+
}
|
|
148018
|
+
});
|
|
148019
|
+
return { catalog: errors.length ? null : { groups, entries }, errors };
|
|
148020
|
+
}
|
|
148021
|
+
function resolveEntry(catalog, id) {
|
|
148022
|
+
return catalog.entries.find((e) => e.id === id) ?? null;
|
|
148023
|
+
}
|
|
148024
|
+
function assetDirOf(entry) {
|
|
148025
|
+
return entry.kind === "skin" ? `styles/${entry.id}` : `packs/${entry.id}`;
|
|
148026
|
+
}
|
|
148027
|
+
function cssFileOf(entry) {
|
|
148028
|
+
return entry.kind === "skin" ? "skin.css" : "pack.css";
|
|
148029
|
+
}
|
|
148030
|
+
|
|
147847
148031
|
// apps/admin/data/skills.lib/document/bin-src/html2pptx.mjs
|
|
147848
148032
|
function imageResolver(baseDir) {
|
|
147849
148033
|
return async (src) => {
|
|
@@ -147869,27 +148053,54 @@ async function tailwindCss() {
|
|
|
147869
148053
|
_tailwindCss = (0, import_node_fs.existsSync)(file) ? await (0, import_promises.readFile)(file, "utf8").catch(() => "") : "";
|
|
147870
148054
|
return _tailwindCss;
|
|
147871
148055
|
}
|
|
147872
|
-
var CJK_RE2 = /[
|
|
147873
|
-
var
|
|
147874
|
-
|
|
147875
|
-
|
|
147876
|
-
var _cjkFontCss;
|
|
147877
|
-
async function cjkFontFaceCss() {
|
|
147878
|
-
if (_cjkFontCss !== void 0) return _cjkFontCss;
|
|
148056
|
+
var CJK_RE2 = /[\u2E80-\u2FFF\u3000-\u303F\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFF00-\uFFEF]/;
|
|
148057
|
+
var _fontManifest;
|
|
148058
|
+
async function fontManifest() {
|
|
148059
|
+
if (_fontManifest !== void 0) return _fontManifest;
|
|
147879
148060
|
const dir = process.env.TALOS_CJK_FONT_DIR || (0, import_node_path.join)((0, import_node_path.dirname)(process.argv[1]), "..", "assets", "fonts");
|
|
147880
|
-
const
|
|
147881
|
-
|
|
147882
|
-
|
|
147883
|
-
}
|
|
147884
|
-
|
|
147885
|
-
|
|
147886
|
-
|
|
147887
|
-
|
|
147888
|
-
|
|
147889
|
-
|
|
147890
|
-
|
|
148061
|
+
const file = (0, import_node_path.join)(dir, "fonts.json");
|
|
148062
|
+
try {
|
|
148063
|
+
_fontManifest = { dir, ...JSON.parse(await (0, import_promises.readFile)(file, "utf8")) };
|
|
148064
|
+
} catch {
|
|
148065
|
+
_fontManifest = { dir, cjk: [], latin: [], cjkUnicodeRange: "" };
|
|
148066
|
+
}
|
|
148067
|
+
return _fontManifest;
|
|
148068
|
+
}
|
|
148069
|
+
async function faceCss(entries, range, doc) {
|
|
148070
|
+
const { dir } = await fontManifest();
|
|
148071
|
+
const rules = [];
|
|
148072
|
+
for (const entry of entries ?? []) {
|
|
148073
|
+
const families = doc ? (entry.families ?? []).filter((f) => doc.includes(f)) : entry.families ?? [];
|
|
148074
|
+
if (!families.length) continue;
|
|
148075
|
+
const path = (0, import_node_path.join)(dir, entry.file);
|
|
148076
|
+
if (!(0, import_node_fs.existsSync)(path)) continue;
|
|
148077
|
+
const b64 = (await (0, import_promises.readFile)(path).catch(() => null))?.toString("base64");
|
|
148078
|
+
if (!b64) continue;
|
|
148079
|
+
for (const family of families) {
|
|
148080
|
+
rules.push(
|
|
148081
|
+
`@font-face{font-family:'${family}';src:local('${family}'),url(data:font/woff2;base64,${b64}) format('woff2');${entry.weight ? `font-weight:${entry.weight};` : ""}${range ? `unicode-range:${range};` : ""}font-display:swap}`
|
|
148082
|
+
);
|
|
148083
|
+
}
|
|
148084
|
+
}
|
|
148085
|
+
return rules.join("");
|
|
148086
|
+
}
|
|
148087
|
+
var _cjkFontCss;
|
|
148088
|
+
async function cjkFontFaceCss(doc) {
|
|
148089
|
+
if (_cjkFontCss === void 0) {
|
|
148090
|
+
const m = await fontManifest();
|
|
148091
|
+
_cjkFontCss = await faceCss(m.cjk, m.cjkUnicodeRange, doc);
|
|
148092
|
+
}
|
|
147891
148093
|
return _cjkFontCss;
|
|
147892
148094
|
}
|
|
148095
|
+
var _latinFontCss;
|
|
148096
|
+
async function latinFontFaceCss(doc) {
|
|
148097
|
+
if (_latinFontCss === void 0) {
|
|
148098
|
+
const m = await fontManifest();
|
|
148099
|
+
const wanted = (m.latin ?? []).filter((e) => (e.families ?? []).some((f) => doc.includes(f)));
|
|
148100
|
+
_latinFontCss = await faceCss(wanted, void 0);
|
|
148101
|
+
}
|
|
148102
|
+
return _latinFontCss;
|
|
148103
|
+
}
|
|
147893
148104
|
async function withHeadlessPage(html, fn) {
|
|
147894
148105
|
const headless = (process.env.TALOS_HTML2PPTX_HEADLESS ?? "").trim().toLowerCase();
|
|
147895
148106
|
if (headless === "off" || headless === "none" || headless === "0" || headless === "false") return null;
|
|
@@ -148004,7 +148215,7 @@ async function main() {
|
|
|
148004
148215
|
process.stdout.write(JSON.stringify({ ok: true, out, engine: "layout-json", slides: snapshot2.slides?.length ?? 0, ...notesDocPath ? { notesDoc: notesDocPath } : {}, warnings: warnings2 }, null, 1) + "\n");
|
|
148005
148216
|
return;
|
|
148006
148217
|
}
|
|
148007
|
-
if (
|
|
148218
|
+
if (!/<section[^>]*\bclass="[^"]*(?<![\w-])slide(?![\w-])/.test(raw)) {
|
|
148008
148219
|
die('the HTML must contain one <section class="slide"> per slide (1280\xD7720 canvas) \u2014 see deck-design.md', 65);
|
|
148009
148220
|
}
|
|
148010
148221
|
const colorWarnings = [...lintHardcodedColors(raw), ...lintRepeatedLayouts(raw)];
|
|
@@ -148028,13 +148239,33 @@ async function main() {
|
|
|
148028
148239
|
let skinCss = "", backdropHtml = "", skinAccent = "", skinAxis = "", skinChart1 = "";
|
|
148029
148240
|
if (styleArg) {
|
|
148030
148241
|
const skillDir = (0, import_node_path.dirname)((0, import_node_path.dirname)(process.argv[1] || ""));
|
|
148031
|
-
|
|
148032
|
-
|
|
148242
|
+
let styleDir, cssName = "skin.css";
|
|
148243
|
+
if ((0, import_node_fs.existsSync)((0, import_node_path.join)(styleArg, "skin.css"))) {
|
|
148244
|
+
styleDir = styleArg;
|
|
148245
|
+
} else if ((0, import_node_fs.existsSync)((0, import_node_path.join)(styleArg, "pack.css"))) {
|
|
148246
|
+
styleDir = styleArg;
|
|
148247
|
+
cssName = "pack.css";
|
|
148248
|
+
} else {
|
|
148249
|
+
let entry = null;
|
|
148250
|
+
const catalogPath = (0, import_node_path.join)(skillDir, "catalog.json");
|
|
148251
|
+
if ((0, import_node_fs.existsSync)(catalogPath)) {
|
|
148252
|
+
try {
|
|
148253
|
+
const { catalog } = parseCatalog(JSON.parse((0, import_node_fs.readFileSync)(catalogPath, "utf8")));
|
|
148254
|
+
if (catalog) entry = resolveEntry(catalog, styleArg);
|
|
148255
|
+
} catch {
|
|
148256
|
+
}
|
|
148257
|
+
}
|
|
148258
|
+
styleDir = entry ? (0, import_node_path.join)(skillDir, assetDirOf(entry)) : (0, import_node_path.join)(skillDir, "styles", styleArg);
|
|
148259
|
+
if (entry) cssName = cssFileOf(entry);
|
|
148260
|
+
}
|
|
148261
|
+
const skinPath = (0, import_node_path.join)(styleDir, cssName);
|
|
148033
148262
|
try {
|
|
148034
148263
|
skinCss = await (0, import_promises.readFile)(skinPath, "utf8");
|
|
148035
148264
|
} catch (e) {
|
|
148036
148265
|
die(`cannot read style ${skinPath}: ${e.message}`, 66);
|
|
148037
148266
|
}
|
|
148267
|
+
const defaultsPath = (0, import_node_path.join)(skillDir, "styles", "_contract-defaults.css");
|
|
148268
|
+
if ((0, import_node_fs.existsSync)(defaultsPath)) skinCss = await (0, import_promises.readFile)(defaultsPath, "utf8") + "\n" + skinCss;
|
|
148038
148269
|
const sharedBackdropsDir = (0, import_node_path.join)(skillDir, "styles", "_backdrops");
|
|
148039
148270
|
const NO_AUTO_BACKDROP_VARIETY = /* @__PURE__ */ new Set(["mckinsey", "mono", "cinereel"]);
|
|
148040
148271
|
let bdPath;
|
|
@@ -148088,8 +148319,10 @@ async function main() {
|
|
|
148088
148319
|
if (skinChart1) rawInlined = rawInlined.replaceAll("__CHART1__", skinChart1);
|
|
148089
148320
|
}
|
|
148090
148321
|
const tw = await tailwindCss();
|
|
148091
|
-
const cjk = !hasService && CJK_RE2.test(rawInlined) ? await cjkFontFaceCss() : "";
|
|
148092
|
-
const
|
|
148322
|
+
const cjk = !hasService && CJK_RE2.test(rawInlined) ? await cjkFontFaceCss(rawInlined + skinCss + themeCss + SKELETON_CSS) : "";
|
|
148323
|
+
const latin = await latinFontFaceCss(rawInlined + skinCss);
|
|
148324
|
+
const fontCss = cjk + latin;
|
|
148325
|
+
const html = injectHead(rawInlined, `${fontCss ? `<style>${fontCss}</style>` : ""}${tw ? `<style>${tw}</style>` : ""}<style>${themeCss}${SKELETON_CSS}${skinCss}</style>`);
|
|
148093
148326
|
if (rasterize) {
|
|
148094
148327
|
let images;
|
|
148095
148328
|
if (hasService) ({ images } = await callService("/shot", html).catch((e) => die(e.message, 1)));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"groups": [
|
|
3
|
+
{"id":"tech-future","name_cn":"科技未来","sample":"styles/_samples/_groups/tech-future.webp","scenarios":["科技","发布会","产品","pitch"]},
|
|
4
|
+
{"id":"biz-premium","name_cn":"商务高端","sample":"styles/_samples/_groups/biz-premium.webp","scenarios":["金融","年报","路演","招商","董事会"]},
|
|
5
|
+
{"id":"minimal","name_cn":"极简设计","sample":"styles/_samples/_groups/minimal.webp","scenarios":["极简","设计","作品集"]},
|
|
6
|
+
{"id":"editorial","name_cn":"编辑人文","sample":"styles/_samples/_groups/editorial.webp","scenarios":["人文","行业观察","杂志感","研究分享"]},
|
|
7
|
+
{"id":"creative","name_cn":"创意手作","sample":"styles/_samples/_groups/creative.webp","scenarios":["创意","教学","工作坊","头脑风暴"]},
|
|
8
|
+
{"id":"natural","name_cn":"自然温和","sample":"styles/_samples/_groups/natural.webp","scenarios":["品牌手册","可持续","美妆","零售"]}
|
|
9
|
+
],
|
|
10
|
+
"entries": [
|
|
11
|
+
{"id":"cool","kind":"skin","group":"tech-future","name_cn":"酷炫深色","oneliner":"深蓝辉光 · 科技发布","scenarios":["科技","发布","pitch","主题演讲"],"mode":"dark","sample":"styles/_samples/cool.webp","motion":"motion/cool.json"},
|
|
12
|
+
{"id":"neon-cyber","kind":"skin","group":"tech-future","name_cn":"霓虹赛博","oneliner":"霓虹品红 · 赛博夜场","scenarios":["科技","游戏","Web3","夜场发布"],"mode":"dark","sample":"styles/_samples/neon-cyber.webp","motion":"motion/neon-cyber.json"},
|
|
13
|
+
{"id":"swiss-grid","kind":"skin","group":"tech-future","name_cn":"瑞士国际","oneliner":"克莱因蓝白 · 瑞士国际","scenarios":["科技产品","数据汇报","设计","年度总结"],"mode":"light","sample":"styles/_samples/swiss-grid.webp","motion":"motion/swiss-grid.json"},
|
|
14
|
+
{"id":"black-gold","kind":"skin","group":"biz-premium","name_cn":"黑金","oneliner":"纯黑金辉 · 高端商务","scenarios":["金融","年报","路演","奢侈品"],"mode":"dark","sample":"styles/_samples/black-gold.webp","motion":"motion/black-gold.json"},
|
|
15
|
+
{"id":"olive-gold","kind":"skin","group":"biz-premium","name_cn":"橄榄金","oneliner":"橄榄亮金 · 高端招商","scenarios":["高端","证书","招商","品牌"],"mode":"dark","sample":"styles/_samples/olive-gold.webp","motion":"motion/olive-gold.json"},
|
|
16
|
+
{"id":"mckinsey","kind":"skin","group":"biz-premium","name_cn":"白底咨询","oneliner":"白底藏青 · 咨询评审","scenarios":["咨询","战略汇报","评审","董事会"],"mode":"light","sample":"styles/_samples/mckinsey.webp","motion":"motion/mckinsey.json"},
|
|
17
|
+
{"id":"apple","kind":"skin","group":"minimal","name_cn":"纯黑极简","oneliner":"纯黑极简 · 产品发布","scenarios":["产品发布","主题演讲","极简演示"],"mode":"dark","sample":"styles/_samples/apple.webp","motion":"motion/apple.json"},
|
|
18
|
+
{"id":"mono","kind":"skin","group":"minimal","name_cn":"纯白黑灰","oneliner":"纯白黑灰 · 极简设计","scenarios":["极简","高端","设计","单色报告"],"mode":"light","sample":"styles/_samples/mono.webp","motion":"motion/mono.json"},
|
|
19
|
+
{"id":"ivory-gold","kind":"skin","group":"minimal","name_cn":"奶油青铜","oneliner":"奶油青铜 · 奢华极简","scenarios":["奢华极简","品牌手册","路演","高端零售"],"mode":"light","sample":"styles/_samples/ivory-gold.webp","motion":"motion/ivory-gold.json"},
|
|
20
|
+
{"id":"magazine-ink","kind":"skin","group":"editorial","name_cn":"杂志墨","oneliner":"瓷白靛蓝 · 杂志人文","scenarios":["人文分享","行业观察","商业发布"],"mode":"light","sample":"styles/_samples/magazine-ink.webp","motion":"motion/magazine-ink.json"},
|
|
21
|
+
{"id":"anthropic","kind":"skin","group":"editorial","name_cn":"奶油珊瑚","oneliner":"奶油珊瑚 · AI 研究","scenarios":["AI","产品","研究分享","人文品牌"],"mode":"light","sample":"styles/_samples/anthropic.webp","motion":"motion/anthropic.json"},
|
|
22
|
+
{"id":"hand-drawn","kind":"skin","group":"creative","name_cn":"纸感手绘","oneliner":"纸感手绘 · 创意教学","scenarios":["创意","头脑风暴","教学","工作坊"],"mode":"light","sample":"styles/_samples/hand-drawn.webp","motion":"motion/hand-drawn.json"},
|
|
23
|
+
{"id":"cinereel","kind":"skin","group":"creative","name_cn":"黑白胶片","oneliner":"黑白胶片 · 影视创意","scenarios":["影视","创意作品集","音乐","传媒"],"mode":"dark","sample":"styles/_samples/cinereel.webp","motion":"motion/cinereel.json"},
|
|
24
|
+
{"id":"branding","kind":"skin","group":"natural","name_cn":"暖米绿意","oneliner":"暖米绿意 · 品牌手册","scenarios":["品牌手册","可持续","美妆","零售","极简"],"mode":"light","sample":"styles/_samples/branding.webp","motion":"motion/branding.json"},
|
|
25
|
+
{"id":"dark-glass","kind":"skin","group":"tech-future","name_cn":"暗色玻璃","oneliner":"石墨冰蓝 · 产品评审","scenarios":["产品评审","技术方案","路线图","内部汇报"],"mode":"dark","sample":"styles/_samples/dark-glass.webp","motion":"motion/dark-glass.json"},
|
|
26
|
+
{"id":"grid-tech","kind":"skin","group":"tech-future","name_cn":"硬核网格","oneliner":"近黑荧绿 · 工程评审","scenarios":["工程","基础设施","数据平台","技术大会"],"mode":"dark","sample":"styles/_samples/grid-tech.webp","motion":"motion/grid-tech.json"},
|
|
27
|
+
{"id":"pastel-saas","kind":"skin","group":"minimal","name_cn":"柔和粉彩","oneliner":"薰衣草白 · SaaS 提案","scenarios":["SaaS","产品提案","增长复盘","客户成功"],"mode":"light","sample":"styles/_samples/pastel-saas.webp","motion":"motion/pastel-saas.json"},
|
|
28
|
+
{"id":"memphis","kind":"skin","group":"creative","name_cn":"几何孟菲斯","oneliner":"米白撞色 · 创意提案","scenarios":["创意提案","品牌活动","校园分享","工作坊"],"mode":"light","sample":"styles/_samples/memphis.webp","motion":"motion/memphis.json"},
|
|
29
|
+
{"id":"retro-press","kind":"skin","group":"editorial","name_cn":"复古印刷","oneliner":"旧纸砖红 · 文化叙事","scenarios":["文化","书业","展览","品牌故事"],"mode":"light","sample":"styles/_samples/retro-press.webp","motion":"motion/retro-press.json"},
|
|
30
|
+
{"id":"bold-clash","kind":"skin","group":"creative","name_cn":"大胆撞色","oneliner":"亮黄墨黑 · 发布造势","scenarios":["发布造势","营销campaign","潮牌","音乐节"],"mode":"light","sample":"styles/_samples/bold-clash.webp","motion":"motion/bold-clash.json"},
|
|
31
|
+
{"id":"organic-earth","kind":"skin","group":"natural","name_cn":"自然有机","oneliner":"苔绿陶土 · 可持续","scenarios":["可持续","农业食品","户外","ESG 报告"],"mode":"light","sample":"styles/_samples/organic-earth.webp","motion":"motion/organic-earth.json"},
|
|
32
|
+
{"id":"press-room","kind":"pack","group":"editorial","name_cn":"报刊头版","oneliner":"报纸墨黑 · 发布头版","scenarios":["发布会","媒体沟通","行业观察","年度特刊"],"mode":"light","sample":"styles/_samples/press-room.webp","motion":"motion/press-room.json"},
|
|
33
|
+
{"id":"board-brief","kind":"pack","group":"biz-premium","name_cn":"董事会简报","oneliner":"冷灰藏青 · 董事会","scenarios":["董事会","季度经营","投委会","内部治理"],"mode":"light","sample":"styles/_samples/board-brief.webp","motion":"motion/board-brief.json"},
|
|
34
|
+
{"id":"campus-teal","kind":"skin","group":"creative","name_cn":"课堂青","oneliner":"浅青板书 · 教学课件","scenarios":["教学","课件","培训","校园"],"mode":"light","sample":"styles/_samples/campus-teal.webp","motion":"motion/campus-teal.json"},
|
|
35
|
+
{"id":"clinic-care","kind":"skin","group":"minimal","name_cn":"诊疗蓝","oneliner":"洁净浅蓝 · 医疗健康","scenarios":["医疗","健康科普","器械","公共卫生"],"mode":"light","sample":"styles/_samples/clinic-care.webp","motion":"motion/clinic-care.json"},
|
|
36
|
+
{"id":"wedding-blush","kind":"skin","group":"creative","name_cn":"婚礼胭脂","oneliner":"胭脂米白 · 婚礼请柬","scenarios":["婚礼","请柬","纪念册","私人典礼"],"mode":"light","sample":"styles/_samples/wedding-blush.webp","motion":"motion/wedding-blush.json"},
|
|
37
|
+
{"id":"portfolio-noir","kind":"skin","group":"minimal","name_cn":"炭黑作品集","oneliner":"炭黑铜金 · 作品集","scenarios":["作品集","个人品牌","摄影","设计评审"],"mode":"dark","sample":"styles/_samples/portfolio-noir.webp","motion":"motion/portfolio-noir.json"},
|
|
38
|
+
{"id":"bistro-warm","kind":"skin","group":"natural","name_cn":"餐酒暖木","oneliner":"奶油辣椒红 · 餐饮门店","scenarios":["餐饮","门店","食品品牌","菜单发布"],"mode":"light","sample":"styles/_samples/bistro-warm.webp","motion":"motion/bistro-warm.json"},
|
|
39
|
+
{"id":"gov-brief","kind":"skin","group":"biz-premium","name_cn":"政务简报","oneliner":"素白藏蓝 · 政务汇报","scenarios":["政务","公共事务","工作汇报","会议材料"],"mode":"light","sample":"styles/_samples/gov-brief.webp","motion":"motion/gov-brief.json"},
|
|
40
|
+
{"id":"sport-arena","kind":"skin","group":"creative","name_cn":"赛场竞技","oneliner":"夜场亮橙 · 赛事发布","scenarios":["赛事","体育","战报","俱乐部"],"mode":"dark","sample":"styles/_samples/sport-arena.webp","motion":"motion/sport-arena.json"},
|
|
41
|
+
{"id":"legal-slate","kind":"skin","group":"biz-premium","name_cn":"法务石板","oneliner":"石板墨绿 · 法务合规","scenarios":["法务","合规","尽调","风险评估"],"mode":"light","sample":"styles/_samples/legal-slate.webp","motion":"motion/legal-slate.json"}
|
|
42
|
+
]
|
|
43
|
+
}
|