@openpresentation/opf 0.13.0 → 0.15.1
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 +40 -49
- package/dist/catalog-refs-BSfGELpt.d.ts +128 -0
- package/dist/catalog-schemas-CinPh5WA.d.ts +12 -0
- package/dist/catalog.d.ts +91 -0
- package/dist/{chunk-E34DJ5LL.js → catalog.js} +16949 -17628
- package/dist/{chart-data-Cdr6rRVV.d.ts → chart-data-BnNqgnC-.d.ts} +17 -6
- package/dist/{chunk-7QBCWNWL.js → chunk-2CJPC4HI.js} +1807 -1904
- package/dist/{chunk-II5EYKZU.js → chunk-374R35TJ.js} +2 -92
- package/dist/chunk-3JG4YXWF.js +1842 -0
- package/dist/chunk-3RKB4RDJ.js +192 -0
- package/dist/{chunk-IS2CPNVJ.js → chunk-5FTUIDUH.js} +26 -26
- package/dist/{chunk-GJKJL4YY.js → chunk-HXHOZ7AH.js} +1379 -504
- package/dist/{chunk-MPM7NRG7.js → chunk-O744SXXA.js} +2014 -885
- package/dist/chunk-QDI75P2M.js +3515 -0
- package/dist/chunk-SPFV27O5.js +210 -0
- package/dist/chunk-TRDXRRQK.js +17 -0
- package/dist/chunk-TWQJLI6E.js +601 -0
- package/dist/{chunk-ATGDDJPX.js → chunk-U4J75TRG.js} +3 -3
- package/dist/{chunk-RAYB46AB.js → chunk-UBFJ2QHH.js} +34 -30
- package/dist/chunk-VGAOJEY7.js +94 -0
- package/dist/chunk-ZPU46TFA.js +83 -0
- package/dist/{composition-D7we69Tr.d.ts → composition-D2tghM82.d.ts} +947 -111
- package/dist/composition.d.ts +3 -2
- package/dist/composition.js +2 -2
- package/dist/convert.d.ts +18 -19
- package/dist/convert.js +61 -50
- package/dist/data.d.ts +4 -4
- package/dist/data.js +3 -3
- package/dist/diff.d.ts +4 -4
- package/dist/diff.js +7 -605
- package/dist/docs.js +56 -44
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +49451 -6259
- package/dist/finding-CT_f_vbD.d.ts +212 -0
- package/dist/format.d.ts +4 -4
- package/dist/format.js +2 -83
- package/dist/index.d.ts +492 -309
- package/dist/index.js +767 -1097
- package/dist/json-BFSdESOE.d.ts +19 -0
- package/dist/markdown.d.ts +40 -27
- package/dist/markdown.js +9 -1941
- package/dist/pagination-wedbe7eq.d.ts +119 -0
- package/dist/pagination.d.ts +4 -61
- package/dist/pagination.js +6 -6
- package/dist/patch.d.ts +12 -23
- package/dist/patch.js +6 -6
- package/dist/{presentation-mG-IYErQ.d.ts → presentation-CDKQVkyI.d.ts} +702 -1026
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.d.ts +284 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/README.md +11 -6
- package/dist/spec/catalogs/audiences/index.json +2 -50
- package/dist/spec/catalogs/chart-types/100pct-stacked-area.json +21 -0
- package/dist/spec/catalogs/chart-types/100pct-stacked-bar.json +22 -0
- package/dist/spec/catalogs/chart-types/100pct-stacked-column.json +22 -0
- package/dist/spec/catalogs/chart-types/area.json +2 -60
- package/dist/spec/catalogs/chart-types/bar.json +2 -48
- package/dist/spec/catalogs/chart-types/box-and-whisker.json +2 -132
- package/dist/spec/catalogs/chart-types/column.json +2 -52
- package/dist/spec/catalogs/chart-types/combo.json +37 -0
- package/dist/spec/catalogs/chart-types/doughnut.json +2 -40
- package/dist/spec/catalogs/chart-types/filled-radar.json +2 -52
- package/dist/spec/catalogs/chart-types/funnel.json +2 -46
- package/dist/spec/catalogs/chart-types/histogram.json +2 -149
- package/dist/spec/catalogs/chart-types/index.json +50 -520
- package/dist/spec/catalogs/chart-types/line-with-markers.json +2 -60
- package/dist/spec/catalogs/chart-types/line.json +2 -60
- package/dist/spec/catalogs/chart-types/pareto.json +2 -50
- package/dist/spec/catalogs/chart-types/pie.json +2 -40
- package/dist/spec/catalogs/chart-types/radar-with-markers.json +2 -52
- package/dist/spec/catalogs/chart-types/radar.json +2 -52
- package/dist/spec/catalogs/chart-types/scatter.json +2 -73
- package/dist/spec/catalogs/chart-types/stacked-area.json +21 -0
- package/dist/spec/catalogs/chart-types/stacked-bar.json +22 -0
- package/dist/spec/catalogs/chart-types/stacked-column.json +22 -0
- package/dist/spec/catalogs/chart-types/stacked-line-with-markers.json +22 -0
- package/dist/spec/catalogs/chart-types/stacked-line.json +21 -0
- package/dist/spec/catalogs/chart-types/treemap.json +2 -48
- package/dist/spec/catalogs/chart-types/waterfall.json +2 -52
- package/dist/spec/catalogs/chart-types/world.json +2 -64
- package/dist/spec/catalogs/font-schemes/angsana-new.json +2 -2
- package/dist/spec/catalogs/font-schemes/aparajita.json +3 -3
- package/dist/spec/catalogs/font-schemes/aptos.json +1 -1
- package/dist/spec/catalogs/font-schemes/arabic-typesetting.json +2 -2
- package/dist/spec/catalogs/font-schemes/arial.json +1 -1
- package/dist/spec/catalogs/font-schemes/batang.json +2 -2
- package/dist/spec/catalogs/font-schemes/bookman.json +1 -1
- package/dist/spec/catalogs/font-schemes/calibri.json +1 -1
- package/dist/spec/catalogs/font-schemes/century-schoolbook.json +1 -1
- package/dist/spec/catalogs/font-schemes/consolas.json +2 -4
- package/dist/spec/catalogs/font-schemes/constantia.json +1 -1
- package/dist/spec/catalogs/font-schemes/courier-new.json +2 -4
- package/dist/spec/catalogs/font-schemes/daunpenh.json +2 -2
- package/dist/spec/catalogs/font-schemes/david.json +2 -2
- package/dist/spec/catalogs/font-schemes/dilleniaupc.json +2 -2
- package/dist/spec/catalogs/font-schemes/fangsong.json +2 -2
- package/dist/spec/catalogs/font-schemes/garamond.json +1 -1
- package/dist/spec/catalogs/font-schemes/gautami.json +2 -2
- package/dist/spec/catalogs/font-schemes/georgia.json +1 -1
- package/dist/spec/catalogs/font-schemes/gisha.json +3 -3
- package/dist/spec/catalogs/font-schemes/grandview.json +1 -1
- package/dist/spec/catalogs/font-schemes/gungsuh.json +2 -2
- package/dist/spec/catalogs/font-schemes/impact.json +1 -1
- package/dist/spec/catalogs/font-schemes/index.json +1 -1
- package/dist/spec/catalogs/font-schemes/kalinga.json +2 -2
- package/dist/spec/catalogs/font-schemes/kartika.json +2 -2
- package/dist/spec/catalogs/font-schemes/khmer-ui.json +2 -2
- package/dist/spec/catalogs/font-schemes/latha.json +2 -2
- package/dist/spec/catalogs/font-schemes/lucida-sans.json +1 -1
- package/dist/spec/catalogs/font-schemes/malgun-gothic.json +2 -2
- package/dist/spec/catalogs/font-schemes/mangal.json +4 -5
- package/dist/spec/catalogs/font-schemes/meiryo.json +2 -2
- package/dist/spec/catalogs/font-schemes/microsoft-jhenghei.json +2 -2
- package/dist/spec/catalogs/font-schemes/microsoft-yahei.json +5 -5
- package/dist/spec/catalogs/font-schemes/mingliu.json +2 -2
- package/dist/spec/catalogs/font-schemes/miriam.json +2 -2
- package/dist/spec/catalogs/font-schemes/montserrat.json +1 -1
- package/dist/spec/catalogs/font-schemes/ms-mincho.json +2 -2
- package/dist/spec/catalogs/font-schemes/nirmala-ui.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-naksh-arabic.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-nastaliq-urdu.json +3 -3
- package/dist/spec/catalogs/font-schemes/noto-sans-arabic.json +4 -4
- package/dist/spec/catalogs/font-schemes/noto-sans-armenian.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-bengali.json +3 -3
- package/dist/spec/catalogs/font-schemes/noto-sans-devangari.json +3 -3
- package/dist/spec/catalogs/font-schemes/noto-sans-ethiopic.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-georgian.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-gujarati.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-gurmukhi.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-hebrew.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-jp.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-kannada.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-khmer.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-kr.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-malayalam.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-mongolian.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-oriya.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-sc.json +5 -5
- package/dist/spec/catalogs/font-schemes/noto-sans-tamil.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-tc.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-telugu.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-thai.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans.json +5 -5
- package/dist/spec/catalogs/font-schemes/nyala.json +2 -2
- package/dist/spec/catalogs/font-schemes/open-sans.json +1 -1
- package/dist/spec/catalogs/font-schemes/pmingliu.json +2 -2
- package/dist/spec/catalogs/font-schemes/poppins.json +1 -1
- package/dist/spec/catalogs/font-schemes/pt-serif.json +1 -1
- package/dist/spec/catalogs/font-schemes/raavi.json +2 -2
- package/dist/spec/catalogs/font-schemes/raleway.json +1 -1
- package/dist/spec/catalogs/font-schemes/roboto.json +1 -1
- package/dist/spec/catalogs/font-schemes/rockwell.json +1 -1
- package/dist/spec/catalogs/font-schemes/sakkal-majalla.json +4 -4
- package/dist/spec/catalogs/font-schemes/seaford.json +1 -1
- package/dist/spec/catalogs/font-schemes/segoe-ui-light.json +1 -1
- package/dist/spec/catalogs/font-schemes/segoe-ui.json +1 -1
- package/dist/spec/catalogs/font-schemes/shonar-bangla.json +3 -3
- package/dist/spec/catalogs/font-schemes/shruti.json +2 -2
- package/dist/spec/catalogs/font-schemes/simsun.json +2 -2
- package/dist/spec/catalogs/font-schemes/skeena.json +1 -1
- package/dist/spec/catalogs/font-schemes/sylfaen.json +3 -3
- package/dist/spec/catalogs/font-schemes/tahoma.json +1 -1
- package/dist/spec/catalogs/font-schemes/tenorite.json +1 -1
- package/dist/spec/catalogs/font-schemes/times-new-roman.json +1 -1
- package/dist/spec/catalogs/font-schemes/traditional-arabic.json +4 -4
- package/dist/spec/catalogs/font-schemes/trebuchet-ms.json +1 -1
- package/dist/spec/catalogs/font-schemes/tunga.json +2 -2
- package/dist/spec/catalogs/font-schemes/verdana.json +1 -1
- package/dist/spec/catalogs/font-schemes/vrinda.json +2 -2
- package/dist/spec/catalogs/font-schemes/yu-gothic.json +2 -2
- package/dist/spec/catalogs/layouts/action-plan.json +9 -15
- package/dist/spec/catalogs/layouts/agenda.json +8 -15
- package/dist/spec/catalogs/layouts/appendix-index.json +7 -15
- package/dist/spec/catalogs/layouts/architecture-stack.json +9 -15
- package/dist/spec/catalogs/layouts/assumptions-dependencies.json +9 -15
- package/dist/spec/catalogs/layouts/before-after.json +9 -15
- package/dist/spec/catalogs/layouts/benchmark-target-table.json +9 -15
- package/dist/spec/catalogs/layouts/blank.json +11 -1
- package/dist/spec/catalogs/layouts/bullet-list.json +9 -15
- package/dist/spec/catalogs/layouts/business-model-canvas.json +9 -15
- package/dist/spec/catalogs/layouts/capability-map.json +11 -16
- package/dist/spec/catalogs/layouts/case-study.json +9 -15
- package/dist/spec/catalogs/layouts/chapter-recap.json +8 -15
- package/dist/spec/catalogs/layouts/chart-1x-title-center.json +30 -0
- package/dist/spec/catalogs/layouts/chart-1x.json +15 -0
- package/dist/spec/catalogs/layouts/chart-2x-title-center.json +36 -0
- package/dist/spec/catalogs/layouts/chart-2x-vertical-title-left.json +37 -0
- package/dist/spec/catalogs/layouts/chart-2x.json +15 -0
- package/dist/spec/catalogs/layouts/chart-3x-bottom-vertical-title-left.json +46 -0
- package/dist/spec/catalogs/layouts/chart-3x-left-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/chart-3x-left.json +40 -0
- package/dist/spec/catalogs/layouts/chart-3x-right-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/chart-3x-right.json +40 -0
- package/dist/spec/catalogs/layouts/chart-3x-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/chart-3x-top-vertical-title-left.json +46 -0
- package/dist/spec/catalogs/layouts/chart-3x.json +15 -0
- package/dist/spec/catalogs/layouts/circular-lifecycle.json +9 -15
- package/dist/spec/catalogs/layouts/code-1x.json +10 -0
- package/dist/spec/catalogs/layouts/comparison.json +9 -15
- package/dist/spec/catalogs/layouts/competitive-landscape.json +11 -16
- package/dist/spec/catalogs/layouts/customer-journey.json +11 -16
- package/dist/spec/catalogs/layouts/customer-logos.json +9 -15
- package/dist/spec/catalogs/layouts/dashboard.json +9 -15
- package/dist/spec/catalogs/layouts/data-visualization.json +9 -15
- package/dist/spec/catalogs/layouts/decision-tree.json +11 -16
- package/dist/spec/catalogs/layouts/detailed-data-table.json +9 -15
- package/dist/spec/catalogs/layouts/ecosystem-map.json +11 -16
- package/dist/spec/catalogs/layouts/executive-decision.json +9 -15
- package/dist/spec/catalogs/layouts/executive-summary.json +9 -15
- package/dist/spec/catalogs/layouts/extract/canonical.json +7 -16
- package/dist/spec/catalogs/layouts/faq.json +9 -15
- package/dist/spec/catalogs/layouts/feature-comparison-matrix.json +9 -15
- package/dist/spec/catalogs/layouts/forecast-scenario.json +9 -15
- package/dist/spec/catalogs/layouts/funnel-pyramid.json +9 -15
- package/dist/spec/catalogs/layouts/gantt-project-plan.json +9 -15
- package/dist/spec/catalogs/layouts/geographic-map.json +10 -15
- package/dist/spec/catalogs/layouts/heatmap-cohort.json +9 -15
- package/dist/spec/catalogs/layouts/hub-and-spoke.json +9 -15
- package/dist/spec/catalogs/layouts/icon-grid.json +11 -16
- package/dist/spec/catalogs/layouts/image-1x-crop-title-center.json +32 -0
- package/dist/spec/catalogs/layouts/image-1x-crop-title-left.json +32 -0
- package/dist/spec/catalogs/layouts/image-1x-crop.json +27 -0
- package/dist/spec/catalogs/layouts/image-1x-fit-title-center.json +32 -0
- package/dist/spec/catalogs/layouts/image-1x.json +14 -1
- package/dist/spec/catalogs/layouts/image-2x-crop-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/image-2x-crop-vertical-title-left.json +39 -0
- package/dist/spec/catalogs/layouts/image-2x-crop-vertical.json +34 -0
- package/dist/spec/catalogs/layouts/image-2x-crop.json +33 -0
- package/dist/spec/catalogs/layouts/image-2x-fit-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/image-2x-fit-vertical-title-left.json +39 -0
- package/dist/spec/catalogs/layouts/image-2x-fit-vertical.json +34 -0
- package/dist/spec/catalogs/layouts/image-2x.json +15 -2
- package/dist/spec/catalogs/layouts/image-3x-crop-title-center.json +41 -0
- package/dist/spec/catalogs/layouts/image-3x-crop-vertical-title-left.json +42 -0
- package/dist/spec/catalogs/layouts/image-3x-crop-vertical.json +37 -0
- package/dist/spec/catalogs/layouts/image-3x-crop.json +36 -0
- package/dist/spec/catalogs/layouts/image-3x-fit-title-center.json +41 -0
- package/dist/spec/catalogs/layouts/image-3x-fit-vertical-title-left.json +42 -0
- package/dist/spec/catalogs/layouts/image-3x-fit-vertical.json +37 -0
- package/dist/spec/catalogs/layouts/image-3x-fit.json +36 -0
- package/dist/spec/catalogs/layouts/image-3x.json +16 -3
- package/dist/spec/catalogs/layouts/image-focus.json +13 -18
- package/dist/spec/catalogs/layouts/image-only-1x-crop-title-center.json +31 -0
- package/dist/spec/catalogs/layouts/image-only-1x-fit-title-center.json +31 -0
- package/dist/spec/catalogs/layouts/image-only-2x-crop-title-center.json +37 -0
- package/dist/spec/catalogs/layouts/image-only-2x-crop-vertical-title-left.json +38 -0
- package/dist/spec/catalogs/layouts/image-only-2x-crop-vertical.json +33 -0
- package/dist/spec/catalogs/layouts/image-only-2x-fit-title-center.json +37 -0
- package/dist/spec/catalogs/layouts/image-only-2x-fit-vertical-title-left.json +38 -0
- package/dist/spec/catalogs/layouts/image-only-2x-fit-vertical.json +33 -0
- package/dist/spec/catalogs/layouts/image-only-3x-crop-title-center.json +40 -0
- package/dist/spec/catalogs/layouts/image-only-3x-crop-vertical-title-left.json +41 -0
- package/dist/spec/catalogs/layouts/image-only-3x-crop-vertical.json +36 -0
- package/dist/spec/catalogs/layouts/image-only-3x-crop.json +35 -0
- package/dist/spec/catalogs/layouts/image-only-3x-fit-title-center.json +40 -0
- package/dist/spec/catalogs/layouts/image-only-3x-fit-vertical-title-left.json +41 -0
- package/dist/spec/catalogs/layouts/image-only-3x-fit-vertical.json +36 -0
- package/dist/spec/catalogs/layouts/image-only-3x-fit.json +35 -0
- package/dist/spec/catalogs/layouts/index.json +1041 -151
- package/dist/spec/catalogs/layouts/key-takeaway.json +8 -15
- package/dist/spec/catalogs/layouts/kpi-scorecard.json +9 -15
- package/dist/spec/catalogs/layouts/list-1x-box-title-center.json +32 -0
- package/dist/spec/catalogs/layouts/list-1x-box-vertical-title-center.json +33 -0
- package/dist/spec/catalogs/layouts/list-1x-box-vertical-title-left.json +33 -0
- package/dist/spec/catalogs/layouts/list-1x-box-vertical.json +28 -0
- package/dist/spec/catalogs/layouts/list-1x-box.json +27 -0
- package/dist/spec/catalogs/layouts/list-1x-itemimage-title-center.json +32 -0
- package/dist/spec/catalogs/layouts/list-1x-itemimage-vertical-title-center.json +33 -0
- package/dist/spec/catalogs/layouts/list-1x-title-center.json +31 -0
- package/dist/spec/catalogs/layouts/list-1x-vertical-title-center.json +32 -0
- package/dist/spec/catalogs/layouts/list-1x.json +17 -1
- package/dist/spec/catalogs/layouts/list-2x-box-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/list-2x-box-vertical-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/list-2x-box-vertical-title-left.json +39 -0
- package/dist/spec/catalogs/layouts/list-2x-box-vertical.json +34 -0
- package/dist/spec/catalogs/layouts/list-2x-box.json +33 -0
- package/dist/spec/catalogs/layouts/list-2x-itemimage-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical-title-left.json +39 -0
- package/dist/spec/catalogs/layouts/list-2x-itemimage-vertical.json +34 -0
- package/dist/spec/catalogs/layouts/list-2x-title-center.json +37 -0
- package/dist/spec/catalogs/layouts/list-2x-vertical-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/list-2x-vertical-title-left.json +38 -0
- package/dist/spec/catalogs/layouts/list-2x-vertical.json +33 -0
- package/dist/spec/catalogs/layouts/list-2x.json +16 -0
- package/dist/spec/catalogs/layouts/list-3x-box-title-center.json +41 -0
- package/dist/spec/catalogs/layouts/list-3x-box-vertical-title-center.json +42 -0
- package/dist/spec/catalogs/layouts/list-3x-box-vertical-title-left.json +42 -0
- package/dist/spec/catalogs/layouts/list-3x-box-vertical.json +37 -0
- package/dist/spec/catalogs/layouts/list-3x-box.json +36 -0
- package/dist/spec/catalogs/layouts/list-3x-itemimage-title-center.json +41 -0
- package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical-title-center.json +42 -0
- package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical-title-left.json +42 -0
- package/dist/spec/catalogs/layouts/list-3x-itemimage-vertical.json +37 -0
- package/dist/spec/catalogs/layouts/list-3x-itemimage.json +36 -0
- package/dist/spec/catalogs/layouts/list-3x-title-center.json +40 -0
- package/dist/spec/catalogs/layouts/list-3x-vertical-title-center.json +41 -0
- package/dist/spec/catalogs/layouts/list-3x-vertical-title-left.json +41 -0
- package/dist/spec/catalogs/layouts/list-3x-vertical.json +36 -0
- package/dist/spec/catalogs/layouts/list-3x.json +16 -0
- package/dist/spec/catalogs/layouts/list-4x-box-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-box-vertical-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-box-vertical-title-left.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-box-vertical.json +40 -0
- package/dist/spec/catalogs/layouts/list-4x-box.json +40 -0
- package/dist/spec/catalogs/layouts/list-4x-itemimage-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical-title-left.json +45 -0
- package/dist/spec/catalogs/layouts/list-4x-itemimage-vertical.json +40 -0
- package/dist/spec/catalogs/layouts/list-4x-title-center.json +44 -0
- package/dist/spec/catalogs/layouts/list-4x-vertical-title-center.json +44 -0
- package/dist/spec/catalogs/layouts/list-4x-vertical-title-left.json +44 -0
- package/dist/spec/catalogs/layouts/list-4x-vertical.json +39 -0
- package/dist/spec/catalogs/layouts/list-4x.json +16 -0
- package/dist/spec/catalogs/layouts/list-5x-box-title-center.json +48 -0
- package/dist/spec/catalogs/layouts/list-5x-box-vertical-title-center.json +50 -0
- package/dist/spec/catalogs/layouts/list-5x-box-vertical-title-left.json +50 -0
- package/dist/spec/catalogs/layouts/list-5x-box-vertical.json +45 -0
- package/dist/spec/catalogs/layouts/list-5x-box.json +43 -0
- package/dist/spec/catalogs/layouts/list-5x-itemimage-title-center.json +48 -0
- package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical-title-center.json +48 -0
- package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical-title-left.json +48 -0
- package/dist/spec/catalogs/layouts/list-5x-itemimage-vertical.json +43 -0
- package/dist/spec/catalogs/layouts/list-5x-title-center.json +47 -0
- package/dist/spec/catalogs/layouts/list-5x-vertical-title-center.json +47 -0
- package/dist/spec/catalogs/layouts/list-5x-vertical-title-left.json +47 -0
- package/dist/spec/catalogs/layouts/list-5x-vertical.json +42 -0
- package/dist/spec/catalogs/layouts/list-5x.json +16 -0
- package/dist/spec/catalogs/layouts/list-6x-box-title-center.json +51 -0
- package/dist/spec/catalogs/layouts/list-6x-box-vertical-title-center.json +53 -0
- package/dist/spec/catalogs/layouts/list-6x-box-vertical-title-left.json +53 -0
- package/dist/spec/catalogs/layouts/list-6x-box-vertical.json +48 -0
- package/dist/spec/catalogs/layouts/list-6x-box.json +46 -0
- package/dist/spec/catalogs/layouts/list-6x-itemimage-title-center.json +51 -0
- package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical-title-center.json +51 -0
- package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical-title-left.json +51 -0
- package/dist/spec/catalogs/layouts/list-6x-itemimage-vertical.json +46 -0
- package/dist/spec/catalogs/layouts/list-6x-title-center.json +50 -0
- package/dist/spec/catalogs/layouts/list-6x-vertical-title-center.json +50 -0
- package/dist/spec/catalogs/layouts/list-6x-vertical-title-left.json +50 -0
- package/dist/spec/catalogs/layouts/list-6x-vertical.json +45 -0
- package/dist/spec/catalogs/layouts/list-6x.json +16 -0
- package/dist/spec/catalogs/layouts/logic-tree.json +9 -15
- package/dist/spec/catalogs/layouts/market-size.json +9 -15
- package/dist/spec/catalogs/layouts/matrix-quadrant.json +9 -15
- package/dist/spec/catalogs/layouts/media-1x.json +11 -1
- package/dist/spec/catalogs/layouts/network-dependency-map.json +10 -15
- package/dist/spec/catalogs/layouts/number-1x-box-title-center.json +30 -0
- package/dist/spec/catalogs/layouts/number-1x-box.json +25 -0
- package/dist/spec/catalogs/layouts/number-1x-title-center.json +29 -0
- package/dist/spec/catalogs/layouts/number-1x.json +16 -1
- package/dist/spec/catalogs/layouts/number-2x-box-title-center.json +36 -0
- package/dist/spec/catalogs/layouts/number-2x-box.json +31 -0
- package/dist/spec/catalogs/layouts/number-2x-title-center.json +35 -0
- package/dist/spec/catalogs/layouts/number-2x.json +15 -0
- package/dist/spec/catalogs/layouts/number-3x-box-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/number-3x-box.json +34 -0
- package/dist/spec/catalogs/layouts/number-3x-title-center.json +38 -0
- package/dist/spec/catalogs/layouts/number-3x.json +15 -0
- package/dist/spec/catalogs/layouts/number-4x-box-title-center.json +43 -0
- package/dist/spec/catalogs/layouts/number-4x-box.json +38 -0
- package/dist/spec/catalogs/layouts/number-4x-title-center.json +42 -0
- package/dist/spec/catalogs/layouts/number-4x.json +15 -0
- package/dist/spec/catalogs/layouts/number-5x-box-title-center.json +46 -0
- package/dist/spec/catalogs/layouts/number-5x-box.json +41 -0
- package/dist/spec/catalogs/layouts/number-5x-title-center.json +45 -0
- package/dist/spec/catalogs/layouts/number-5x.json +15 -0
- package/dist/spec/catalogs/layouts/number-6x-box-title-center.json +49 -0
- package/dist/spec/catalogs/layouts/number-6x-box.json +44 -0
- package/dist/spec/catalogs/layouts/number-6x-title-center.json +48 -0
- package/dist/spec/catalogs/layouts/number-6x.json +15 -0
- package/dist/spec/catalogs/layouts/one-column-explainer.json +9 -15
- package/dist/spec/catalogs/layouts/org-chart.json +9 -15
- package/dist/spec/catalogs/layouts/persona-grid.json +11 -16
- package/dist/spec/catalogs/layouts/photo-grid.json +14 -19
- package/dist/spec/catalogs/layouts/pricing-table.json +9 -15
- package/dist/spec/catalogs/layouts/process-flow.json +9 -15
- package/dist/spec/catalogs/layouts/product-feature.json +11 -16
- package/dist/spec/catalogs/layouts/pros-cons.json +9 -15
- package/dist/spec/catalogs/layouts/qa-discussion.json +7 -15
- package/dist/spec/catalogs/layouts/quote-1x.json +11 -1
- package/dist/spec/catalogs/layouts/quote-highlight.json +9 -15
- package/dist/spec/catalogs/layouts/raci-matrix.json +9 -15
- package/dist/spec/catalogs/layouts/risk-heatmap.json +9 -15
- package/dist/spec/catalogs/layouts/roadmap.json +9 -15
- package/dist/spec/catalogs/layouts/screenshot-walkthrough.json +11 -16
- package/dist/spec/catalogs/layouts/section-divider.json +8 -15
- package/dist/spec/catalogs/layouts/single-message-statement.json +8 -15
- package/dist/spec/catalogs/layouts/stats-metrics.json +9 -15
- package/dist/spec/catalogs/layouts/status-rag.json +9 -15
- package/dist/spec/catalogs/layouts/swimlane-process.json +11 -16
- package/dist/spec/catalogs/layouts/swot-analysis.json +9 -15
- package/dist/spec/catalogs/layouts/table-1x.json +10 -0
- package/dist/spec/catalogs/layouts/team-bio.json +11 -16
- package/dist/spec/catalogs/layouts/testimonial-grid.json +9 -15
- package/dist/spec/catalogs/layouts/text-1x-box-title-center.json +31 -0
- package/dist/spec/catalogs/layouts/text-1x-box-title-left.json +31 -0
- package/dist/spec/catalogs/layouts/text-1x-center-box-title-center.json +31 -0
- package/dist/spec/catalogs/layouts/text-1x-center-box-title-left.json +31 -0
- package/dist/spec/catalogs/layouts/text-1x-center-box.json +26 -0
- package/dist/spec/catalogs/layouts/text-1x-center-title-center.json +30 -0
- package/dist/spec/catalogs/layouts/text-1x-center-title-left.json +30 -0
- package/dist/spec/catalogs/layouts/text-1x-center.json +25 -0
- package/dist/spec/catalogs/layouts/text-1x-left-box.json +26 -0
- package/dist/spec/catalogs/layouts/text-1x-title-center.json +30 -0
- package/dist/spec/catalogs/layouts/text-1x.json +11 -1
- package/dist/spec/catalogs/layouts/text-2x-box-title-center.json +37 -0
- package/dist/spec/catalogs/layouts/text-2x-box-vertical-title-left.json +37 -0
- package/dist/spec/catalogs/layouts/text-2x-center-box-title-center.json +37 -0
- package/dist/spec/catalogs/layouts/text-2x-center-box-vertical-title-left.json +37 -0
- package/dist/spec/catalogs/layouts/text-2x-center-box.json +32 -0
- package/dist/spec/catalogs/layouts/text-2x-center-title-center.json +36 -0
- package/dist/spec/catalogs/layouts/text-2x-center-vertical-title-left.json +36 -0
- package/dist/spec/catalogs/layouts/text-2x-center.json +31 -0
- package/dist/spec/catalogs/layouts/text-2x-left-box.json +32 -0
- package/dist/spec/catalogs/layouts/text-2x-title-center.json +36 -0
- package/dist/spec/catalogs/layouts/text-2x-vertical-title-left.json +36 -0
- package/dist/spec/catalogs/layouts/text-2x.json +10 -0
- package/dist/spec/catalogs/layouts/text-3x-box-title-center.json +40 -0
- package/dist/spec/catalogs/layouts/text-3x-box-vertical-title-left.json +41 -0
- package/dist/spec/catalogs/layouts/text-3x-center-box-title-center.json +40 -0
- package/dist/spec/catalogs/layouts/text-3x-center-box-vertical-title-left.json +41 -0
- package/dist/spec/catalogs/layouts/text-3x-center-box.json +35 -0
- package/dist/spec/catalogs/layouts/text-3x-center-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/text-3x-center-vertical-title-left.json +40 -0
- package/dist/spec/catalogs/layouts/text-3x-center.json +34 -0
- package/dist/spec/catalogs/layouts/text-3x-left-box.json +35 -0
- package/dist/spec/catalogs/layouts/text-3x-left.json +34 -0
- package/dist/spec/catalogs/layouts/text-3x-title-center.json +39 -0
- package/dist/spec/catalogs/layouts/text-3x-vertical-title-left.json +40 -0
- package/dist/spec/catalogs/layouts/text-3x.json +10 -0
- package/dist/spec/catalogs/layouts/thank-you-cta.json +8 -15
- package/dist/spec/catalogs/layouts/three-column.json +9 -15
- package/dist/spec/catalogs/layouts/timeline-1x.json +11 -1
- package/dist/spec/catalogs/layouts/timeline.json +9 -15
- package/dist/spec/catalogs/layouts/title-center-box.json +27 -0
- package/dist/spec/catalogs/layouts/title-center-image-bottom.json +34 -0
- package/dist/spec/catalogs/layouts/title-center-image-top.json +34 -0
- package/dist/spec/catalogs/layouts/title-center.json +26 -0
- package/dist/spec/catalogs/layouts/title-left-image-bottom.json +34 -0
- package/dist/spec/catalogs/layouts/title-left-image-left.json +34 -0
- package/dist/spec/catalogs/layouts/title-left-image-right.json +34 -0
- package/dist/spec/catalogs/layouts/title-left-image-top.json +34 -0
- package/dist/spec/catalogs/layouts/title-slide.json +8 -15
- package/dist/spec/catalogs/layouts/title-subtitle.json +11 -1
- package/dist/spec/catalogs/layouts/title.json +11 -1
- package/dist/spec/catalogs/layouts/two-column.json +9 -15
- package/dist/spec/catalogs/layouts/venn-overlap.json +9 -15
- package/dist/spec/catalogs/layouts/waterfall-bridge.json +9 -15
- package/dist/spec/catalogs/layouts/wheel-radial.json +9 -15
- package/dist/spec/catalogs/manifest.json +22 -22
- package/dist/spec/catalogs/narratives/board-meeting.json +45 -45
- package/dist/spec/catalogs/narratives/business-narrative.json +19 -19
- package/dist/spec/catalogs/narratives/business-review.json +27 -27
- package/dist/spec/catalogs/narratives/capacity-planning.json +19 -19
- package/dist/spec/catalogs/narratives/challenge-resolution.json +17 -17
- package/dist/spec/catalogs/narratives/change-story.json +13 -13
- package/dist/spec/catalogs/narratives/classic-story.json +17 -17
- package/dist/spec/catalogs/narratives/company-intro.json +21 -21
- package/dist/spec/catalogs/narratives/conference-talk.json +4 -4
- package/dist/spec/catalogs/narratives/data-story.json +13 -14
- package/dist/spec/catalogs/narratives/early-startup-pitch.json +27 -27
- package/dist/spec/catalogs/narratives/educate.json +21 -21
- package/dist/spec/catalogs/narratives/employee-review.json +19 -19
- package/dist/spec/catalogs/narratives/failure-analysis.json +23 -23
- package/dist/spec/catalogs/narratives/focus.json +27 -27
- package/dist/spec/catalogs/narratives/golden-circle.json +4 -4
- package/dist/spec/catalogs/narratives/heros-journey.json +13 -13
- package/dist/spec/catalogs/narratives/index.json +145 -145
- package/dist/spec/catalogs/narratives/innovation.json +21 -21
- package/dist/spec/catalogs/narratives/justice.json +25 -25
- package/dist/spec/catalogs/narratives/marketing-strategy.json +25 -25
- package/dist/spec/catalogs/narratives/performance-improvement-plan.json +19 -19
- package/dist/spec/catalogs/narratives/performance-review.json +25 -25
- package/dist/spec/catalogs/narratives/persuade.json +17 -17
- package/dist/spec/catalogs/narratives/persuasive-sales.json +19 -19
- package/dist/spec/catalogs/narratives/pitch-deck.json +6 -6
- package/dist/spec/catalogs/narratives/problem-solution.json +5 -5
- package/dist/spec/catalogs/narratives/product-launch.json +23 -23
- package/dist/spec/catalogs/narratives/project-proposal.json +23 -23
- package/dist/spec/catalogs/narratives/pyramid-principle.json +9 -9
- package/dist/spec/catalogs/narratives/qbr.json +8 -8
- package/dist/spec/catalogs/narratives/rags-to-riches.json +17 -17
- package/dist/spec/catalogs/narratives/reveal.json +19 -19
- package/dist/spec/catalogs/narratives/scqa.json +4 -4
- package/dist/spec/catalogs/narratives/situation-complication-resolution.json +11 -11
- package/dist/spec/catalogs/narratives/sparkline.json +11 -11
- package/dist/spec/catalogs/narratives/star-method.json +11 -11
- package/dist/spec/catalogs/narratives/status-update.json +15 -15
- package/dist/spec/catalogs/narratives/strategic-advisory.json +17 -17
- package/dist/spec/catalogs/narratives/strategic-narrative.json +4 -4
- package/dist/spec/catalogs/narratives/survey-analysis.json +23 -23
- package/dist/spec/catalogs/narratives/survival-story.json +23 -23
- package/dist/spec/catalogs/narratives/transformation-arc.json +4 -4
- package/dist/spec/catalogs/narratives/trend-analysis.json +17 -17
- package/dist/spec/catalogs/narratives/underdog-victory.json +19 -19
- package/dist/spec/catalogs/narratives/venture-pitch.json +27 -27
- package/dist/spec/catalogs/narratives/vision-roadmap.json +13 -13
- package/dist/spec/catalogs/narratives/weekly-progress.json +23 -23
- package/dist/spec/catalogs/narratives/what-so-what-now-what.json +9 -9
- package/dist/spec/openapi.yaml +4 -7
- package/dist/spec/reference/engine-defaults.json +22 -30
- package/dist/spec/reference/engine-vocabularies.json +1577 -0
- package/dist/spec/schemas/audience.schema.json +6 -27
- package/dist/spec/schemas/catalog-index.schema.json +2 -2
- package/dist/spec/schemas/catalog-manifest.schema.json +3 -3
- package/dist/spec/schemas/chart-type.schema.json +17 -321
- package/dist/spec/schemas/color-scheme.schema.json +23 -36
- package/dist/spec/schemas/finding.schema.json +191 -0
- package/dist/spec/schemas/font-scheme.schema.json +17 -75
- package/dist/spec/schemas/language.schema.json +7 -28
- package/dist/spec/schemas/layout.schema.json +130 -184
- package/dist/spec/schemas/narrative.schema.json +20 -48
- package/dist/spec/schemas/opf.schema.json +678 -701
- package/dist/spec/schemas/purpose.schema.json +5 -26
- package/dist/spec/schemas/social-platform.schema.json +2 -48
- package/dist/spec/schemas/theme.schema.json +13 -38
- package/dist/spec/schemas/tone.schema.json +4 -25
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +1 -1
- package/dist/symbol-font-encodings.js +18448 -1
- package/dist/types.d.ts +1125 -4
- package/dist/validation-types-BOcY9GTs.d.ts +276 -0
- package/dist/validator.d.ts +63 -4
- package/dist/validator.js +5 -5
- package/dist/yaml.d.ts +102 -0
- package/dist/yaml.js +322 -0
- package/package.json +9 -17
- package/dist/audit.d.ts +0 -35
- package/dist/audit.js +0 -7
- package/dist/catalogs-ywCamd8C.d.ts +0 -1465
- package/dist/catalogs.d.ts +0 -2
- package/dist/catalogs.js +0 -2
- package/dist/chunk-7N4VMAT4.js +0 -1694
- package/dist/chunk-FYLJVF7X.js +0 -18448
- package/dist/chunk-INU7ZNSB.js +0 -670
- package/dist/chunk-IYCJUKWD.js +0 -951
- package/dist/chunk-PIQXLBBJ.js +0 -445
- package/dist/chunk-S5W34SIJ.js +0 -1
- package/dist/lint-B7azdiuE.d.ts +0 -197
- package/dist/lint.d.ts +0 -7
- package/dist/lint.js +0 -6
- package/dist/previews.d.ts +0 -40
- package/dist/previews.js +0 -1
- package/dist/schemas-BbPonsTz.d.ts +0 -270
- package/dist/spec/catalogs/audiences/customers.json +0 -27
- package/dist/spec/catalogs/audiences/executives.json +0 -27
- package/dist/spec/catalogs/audiences/investors.json +0 -27
- package/dist/spec/catalogs/audiences/marketing-team.json +0 -27
- package/dist/spec/catalogs/audiences/regulators.json +0 -27
- package/dist/spec/catalogs/audiences/sales-team.json +0 -27
- package/dist/spec/catalogs/chart-types/100pct-bullet-bar-2x.json +0 -91
- package/dist/spec/catalogs/chart-types/100pct-bullet-bar-3x.json +0 -103
- package/dist/spec/catalogs/chart-types/100pct-bullet-bar.json +0 -79
- package/dist/spec/catalogs/chart-types/100pct-bullet-column-2x.json +0 -91
- package/dist/spec/catalogs/chart-types/100pct-bullet-column-3x.json +0 -103
- package/dist/spec/catalogs/chart-types/100pct-bullet-column.json +0 -79
- package/dist/spec/catalogs/chart-types/100pct-progress-bar.json +0 -105
- package/dist/spec/catalogs/chart-types/100pct-stacked-area-2x.json +0 -106
- package/dist/spec/catalogs/chart-types/100pct-stacked-area-3x.json +0 -123
- package/dist/spec/catalogs/chart-types/100pct-stacked-bar-2x.json +0 -89
- package/dist/spec/catalogs/chart-types/100pct-stacked-bar-3x.json +0 -100
- package/dist/spec/catalogs/chart-types/100pct-stacked-column-2x.json +0 -95
- package/dist/spec/catalogs/chart-types/100pct-stacked-column-3x.json +0 -108
- package/dist/spec/catalogs/chart-types/australia.json +0 -76
- package/dist/spec/catalogs/chart-types/box-and-whisker-2x.json +0 -136
- package/dist/spec/catalogs/chart-types/box-and-whisker-3x.json +0 -168
- package/dist/spec/catalogs/chart-types/bullet-bar-2x.json +0 -89
- package/dist/spec/catalogs/chart-types/bullet-bar-3x.json +0 -101
- package/dist/spec/catalogs/chart-types/bullet-bar.json +0 -77
- package/dist/spec/catalogs/chart-types/bullet-column-2x.json +0 -89
- package/dist/spec/catalogs/chart-types/bullet-column-3x.json +0 -101
- package/dist/spec/catalogs/chart-types/bullet-column.json +0 -77
- package/dist/spec/catalogs/chart-types/canada.json +0 -86
- package/dist/spec/catalogs/chart-types/clustered-bar-2x.json +0 -89
- package/dist/spec/catalogs/chart-types/clustered-column.json +0 -95
- package/dist/spec/catalogs/chart-types/dot-plot-2x.json +0 -99
- package/dist/spec/catalogs/chart-types/dot-plot-3x.json +0 -124
- package/dist/spec/catalogs/chart-types/dot-plot-4x.json +0 -149
- package/dist/spec/catalogs/chart-types/dot-plot-5x.json +0 -174
- package/dist/spec/catalogs/chart-types/dot-plot-6x.json +0 -199
- package/dist/spec/catalogs/chart-types/dot-plot.json +0 -74
- package/dist/spec/catalogs/chart-types/dumbbell.json +0 -120
- package/dist/spec/catalogs/chart-types/line-2x.json +0 -105
- package/dist/spec/catalogs/chart-types/line-3x.json +0 -127
- package/dist/spec/catalogs/chart-types/line-with-high-low-and-markers.json +0 -144
- package/dist/spec/catalogs/chart-types/line-with-high-low.json +0 -144
- package/dist/spec/catalogs/chart-types/line-with-markers-2x.json +0 -106
- package/dist/spec/catalogs/chart-types/line-with-markers-3x.json +0 -128
- package/dist/spec/catalogs/chart-types/sparkline-2x.json +0 -138
- package/dist/spec/catalogs/chart-types/sparkline-3x.json +0 -174
- package/dist/spec/catalogs/chart-types/sparkline-4x.json +0 -210
- package/dist/spec/catalogs/chart-types/sparkline-5x.json +0 -246
- package/dist/spec/catalogs/chart-types/sparkline-6x.json +0 -282
- package/dist/spec/catalogs/chart-types/sparkline.json +0 -102
- package/dist/spec/catalogs/chart-types/stacked-area-2x.json +0 -106
- package/dist/spec/catalogs/chart-types/stacked-area-3x.json +0 -123
- package/dist/spec/catalogs/chart-types/stacked-bar-2x.json +0 -89
- package/dist/spec/catalogs/chart-types/stacked-bar-3x.json +0 -100
- package/dist/spec/catalogs/chart-types/stacked-column-2x.json +0 -95
- package/dist/spec/catalogs/chart-types/stacked-column-3x.json +0 -108
- package/dist/spec/catalogs/chart-types/stacked-line-2x.json +0 -106
- package/dist/spec/catalogs/chart-types/stacked-line-3x.json +0 -123
- package/dist/spec/catalogs/chart-types/stacked-line-with-markers-2x.json +0 -107
- package/dist/spec/catalogs/chart-types/stacked-line-with-markers-3x.json +0 -124
- package/dist/spec/catalogs/chart-types/treemap-2x.json +0 -101
- package/dist/spec/catalogs/chart-types/treemap-3x.json +0 -122
- package/dist/spec/catalogs/chart-types/united-kingdom.json +0 -68
- package/dist/spec/catalogs/chart-types/united-states.json +0 -82
- package/dist/spec/catalogs/layouts/image-bleed.json +0 -10
- package/dist/validator-CIylxoIm.d.ts +0 -172
package/dist/index.js
CHANGED
|
@@ -1,1139 +1,809 @@
|
|
|
1
|
-
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
1
|
+
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-HXHOZ7AH.js';
|
|
2
|
+
export { OPFDataImportError, importData, parseTabularData } from './chunk-U4J75TRG.js';
|
|
3
|
+
export { fromMarkdown, toMarkdown } from './chunk-3JG4YXWF.js';
|
|
4
|
+
export { OPFMarkdownError } from './chunk-3RKB4RDJ.js';
|
|
5
|
+
export { diff, merge } from './chunk-TWQJLI6E.js';
|
|
6
|
+
export { OPFPatchError, OPFPatchValidationError, applyPatch } from './chunk-5FTUIDUH.js';
|
|
7
|
+
export { OPFFormatError, format } from './chunk-ZPU46TFA.js';
|
|
8
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-UBFJ2QHH.js';
|
|
9
|
+
import './chunk-374R35TJ.js';
|
|
10
|
+
import './chunk-VGAOJEY7.js';
|
|
11
|
+
export { DEFAULT_CHART_PALETTE, DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-QDI75P2M.js';
|
|
12
|
+
import { isRecord, visitContentPayloads, listVariables, resolveDesignRecords, resolveFontFamilies, resolveCanvasDimensions, imageBackground } from './chunk-O744SXXA.js';
|
|
13
|
+
export { CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, OPFVariableError, SOCIAL_PLATFORMS, VARIABLE_KINDS, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unusedDatasets, variableDeclarations } from './chunk-O744SXXA.js';
|
|
14
|
+
export { catalogDisplayKinds, catalogSchemaNames } from './chunk-TRDXRRQK.js';
|
|
15
|
+
import { embeddedCopy, checkCatalogsOption, catalogReferenceSites, parseReference, catalogGroupDeclared, resolveReference, dottedPath, unresolvedReference, recordReferenceSites, catalogGroupSource, registeredCatalog, catalogKinds, CATALOG_GROUP_PATTERN } from './chunk-SPFV27O5.js';
|
|
16
|
+
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, OPFCatalogsOptionError, OPFUnresolvedReferenceError, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, parseReference, resolveReference, unresolvedReference } from './chunk-SPFV27O5.js';
|
|
17
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-2CJPC4HI.js';
|
|
15
18
|
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-WXSPETQ6.js';
|
|
16
19
|
|
|
17
|
-
// src/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (const key of Object.keys(entry.socials)) addReference(collector, "socialPlatforms", key, false);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function collectBeatReferences(collector, narrative2) {
|
|
61
|
-
if (!isRecord(narrative2) || !Array.isArray(narrative2.beats)) return;
|
|
62
|
-
for (const beat of narrative2.beats) {
|
|
63
|
-
if (isRecord(beat)) addReference(collector, "layouts", beat.layoutHint, false);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function collectLanguageReferences(collector, language2) {
|
|
67
|
-
addReference(collector, "languages", language2, false);
|
|
68
|
-
if (!isRecord(language2)) return;
|
|
69
|
-
addReference(collector, "fontSchemes", language2.fontScheme, false);
|
|
70
|
-
addReference(collector, "fontSchemes", language2.googleFontScheme, false);
|
|
71
|
-
}
|
|
72
|
-
function collectDocumentReferences(collector, document) {
|
|
73
|
-
addReference(collector, "narratives", document.narrative, typeof document.narrative === "string");
|
|
74
|
-
collectBeatReferences(collector, document.narrative);
|
|
75
|
-
addReference(collector, "tones", document.tone, false);
|
|
76
|
-
addReference(collector, "purposes", document.purpose, false);
|
|
77
|
-
collectLanguageReferences(collector, document.language);
|
|
78
|
-
if (Array.isArray(document.audience)) {
|
|
79
|
-
for (const entry of document.audience) addReference(collector, "audiences", entry, true);
|
|
80
|
-
} else {
|
|
81
|
-
addReference(collector, "audiences", document.audience, typeof document.audience === "string");
|
|
82
|
-
}
|
|
83
|
-
collectDesignReferences(collector, document.design);
|
|
84
|
-
collectSocialReferences(collector, document.organization);
|
|
85
|
-
collectSocialReferences(collector, document.speaker);
|
|
86
|
-
if (!Array.isArray(document.slides)) return;
|
|
87
|
-
for (const slide of document.slides) {
|
|
88
|
-
if (!isRecord(slide)) continue;
|
|
89
|
-
addReference(collector, "layouts", slide.layout, false);
|
|
90
|
-
collectDesignReferences(collector, slide.design);
|
|
91
|
-
collectChartReference(collector, slide);
|
|
92
|
-
visitContentPayloads(slide, "", (payload) => {
|
|
93
|
-
collectChartReference(collector, payload);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function collectRecordReferences(collector, kind, record) {
|
|
98
|
-
if (kind === "themes") {
|
|
99
|
-
addReference(collector, "colorSchemes", record.colorScheme, false);
|
|
100
|
-
addReference(collector, "fontSchemes", record.fontScheme, false);
|
|
101
|
-
} else if (kind === "narratives") {
|
|
102
|
-
collectBeatReferences(collector, record);
|
|
103
|
-
} else if (kind === "languages") {
|
|
104
|
-
addReference(collector, "fontSchemes", record.fontScheme, false);
|
|
105
|
-
addReference(collector, "fontSchemes", record.googleFontScheme, false);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
var bundledIndex;
|
|
109
|
-
function bundledCatalogIndex() {
|
|
110
|
-
if (bundledIndex) return bundledIndex;
|
|
111
|
-
const index = /* @__PURE__ */ new Map();
|
|
112
|
-
for (const entry of catalogEntries) {
|
|
113
|
-
const records = /* @__PURE__ */ new Map();
|
|
114
|
-
for (const record of entry.records) {
|
|
115
|
-
if (isRecord(record) && typeof record.id === "string") records.set(record.id, record);
|
|
20
|
+
// src/catalog-helpers.ts
|
|
21
|
+
var isRec = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22
|
+
var rec = (value) => isRec(value) ? value : {};
|
|
23
|
+
function canonical(value) {
|
|
24
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
25
|
+
if (isRec(value))
|
|
26
|
+
return `{${Object.keys(value).filter((key) => value[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`).join(",")}}`;
|
|
27
|
+
return JSON.stringify(value);
|
|
28
|
+
}
|
|
29
|
+
function sameRecord(a, b) {
|
|
30
|
+
return canonical(embeddedCopy(a)) === canonical(embeddedCopy(b));
|
|
31
|
+
}
|
|
32
|
+
function setAt(root, path, value) {
|
|
33
|
+
let node = root;
|
|
34
|
+
for (const part of path.slice(0, -1)) node = node[part];
|
|
35
|
+
node[path[path.length - 1]] = value;
|
|
36
|
+
}
|
|
37
|
+
var kindsOf = (group, kind) => {
|
|
38
|
+
if (!isRec(group[kind])) group[kind] = {};
|
|
39
|
+
return group[kind];
|
|
40
|
+
};
|
|
41
|
+
function embed(document, options = {}) {
|
|
42
|
+
const catalogs = { catalogs: checkCatalogsOption(options.catalogs, "embed") };
|
|
43
|
+
const out = structuredClone(rec(document));
|
|
44
|
+
const added = [];
|
|
45
|
+
const unresolved = [];
|
|
46
|
+
const queue = catalogReferenceSites(out);
|
|
47
|
+
const reported = /* @__PURE__ */ new Set();
|
|
48
|
+
while (queue.length) {
|
|
49
|
+
const site = queue.shift();
|
|
50
|
+
const parsed = parseReference(site.reference);
|
|
51
|
+
if (parsed?.group !== void 0 && !catalogGroupDeclared(out, parsed.group)) continue;
|
|
52
|
+
const found = resolveReference(out, site.kind, site.reference, { ...catalogs, ...site.group !== void 0 ? { group: site.group } : {} });
|
|
53
|
+
if (!found) {
|
|
54
|
+
const path = dottedPath(site.path);
|
|
55
|
+
if (!reported.has(path)) {
|
|
56
|
+
reported.add(path);
|
|
57
|
+
unresolved.push(unresolvedReference(out, site.kind, site.reference, path, catalogs));
|
|
58
|
+
}
|
|
59
|
+
continue;
|
|
116
60
|
}
|
|
117
|
-
|
|
61
|
+
if (found.origin === "document") continue;
|
|
62
|
+
if (!isRec(out.catalogs)) out.catalogs = {};
|
|
63
|
+
const groups = out.catalogs;
|
|
64
|
+
if (!isRec(groups[found.group])) groups[found.group] = {};
|
|
65
|
+
const group = groups[found.group];
|
|
66
|
+
if (found.group !== "custom" && typeof group.source !== "string" && found.source !== void 0) {
|
|
67
|
+
const rest = { ...group };
|
|
68
|
+
for (const key of Object.keys(group)) delete group[key];
|
|
69
|
+
Object.assign(group, { source: found.source }, rest);
|
|
70
|
+
}
|
|
71
|
+
const copy = embeddedCopy(found.record);
|
|
72
|
+
kindsOf(group, site.kind)[found.id] = copy;
|
|
73
|
+
added.push({ group: found.group, kind: site.kind, id: found.id, ...found.source !== void 0 ? { source: found.source } : {} });
|
|
74
|
+
queue.push(...recordReferenceSites(site.kind, copy, ["catalogs", found.group, site.kind, found.id], found.group));
|
|
118
75
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
76
|
+
return { document: out, added, unresolved };
|
|
77
|
+
}
|
|
78
|
+
function groupNameFor(source) {
|
|
79
|
+
const base = source.startsWith("pkg:") ? source.slice(4).replace(/^@/, "").split("/").slice(0, 2).join("-") : (() => {
|
|
80
|
+
try {
|
|
81
|
+
return new URL(source).hostname.replace(/^www\./, "");
|
|
82
|
+
} catch {
|
|
83
|
+
return source;
|
|
84
|
+
}
|
|
85
|
+
})();
|
|
86
|
+
const name = base.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
87
|
+
return /^[a-z]/.test(name) ? name : `catalog-${name || "source"}`;
|
|
88
|
+
}
|
|
89
|
+
function copySlides(from, to, indexes, options = {}) {
|
|
90
|
+
const catalogs = { catalogs: checkCatalogsOption(options.catalogs, "copySlides") };
|
|
91
|
+
const source = rec(from);
|
|
92
|
+
const target = structuredClone(rec(to));
|
|
93
|
+
const sourceSlides = Array.isArray(source.slides) ? source.slides : [];
|
|
94
|
+
const targetSlides = Array.isArray(target.slides) ? target.slides : [];
|
|
95
|
+
for (const index of indexes)
|
|
96
|
+
if (!Number.isInteger(index) || index < 0 || index >= sourceSlides.length) throw new RangeError(`Slide index ${String(index)} is outside the source presentation's ${sourceSlides.length} slides.`);
|
|
97
|
+
const at = options.at ?? targetSlides.length;
|
|
98
|
+
if (!Number.isInteger(at) || at < 0 || at > targetSlides.length) throw new RangeError(`Insertion index ${String(at)} is outside the target presentation's ${targetSlides.length + 1} positions.`);
|
|
99
|
+
const renamed = [];
|
|
100
|
+
const addedGroups = [];
|
|
101
|
+
const added = [];
|
|
102
|
+
const unresolved = [];
|
|
103
|
+
const hadCatalogs = isRec(target.catalogs);
|
|
104
|
+
const groups = () => {
|
|
105
|
+
if (!isRec(target.catalogs)) target.catalogs = {};
|
|
106
|
+
return target.catalogs;
|
|
107
|
+
};
|
|
108
|
+
const memo = /* @__PURE__ */ new Map();
|
|
109
|
+
const targetGroupFor = (catalogSource, sourceGroupName) => {
|
|
110
|
+
for (const [name2, value] of Object.entries(rec(target.catalogs))) if (name2 !== "custom" && isRec(value) && value.source === catalogSource) return name2;
|
|
111
|
+
if (rec(target.catalogs).default !== false && catalogGroupSource(target, "default", catalogs) === catalogSource) return "default";
|
|
112
|
+
let name = sourceGroupName === "default" || sourceGroupName === "custom" ? groupNameFor(catalogSource) : sourceGroupName;
|
|
113
|
+
for (let n = 2; catalogGroupDeclared(target, name) || name === "default" || name === "custom"; n++) name = `${sourceGroupName === "default" ? groupNameFor(catalogSource) : sourceGroupName}-${n}`;
|
|
114
|
+
groups()[name] = { source: catalogSource };
|
|
115
|
+
addedGroups.push({ name, source: catalogSource });
|
|
116
|
+
return name;
|
|
117
|
+
};
|
|
118
|
+
const bareTaken = (kind, id) => resolveReference(target, kind, id, catalogs) !== void 0;
|
|
119
|
+
const addCustom = (kind, wanted, record, renamed2 = false) => {
|
|
120
|
+
const custom = rec(rec(target.catalogs).custom);
|
|
121
|
+
const existing = rec(custom[kind]);
|
|
122
|
+
for (const [id2, value] of Object.entries(existing)) if ((!renamed2 && id2 === wanted || /^-\d+$/.test(id2.slice(wanted.length))) && id2.startsWith(wanted) && sameRecord(value, record)) return { id: id2, reused: true };
|
|
123
|
+
let n = renamed2 ? 2 : 1;
|
|
124
|
+
let id = renamed2 ? `${wanted}-2` : wanted;
|
|
125
|
+
while (Object.hasOwn(existing, id) || bareTaken(kind, id)) id = `${wanted}-${++n}`;
|
|
126
|
+
if (!isRec(groups().custom)) groups().custom = {};
|
|
127
|
+
kindsOf(groups().custom, kind)[id] = record;
|
|
128
|
+
added.push({ group: "custom", kind, id });
|
|
129
|
+
return { id, reused: false };
|
|
130
|
+
};
|
|
131
|
+
const referenceTo = (kind, group, id, holder) => {
|
|
132
|
+
const found = resolveReference(target, kind, id, { ...catalogs, ...holder !== void 0 ? { group: holder } : {} });
|
|
133
|
+
return found && found.group === group && found.id === id ? id : `${group}:${id}`;
|
|
134
|
+
};
|
|
135
|
+
const place = (kind, reference2, path, holder) => {
|
|
136
|
+
const found = resolveReference(source, kind, reference2, { ...catalogs, ...holder !== void 0 ? { group: holder } : {} });
|
|
137
|
+
if (!found) {
|
|
138
|
+
unresolved.push(unresolvedReference(source, kind, reference2, path, catalogs));
|
|
139
|
+
return void 0;
|
|
140
|
+
}
|
|
141
|
+
const key = `${kind}\0${found.group}\0${found.source ?? ""}\0${found.id}`;
|
|
142
|
+
const known = memo.get(key);
|
|
143
|
+
if (known) return known;
|
|
144
|
+
const incoming = embeddedCopy(found.record);
|
|
145
|
+
const catalogSource = found.group === "custom" ? void 0 : found.source;
|
|
146
|
+
const group = catalogSource === void 0 ? "custom" : targetGroupFor(catalogSource, found.group);
|
|
147
|
+
const inner = recordReferenceSites(kind, incoming, []).map((site) => ({ site, placed: place(site.kind, site.reference, `${path} -> ${site.path.join(".")}`, found.group) }));
|
|
148
|
+
const rewrite = (holderGroup) => {
|
|
149
|
+
const copy = structuredClone(incoming);
|
|
150
|
+
for (const { site, placed: placed2 } of inner) if (placed2) setAt(copy, site.path, referenceTo(site.kind, placed2.group, placed2.id, holderGroup));
|
|
151
|
+
return copy;
|
|
152
|
+
};
|
|
153
|
+
let placed;
|
|
154
|
+
if (group === "custom") {
|
|
155
|
+
const result = addCustom(kind, found.id, rewrite("custom"));
|
|
156
|
+
if (result.id !== found.id && !result.reused) renamed.push({ kind, from: reference2, to: result.id, reason: "custom-conflict" });
|
|
157
|
+
placed = { group: "custom", id: result.id };
|
|
158
|
+
} else {
|
|
159
|
+
const record = rewrite(group);
|
|
160
|
+
const embedded = rec(rec(rec(target.catalogs)[group])[kind]);
|
|
161
|
+
const current = Object.hasOwn(embedded, found.id) ? embedded[found.id] : registeredCatalog(catalogGroupSource(target, group, catalogs), catalogs)?.[kind]?.[found.id];
|
|
162
|
+
if (current === void 0 || sameRecord(current, record)) {
|
|
163
|
+
if (!Object.hasOwn(embedded, found.id)) {
|
|
164
|
+
if (!isRec(groups()[group])) groups()[group] = {};
|
|
165
|
+
const holder2 = groups()[group];
|
|
166
|
+
if (typeof holder2.source !== "string" && catalogSource !== void 0) {
|
|
167
|
+
const rest = { ...holder2 };
|
|
168
|
+
for (const key2 of Object.keys(holder2)) delete holder2[key2];
|
|
169
|
+
Object.assign(holder2, { source: catalogSource }, rest);
|
|
170
|
+
}
|
|
171
|
+
kindsOf(holder2, kind)[found.id] = record;
|
|
172
|
+
added.push({ group, kind, id: found.id, ...catalogSource !== void 0 ? { source: catalogSource } : {} });
|
|
173
|
+
}
|
|
174
|
+
placed = { group, id: found.id };
|
|
175
|
+
} else {
|
|
176
|
+
const { id, reused } = addCustom(kind, found.id, rewrite("custom"), true);
|
|
177
|
+
if (!reused) renamed.push({ kind, from: reference2, to: id, reason: "catalog-revision" });
|
|
178
|
+
placed = { group: "custom", id };
|
|
179
|
+
}
|
|
136
180
|
}
|
|
181
|
+
memo.set(key, placed);
|
|
182
|
+
return placed;
|
|
183
|
+
};
|
|
184
|
+
const copied = [];
|
|
185
|
+
for (const index of indexes) {
|
|
186
|
+
const slide = structuredClone(sourceSlides[index]);
|
|
187
|
+
const holder = { slides: [slide] };
|
|
188
|
+
for (const site of catalogReferenceSites(holder, { records: false })) {
|
|
189
|
+
const placed = place(site.kind, site.reference, `slides.${index}.${site.path.slice(2).join(".")}`);
|
|
190
|
+
if (placed) setAt(holder, site.path, referenceTo(site.kind, placed.group, placed.id));
|
|
191
|
+
}
|
|
192
|
+
copied.push(holder.slides[0]);
|
|
137
193
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
194
|
+
targetSlides.splice(at, 0, ...copied);
|
|
195
|
+
target.slides = targetSlides;
|
|
196
|
+
if (!hadCatalogs && isRec(target.catalogs) && Object.keys(target.catalogs).length === 0) delete target.catalogs;
|
|
197
|
+
return { document: target, slides: copied.map((_, offset) => at + offset), renamed, addedGroups, added, unresolved };
|
|
198
|
+
}
|
|
199
|
+
var pointerPart = (part) => part.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
200
|
+
function updateFromCatalog(document, catalogs, refs) {
|
|
201
|
+
const options = { catalogs: checkCatalogsOption(catalogs, "updateFromCatalog") };
|
|
202
|
+
const groups = rec(rec(document).catalogs);
|
|
203
|
+
const wanted = refs?.map((ref) => {
|
|
204
|
+
const parsed = parseReference(ref.reference);
|
|
205
|
+
return parsed ? { kind: ref.kind, group: parsed.group ?? "default", id: parsed.id } : void 0;
|
|
206
|
+
});
|
|
207
|
+
const changes = [];
|
|
208
|
+
for (const [group, value] of Object.entries(groups)) {
|
|
209
|
+
if (group === "custom" || !isRec(value)) continue;
|
|
210
|
+
const catalogSource = catalogGroupSource(document, group, options);
|
|
211
|
+
const registered = registeredCatalog(catalogSource, options);
|
|
212
|
+
if (!registered || catalogSource === void 0) continue;
|
|
213
|
+
for (const kind of catalogKinds)
|
|
214
|
+
for (const [id, embedded] of Object.entries(rec(value[kind]))) {
|
|
215
|
+
if (wanted && !wanted.some((entry) => entry && entry.kind === kind && entry.group === group && entry.id === id)) continue;
|
|
216
|
+
const current = registered[kind]?.[id];
|
|
217
|
+
if (current === void 0 || sameRecord(embedded, current)) continue;
|
|
218
|
+
changes.push({ kind, reference: group === "default" ? id : `${group}:${id}`, group, id, source: catalogSource, embedded: rec(embedded), current: embeddedCopy(current) });
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return {
|
|
222
|
+
changes,
|
|
223
|
+
patch: changes.map((change) => ({ op: "replace", path: `/catalogs/${pointerPart(change.group)}/${change.kind}/${pointerPart(change.id)}`, value: change.current }))
|
|
224
|
+
};
|
|
152
225
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
226
|
+
var OPFMoveToCustomError = class extends Error {
|
|
227
|
+
code;
|
|
228
|
+
constructor(code, message) {
|
|
229
|
+
super(message);
|
|
230
|
+
this.name = "OPFMoveToCustomError";
|
|
231
|
+
this.code = code;
|
|
157
232
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
233
|
+
};
|
|
234
|
+
var pointerOf = (path) => `/${path.map((part) => pointerPart(String(part))).join("/")}`;
|
|
235
|
+
function moveToCustom(document, ref, options = {}) {
|
|
236
|
+
const catalogs = { catalogs: checkCatalogsOption(options.catalogs, "moveToCustom") };
|
|
237
|
+
const parsed = parseReference(ref.reference);
|
|
238
|
+
if (!parsed || !catalogKinds.includes(ref.kind)) throw new OPFMoveToCustomError("invalid-reference", `moveToCustom: ${JSON.stringify(ref.reference)} is not a ${String(ref.kind)} reference (an id or name:id).`);
|
|
239
|
+
const { kind } = ref;
|
|
240
|
+
const fromGroup = parsed.group ?? "default";
|
|
241
|
+
if (fromGroup === "custom") throw new OPFMoveToCustomError("already-custom", `moveToCustom: ${ref.reference} already names a record of catalogs.custom.`);
|
|
242
|
+
const before = rec(document);
|
|
243
|
+
const records = rec(rec(rec(before.catalogs)[fromGroup])[kind]);
|
|
244
|
+
if (!Object.hasOwn(records, parsed.id)) throw new OPFMoveToCustomError("not-embedded", `moveToCustom: catalogs.${fromGroup}.${kind} does not embed ${JSON.stringify(parsed.id)}.`);
|
|
245
|
+
const fromId = parsed.id;
|
|
246
|
+
const record = rec(records[fromId]);
|
|
247
|
+
const sites = catalogReferenceSites(before);
|
|
248
|
+
const targets = sites.map((site) => resolveReference(before, site.kind, site.reference, { ...catalogs, ...site.group !== void 0 ? { group: site.group } : {} }));
|
|
249
|
+
const isMoved = (found) => found?.origin === "document" && found.kind === kind && found.group === fromGroup && found.id === fromId;
|
|
250
|
+
const inMoved = (site) => site.path.length >= 4 && site.path[0] === "catalogs" && site.path[1] === fromGroup && site.path[2] === kind && site.path[3] === fromId;
|
|
251
|
+
const after = structuredClone(before);
|
|
252
|
+
const groups = after.catalogs;
|
|
253
|
+
const custom = rec(groups.custom);
|
|
254
|
+
const existing = rec(custom[kind]);
|
|
255
|
+
const moved = structuredClone(record);
|
|
256
|
+
const ownSites = sites.map((site, index) => ({ site, found: targets[index] })).filter(({ site }) => inMoved(site));
|
|
257
|
+
if (options.id !== void 0 && (typeof options.id !== "string" || !CATALOG_GROUP_PATTERN.test(options.id))) throw new OPFMoveToCustomError("invalid-id", `moveToCustom: the new id ${JSON.stringify(options.id)} is not a lowercase kebab-case id.`);
|
|
258
|
+
const wanted = options.id ?? fromId;
|
|
259
|
+
let toId = wanted;
|
|
260
|
+
for (let n = 2; Object.hasOwn(existing, toId) && !sameRecord(existing[toId], moved); n++) toId = `${wanted}-${n}`;
|
|
261
|
+
const reused = Object.hasOwn(existing, toId);
|
|
262
|
+
const patch = [];
|
|
263
|
+
const fromRecords = groups[fromGroup][kind];
|
|
264
|
+
delete fromRecords[fromId];
|
|
265
|
+
patch.push({ op: "remove", path: pointerOf(["catalogs", fromGroup, kind, fromId]) });
|
|
266
|
+
if (Object.keys(fromRecords).length === 0) {
|
|
267
|
+
delete groups[fromGroup][kind];
|
|
268
|
+
patch.push({ op: "remove", path: pointerOf(["catalogs", fromGroup, kind]) });
|
|
161
269
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const states = /* @__PURE__ */ new Map();
|
|
166
|
-
const resolved = /* @__PURE__ */ new Map();
|
|
167
|
-
for (let index = 0; index < collector.queue.length; index += 1) {
|
|
168
|
-
const pending = collector.queue[index];
|
|
169
|
-
if (!pending) continue;
|
|
170
|
-
const { kind, id } = pending;
|
|
171
|
-
const state = kindState(states, catalogsField, kind);
|
|
172
|
-
const inlineRecord = state.inline.get(id);
|
|
173
|
-
if (inlineRecord) {
|
|
174
|
-
collectRecordReferences(collector, kind, inlineRecord);
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
if (state.customSource) continue;
|
|
178
|
-
const record = bundledRecord(kind, id);
|
|
179
|
-
if (!record) continue;
|
|
180
|
-
let kindRecords = resolved.get(kind);
|
|
181
|
-
if (!kindRecords) {
|
|
182
|
-
kindRecords = /* @__PURE__ */ new Map();
|
|
183
|
-
resolved.set(kind, kindRecords);
|
|
184
|
-
}
|
|
185
|
-
kindRecords.set(id, record);
|
|
186
|
-
collectRecordReferences(collector, kind, record);
|
|
270
|
+
if (!isRec(groups.custom)) {
|
|
271
|
+
groups.custom = {};
|
|
272
|
+
patch.push({ op: "add", path: pointerOf(["catalogs", "custom"]), value: {} });
|
|
187
273
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
const kindResolved = resolved.get(kind);
|
|
192
|
-
const addedIds = [];
|
|
193
|
-
for (const id of [...ids].sort()) {
|
|
194
|
-
if (state.inline.has(id)) pushReportId(report.alreadyInline, kind, id);
|
|
195
|
-
else if (kindResolved?.has(id)) addedIds.push(id);
|
|
196
|
-
else if (!state.customSource && collector.reportable.has(reportKey(kind, id))) {
|
|
197
|
-
pushReportId(report.unresolved, kind, id);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (!addedIds.length) continue;
|
|
201
|
-
if (!isRecord(presentation2.catalogs)) presentation2.catalogs = {};
|
|
202
|
-
const catalogs2 = presentation2.catalogs;
|
|
203
|
-
if (!isRecord(catalogs2[kind])) catalogs2[kind] = {};
|
|
204
|
-
const entry = catalogs2[kind];
|
|
205
|
-
if (!Array.isArray(entry.records)) entry.records = [];
|
|
206
|
-
const records = entry.records;
|
|
207
|
-
for (const id of addedIds) records.push(kindResolved?.get(id));
|
|
208
|
-
report.added[kind] = addedIds;
|
|
274
|
+
if (!isRec(groups.custom[kind])) {
|
|
275
|
+
groups.custom[kind] = {};
|
|
276
|
+
patch.push({ op: "add", path: pointerOf(["catalogs", "custom", kind]), value: {} });
|
|
209
277
|
}
|
|
210
|
-
|
|
211
|
-
|
|
278
|
+
const referenceTo = (targetKind, group, id, holder) => {
|
|
279
|
+
const found = resolveReference(after, targetKind, id, { ...catalogs, ...holder !== void 0 ? { group: holder } : {} });
|
|
280
|
+
return found && found.group === group && found.id === id ? id : `${group}:${id}`;
|
|
281
|
+
};
|
|
282
|
+
if (!reused) {
|
|
283
|
+
groups.custom[kind][toId] = moved;
|
|
284
|
+
for (const { site, found } of ownSites) {
|
|
285
|
+
if (!found) continue;
|
|
286
|
+
const target = isMoved(found) ? { group: "custom", id: toId } : { group: found.group, id: found.id };
|
|
287
|
+
setAt(moved, site.path.slice(4), referenceTo(site.kind, target.group, target.id, "custom"));
|
|
288
|
+
}
|
|
289
|
+
patch.push({ op: "add", path: pointerOf(["catalogs", "custom", kind, toId]), value: structuredClone(moved) });
|
|
290
|
+
}
|
|
291
|
+
const references = [];
|
|
292
|
+
sites.forEach((site, index) => {
|
|
293
|
+
if (inMoved(site) || !isMoved(targets[index])) return;
|
|
294
|
+
const written = referenceTo(kind, "custom", toId, site.group);
|
|
295
|
+
if (written === site.reference) return;
|
|
296
|
+
setAt(after, site.path, written);
|
|
297
|
+
references.push(pointerOf(site.path));
|
|
298
|
+
patch.push({ op: "replace", path: pointerOf(site.path), value: written });
|
|
299
|
+
});
|
|
300
|
+
return {
|
|
301
|
+
document: after,
|
|
302
|
+
from: { kind, group: fromGroup, id: fromId, reference: fromGroup === "default" ? fromId : `${fromGroup}:${fromId}` },
|
|
303
|
+
to: { kind, group: "custom", id: toId, reference: toId },
|
|
304
|
+
references,
|
|
305
|
+
patch,
|
|
306
|
+
...toId !== wanted ? { renamed: { from: wanted, to: toId } } : {}
|
|
307
|
+
};
|
|
212
308
|
}
|
|
213
309
|
|
|
214
|
-
// src/
|
|
215
|
-
var
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
};
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
310
|
+
// src/stats.ts
|
|
311
|
+
var DEFAULT_WORDS_PER_MINUTE = 130;
|
|
312
|
+
var KIND_ORDER = ["text", "items", "bullets", "quote", "metric", "code", "timeline", "chart", "table", "image", "video"];
|
|
313
|
+
var FURNITURE_FIELDS = ["logo", "image", "text", "organization", "socials", "section", "slideNumber", "date"];
|
|
314
|
+
var ZONES = ["left", "center", "right"];
|
|
315
|
+
var LOGO_VARIANTS = ["default", "light", "dark", "stacked", "stackedLight", "stackedDark", "icon", "iconLight", "iconDark", "wordmark", "wordmarkLight", "wordmarkDark"];
|
|
316
|
+
var WORD = /[\p{L}\p{N}\p{M}]+(?:['’.,-][\p{L}\p{N}\p{M}]+)*/gu;
|
|
317
|
+
var UNSPACED = /[-က-႟ក--ヿ㐀-䶿一-鿿豈-]/gu;
|
|
318
|
+
var wordCount = (text) => {
|
|
319
|
+
let extra = 0;
|
|
320
|
+
const spaced = text.replace(UNSPACED, () => {
|
|
321
|
+
extra++;
|
|
322
|
+
return " ";
|
|
323
|
+
});
|
|
324
|
+
return (spaced.match(WORD)?.length ?? 0) + extra;
|
|
224
325
|
};
|
|
225
|
-
var
|
|
226
|
-
|
|
227
|
-
|
|
326
|
+
var sorted = (values) => [...new Set(values)].sort();
|
|
327
|
+
var sortedCounts = (counts) => Object.fromEntries([...counts].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
328
|
+
var bump = (counts, key) => counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
329
|
+
var str = (value) => typeof value === "string" ? value : null;
|
|
330
|
+
var decimals = (value, places) => Math.round(value * 10 ** places) / 10 ** places;
|
|
331
|
+
var reference = (value) => {
|
|
332
|
+
if (typeof value === "string") return { id: value, inline: false };
|
|
333
|
+
if (isRecord(value)) return { id: str(value.id), inline: true };
|
|
334
|
+
return null;
|
|
228
335
|
};
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
336
|
+
var list = (value) => Array.isArray(value) ? value : value === void 0 ? [] : [value];
|
|
337
|
+
var assetForm = (src) => /^asset:/i.test(src) ? "reference" : /^data:/i.test(src) ? "embedded" : /^(https?:)?\/\//i.test(src) || /^pkg:/i.test(src) ? "remote" : "file";
|
|
338
|
+
var embeddedBytes = (src) => {
|
|
339
|
+
const comma = src.indexOf(",");
|
|
340
|
+
if (comma < 0) return 0;
|
|
341
|
+
const payload = src.slice(comma + 1);
|
|
342
|
+
if (!/;base64$/i.test(src.slice(0, comma))) return payload.length;
|
|
343
|
+
const padding = payload.endsWith("==") ? 2 : payload.endsWith("=") ? 1 : 0;
|
|
344
|
+
return Math.max(0, Math.floor(payload.length * 3 / 4) - padding);
|
|
234
345
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (contrast(foreground, background) >= minimum) return foreground;
|
|
250
|
-
const [h, s, l] = toHsl(foreground), preferred = luminance(background) < 0.5 ? 1 : -1;
|
|
251
|
-
for (const direction of [preferred, -preferred]) {
|
|
252
|
-
for (let step = 1; step <= 100; step++) {
|
|
253
|
-
const lightness = l + direction * step / 100;
|
|
254
|
-
if (lightness < 0 || lightness > 1) break;
|
|
255
|
-
const candidate = fromHsl(h, s, lightness);
|
|
256
|
-
if (contrast(candidate, background) >= minimum) return candidate;
|
|
257
|
-
}
|
|
346
|
+
var srcOf = (asset) => typeof asset === "string" ? asset : isRecord(asset) && typeof asset.src === "string" ? asset.src : void 0;
|
|
347
|
+
function slideSize(deck, catalogs) {
|
|
348
|
+
const design = isRecord(deck.design) ? deck.design : {};
|
|
349
|
+
const records = resolveDesignRecords(deck, void 0, catalogs);
|
|
350
|
+
const theme2 = records.theme;
|
|
351
|
+
const themed = typeof design.theme === "string" && !records.diagnostics.some((diagnostic) => diagnostic.kind === "themes");
|
|
352
|
+
const source = design.dimensions !== void 0 ? "design" : themed && theme2.dimensions !== void 0 ? "theme" : "default";
|
|
353
|
+
const dimensions = design.dimensions ?? theme2.dimensions;
|
|
354
|
+
let width = 40 / 3, height = 7.5;
|
|
355
|
+
try {
|
|
356
|
+
const resolved = resolveCanvasDimensions(dimensions);
|
|
357
|
+
width = resolved.width / 96;
|
|
358
|
+
height = resolved.height / 96;
|
|
359
|
+
} catch {
|
|
258
360
|
}
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
typescript: JS,
|
|
274
|
-
python: { line: ["#"], strings: `'"`, triple: ['"""', "'''"], keywords: "and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield match case self cls", literals: "True False None", types: "int float str bool bytes list dict set tuple object type", defs: { def: "function", class: "type" }, capsTypes: true, calls: true, decorators: true },
|
|
275
|
-
rust: { line: ["//"], block: [["/*", "*/"]], strings: '"', rawStrings: "r", keywords: "as async await break const continue crate dyn else enum extern fn for if impl in let loop match mod move mut pub ref return self Self static struct super trait type unsafe use where while", literals: "true false", types: "i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 bool char str String Vec Option Result Box", defs: { fn: "function", struct: "type", enum: "type", trait: "type", type: "type", mod: "type" }, capsTypes: true, calls: true, macros: true },
|
|
276
|
-
go: { line: ["//"], block: [["/*", "*/"]], strings: "\"'`", noEscapes: "`", keywords: "break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type var", literals: "true false nil iota", types: "int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 complex64 complex128 string bool byte rune error any", defs: { func: "function", type: "type" }, capsTypes: true, calls: true },
|
|
277
|
-
bash: { line: ["#"], strings: `'"`, noEscapes: "'", keywords: "if then else elif fi for while until do done case esac in function select time return exit break continue export local readonly declare unset set shift source alias trap eval exec", literals: "true false", variables: true, calls: false },
|
|
278
|
-
json: { line: ["//"], block: [["/*", "*/"]], strings: '"', literals: "true false null", quotedKeys: true },
|
|
279
|
-
yaml: { kind: "yaml" },
|
|
280
|
-
toml: { kind: "ini", line: ["#"] },
|
|
281
|
-
ini: { kind: "ini", line: ["#", ";"] },
|
|
282
|
-
markup: { kind: "markup" },
|
|
283
|
-
css: { kind: "css" },
|
|
284
|
-
sql: { line: ["--"], block: [["/*", "*/"]], strings: `'"`, ci: true, keywords: "add all alter and any as asc between by case check column commit constraint create cross database default delete desc distinct drop else end exists foreign from full group having if in index inner insert into is join key left like limit not null offset on or order outer primary references replace right rollback select set table then top union unique update values view when where with", literals: "true false", types: "int integer bigint smallint decimal numeric float real double varchar char text date time timestamp boolean serial uuid json" },
|
|
285
|
-
java: { line: ["//"], block: [["/*", "*/"]], strings: `"'`, keywords: "abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try var volatile while record sealed permits", literals: "true false null", types: "boolean byte char double float int long short void String Object", defs: { class: "type", interface: "type", enum: "type", record: "type" }, capsTypes: true, calls: true, decorators: true },
|
|
286
|
-
csharp: { line: ["//"], block: [["/*", "*/"]], strings: `"'`, keywords: "abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using var virtual volatile while record init required", literals: "true false null", types: "bool byte char decimal double float int long object sbyte short string uint ulong ushort void dynamic", defs: { class: "type", interface: "type", struct: "type", enum: "type", record: "type" }, capsTypes: true, calls: true, decorators: false },
|
|
287
|
-
kotlin: { line: ["//"], block: [["/*", "*/"]], strings: `"'`, triple: ['"""'], keywords: "abstract actual annotation as break by catch class companion const constructor continue crossinline data do else enum expect external final finally for fun get if import in infix init inline inner interface internal is it lateinit lazy noinline object open operator out override package private protected public reified return sealed set super suspend tailrec this throw try typealias val var vararg when where while", literals: "true false null", types: "Int Long Short Byte Float Double Boolean Char String Unit Any Nothing", defs: { fun: "function", class: "type", interface: "type", object: "type" }, capsTypes: true, calls: true, decorators: true },
|
|
288
|
-
swift: { line: ["//"], block: [["/*", "*/"]], strings: '"', triple: ['"""'], keywords: "actor as associatedtype async await break case catch class continue default defer deinit do else enum extension fallthrough fileprivate for func guard if import in init inout internal is let nonisolated open operator private protocol public repeat rethrows return self Self static struct subscript super switch throw throws try typealias var where while", literals: "true false nil", types: "Int Double Float Bool String Character Array Dictionary Set Optional Any", defs: { func: "function", class: "type", struct: "type", enum: "type", protocol: "type", extension: "type" }, capsTypes: true, calls: true, decorators: true },
|
|
289
|
-
ruby: { line: ["#"], strings: `'"`, keywords: "alias and begin break case class def defined do else elsif end ensure for if in module next not or redo rescue retry return self super then undef unless until when while yield require require_relative include extend attr_accessor attr_reader attr_writer private protected public", literals: "true false nil", defs: { def: "function", class: "type", module: "type" }, capsTypes: true, calls: true },
|
|
290
|
-
php: { line: ["//", "#"], block: [["/*", "*/"]], strings: `'"`, keywords: "abstract and array as break callable case catch class clone const continue declare default do echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile extends final finally fn for foreach function global goto if implements include include_once instanceof insteadof interface isset list match namespace new or print private protected public readonly require require_once return static switch throw trait try unset use var while xor yield", literals: "true false null TRUE FALSE NULL", defs: { function: "function", class: "type", interface: "type", trait: "type" }, capsTypes: true, calls: true, variables: true },
|
|
291
|
-
c: { line: ["//"], block: [["/*", "*/"]], strings: `"'`, keywords: C_LIKE_KEYWORDS, literals: "true false NULL nullptr", types: "size_t ssize_t int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t bool FILE", calls: true, capsTypes: false, directives: true, defs: { struct: "type", enum: "type", union: "type", class: "type" } },
|
|
292
|
-
hcl: { line: ["#", "//"], block: [["/*", "*/"]], strings: '"', keywords: "resource data variable output locals module provider terraform for in if else dynamic content backend required_providers lifecycle", literals: "true false null", types: "string number bool list map set object tuple any", calls: true },
|
|
293
|
-
dockerfile: { line: ["#"], strings: `'"`, keywords: "FROM RUN CMD LABEL MAINTAINER EXPOSE ENV ADD COPY ENTRYPOINT VOLUME USER WORKDIR ARG ONBUILD STOPSIGNAL HEALTHCHECK SHELL AS", variables: true }
|
|
294
|
-
};
|
|
295
|
-
var ALIASES = {
|
|
296
|
-
js: "javascript",
|
|
297
|
-
javascript: "javascript",
|
|
298
|
-
mjs: "javascript",
|
|
299
|
-
cjs: "javascript",
|
|
300
|
-
jsx: "javascript",
|
|
301
|
-
node: "javascript",
|
|
302
|
-
nodejs: "javascript",
|
|
303
|
-
ts: "typescript",
|
|
304
|
-
typescript: "typescript",
|
|
305
|
-
tsx: "typescript",
|
|
306
|
-
mts: "typescript",
|
|
307
|
-
cts: "typescript",
|
|
308
|
-
python: "python",
|
|
309
|
-
py: "python",
|
|
310
|
-
python3: "python",
|
|
311
|
-
py3: "python",
|
|
312
|
-
rust: "rust",
|
|
313
|
-
rs: "rust",
|
|
314
|
-
go: "go",
|
|
315
|
-
golang: "go",
|
|
316
|
-
bash: "bash",
|
|
317
|
-
sh: "bash",
|
|
318
|
-
shell: "bash",
|
|
319
|
-
zsh: "bash",
|
|
320
|
-
console: "bash",
|
|
321
|
-
shellscript: "bash",
|
|
322
|
-
fish: "bash",
|
|
323
|
-
json: "json",
|
|
324
|
-
jsonc: "json",
|
|
325
|
-
json5: "json",
|
|
326
|
-
yaml: "yaml",
|
|
327
|
-
yml: "yaml",
|
|
328
|
-
toml: "toml",
|
|
329
|
-
ini: "ini",
|
|
330
|
-
conf: "ini",
|
|
331
|
-
cfg: "ini",
|
|
332
|
-
properties: "ini",
|
|
333
|
-
env: "ini",
|
|
334
|
-
markup: "markup",
|
|
335
|
-
html: "markup",
|
|
336
|
-
xml: "markup",
|
|
337
|
-
svg: "markup",
|
|
338
|
-
xhtml: "markup",
|
|
339
|
-
vue: "markup",
|
|
340
|
-
plist: "markup",
|
|
341
|
-
css: "css",
|
|
342
|
-
scss: "css",
|
|
343
|
-
less: "css",
|
|
344
|
-
sass: "css",
|
|
345
|
-
sql: "sql",
|
|
346
|
-
postgres: "sql",
|
|
347
|
-
postgresql: "sql",
|
|
348
|
-
mysql: "sql",
|
|
349
|
-
sqlite: "sql",
|
|
350
|
-
pgsql: "sql",
|
|
351
|
-
java: "java",
|
|
352
|
-
csharp: "csharp",
|
|
353
|
-
cs: "csharp",
|
|
354
|
-
"c#": "csharp",
|
|
355
|
-
kotlin: "kotlin",
|
|
356
|
-
kt: "kotlin",
|
|
357
|
-
swift: "swift",
|
|
358
|
-
ruby: "ruby",
|
|
359
|
-
rb: "ruby",
|
|
360
|
-
php: "php",
|
|
361
|
-
c: "c",
|
|
362
|
-
h: "c",
|
|
363
|
-
cpp: "c",
|
|
364
|
-
"c++": "c",
|
|
365
|
-
cc: "c",
|
|
366
|
-
cxx: "c",
|
|
367
|
-
hpp: "c",
|
|
368
|
-
hh: "c",
|
|
369
|
-
objc: "c",
|
|
370
|
-
hcl: "hcl",
|
|
371
|
-
terraform: "hcl",
|
|
372
|
-
tf: "hcl",
|
|
373
|
-
tfvars: "hcl",
|
|
374
|
-
dockerfile: "dockerfile",
|
|
375
|
-
docker: "dockerfile"
|
|
376
|
-
};
|
|
377
|
-
var CODE_HIGHLIGHT_LANGUAGES = Object.freeze(Object.keys(LANGUAGES));
|
|
378
|
-
function resolveCodeLanguage(language2) {
|
|
379
|
-
if (typeof language2 !== "string") return void 0;
|
|
380
|
-
const key = language2.trim().toLowerCase().replace(/^(?:language|lang)[-:]/, "").replace(/^\./, "");
|
|
381
|
-
return Object.hasOwn(ALIASES, key) ? ALIASES[key] : void 0;
|
|
382
|
-
}
|
|
383
|
-
var IDENT = /[\p{L}_$][\p{L}\p{N}_$]*/uy;
|
|
384
|
-
var NUMBER = /(?:0[xX][\da-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)[a-zA-Z]{0,4}/y;
|
|
385
|
-
var isIdentChar = (character) => character !== void 0 && /[\p{L}\p{N}_$]/u.test(character);
|
|
386
|
-
function endOfLine(source, from) {
|
|
387
|
-
const index = source.slice(from).search(/\r\n|\r|\n/);
|
|
388
|
-
return index < 0 ? source.length : from + index;
|
|
389
|
-
}
|
|
390
|
-
function pushToken(tokens, start, end, kind) {
|
|
391
|
-
if (end <= start) return;
|
|
392
|
-
const last = tokens[tokens.length - 1];
|
|
393
|
-
if (last && last.kind === kind && last.end === start && kind !== "function" && kind !== "property") last.end = end;
|
|
394
|
-
else tokens.push({ start, end, kind });
|
|
395
|
-
}
|
|
396
|
-
function scanQuoted(source, from, quote, escapes, multiline) {
|
|
397
|
-
let index = from + 1;
|
|
398
|
-
while (index < source.length) {
|
|
399
|
-
const character = source[index];
|
|
400
|
-
if (escapes && character === "\\") {
|
|
401
|
-
index += 2;
|
|
402
|
-
continue;
|
|
361
|
+
const preset = typeof dimensions === "string" ? dimensions : isRecord(dimensions) && typeof dimensions.preset === "string" && dimensions.widthInches === void 0 && dimensions.heightInches === void 0 ? dimensions.preset : null;
|
|
362
|
+
return { preset, widthInches: decimals(width, 4), heightInches: decimals(height, 4), aspectRatio: decimals(width / height, 3), source };
|
|
363
|
+
}
|
|
364
|
+
var furniture = (value) => {
|
|
365
|
+
const zones = [], fields = /* @__PURE__ */ new Set();
|
|
366
|
+
if (isRecord(value))
|
|
367
|
+
for (const zone of ZONES) {
|
|
368
|
+
const item = value[zone];
|
|
369
|
+
if (!isRecord(item)) continue;
|
|
370
|
+
const present = FURNITURE_FIELDS.filter((field) => item[field] !== void 0 && item[field] !== false);
|
|
371
|
+
if (present.length) {
|
|
372
|
+
zones.push(zone);
|
|
373
|
+
for (const field of present) fields.add(field);
|
|
374
|
+
}
|
|
403
375
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
376
|
+
return { configured: isRecord(value), suppressed: value === false, zones, fields: FURNITURE_FIELDS.filter((field) => fields.has(field)) };
|
|
377
|
+
};
|
|
378
|
+
function visitRuns(value, visit) {
|
|
379
|
+
if (typeof value === "string") visit({ text: value });
|
|
380
|
+
else if (typeof value === "number") visit({ text: String(value) });
|
|
381
|
+
else if (Array.isArray(value)) for (const entry of value) visitRuns(entry, visit);
|
|
382
|
+
else if (isRecord(value)) {
|
|
383
|
+
if (typeof value.text === "string") {
|
|
384
|
+
visit(value);
|
|
385
|
+
if (value.description !== void 0) visitRuns(value.description, visit);
|
|
386
|
+
} else if (Array.isArray(value.text)) {
|
|
387
|
+
visitRuns(value.text, visit);
|
|
388
|
+
if (value.description !== void 0) visitRuns(value.description, visit);
|
|
389
|
+
} else if (value.value !== void 0) visitRuns(value.value, visit);
|
|
390
|
+
else if (typeof value.name === "string") visit({ text: value.name });
|
|
407
391
|
}
|
|
408
|
-
return source.length;
|
|
409
392
|
}
|
|
410
|
-
function
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
393
|
+
function stats(presentation2, options = {}) {
|
|
394
|
+
const catalogs = { catalogs: checkCatalogsOption(options.catalogs, "stats") };
|
|
395
|
+
if (!isRecord(presentation2)) throw new TypeError("stats needs a presentation object.");
|
|
396
|
+
const deck = presentation2;
|
|
397
|
+
const wordsPerMinute = options.wordsPerMinute ?? DEFAULT_WORDS_PER_MINUTE;
|
|
398
|
+
if (!Number.isFinite(wordsPerMinute) || wordsPerMinute <= 0) throw new RangeError("wordsPerMinute must be a positive number.");
|
|
399
|
+
const slides = Array.isArray(deck.slides) ? deck.slides.filter(isRecord) : [];
|
|
400
|
+
const design = isRecord(deck.design) ? deck.design : {};
|
|
401
|
+
const registry = isRecord(deck.assets) ? deck.assets : {};
|
|
402
|
+
const uses = { total: 0, references: 0, embedded: 0, files: 0, remote: 0 };
|
|
403
|
+
let embeddedTotal = 0;
|
|
404
|
+
const useAsset = (asset) => {
|
|
405
|
+
const src = srcOf(asset);
|
|
406
|
+
if (src === void 0) return;
|
|
407
|
+
const form = assetForm(src);
|
|
408
|
+
uses.total++;
|
|
409
|
+
uses[form === "reference" ? "references" : form === "embedded" ? "embedded" : form === "remote" ? "remote" : "files"]++;
|
|
410
|
+
if (form === "embedded") embeddedTotal += embeddedBytes(src);
|
|
411
|
+
};
|
|
412
|
+
const registryFacts = { entries: 0, embedded: 0, files: 0, remote: 0 };
|
|
413
|
+
for (const entry of Object.values(registry)) {
|
|
414
|
+
const src = srcOf(entry);
|
|
415
|
+
if (src === void 0) continue;
|
|
416
|
+
registryFacts.entries++;
|
|
417
|
+
const form = assetForm(src);
|
|
418
|
+
if (form === "embedded") {
|
|
419
|
+
registryFacts.embedded++;
|
|
420
|
+
embeddedTotal += embeddedBytes(src);
|
|
421
|
+
} else if (form === "remote") registryFacts.remote++;
|
|
422
|
+
else if (form === "file") registryFacts.files++;
|
|
417
423
|
}
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
+
const altOf = (asset) => {
|
|
425
|
+
if (isRecord(asset) && typeof asset.alt === "string") return asset.alt;
|
|
426
|
+
const src = srcOf(asset);
|
|
427
|
+
if (src?.startsWith("asset:")) {
|
|
428
|
+
const entry = registry[src.slice("asset:".length)];
|
|
429
|
+
if (isRecord(entry) && typeof entry.alt === "string") return entry.alt;
|
|
430
|
+
}
|
|
431
|
+
return void 0;
|
|
424
432
|
};
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
if (
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
if (
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
const end = close < 0 ? source.length : close + block[1].length;
|
|
442
|
-
pushToken(tokens, index, end, "comment");
|
|
443
|
-
index = end;
|
|
444
|
-
continue;
|
|
433
|
+
const images = { content: { total: 0, withAlt: 0, decorative: 0, missingAlt: 0 }, logos: 0, watermarks: { deck: false, slides: 0 }, backgrounds: { deck: false, slides: 0 }, headerFooter: 0, speakerPhotos: 0, videos: 0 };
|
|
434
|
+
const contentImage = (asset) => {
|
|
435
|
+
if (srcOf(asset) === void 0) return 0;
|
|
436
|
+
useAsset(asset);
|
|
437
|
+
images.content.total++;
|
|
438
|
+
const alt = altOf(asset);
|
|
439
|
+
if (alt === void 0 || alt !== "" && alt.trim() === "") images.content.missingAlt++;
|
|
440
|
+
else if (alt === "") images.content.decorative++;
|
|
441
|
+
else images.content.withAlt++;
|
|
442
|
+
return 1;
|
|
443
|
+
};
|
|
444
|
+
const logoImages = (value) => {
|
|
445
|
+
if (srcOf(value) !== void 0) {
|
|
446
|
+
useAsset(value);
|
|
447
|
+
images.logos++;
|
|
448
|
+
return;
|
|
445
449
|
}
|
|
446
|
-
if (
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
if (found) {
|
|
451
|
-
pushToken(tokens, index, index + found[0].length, "keyword");
|
|
452
|
-
index += found[0].length;
|
|
453
|
-
if (/include/.test(found[0])) {
|
|
454
|
-
const header = /[ \t]*(<[^>\n]*>)/y;
|
|
455
|
-
header.lastIndex = index;
|
|
456
|
-
const matched = header.exec(source);
|
|
457
|
-
if (matched) {
|
|
458
|
-
const start = index + matched[0].length - matched[1].length;
|
|
459
|
-
pushToken(tokens, start, start + matched[1].length, "string");
|
|
460
|
-
index += matched[0].length;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
continue;
|
|
450
|
+
if (isRecord(value)) {
|
|
451
|
+
for (const variant of LOGO_VARIANTS) if (srcOf(value[variant]) !== void 0) {
|
|
452
|
+
useAsset(value[variant]);
|
|
453
|
+
images.logos++;
|
|
464
454
|
}
|
|
465
455
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const match = /'[\p{L}_][\p{L}\p{N}_]*/uy;
|
|
486
|
-
match.lastIndex = index;
|
|
487
|
-
const found = match.exec(source);
|
|
488
|
-
const end2 = index + (found ? found[0].length : 1);
|
|
489
|
-
if (found) pushToken(tokens, index, end2, "type");
|
|
490
|
-
index = end2;
|
|
491
|
-
continue;
|
|
492
|
-
}
|
|
493
|
-
const escapes = !(def.noEscapes ?? "").includes(character);
|
|
494
|
-
const multiline = character === "`";
|
|
495
|
-
const end = scanQuoted(source, index, character, escapes, multiline);
|
|
496
|
-
let kind = "string";
|
|
497
|
-
if (def.quotedKeys) {
|
|
498
|
-
const after = /^[ \t]*:/.exec(source.slice(end, end + 40));
|
|
499
|
-
if (after) kind = "property";
|
|
456
|
+
};
|
|
457
|
+
const watermarkOf = (value) => {
|
|
458
|
+
if (value === void 0 || value === false) return false;
|
|
459
|
+
if (srcOf(value) !== void 0) useAsset(value);
|
|
460
|
+
return srcOf(value) !== void 0;
|
|
461
|
+
};
|
|
462
|
+
const backgroundImage = (value) => {
|
|
463
|
+
const picture = imageBackground(value);
|
|
464
|
+
if (!picture) return false;
|
|
465
|
+
useAsset(picture.src);
|
|
466
|
+
return true;
|
|
467
|
+
};
|
|
468
|
+
const furnitureImages = (value) => {
|
|
469
|
+
if (!isRecord(value)) return;
|
|
470
|
+
for (const zone of ZONES) {
|
|
471
|
+
const item = value[zone];
|
|
472
|
+
if (isRecord(item) && srcOf(item.image) !== void 0) {
|
|
473
|
+
useAsset(item.image);
|
|
474
|
+
images.headerFooter++;
|
|
500
475
|
}
|
|
501
|
-
pushToken(tokens, index, end, kind);
|
|
502
|
-
index = end;
|
|
503
|
-
pendingDef = void 0;
|
|
504
|
-
continue;
|
|
505
476
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
477
|
+
};
|
|
478
|
+
const designAssets = (value, scope) => {
|
|
479
|
+
if (!isRecord(value)) return;
|
|
480
|
+
logoImages(value.logo);
|
|
481
|
+
if (watermarkOf(value.watermark)) {
|
|
482
|
+
if (scope === "deck") images.watermarks.deck = true;
|
|
483
|
+
else images.watermarks.slides++;
|
|
484
|
+
}
|
|
485
|
+
if (backgroundImage(value.background)) {
|
|
486
|
+
if (scope === "deck") images.backgrounds.deck = true;
|
|
487
|
+
else images.backgrounds.slides++;
|
|
488
|
+
}
|
|
489
|
+
furnitureImages(value.header);
|
|
490
|
+
furnitureImages(value.footer);
|
|
491
|
+
};
|
|
492
|
+
const organizations = list(deck.organization).filter(isRecord).map((entry) => {
|
|
493
|
+
const hasLogo = srcOf(entry.logo) !== void 0;
|
|
494
|
+
if (hasLogo) {
|
|
495
|
+
useAsset(entry.logo);
|
|
496
|
+
images.logos++;
|
|
515
497
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
498
|
+
return { id: str(entry.id) ?? "", name: str(entry.name) ?? "", role: str(entry.role), hasLogo };
|
|
499
|
+
});
|
|
500
|
+
const speakers = list(deck.speaker).filter(isRecord).map((entry) => {
|
|
501
|
+
const hasPhoto = srcOf(entry.photo) !== void 0;
|
|
502
|
+
if (hasPhoto) {
|
|
503
|
+
useAsset(entry.photo);
|
|
504
|
+
images.speakerPhotos++;
|
|
523
505
|
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
506
|
+
return { id: str(entry.id) ?? "", name: str(entry.name) ?? "", title: str(entry.title), organizationId: str(entry.organizationId), hasPhoto };
|
|
507
|
+
});
|
|
508
|
+
designAssets(design, "deck");
|
|
509
|
+
for (const variable of Object.values(isRecord(deck.variables) ? deck.variables : {})) if (isRecord(variable) && variable.type === "image") useAsset(variable.value);
|
|
510
|
+
const narrative2 = reference(deck.narrative);
|
|
511
|
+
const deckFacts = {
|
|
512
|
+
name: str(deck.name),
|
|
513
|
+
description: typeof deck.description === "string" && deck.description !== "",
|
|
514
|
+
filename: str(deck.filename),
|
|
515
|
+
author: list(deck.author).filter((entry) => typeof entry === "string"),
|
|
516
|
+
language: reference(deck.language),
|
|
517
|
+
slideSize: slideSize(deck, catalogs),
|
|
518
|
+
template: deck.template === true,
|
|
519
|
+
tags: Array.isArray(deck.tags) ? deck.tags.filter((tag) => typeof tag === "string") : [],
|
|
520
|
+
takeaways: list(deck.takeaway).filter((entry) => typeof entry === "string").length,
|
|
521
|
+
declaredMinutes: typeof deck.duration === "number" ? deck.duration : null,
|
|
522
|
+
design: { theme: reference(design.theme), colorScheme: reference(design.colorScheme), fontScheme: reference(design.fontScheme) },
|
|
523
|
+
audience: list(deck.audience).flatMap((entry) => reference(entry) ?? []),
|
|
524
|
+
purpose: reference(deck.purpose),
|
|
525
|
+
tone: reference(deck.tone),
|
|
526
|
+
narrative: narrative2 ? { ...narrative2, beats: isRecord(deck.narrative) && Array.isArray(deck.narrative.beats) ? deck.narrative.beats.length : 0 } : null
|
|
527
|
+
};
|
|
528
|
+
const datasetRecords = isRecord(deck.datasets) ? Object.entries(deck.datasets).filter(([, value]) => isRecord(value)) : [];
|
|
529
|
+
const datasetUse = /* @__PURE__ */ new Map();
|
|
530
|
+
const payloadCounts = { text: 0, items: 0, bullets: 0, quote: 0, metric: 0, code: 0, timeline: 0, chart: 0, table: 0, image: 0, video: 0, blocks: 0, regions: 0, groups: 0, maxDepth: 0 };
|
|
531
|
+
const layouts = /* @__PURE__ */ new Map(), chartTypes = /* @__PURE__ */ new Map(), extensions = /* @__PURE__ */ new Set();
|
|
532
|
+
const chartData = { inline: 0, dataset: 0, source: 0 };
|
|
533
|
+
const tableItems = [];
|
|
534
|
+
let tableRows = 0, tableColumns = 0, datasetBackedTables = 0, chartTotal = 0, captions = 0;
|
|
535
|
+
const hidden = [], withoutNotes = [], sections = [];
|
|
536
|
+
let withTitle = 0, withBeat = 0, unsectioned = 0, withoutLayout = 0, withOwnDesign = 0, withNotes = 0, contentWords = 0, notesWords = 0;
|
|
537
|
+
const headerOverrides = { header: 0, headerSuppressed: 0, footer: 0, footerSuppressed: 0 };
|
|
538
|
+
const total = { citations: 0, footnotes: 0, links: 0, cited: /* @__PURE__ */ new Set(), families: /* @__PURE__ */ new Set() };
|
|
539
|
+
const perSlide = [];
|
|
540
|
+
const contentPerSlide = [];
|
|
541
|
+
const schemeDesigns = [void 0];
|
|
542
|
+
slides.forEach((slide, index) => {
|
|
543
|
+
const id = str(slide.id);
|
|
544
|
+
const ref = { index, id };
|
|
545
|
+
const slideDesign = isRecord(slide.design) ? slide.design : void 0;
|
|
546
|
+
const slideTally = { words: 0, citations: 0, footnotes: 0, links: 0, cited: /* @__PURE__ */ new Set(), families: /* @__PURE__ */ new Set() };
|
|
547
|
+
const kinds = /* @__PURE__ */ new Set();
|
|
548
|
+
let slideImages = 0, slideCharts = 0, slideTables = 0;
|
|
549
|
+
const count = (text) => {
|
|
550
|
+
slideTally.words += wordCount(text);
|
|
551
|
+
};
|
|
552
|
+
const run = (value) => visitRuns(value, (entry) => {
|
|
553
|
+
count(entry.text);
|
|
554
|
+
if (typeof entry.link === "string" && entry.link !== "") slideTally.links++;
|
|
555
|
+
if (entry.cite !== void 0) {
|
|
556
|
+
slideTally.citations++;
|
|
557
|
+
for (const cite of list(entry.cite)) if (typeof cite === "string") slideTally.cited.add(cite);
|
|
532
558
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
const close = source.indexOf(quote.repeat(3), index + prefix + 3);
|
|
541
|
-
end = close < 0 ? source.length : close + 3;
|
|
542
|
-
} else end = scanQuoted(source, index + prefix, quote, !/[rR]/.test(source.slice(index, index + prefix)), false);
|
|
543
|
-
pushToken(tokens, index, end, "string");
|
|
544
|
-
index = end;
|
|
545
|
-
pendingDef = void 0;
|
|
546
|
-
continue;
|
|
547
|
-
}
|
|
548
|
-
IDENT.lastIndex = index;
|
|
549
|
-
const identifier = IDENT.exec(source);
|
|
550
|
-
if (identifier) {
|
|
551
|
-
const word = identifier[0], end = index + word.length, folded = fold(word);
|
|
552
|
-
let kind;
|
|
553
|
-
if (pendingDef && !keywords.has(folded)) kind = pendingDef;
|
|
554
|
-
else if (keywords.has(folded)) {
|
|
555
|
-
kind = "keyword";
|
|
556
|
-
pendingDef = def.defs && Object.hasOwn(def.defs, folded) ? def.defs[folded] : void 0;
|
|
557
|
-
pushToken(tokens, index, end, kind);
|
|
558
|
-
index = end;
|
|
559
|
-
continue;
|
|
560
|
-
} else if (literals.has(word) || literals.has(folded)) kind = "number";
|
|
561
|
-
else if (types.has(folded)) kind = "type";
|
|
562
|
-
else if (def.calls && source[end] === "(") kind = "function";
|
|
563
|
-
else if (def.macros && source[end] === "!" && /[([{]/.test(source[end + 1] ?? "")) kind = "function";
|
|
564
|
-
else if (def.capsTypes && /^[A-Z]/.test(word) && /[a-z]/.test(word)) kind = "type";
|
|
565
|
-
pendingDef = void 0;
|
|
566
|
-
if (kind) pushToken(tokens, index, end, kind);
|
|
567
|
-
index = end;
|
|
568
|
-
continue;
|
|
569
|
-
}
|
|
570
|
-
pendingDef = void 0;
|
|
571
|
-
index++;
|
|
572
|
-
}
|
|
573
|
-
return tokens;
|
|
574
|
-
}
|
|
575
|
-
var YAML_LITERALS = /* @__PURE__ */ new Set(["true", "false", "null", "yes", "no", "on", "off", "~", "True", "False", "Null", "TRUE", "FALSE", "NULL"]);
|
|
576
|
-
function scanYamlValue(source, start, end, tokens, comments) {
|
|
577
|
-
let index = start;
|
|
578
|
-
while (index < end) {
|
|
579
|
-
const character = source[index];
|
|
580
|
-
if (character === "#" && (index === start || /\s/.test(source[index - 1])) && comments.includes("#")) {
|
|
581
|
-
pushToken(tokens, index, end, "comment");
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (character === ";" && comments.includes(";") && (index === start || /\s/.test(source[index - 1]))) {
|
|
585
|
-
pushToken(tokens, index, end, "comment");
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
if (character === '"' || character === "'") {
|
|
589
|
-
const close = scanQuoted(source, index, character, character === '"', false);
|
|
590
|
-
pushToken(tokens, index, Math.min(close, end), "string");
|
|
591
|
-
index = Math.min(close, end);
|
|
592
|
-
continue;
|
|
593
|
-
}
|
|
594
|
-
if ((character === "&" || character === "*") && /[\w-]/.test(source[index + 1] ?? "")) {
|
|
595
|
-
const match = /[&*][\w-]+/y;
|
|
596
|
-
match.lastIndex = index;
|
|
597
|
-
const found2 = match.exec(source);
|
|
598
|
-
pushToken(tokens, index, index + found2[0].length, "type");
|
|
599
|
-
index += found2[0].length;
|
|
600
|
-
continue;
|
|
601
|
-
}
|
|
602
|
-
if (!isIdentChar(source[index - 1]) && /[\d-]/.test(character)) {
|
|
603
|
-
const match = /-?\d[\d_]*(?:\.\d+)?(?:[eE][+-]?\d+)?(?=[\s,\]}]|$)/y;
|
|
604
|
-
match.lastIndex = index;
|
|
605
|
-
const found2 = match.exec(source);
|
|
606
|
-
if (found2 && index + found2[0].length <= end) {
|
|
607
|
-
pushToken(tokens, index, index + found2[0].length, "number");
|
|
608
|
-
index += found2[0].length;
|
|
609
|
-
continue;
|
|
559
|
+
if (entry.footnote !== void 0) slideTally.footnotes++;
|
|
560
|
+
if (typeof entry.fontFamily === "string" && entry.fontFamily !== "") slideTally.families.add(entry.fontFamily);
|
|
561
|
+
});
|
|
562
|
+
const caption = (node) => {
|
|
563
|
+
if (node.caption !== void 0) {
|
|
564
|
+
captions++;
|
|
565
|
+
run(node.caption);
|
|
610
566
|
}
|
|
611
|
-
}
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
if (
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
index++;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
function lineRanges(source) {
|
|
624
|
-
const ranges = [];
|
|
625
|
-
let cursor = 0;
|
|
626
|
-
const pattern = /\r\n|\r|\n/g;
|
|
627
|
-
for (let match = pattern.exec(source); match; match = pattern.exec(source)) {
|
|
628
|
-
ranges.push({ start: cursor, end: match.index });
|
|
629
|
-
cursor = match.index + match[0].length;
|
|
630
|
-
}
|
|
631
|
-
ranges.push({ start: cursor, end: source.length });
|
|
632
|
-
return ranges;
|
|
633
|
-
}
|
|
634
|
-
function yamlKey(source, from, to) {
|
|
635
|
-
const first = source[from];
|
|
636
|
-
if (first === void 0 || from >= to) return void 0;
|
|
637
|
-
let index = from;
|
|
638
|
-
if (first === '"' || first === "'") {
|
|
639
|
-
index = Math.min(scanQuoted(source, from, first, first === '"', false), to);
|
|
640
|
-
let at = index;
|
|
641
|
-
while (at < to && (source[at] === " " || source[at] === " ")) at++;
|
|
642
|
-
return source[index - 1] === first && source[at] === ":" && (at + 1 >= to || /\s/.test(source[at + 1])) ? { nameEnd: index, colon: at } : void 0;
|
|
643
|
-
}
|
|
644
|
-
if (/[\s#:{}[\],&*!|>%@`]/.test(first) || first === "-" && /[\s#:]/.test(source[from + 1] ?? " ")) return void 0;
|
|
645
|
-
for (; index < to; index++) {
|
|
646
|
-
const character = source[index];
|
|
647
|
-
if (character === "#" && /\s/.test(source[index - 1])) return void 0;
|
|
648
|
-
if (character === ":" && (index + 1 >= to || /\s/.test(source[index + 1]))) {
|
|
649
|
-
let nameEnd = index;
|
|
650
|
-
while (nameEnd > from && /\s/.test(source[nameEnd - 1])) nameEnd--;
|
|
651
|
-
return nameEnd > from ? { nameEnd, colon: index } : void 0;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return void 0;
|
|
655
|
-
}
|
|
656
|
-
function scanYaml(source) {
|
|
657
|
-
const tokens = [];
|
|
658
|
-
let blockIndent = -1;
|
|
659
|
-
for (const { start, end } of lineRanges(source)) {
|
|
660
|
-
const text = source.slice(start, end), indent = /^ */.exec(text)[0].length;
|
|
661
|
-
if (blockIndent >= 0) {
|
|
662
|
-
if (text.trim() === "" || indent > blockIndent) {
|
|
663
|
-
if (text.trim() !== "") pushToken(tokens, start + indent, end, "string");
|
|
664
|
-
continue;
|
|
567
|
+
};
|
|
568
|
+
const visitNode = (node, path, depth, kind) => {
|
|
569
|
+
if (kind === "block") payloadCounts.blocks++;
|
|
570
|
+
if (kind === "region") payloadCounts.regions++;
|
|
571
|
+
if (kind !== "root" && Array.isArray(node.blocks)) payloadCounts.groups++;
|
|
572
|
+
if (depth > payloadCounts.maxDepth) payloadCounts.maxDepth = depth;
|
|
573
|
+
for (const key of KIND_ORDER) if (node[key] !== void 0) {
|
|
574
|
+
payloadCounts[key]++;
|
|
575
|
+
kinds.add(key);
|
|
665
576
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
const dash = /^(?:-\s+)+/.exec(text.slice(indent));
|
|
679
|
-
if (dash) cursor += dash[0].length;
|
|
680
|
-
let valueStart = cursor;
|
|
681
|
-
const key = yamlKey(source, cursor, end);
|
|
682
|
-
if (key) {
|
|
683
|
-
pushToken(tokens, cursor, key.nameEnd, "property");
|
|
684
|
-
valueStart = key.colon + 1;
|
|
685
|
-
}
|
|
686
|
-
scanYamlValue(source, valueStart, end, tokens, "#");
|
|
687
|
-
if (/(?:^|\s)[|>][+-]?\d?\s*(?:#.*)?$/.test(text.slice(valueStart - start))) blockIndent = indent;
|
|
688
|
-
}
|
|
689
|
-
return tokens;
|
|
690
|
-
}
|
|
691
|
-
function scanIni(source, def) {
|
|
692
|
-
const tokens = [], comments = (def.line ?? []).join("");
|
|
693
|
-
for (const { start, end } of lineRanges(source)) {
|
|
694
|
-
const text = source.slice(start, end), indent = /^\s*/.exec(text)[0].length, first = text[indent];
|
|
695
|
-
if (first === void 0) continue;
|
|
696
|
-
if (comments.includes(first)) {
|
|
697
|
-
pushToken(tokens, start + indent, end, "comment");
|
|
698
|
-
continue;
|
|
699
|
-
}
|
|
700
|
-
if (first === "[") {
|
|
701
|
-
const close = text.indexOf("]", indent);
|
|
702
|
-
const stop = close < 0 ? end : start + close + 1;
|
|
703
|
-
pushToken(tokens, start + indent, stop, "type");
|
|
704
|
-
scanYamlValue(source, stop, end, tokens, comments);
|
|
705
|
-
continue;
|
|
706
|
-
}
|
|
707
|
-
const key = /^("[^"\n]*"|'[^'\n]*'|[^\s=:#;"']+(?:\s+[^\s=:#;"']+)*)\s*[=:]/.exec(text.slice(indent));
|
|
708
|
-
let valueStart = start + indent;
|
|
709
|
-
if (key) {
|
|
710
|
-
pushToken(tokens, start + indent, start + indent + key[1].length, "property");
|
|
711
|
-
valueStart = start + indent + key[0].length;
|
|
712
|
-
}
|
|
713
|
-
scanYamlValue(source, valueStart, end, tokens, comments);
|
|
714
|
-
}
|
|
715
|
-
return tokens;
|
|
716
|
-
}
|
|
717
|
-
function scanMarkup(source) {
|
|
718
|
-
const tokens = [];
|
|
719
|
-
let index = 0;
|
|
720
|
-
while (index < source.length) {
|
|
721
|
-
const open = source.indexOf("<", index);
|
|
722
|
-
if (open < 0) break;
|
|
723
|
-
if (source.startsWith("<!--", open)) {
|
|
724
|
-
const close = source.indexOf("-->", open + 4);
|
|
725
|
-
const end = close < 0 ? source.length : close + 3;
|
|
726
|
-
pushToken(tokens, open, end, "comment");
|
|
727
|
-
index = end;
|
|
728
|
-
continue;
|
|
729
|
-
}
|
|
730
|
-
if (source.startsWith("<![CDATA[", open)) {
|
|
731
|
-
const close = source.indexOf("]]>", open);
|
|
732
|
-
const end = close < 0 ? source.length : close + 3;
|
|
733
|
-
pushToken(tokens, open, end, "string");
|
|
734
|
-
index = end;
|
|
735
|
-
continue;
|
|
736
|
-
}
|
|
737
|
-
const name = /<([/?!]?)([A-Za-z][\w:.-]*|DOCTYPE)?/y;
|
|
738
|
-
name.lastIndex = open;
|
|
739
|
-
const found = name.exec(source);
|
|
740
|
-
if (!found || !found[2]) {
|
|
741
|
-
index = open + 1;
|
|
742
|
-
continue;
|
|
743
|
-
}
|
|
744
|
-
pushToken(tokens, open + 1, open + found[0].length, "keyword");
|
|
745
|
-
index = open + found[0].length;
|
|
746
|
-
while (index < source.length && source[index] !== ">") {
|
|
747
|
-
const character = source[index];
|
|
748
|
-
if (character === '"' || character === "'") {
|
|
749
|
-
const close = source.indexOf(character, index + 1);
|
|
750
|
-
const end = close < 0 ? source.length : close + 1;
|
|
751
|
-
pushToken(tokens, index, end, "string");
|
|
752
|
-
index = end;
|
|
753
|
-
continue;
|
|
577
|
+
if (isRecord(node.extensions)) for (const key of Object.keys(node.extensions)) extensions.add(key);
|
|
578
|
+
run(node.text);
|
|
579
|
+
run(node.items);
|
|
580
|
+
run(node.bullets);
|
|
581
|
+
caption(node);
|
|
582
|
+
if (node.quote !== void 0) {
|
|
583
|
+
const quote = node.quote;
|
|
584
|
+
if (isRecord(quote)) {
|
|
585
|
+
run(quote.text);
|
|
586
|
+
run(quote.attribution);
|
|
587
|
+
run(quote.source);
|
|
588
|
+
} else run(quote);
|
|
754
589
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
continue;
|
|
590
|
+
if (isRecord(node.metric)) {
|
|
591
|
+
run(node.metric.value);
|
|
592
|
+
run(node.metric.label);
|
|
593
|
+
run(node.metric.description);
|
|
594
|
+
run(node.metric.unit);
|
|
595
|
+
run(node.metric.delta);
|
|
762
596
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
if (/\s/.test(character)) {
|
|
775
|
-
index++;
|
|
776
|
-
continue;
|
|
777
|
-
}
|
|
778
|
-
if (source.startsWith("/*", index)) {
|
|
779
|
-
const close = source.indexOf("*/", index + 2);
|
|
780
|
-
const end = close < 0 ? source.length : close + 2;
|
|
781
|
-
pushToken(tokens, index, end, "comment");
|
|
782
|
-
index = end;
|
|
783
|
-
continue;
|
|
784
|
-
}
|
|
785
|
-
if (character === '"' || character === "'") {
|
|
786
|
-
const end = scanQuoted(source, index, character, true, false);
|
|
787
|
-
pushToken(tokens, index, end, "string");
|
|
788
|
-
index = end;
|
|
789
|
-
continue;
|
|
790
|
-
}
|
|
791
|
-
if (character === "{") {
|
|
792
|
-
depth++;
|
|
793
|
-
index++;
|
|
794
|
-
continue;
|
|
795
|
-
}
|
|
796
|
-
if (character === "}") {
|
|
797
|
-
depth = Math.max(0, depth - 1);
|
|
798
|
-
index++;
|
|
799
|
-
continue;
|
|
800
|
-
}
|
|
801
|
-
if (character === "@") {
|
|
802
|
-
const match = /@[\w-]+/y;
|
|
803
|
-
match.lastIndex = index;
|
|
804
|
-
const found2 = match.exec(source);
|
|
805
|
-
if (found2) {
|
|
806
|
-
pushToken(tokens, index, index + found2[0].length, "keyword");
|
|
807
|
-
index += found2[0].length;
|
|
808
|
-
continue;
|
|
597
|
+
if (node.timeline !== void 0) {
|
|
598
|
+
const timeline = node.timeline, events = Array.isArray(timeline) ? timeline : isRecord(timeline) && Array.isArray(timeline.events) ? timeline.events : [];
|
|
599
|
+
if (isRecord(timeline)) {
|
|
600
|
+
run(timeline.name);
|
|
601
|
+
run(timeline.description);
|
|
602
|
+
}
|
|
603
|
+
for (const event of events) if (isRecord(event)) {
|
|
604
|
+
run(event.when);
|
|
605
|
+
run(event.what);
|
|
606
|
+
run(event.description);
|
|
607
|
+
}
|
|
809
608
|
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
const found2 = match.exec(source);
|
|
815
|
-
if (found2) {
|
|
816
|
-
pushToken(tokens, index, index + found2[0].length, "keyword");
|
|
817
|
-
index += found2[0].length;
|
|
818
|
-
continue;
|
|
609
|
+
if (node.image !== void 0) slideImages += contentImage(node.image);
|
|
610
|
+
if (node.video !== void 0) {
|
|
611
|
+
useAsset(node.video);
|
|
612
|
+
images.videos++;
|
|
819
613
|
}
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
614
|
+
if (isRecord(node.chart)) {
|
|
615
|
+
chartTotal++;
|
|
616
|
+
slideCharts++;
|
|
617
|
+
bump(chartTypes, str(node.chart.type) ?? "unknown");
|
|
618
|
+
const data = node.chart.data;
|
|
619
|
+
if (isRecord(data)) {
|
|
620
|
+
if (typeof data.dataset === "string") {
|
|
621
|
+
chartData.dataset++;
|
|
622
|
+
bump(datasetUse, data.dataset);
|
|
623
|
+
} else if (Array.isArray(data.columns) || Array.isArray(data.rows)) chartData.inline++;
|
|
624
|
+
else if (typeof data.src === "string") {
|
|
625
|
+
chartData.source++;
|
|
626
|
+
useAsset(data.src);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
829
629
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
630
|
+
if (isRecord(node.table)) {
|
|
631
|
+
slideTables++;
|
|
632
|
+
const table = node.table;
|
|
633
|
+
let rows = 0, columns = 0, dataset = null;
|
|
634
|
+
if (typeof table.dataset === "string") {
|
|
635
|
+
dataset = table.dataset;
|
|
636
|
+
datasetBackedTables++;
|
|
637
|
+
bump(datasetUse, dataset);
|
|
638
|
+
const source = isRecord(deck.datasets) && isRecord(deck.datasets[dataset]) ? deck.datasets[dataset] : void 0;
|
|
639
|
+
rows = Array.isArray(source?.rows) ? source.rows.length : 0;
|
|
640
|
+
columns = Array.isArray(table.fields) ? table.fields.length : Array.isArray(source?.columns) ? source.columns.length : 0;
|
|
641
|
+
} else {
|
|
642
|
+
const body = Array.isArray(table.rows) ? table.rows : [];
|
|
643
|
+
rows = body.length;
|
|
644
|
+
columns = Array.isArray(table.columns) ? table.columns.length : body.reduce((widest, row) => Math.max(widest, Array.isArray(row) ? row.length : 0), 0);
|
|
645
|
+
run(table.columns);
|
|
646
|
+
for (const row of body) run(row);
|
|
647
|
+
}
|
|
648
|
+
tableRows += rows;
|
|
649
|
+
tableColumns += columns;
|
|
650
|
+
tableItems.push({ slide: index, path: `${path}/table`, rows, columns, dataset });
|
|
839
651
|
}
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
652
|
+
};
|
|
653
|
+
run(slide.title);
|
|
654
|
+
run(slide.subtitle);
|
|
655
|
+
run(slide.tag);
|
|
656
|
+
const slidePath = `/slides/${index}`;
|
|
657
|
+
visitNode(slide, slidePath, 0, "root");
|
|
658
|
+
visitContentPayloads(slide, slidePath, (node, path) => {
|
|
659
|
+
const relative = path.slice(slidePath.length + 1);
|
|
660
|
+
visitNode(node, path, (relative.match(/(^|\/)blocks\//g) ?? []).length, /(^|\/)blocks\/\d+$/.test(relative) ? "block" : "region");
|
|
661
|
+
});
|
|
662
|
+
const notes = typeof slide.notes === "string" ? slide.notes : "";
|
|
663
|
+
const noteWords = wordCount(notes);
|
|
664
|
+
const hasNotes = notes.trim() !== "";
|
|
665
|
+
if (hasNotes) withNotes++;
|
|
666
|
+
else withoutNotes.push(ref);
|
|
667
|
+
notesWords += noteWords;
|
|
668
|
+
contentWords += slideTally.words;
|
|
669
|
+
contentPerSlide.push(slideTally.words);
|
|
670
|
+
total.citations += slideTally.citations;
|
|
671
|
+
total.footnotes += slideTally.footnotes;
|
|
672
|
+
total.links += slideTally.links;
|
|
673
|
+
for (const cite of slideTally.cited) total.cited.add(cite);
|
|
674
|
+
for (const family of slideTally.families) total.families.add(family);
|
|
675
|
+
const title = typeof slide.title === "string" && slide.title.trim() !== "" ? slide.title : null;
|
|
676
|
+
if (title) withTitle++;
|
|
677
|
+
if (slide.beat !== void 0) withBeat++;
|
|
678
|
+
if (slide.hidden === true) hidden.push(ref);
|
|
679
|
+
const layout2 = str(slide.layout);
|
|
680
|
+
if (layout2) bump(layouts, layout2);
|
|
681
|
+
else withoutLayout++;
|
|
682
|
+
const section = str(slide.section);
|
|
683
|
+
if (section !== null && section !== "") {
|
|
684
|
+
const last = sections.at(-1);
|
|
685
|
+
if (last && last.name === section && last.firstSlide + last.slides === index) last.slides++;
|
|
686
|
+
else sections.push({ name: section, slides: 1, firstSlide: index });
|
|
687
|
+
} else unsectioned++;
|
|
688
|
+
if (slideDesign) {
|
|
689
|
+
withOwnDesign++;
|
|
690
|
+
designAssets(slideDesign, "slide");
|
|
691
|
+
for (const kind of ["header", "footer"]) {
|
|
692
|
+
if (slideDesign[kind] === false) headerOverrides[`${kind}Suppressed`]++;
|
|
693
|
+
else if (isRecord(slideDesign[kind])) headerOverrides[kind]++;
|
|
862
694
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
break;
|
|
883
|
-
case "css":
|
|
884
|
-
tokens = scanCss(source);
|
|
885
|
-
break;
|
|
886
|
-
default:
|
|
887
|
-
tokens = scanGeneric(source, def);
|
|
888
|
-
}
|
|
889
|
-
return tokens.filter((token) => token.end > token.start).sort((a, b) => a.start - b.start);
|
|
890
|
-
}
|
|
891
|
-
function codeLineRuns(tokens, start, end, source) {
|
|
892
|
-
const runs = [];
|
|
893
|
-
const push = (from, to, kind) => {
|
|
894
|
-
if (kind === void 0 || source === void 0 || !source.slice(from, to).includes(" ")) {
|
|
895
|
-
runs.push(kind === void 0 ? { start: from, end: to } : { start: from, end: to, kind });
|
|
896
|
-
return;
|
|
897
|
-
}
|
|
898
|
-
let at = from;
|
|
899
|
-
for (let index = from; index < to; index++) {
|
|
900
|
-
if (source[index] !== " ") continue;
|
|
901
|
-
if (index > at) runs.push({ start: at, end: index, kind });
|
|
902
|
-
runs.push({ start: index, end: index + 1 });
|
|
903
|
-
at = index + 1;
|
|
904
|
-
}
|
|
905
|
-
if (at < to) runs.push({ start: at, end: to, kind });
|
|
906
|
-
};
|
|
907
|
-
let cursor = start;
|
|
908
|
-
for (const token of tokens) {
|
|
909
|
-
if (token.end <= start) continue;
|
|
910
|
-
if (token.start >= end) break;
|
|
911
|
-
const from = Math.max(token.start, start), to = Math.min(token.end, end);
|
|
912
|
-
if (from > cursor) push(cursor, from);
|
|
913
|
-
push(from, to, token.kind);
|
|
914
|
-
cursor = to;
|
|
915
|
-
}
|
|
916
|
-
if (cursor < end) push(cursor, end);
|
|
917
|
-
return runs;
|
|
918
|
-
}
|
|
919
|
-
var distance = (a, b) => Math.hypot(...channels(a).map((value, index) => value - channels(b)[index]));
|
|
920
|
-
var FALLBACK = { keyword: "#C4B5FD", string: "#86EFAC", number: "#FCD34D", function: "#93C5FD", type: "#67E8F9", property: "#F9A8D4", comment: "#94A3B8" };
|
|
921
|
-
function codeSyntaxPalette(theme2 = {}, options = {}) {
|
|
922
|
-
const background = normalize(options.background) ?? CODE_PANEL_BACKGROUND, plain = normalize(options.foreground) ?? CODE_PANEL_FOREGROUND;
|
|
923
|
-
const minimum = options.minimumContrast ?? CODE_SYNTAX_MIN_CONTRAST;
|
|
924
|
-
const palette = { plain: legible(plain, background, minimum) };
|
|
925
|
-
const taken = [palette.plain];
|
|
926
|
-
const slots = [["keyword", theme2.primary], ["string", theme2.accent], ["number", theme2.secondary], ["comment", theme2.mutedText], ["function", void 0], ["type", void 0], ["property", void 0]];
|
|
927
|
-
for (const [kind, themed] of slots) {
|
|
928
|
-
const candidates = [normalize(themed), FALLBACK[kind]].filter((value) => value !== void 0).map((value) => legible(value, background, minimum));
|
|
929
|
-
let [h, s, l] = toHsl(FALLBACK[kind]);
|
|
930
|
-
let pick = candidates.find((candidate) => taken.every((other) => distance(candidate, other) >= 48));
|
|
931
|
-
for (let turn = 0; pick === void 0 && turn < 9; turn++) {
|
|
932
|
-
h += 40;
|
|
933
|
-
const candidate = legible(fromHsl(h, s, l), background, minimum);
|
|
934
|
-
if (taken.every((other) => distance(candidate, other) >= 48)) pick = candidate;
|
|
935
|
-
}
|
|
936
|
-
palette[kind] = pick ?? candidates[candidates.length - 1];
|
|
937
|
-
taken.push(palette[kind]);
|
|
938
|
-
}
|
|
939
|
-
return palette;
|
|
940
|
-
}
|
|
941
|
-
function codeSyntaxPaletteForScheme(scheme, options = {}) {
|
|
942
|
-
const record = scheme && typeof scheme === "object" ? scheme : {};
|
|
943
|
-
const pick = (role, slot, fallback) => normalize(record[role]) ?? normalize(record[slot]) ?? fallback;
|
|
944
|
-
return codeSyntaxPalette({ primary: pick("primary", "accent1", "#2563EB"), secondary: pick("secondary", "accent2", "#0F766E"), accent: pick("accent", "accent3", "#F59E0B") }, options);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
// src/metric-trend.ts
|
|
948
|
-
var METRIC_TREND_SHAPES = Object.freeze({ up: "upArrow", down: "downArrow", flat: "rightArrow" });
|
|
949
|
-
var METRIC_TREND_MIN_CONTRAST = 4.5;
|
|
950
|
-
var SEMANTIC = {
|
|
951
|
-
up: { light: "#15803D", dark: "#4ADE80" },
|
|
952
|
-
down: { light: "#B91C1C", dark: "#F87171" }
|
|
953
|
-
};
|
|
954
|
-
function metricTrendColor(trend, options) {
|
|
955
|
-
const background = normalize(options.background) ?? "#FFFFFF";
|
|
956
|
-
if (trend === "flat") return legible(normalize(options.neutral) ?? (luminance(background) < 0.5 ? "#CBD5E1" : "#475569"), background, METRIC_TREND_MIN_CONTRAST);
|
|
957
|
-
const pair = SEMANTIC[trend];
|
|
958
|
-
return legible(luminance(background) < 0.5 ? pair.dark : pair.light, background, METRIC_TREND_MIN_CONTRAST);
|
|
959
|
-
}
|
|
960
|
-
function metricTrendPoints(shape, box) {
|
|
961
|
-
const { x: l, y: t, width: w, height: h } = box, r = l + w, b = t + h, hc = l + w / 2, vc = t + h / 2, ss = Math.min(w, h);
|
|
962
|
-
if (shape === "rightArrow") {
|
|
963
|
-
const x12 = r - ss * 0.5, y1 = vc - h * 0.25, y22 = vc + h * 0.25;
|
|
964
|
-
return [[l, y1], [x12, y1], [x12, t], [r, vc], [x12, b], [x12, y22], [l, y22]];
|
|
965
|
-
}
|
|
966
|
-
const dy = ss * 0.5, x1 = hc - w * 0.25, x2 = hc + w * 0.25;
|
|
967
|
-
if (shape === "upArrow") {
|
|
968
|
-
const y22 = t + dy;
|
|
969
|
-
return [[l, y22], [hc, t], [r, y22], [x2, y22], [x2, b], [x1, b], [x1, y22]];
|
|
970
|
-
}
|
|
971
|
-
const y2 = b - dy;
|
|
972
|
-
return [[l, y2], [x1, y2], [x1, t], [x2, t], [x2, y2], [r, y2], [hc, b]];
|
|
973
|
-
}
|
|
974
|
-
function metricTrendMark(layout2, options) {
|
|
975
|
-
const part = layout2.parts.find((candidate) => candidate.role === "trend");
|
|
976
|
-
if (!part || !part.visible || !part.fit || part.fit.sourceLines.length === 0) return void 0;
|
|
977
|
-
const trend = part.text.trim();
|
|
978
|
-
if (!Object.hasOwn(METRIC_TREND_SHAPES, trend)) return void 0;
|
|
979
|
-
const line = part.fit.sourceLines[0], origin = part.linePositions[0];
|
|
980
|
-
if (!origin || line.width <= 0) return void 0;
|
|
981
|
-
const size = part.fit.fontSize * 0.72, gap = part.fit.fontSize * 0.3, left = part.box.x, right = part.box.x + part.box.width;
|
|
982
|
-
const after = origin.x + line.width + gap, before = origin.x - gap - size;
|
|
983
|
-
const fitsAfter = after + size <= right + 0.01, fitsBefore = before >= left - 0.01;
|
|
984
|
-
const x = layout2.alignment === "left" ? fitsAfter ? after : fitsBefore ? before : void 0 : fitsBefore ? before : fitsAfter ? after : void 0;
|
|
985
|
-
if (x === void 0) return void 0;
|
|
986
|
-
const shape = METRIC_TREND_SHAPES[trend], box = { x, y: origin.baseline - size, width: size, height: size };
|
|
987
|
-
return { trend, shape, box, points: metricTrendPoints(shape, box), color: metricTrendColor(trend, options), ariaLabel: `Trend: ${trend}`, path: part.path };
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
// src/pattern-fills.ts
|
|
991
|
-
var PATTERN_PRESETS = Object.freeze([
|
|
992
|
-
"pct5",
|
|
993
|
-
"pct10",
|
|
994
|
-
"pct20",
|
|
995
|
-
"pct25",
|
|
996
|
-
"pct30",
|
|
997
|
-
"pct40",
|
|
998
|
-
"pct50",
|
|
999
|
-
"pct60",
|
|
1000
|
-
"pct70",
|
|
1001
|
-
"pct75",
|
|
1002
|
-
"pct80",
|
|
1003
|
-
"pct90",
|
|
1004
|
-
"horz",
|
|
1005
|
-
"vert",
|
|
1006
|
-
"ltHorz",
|
|
1007
|
-
"ltVert",
|
|
1008
|
-
"dkHorz",
|
|
1009
|
-
"dkVert",
|
|
1010
|
-
"narHorz",
|
|
1011
|
-
"narVert",
|
|
1012
|
-
"dashHorz",
|
|
1013
|
-
"dashVert",
|
|
1014
|
-
"cross",
|
|
1015
|
-
"dnDiag",
|
|
1016
|
-
"upDiag",
|
|
1017
|
-
"ltDnDiag",
|
|
1018
|
-
"ltUpDiag",
|
|
1019
|
-
"dkDnDiag",
|
|
1020
|
-
"dkUpDiag",
|
|
1021
|
-
"wdDnDiag",
|
|
1022
|
-
"wdUpDiag",
|
|
1023
|
-
"dashDnDiag",
|
|
1024
|
-
"dashUpDiag",
|
|
1025
|
-
"diagCross",
|
|
1026
|
-
"smCheck",
|
|
1027
|
-
"lgCheck",
|
|
1028
|
-
"smGrid",
|
|
1029
|
-
"lgGrid",
|
|
1030
|
-
"dotGrid",
|
|
1031
|
-
"smConfetti",
|
|
1032
|
-
"lgConfetti",
|
|
1033
|
-
"horzBrick",
|
|
1034
|
-
"diagBrick",
|
|
1035
|
-
"solidDmnd",
|
|
1036
|
-
"openDmnd",
|
|
1037
|
-
"dotDmnd",
|
|
1038
|
-
"plaid",
|
|
1039
|
-
"sphere",
|
|
1040
|
-
"weave",
|
|
1041
|
-
"divot",
|
|
1042
|
-
"shingle",
|
|
1043
|
-
"wave",
|
|
1044
|
-
"trellis",
|
|
1045
|
-
"zigZag"
|
|
1046
|
-
]);
|
|
1047
|
-
var PATTERN_PRESET_ALIASES = Object.freeze({ diagStripe: "wdUpDiag" });
|
|
1048
|
-
var PATTERN_TILE_SIZE = 8;
|
|
1049
|
-
var MEASURED = {
|
|
1050
|
-
pct5: "#......./......../......../......../....#.../......../......../........",
|
|
1051
|
-
pct10: "#......./......../....#.../......../#......./......../....#.../........",
|
|
1052
|
-
pct20: "#...#.../......../..#...#./......../#...#.../......../..#...#./........",
|
|
1053
|
-
pct25: "#...#.../..#...#./#...#.../..#...#./#...#.../..#...#./#...#.../..#...#.",
|
|
1054
|
-
pct30: "#.#.#.#./.#...#../#.#.#.#./...#...#/#.#.#.#./.#...#../#.#.#.#./...#...#",
|
|
1055
|
-
pct40: "#.#.#.#./.#.#.#.#/#.#.#.#./.#.#...#/#.#.#.#./.#.#.#.#/#.#.#.#./...#.#.#",
|
|
1056
|
-
pct50: "#.#.#.#./.#.#.#.#/#.#.#.#./.#.#.#.#/#.#.#.#./.#.#.#.#/#.#.#.#./.#.#.#.#",
|
|
1057
|
-
pct60: "###.###./.#.#.#.#/#.###.##/.#.#.#.#/###.###./.#.#.#.#/#.###.##/.#.#.#.#",
|
|
1058
|
-
pct70: ".###.###/##.###.#/.###.###/##.###.#/.###.###/##.###.#/.###.###/##.###.#",
|
|
1059
|
-
pct75: ".###.###/########/##.###.#/########/.###.###/########/##.###.#/########",
|
|
1060
|
-
pct80: "###.####/########/#######./########/###.####/########/#######./########",
|
|
1061
|
-
pct90: "########/########/########/####.###/########/########/########/.#######",
|
|
1062
|
-
horz: "########/......../......../......../......../......../......../........",
|
|
1063
|
-
vert: "#......./#......./#......./#......./#......./#......./#......./#.......",
|
|
1064
|
-
ltHorz: "########/......../......../......../########/......../......../........",
|
|
1065
|
-
ltVert: "#...#.../#...#.../#...#.../#...#.../#...#.../#...#.../#...#.../#...#...",
|
|
1066
|
-
dkHorz: "########/########/......../......../########/########/......../........",
|
|
1067
|
-
dkVert: "##..##../##..##../##..##../##..##../##..##../##..##../##..##../##..##..",
|
|
1068
|
-
narHorz: "########/......../########/......../########/......../########/........",
|
|
1069
|
-
narVert: ".#.#.#.#/.#.#.#.#/.#.#.#.#/.#.#.#.#/.#.#.#.#/.#.#.#.#/.#.#.#.#/.#.#.#.#",
|
|
1070
|
-
dashHorz: "####..../......../......../......../....####/......../......../........",
|
|
1071
|
-
dashVert: "#......./#......./#......./#......./....#.../....#.../....#.../....#...",
|
|
1072
|
-
cross: "########/#......./#......./#......./#......./#......./#......./#.......",
|
|
1073
|
-
dnDiag: "#......./.#....../..#...../...#..../....#.../.....#../......#./.......#",
|
|
1074
|
-
upDiag: ".......#/......#./.....#../....#.../...#..../..#...../.#....../#.......",
|
|
1075
|
-
ltDnDiag: "#...#.../.#...#../..#...#./...#...#/#...#.../.#...#../..#...#./...#...#",
|
|
1076
|
-
ltUpDiag: "...#...#/..#...#./.#...#../#...#.../...#...#/..#...#./.#...#../#...#...",
|
|
1077
|
-
dkDnDiag: "##..##../.##..##./..##..##/#..##..#/##..##../.##..##./..##..##/#..##..#",
|
|
1078
|
-
dkUpDiag: "..##..##/.##..##./##..##../#..##..#/..##..##/.##..##./##..##../#..##..#",
|
|
1079
|
-
wdDnDiag: "##.....#/###...../.###..../..###.../...###../....###./.....###/#.....##",
|
|
1080
|
-
wdUpDiag: "#.....##/.....###/....###./...###../..###.../.###..../###...../##.....#",
|
|
1081
|
-
dashDnDiag: "......../......../#...#.../.#...#../..#...#./...#...#/......../........",
|
|
1082
|
-
dashUpDiag: "......../......../...#...#/..#...#./.#...#../#...#.../......../........",
|
|
1083
|
-
diagCross: "#......#/.#....#./..#..#../...##.../...##.../..#..#../.#....#./#......#",
|
|
1084
|
-
smCheck: "#..##..#/.##..##./.##..##./#..##..#/#..##..#/.##..##./.##..##./#..##..#",
|
|
1085
|
-
lgCheck: "####..../####..../####..../####..../....####/....####/....####/....####",
|
|
1086
|
-
smGrid: "########/#...#.../#...#.../#...#.../########/#...#.../#...#.../#...#...",
|
|
1087
|
-
lgGrid: "########/#......./#......./#......./#......./#......./#......./#.......",
|
|
1088
|
-
dotGrid: "#.#.#.#./......../#......./......../#......./......../#......./........",
|
|
1089
|
-
smConfetti: "#......./....#.../.#....../......#./...#..../.......#/..#...../.....#..",
|
|
1090
|
-
lgConfetti: "#.##...#/..##..../......##/...##.##/##.##.../##....../....##../#...##.#",
|
|
1091
|
-
horzBrick: "########/#......./#......./#......./########/....#.../....#.../....#...",
|
|
1092
|
-
diagBrick: ".......#/......#./.....#../....#.../...##.../..#..#../.#....#./#......#",
|
|
1093
|
-
solidDmnd: "...#..../..###.../.#####../#######./.#####../..###.../...#..../........",
|
|
1094
|
-
openDmnd: "#.....#./.#...#../..#.#.../...#..../..#.#.../.#...#../#.....#./.......#",
|
|
1095
|
-
dotDmnd: "#......./......../..#...#./......../....#.../......../..#...#./........",
|
|
1096
|
-
plaid: "#.#.#.#./.#.#.#.#/#.#.#.#./.#.#.#.#/####..../####..../####..../####....",
|
|
1097
|
-
sphere: ".###.###/#...#..#/#...####/#...####/.###.###/#..##.../#####.../#####...",
|
|
1098
|
-
weave: "#...#.../.#.#.#../..#...#./.#...#.#/#...#.../...#.#../..#...#./.#.#...#",
|
|
1099
|
-
divot: "......../...#..../....#.../...#..../......../#......./.......#/#.......",
|
|
1100
|
-
shingle: "......##/#....#../.#..#.../..##..../....##../......#./.......#/.......#",
|
|
1101
|
-
wave: "......../...##.../..#..#.#/##....../......../...##.../..#..#.#/##......",
|
|
1102
|
-
trellis: "########/.##..##./########/#..##..#/########/.##..##./########/#..##..#",
|
|
1103
|
-
zigZag: "#......#/.#....#./..#..#../...##.../#......#/.#....#./..#..#../...##..."
|
|
1104
|
-
};
|
|
1105
|
-
function rows(preset) {
|
|
1106
|
-
const art = MEASURED[preset];
|
|
1107
|
-
if (!art) return void 0;
|
|
1108
|
-
return art.split("/").map((row) => [...row].reduce((bits, cell, index) => cell === "#" ? bits | 128 >> index : bits, 0));
|
|
1109
|
-
}
|
|
1110
|
-
var BITMAPS = /* @__PURE__ */ new Map();
|
|
1111
|
-
for (const preset of PATTERN_PRESETS) {
|
|
1112
|
-
const bitmap = rows(preset);
|
|
1113
|
-
if (bitmap) BITMAPS.set(preset, Object.freeze(bitmap));
|
|
1114
|
-
}
|
|
1115
|
-
function resolvePatternPreset(preset) {
|
|
1116
|
-
if (typeof preset !== "string") return void 0;
|
|
1117
|
-
if (BITMAPS.has(preset)) return preset;
|
|
1118
|
-
return Object.hasOwn(PATTERN_PRESET_ALIASES, preset) ? PATTERN_PRESET_ALIASES[preset] : void 0;
|
|
1119
|
-
}
|
|
1120
|
-
function patternBitmap(preset) {
|
|
1121
|
-
const resolved = resolvePatternPreset(preset);
|
|
1122
|
-
return resolved === void 0 ? void 0 : BITMAPS.get(resolved);
|
|
1123
|
-
}
|
|
1124
|
-
function patternRuns(preset) {
|
|
1125
|
-
const bitmap = patternBitmap(preset);
|
|
1126
|
-
if (!bitmap) return void 0;
|
|
1127
|
-
const runs = [];
|
|
1128
|
-
bitmap.forEach((row, y) => {
|
|
1129
|
-
for (let x = 0; x < 8; x++) {
|
|
1130
|
-
if (!(row & 128 >> x)) continue;
|
|
1131
|
-
const start = x;
|
|
1132
|
-
while (x + 1 < 8 && row & 128 >> x + 1) x++;
|
|
1133
|
-
runs.push({ x: start, y, width: x - start + 1 });
|
|
1134
|
-
}
|
|
695
|
+
if (slideDesign.fontScheme !== void 0 || slideDesign.theme !== void 0 && design.fontScheme === void 0) schemeDesigns.push(index);
|
|
696
|
+
}
|
|
697
|
+
if (options.perSlide)
|
|
698
|
+
perSlide.push({
|
|
699
|
+
index,
|
|
700
|
+
id,
|
|
701
|
+
title,
|
|
702
|
+
layout: layout2,
|
|
703
|
+
section: section === "" ? null : section,
|
|
704
|
+
hidden: slide.hidden === true,
|
|
705
|
+
payloads: KIND_ORDER.filter((kind) => kinds.has(kind)),
|
|
706
|
+
words: { content: slideTally.words, notes: noteWords },
|
|
707
|
+
hasNotes,
|
|
708
|
+
speakingSeconds: Math.round(noteWords / wordsPerMinute * 60),
|
|
709
|
+
images: slideImages,
|
|
710
|
+
charts: slideCharts,
|
|
711
|
+
tables: slideTables,
|
|
712
|
+
citations: slideTally.citations
|
|
713
|
+
});
|
|
1135
714
|
});
|
|
1136
|
-
|
|
715
|
+
if (isRecord(deck.extensions)) for (const key of Object.keys(deck.extensions)) extensions.add(key);
|
|
716
|
+
const datasetItems = datasetRecords.map(([id, value]) => ({
|
|
717
|
+
id,
|
|
718
|
+
title: str(value.title),
|
|
719
|
+
columns: Array.isArray(value.columns) ? value.columns.length : 0,
|
|
720
|
+
rows: Array.isArray(value.rows) ? value.rows.length : 0,
|
|
721
|
+
source: isRecord(value.source) ? str(value.source.src) : null,
|
|
722
|
+
referencedBy: datasetUse.get(id) ?? 0
|
|
723
|
+
}));
|
|
724
|
+
const references = Array.isArray(deck.references) ? deck.references.filter(isRecord) : [];
|
|
725
|
+
const referenceIds = references.map((entry) => str(entry.id)).filter((entry) => entry !== null);
|
|
726
|
+
const cited = referenceIds.filter((entry) => total.cited.has(entry));
|
|
727
|
+
const variables = listVariables(deck, isRecord(options.values) ? options.values : {});
|
|
728
|
+
const byKind = /* @__PURE__ */ new Map();
|
|
729
|
+
for (const variable of variables) bump(byKind, variable.kind);
|
|
730
|
+
const variableFacts = {
|
|
731
|
+
declared: variables.length,
|
|
732
|
+
byKind: sortedCounts(byKind),
|
|
733
|
+
required: variables.filter((variable) => variable.required).length,
|
|
734
|
+
optional: variables.filter((variable) => !variable.required).length,
|
|
735
|
+
filled: variables.filter((variable) => variable.filled).length,
|
|
736
|
+
unfilled: variables.filter((variable) => !variable.filled).map((variable) => variable.id),
|
|
737
|
+
unfilledRequired: variables.filter((variable) => !variable.filled && variable.required).map((variable) => variable.id),
|
|
738
|
+
unused: variables.filter((variable) => variable.uses.length === 0).map((variable) => variable.id)
|
|
739
|
+
};
|
|
740
|
+
const families = new Set(total.families), schemeIds = /* @__PURE__ */ new Set(), unresolved = /* @__PURE__ */ new Set();
|
|
741
|
+
const addScheme = (slideIndex) => {
|
|
742
|
+
const resolved = resolveDesignRecords(deck, slideIndex, catalogs);
|
|
743
|
+
for (const diagnostic of resolved.diagnostics) if (diagnostic.kind === "fontSchemes") unresolved.add(diagnostic.reference);
|
|
744
|
+
if (resolved.fontSchemeReference !== void 0) schemeIds.add(resolved.fontSchemeReference);
|
|
745
|
+
const scheme = resolved.fontScheme;
|
|
746
|
+
const named = resolveFontFamilies(scheme);
|
|
747
|
+
families.add(named.heading);
|
|
748
|
+
families.add(named.body);
|
|
749
|
+
if (scheme.code !== void 0) families.add(named.code);
|
|
750
|
+
if (named.accent) families.add(named.accent);
|
|
751
|
+
};
|
|
752
|
+
for (const entry of schemeDesigns) addScheme(entry);
|
|
753
|
+
const catalogGroups = {};
|
|
754
|
+
if (isRecord(deck.catalogs))
|
|
755
|
+
for (const group of Object.keys(deck.catalogs).sort()) {
|
|
756
|
+
const entry = deck.catalogs[group];
|
|
757
|
+
if (!isRecord(entry)) continue;
|
|
758
|
+
const records = {};
|
|
759
|
+
for (const kind of catalogKinds) if (isRecord(entry[kind])) records[kind] = Object.keys(entry[kind]).length;
|
|
760
|
+
catalogGroups[group] = { source: str(entry.source), records };
|
|
761
|
+
}
|
|
762
|
+
const colorVariables = variables.filter((variable) => variable.kind === "color").map((variable) => ({ id: variable.id, value: typeof variable.value === "string" ? variable.value : null, uses: variable.uses.length }));
|
|
763
|
+
const contentMean = slides.length ? decimals(contentWords / slides.length, 1) : 0;
|
|
764
|
+
const result = {
|
|
765
|
+
deck: deckFacts,
|
|
766
|
+
people: { organizations, speakers },
|
|
767
|
+
slides: {
|
|
768
|
+
total: slides.length,
|
|
769
|
+
hidden,
|
|
770
|
+
withTitle,
|
|
771
|
+
withoutTitle: slides.length - withTitle,
|
|
772
|
+
withBeat,
|
|
773
|
+
sections,
|
|
774
|
+
unsectioned,
|
|
775
|
+
layouts: sortedCounts(layouts),
|
|
776
|
+
withoutLayout,
|
|
777
|
+
withOwnDesign
|
|
778
|
+
},
|
|
779
|
+
payloads: payloadCounts,
|
|
780
|
+
words: {
|
|
781
|
+
content: contentWords,
|
|
782
|
+
notes: notesWords,
|
|
783
|
+
total: contentWords + notesWords,
|
|
784
|
+
perSlide: { min: contentPerSlide.length ? Math.min(...contentPerSlide) : 0, max: contentPerSlide.length ? Math.max(...contentPerSlide) : 0, mean: contentMean }
|
|
785
|
+
},
|
|
786
|
+
notes: { withNotes, withoutNotes },
|
|
787
|
+
speakingTime: { basis: "estimate", wordsPerMinute, notesWords, minutes: decimals(notesWords / wordsPerMinute, 1), declaredMinutes: deckFacts.declaredMinutes },
|
|
788
|
+
images,
|
|
789
|
+
charts: { total: chartTotal, byType: sortedCounts(chartTypes), data: chartData },
|
|
790
|
+
tables: { total: tableItems.length, datasetBacked: datasetBackedTables, rows: tableRows, columns: tableColumns, items: tableItems },
|
|
791
|
+
datasets: { count: datasetItems.length, withSource: datasetItems.filter((item) => item.source !== null).length, items: datasetItems },
|
|
792
|
+
citations: { references: references.length, cited, citations: total.citations, footnotes: total.footnotes, captions, links: total.links },
|
|
793
|
+
variables: variableFacts,
|
|
794
|
+
assets: { registry: registryFacts, uses, embeddedBytes: embeddedTotal },
|
|
795
|
+
headerFooter: {
|
|
796
|
+
header: furniture(design.header),
|
|
797
|
+
footer: furniture(design.footer),
|
|
798
|
+
slides: { headerOverrides: headerOverrides.header, headerSuppressed: headerOverrides.headerSuppressed, footerOverrides: headerOverrides.footer, footerSuppressed: headerOverrides.footerSuppressed }
|
|
799
|
+
},
|
|
800
|
+
fonts: { families: sorted(families), schemeIds: sorted(schemeIds), unresolvedSchemeIds: sorted(unresolved), runOverrides: sorted(total.families) },
|
|
801
|
+
colors: { variables: colorVariables },
|
|
802
|
+
extensions: sorted(extensions),
|
|
803
|
+
catalogs: catalogGroups
|
|
804
|
+
};
|
|
805
|
+
if (options.perSlide) result.perSlide = perSlide;
|
|
806
|
+
return result;
|
|
1137
807
|
}
|
|
1138
808
|
|
|
1139
|
-
export {
|
|
809
|
+
export { OPFMoveToCustomError, copySlides, embed, moveToCustom, sameRecord, stats, updateFromCatalog };
|