@openpresentation/opf 0.14.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 +24 -38
- 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-XOZ4KMSR.js → catalog.js} +16514 -8800
- package/dist/{chart-data-B_3z9VTb.d.ts → chart-data-BnNqgnC-.d.ts} +1 -1
- package/dist/{chunk-LS2FMPI5.js → chunk-2CJPC4HI.js} +760 -851
- package/dist/{chunk-4VJDTF55.js → chunk-374R35TJ.js} +1 -1
- package/dist/{chunk-UPQQD7MA.js → chunk-3JG4YXWF.js} +7 -5
- package/dist/{chunk-4LDGKLUC.js → chunk-3RKB4RDJ.js} +1 -1
- package/dist/{chunk-BFLVSVA7.js → chunk-5FTUIDUH.js} +1 -1
- package/dist/{chunk-D3TY4TT6.js → chunk-HXHOZ7AH.js} +1407 -154
- package/dist/{chunk-6OXY2CP3.js → chunk-O744SXXA.js} +319 -162
- package/dist/{chunk-JDJBDYSR.js → chunk-QDI75P2M.js} +194 -846
- package/dist/chunk-SPFV27O5.js +210 -0
- package/dist/chunk-TRDXRRQK.js +17 -0
- package/dist/{chunk-Z65B2B77.js → chunk-TWQJLI6E.js} +2 -2
- package/dist/{chunk-Q2TCMN56.js → chunk-U4J75TRG.js} +1 -1
- package/dist/{chunk-XIZUK2XM.js → chunk-UBFJ2QHH.js} +5 -3
- package/dist/{chunk-CSQHPVGL.js → chunk-VGAOJEY7.js} +1 -1
- package/dist/{chunk-5ZU6JAPP.js → chunk-ZPU46TFA.js} +1 -1
- package/dist/{composition-_WEwBe2a.d.ts → composition-D2tghM82.d.ts} +233 -108
- package/dist/composition.d.ts +3 -2
- package/dist/composition.js +2 -2
- package/dist/convert.d.ts +14 -17
- package/dist/convert.js +36 -39
- package/dist/data.d.ts +1 -1
- package/dist/data.js +3 -3
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +7 -7
- package/dist/docs.js +29 -29
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +48431 -3697
- package/dist/{finding-C_por275.d.ts → finding-CT_f_vbD.d.ts} +2 -2
- package/dist/format.js +2 -2
- package/dist/index.d.ts +225 -76
- package/dist/index.js +341 -258
- package/dist/json-BFSdESOE.d.ts +19 -0
- package/dist/markdown.d.ts +19 -7
- package/dist/markdown.js +9 -9
- package/dist/{pagination-BZpXLvFL.d.ts → pagination-wedbe7eq.d.ts} +31 -31
- package/dist/pagination.d.ts +4 -5
- package/dist/pagination.js +6 -6
- package/dist/patch.d.ts +1 -1
- package/dist/patch.js +6 -6
- package/dist/{presentation-C5eHkevA.d.ts → presentation-CDKQVkyI.d.ts} +382 -550
- 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 +1 -1
- package/dist/spec/catalogs/font-schemes/angsana-new.json +1 -1
- package/dist/spec/catalogs/font-schemes/aparajita.json +2 -2
- package/dist/spec/catalogs/font-schemes/arabic-typesetting.json +1 -1
- package/dist/spec/catalogs/font-schemes/batang.json +1 -1
- package/dist/spec/catalogs/font-schemes/daunpenh.json +1 -1
- package/dist/spec/catalogs/font-schemes/david.json +1 -1
- package/dist/spec/catalogs/font-schemes/dilleniaupc.json +1 -1
- package/dist/spec/catalogs/font-schemes/fangsong.json +1 -1
- package/dist/spec/catalogs/font-schemes/gautami.json +1 -1
- package/dist/spec/catalogs/font-schemes/gisha.json +2 -2
- package/dist/spec/catalogs/font-schemes/gungsuh.json +1 -1
- package/dist/spec/catalogs/font-schemes/index.json +1 -1
- package/dist/spec/catalogs/font-schemes/kalinga.json +1 -1
- package/dist/spec/catalogs/font-schemes/kartika.json +1 -1
- package/dist/spec/catalogs/font-schemes/khmer-ui.json +1 -1
- package/dist/spec/catalogs/font-schemes/latha.json +1 -1
- package/dist/spec/catalogs/font-schemes/malgun-gothic.json +1 -1
- package/dist/spec/catalogs/font-schemes/mangal.json +3 -3
- package/dist/spec/catalogs/font-schemes/meiryo.json +1 -1
- package/dist/spec/catalogs/font-schemes/microsoft-jhenghei.json +1 -1
- package/dist/spec/catalogs/font-schemes/microsoft-yahei.json +4 -4
- package/dist/spec/catalogs/font-schemes/mingliu.json +1 -1
- package/dist/spec/catalogs/font-schemes/miriam.json +1 -1
- package/dist/spec/catalogs/font-schemes/ms-mincho.json +1 -1
- package/dist/spec/catalogs/font-schemes/nirmala-ui.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-naksh-arabic.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-nastaliq-urdu.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-arabic.json +3 -3
- package/dist/spec/catalogs/font-schemes/noto-sans-armenian.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-bengali.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-devangari.json +2 -2
- package/dist/spec/catalogs/font-schemes/noto-sans-ethiopic.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-georgian.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-gujarati.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-gurmukhi.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-hebrew.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-jp.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-kannada.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-khmer.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-kr.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-malayalam.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-mongolian.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-oriya.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-sc.json +4 -4
- package/dist/spec/catalogs/font-schemes/noto-sans-tamil.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-tc.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-telugu.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans-thai.json +1 -1
- package/dist/spec/catalogs/font-schemes/noto-sans.json +4 -4
- package/dist/spec/catalogs/font-schemes/nyala.json +1 -1
- package/dist/spec/catalogs/font-schemes/pmingliu.json +1 -1
- package/dist/spec/catalogs/font-schemes/raavi.json +1 -1
- package/dist/spec/catalogs/font-schemes/sakkal-majalla.json +3 -3
- package/dist/spec/catalogs/font-schemes/shonar-bangla.json +2 -2
- package/dist/spec/catalogs/font-schemes/shruti.json +1 -1
- package/dist/spec/catalogs/font-schemes/simsun.json +1 -1
- package/dist/spec/catalogs/font-schemes/sylfaen.json +2 -2
- package/dist/spec/catalogs/font-schemes/traditional-arabic.json +3 -3
- package/dist/spec/catalogs/font-schemes/tunga.json +1 -1
- package/dist/spec/catalogs/font-schemes/vrinda.json +1 -1
- package/dist/spec/catalogs/font-schemes/yu-gothic.json +1 -1
- package/dist/spec/catalogs/layouts/capability-map.json +1 -4
- package/dist/spec/catalogs/layouts/chart-1x-title-center.json +30 -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-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/competitive-landscape.json +1 -4
- package/dist/spec/catalogs/layouts/customer-journey.json +1 -4
- package/dist/spec/catalogs/layouts/decision-tree.json +1 -4
- package/dist/spec/catalogs/layouts/ecosystem-map.json +1 -4
- package/dist/spec/catalogs/layouts/extract/canonical.json +0 -9
- package/dist/spec/catalogs/layouts/geographic-map.json +1 -4
- package/dist/spec/catalogs/layouts/icon-grid.json +1 -4
- 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 +3 -0
- 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 +3 -0
- 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 +3 -0
- package/dist/spec/catalogs/layouts/image-focus.json +3 -6
- 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/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-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-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-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-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-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/network-dependency-map.json +1 -4
- 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-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-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-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-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-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/persona-grid.json +1 -4
- package/dist/spec/catalogs/layouts/photo-grid.json +1 -4
- package/dist/spec/catalogs/layouts/product-feature.json +1 -4
- package/dist/spec/catalogs/layouts/screenshot-walkthrough.json +1 -4
- package/dist/spec/catalogs/layouts/swimlane-process.json +1 -4
- package/dist/spec/catalogs/layouts/team-bio.json +1 -4
- 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-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-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/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/manifest.json +18 -18
- package/dist/spec/catalogs/narratives/heros-journey.json +1 -1
- package/dist/spec/catalogs/narratives/index.json +1 -1
- package/dist/spec/openapi.yaml +3 -3
- 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 +5 -26
- package/dist/spec/schemas/catalog-manifest.schema.json +3 -3
- package/dist/spec/schemas/chart-type.schema.json +2 -35
- package/dist/spec/schemas/color-scheme.schema.json +3 -24
- package/dist/spec/schemas/finding.schema.json +1 -1
- package/dist/spec/schemas/font-scheme.schema.json +6 -37
- package/dist/spec/schemas/language.schema.json +7 -28
- package/dist/spec/schemas/layout.schema.json +56 -51
- package/dist/spec/schemas/narrative.schema.json +4 -24
- package/dist/spec/schemas/opf.schema.json +399 -368
- package/dist/spec/schemas/purpose.schema.json +5 -26
- package/dist/spec/schemas/social-platform.schema.json +2 -23
- package/dist/spec/schemas/theme.schema.json +9 -37
- 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/types.d.ts +1125 -4
- package/dist/{validation-types-zh03LeZy.d.ts → validation-types-BOcY9GTs.d.ts} +7 -7
- package/dist/validator.d.ts +15 -12
- package/dist/validator.js +5 -5
- package/dist/yaml.d.ts +22 -7
- package/dist/yaml.js +10 -9
- package/package.json +5 -9
- package/dist/catalogs-D-yyQWCQ.d.ts +0 -1343
- package/dist/catalogs.d.ts +0 -2
- package/dist/catalogs.js +0 -2
- package/dist/chunk-PIQXLBBJ.js +0 -445
- package/dist/chunk-S5W34SIJ.js +0 -1
- package/dist/previews.d.ts +0 -40
- package/dist/previews.js +0 -1
- package/dist/schemas-DDpqAgyS.d.ts +0 -284
- package/dist/spec/catalogs/layouts/image-bleed.json +0 -20
package/README.md
CHANGED
|
@@ -29,14 +29,8 @@ Requires Node 22 or later (`engines.node` `>=22`) from the release after 0.12.1.
|
|
|
29
29
|
Use the common root API for most application code:
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
|
-
import {
|
|
33
|
-
|
|
34
|
-
audiences,
|
|
35
|
-
tones,
|
|
36
|
-
catalogs,
|
|
37
|
-
validate,
|
|
38
|
-
validateCatalogRecord,
|
|
39
|
-
} from "@openpresentation/opf";
|
|
32
|
+
import { presentation, validate, embed } from "@openpresentation/opf";
|
|
33
|
+
import { defaultCatalog } from "@openpresentation/opf/catalog";
|
|
40
34
|
|
|
41
35
|
import type { Presentation } from "@openpresentation/opf";
|
|
42
36
|
|
|
@@ -46,34 +40,32 @@ const deck: Presentation = {
|
|
|
46
40
|
};
|
|
47
41
|
|
|
48
42
|
console.log(presentation.$id);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log(
|
|
52
|
-
|
|
43
|
+
// Register the catalogs your host trusts; core itself ships no records in its main entry.
|
|
44
|
+
const catalogs = [defaultCatalog];
|
|
45
|
+
console.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs }).valid);
|
|
46
|
+
// Save with every record the deck uses embedded, so it renders the same with no catalog registered.
|
|
47
|
+
const saved = embed({ ...deck, design: { theme: "classic" } }, { catalogs }).document;
|
|
48
|
+
console.log(Object.keys(saved.catalogs.default.themes)); // ["classic"]
|
|
49
|
+
console.log(Object.keys(defaultCatalog.tones));
|
|
53
50
|
```
|
|
54
51
|
|
|
55
52
|
Use focused imports when you only need one surface:
|
|
56
53
|
|
|
57
54
|
```ts
|
|
58
55
|
import { presentation, audience } from "@openpresentation/opf/schemas";
|
|
59
|
-
import {
|
|
56
|
+
import { defaultCatalog, catalogDisplay, layoutPreviews, getLayoutPreview, hasLayoutPreview } from "@openpresentation/opf/catalog";
|
|
60
57
|
import { specFileEntries } from "@openpresentation/opf/spec-files";
|
|
61
58
|
import { validate, assertValid, validationRules } from "@openpresentation/opf/validator";
|
|
62
|
-
import {
|
|
63
|
-
layoutPreviews,
|
|
64
|
-
getLayoutPreview,
|
|
65
|
-
hasLayoutPreview,
|
|
66
|
-
} from "@openpresentation/opf/previews";
|
|
67
59
|
import type { Presentation, Audience, Tone } from "@openpresentation/opf/types";
|
|
68
60
|
```
|
|
69
61
|
|
|
70
|
-
The root entry holds the application-level API: schemas,
|
|
62
|
+
The root entry holds the application-level API: schemas, catalog references and their resolution (`resolveReference`, `embed`, `copySlides`, `updateFromCatalog`), validation, variables, pagination, data helpers, font policy, `stats` and `resolveSlideContext`. It carries no catalog records: the pinned pptx.gallery snapshot is the opt-in `@openpresentation/opf/catalog` (`defaultCatalog`, display metadata and layout previews), and every entry point that resolves references takes `{ catalogs }`, the catalogs the host registered; the first one is the default for documents that omit `catalogs.default`. See [catalogs and the default catalog](../../docs/default-catalog.md).
|
|
71
63
|
|
|
72
64
|
The layout engine's names are not on the root. `composeSlide`, `fitText`, `layoutQuote` and the other `layoutX`/`fitX` functions, numbering, footnotes and citations, colour contrast, code syntax, pattern fills, metric trends, chart options, script fonts and text direction come from `@openpresentation/opf/composition`; the symbol-font tables come from `@openpresentation/opf/symbol-font-encodings`.
|
|
73
65
|
|
|
74
66
|
### Facts, slide context and the fonts handle
|
|
75
67
|
|
|
76
|
-
`stats(presentation, options?)` reports neutral facts about a deck (structure, words, notes, images, charts, tables, datasets, citations, variables, assets, fonts) without composing, measuring or validating; see [the stats guide](../../docs/stats.md). `resolveSlideContext(presentation, index, { fonts })` resolves one slide's canvas, layout, theme and font families (slide design, then deck design, then theme, then the
|
|
68
|
+
`stats(presentation, options?)` reports neutral facts about a deck (structure, words, notes, images, charts, tables, datasets, citations, variables, assets, fonts) without composing, measuring or validating; see [the stats guide](../../docs/stats.md). `resolveSlideContext(presentation, index, { fonts, catalogs })` resolves one slide's canvas, layout, theme and font families (slide design, then deck design, then theme, then the engine defaults) into the `ComposeSlideOptions` that `composeSlide` takes, with one `unresolved-reference` diagnostic per reference that resolves nowhere (`strictReferences: true` throws `OPFUnresolvedReferenceError` instead). Deck-level verbs take `{ fonts }`, a handle whose `textMeasurement` is how wide the host's real fonts draw text (`paginate(deck, { fonts })`); the renderer's font loader returns a richer handle that extends it. `composeSlide` itself is engine-level and takes `textMeasurement` and `fontFamilies` (`{ heading, body, code, accent? }`) directly.
|
|
77
69
|
|
|
78
70
|
### Content conversions
|
|
79
71
|
|
|
@@ -89,7 +81,7 @@ The layout engine's names are not on the root. `composeSlide`, `fitText`, `layou
|
|
|
89
81
|
|
|
90
82
|
### Validate (0.14.0)
|
|
91
83
|
|
|
92
|
-
`validate(input, options?)` is the one checker, from the root and from `@openpresentation/opf/validator`. `input` is a parsed presentation or strict JSON text; the result is a `ValidationReport` whose `findings` (the shared `Finding` format, `spec/schemas/finding.schema.json`) each have a stable `opf/<rule>` id, a severity and one of six categories: `format` (JSON syntax, duplicate keys, schema), `references` (catalog
|
|
84
|
+
`validate(input, options?)` is the one checker, from the root and from `@openpresentation/opf/validator`. `input` is a parsed presentation or strict JSON text; the result is a `ValidationReport` whose `findings` (the shared `Finding` format, `spec/schemas/finding.schema.json`) each have a stable `opf/<rule>` id, a severity and one of six categories: `format` (JSON syntax, duplicate keys, schema), `references` (catalog references, assets, citations, datasets), `policy` (host `contracts`), `accessibility` (contrast, alt text, reading order, links), `layout` (overflow, type size, image resolution, fonts) and `content` (placeholders, empty slides, non-numeric chart cells). `valid` means no finding has severity `error`, which by default only `format`, `references` and `policy` findings can have. Text input adds line and column; `only`, `ignore` and `severity` pick and promote rules or categories; composition is lazy, so `validate(deck, { only: ["format"] })` costs what a schema check costs. Read-only and deterministic: no remote resources are fetched. See [the validate guide](../../docs/validate.md). A clean report does not certify layout, fonts, or native export fidelity.
|
|
93
85
|
|
|
94
86
|
### Patch, diff, merge and format (0.12.0)
|
|
95
87
|
|
|
@@ -97,14 +89,14 @@ Added in 0.12.0 (not in 0.11.4 or earlier): `@openpresentation/opf/patch` is the
|
|
|
97
89
|
|
|
98
90
|
### Layout previews
|
|
99
91
|
|
|
100
|
-
`@openpresentation/opf/
|
|
92
|
+
`@openpresentation/opf/catalog` ships pre-rendered HTML thumbnails for the
|
|
101
93
|
slide layouts catalogued at pptx.gallery. Each preview is a Tailwind-styled
|
|
102
94
|
fragment sized to fill a 16:9 container and only depends on the standard
|
|
103
95
|
`--background`, `--foreground`, `--card`, `--muted`, `--muted-foreground`,
|
|
104
96
|
`--accent`, and `--border` CSS variables.
|
|
105
97
|
|
|
106
98
|
```tsx
|
|
107
|
-
import { getLayoutPreview } from "@openpresentation/opf/
|
|
99
|
+
import { getLayoutPreview } from "@openpresentation/opf/catalog";
|
|
108
100
|
|
|
109
101
|
export function LayoutThumbnail({ slug }: { slug: string }) {
|
|
110
102
|
const html = getLayoutPreview(slug);
|
|
@@ -179,14 +171,13 @@ console.log(repoReadme.split("\n").slice(0, 3).join("\n"));
|
|
|
179
171
|
|
|
180
172
|
Validation reports carry `findings`. A finding with severity `error` is a
|
|
181
173
|
structural problem that makes `valid` false; `warning` and `info` findings are
|
|
182
|
-
advisory, such as
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
unless the host loads the source's records and passes them as `catalogs`.
|
|
174
|
+
advisory, such as a `narrative`, `design` or `layout` reference that resolves
|
|
175
|
+
nowhere (`opf/unresolved-reference`) or a missing alt text. A reference resolves
|
|
176
|
+
in the records the document embeds (`catalogs.custom`, `catalogs.default`, named
|
|
177
|
+
groups), then in the catalogs the host registered with `{ catalogs }`.
|
|
187
178
|
|
|
188
179
|
```ts
|
|
189
|
-
const report = validate(deck);
|
|
180
|
+
const report = validate(deck, { catalogs: [defaultCatalog] });
|
|
190
181
|
if (!report.valid) console.error(report.findings.filter((finding) => finding.severity === "error"));
|
|
191
182
|
for (const finding of report.findings) console.warn(finding.ruleId, finding.path, finding.message);
|
|
192
183
|
```
|
|
@@ -221,16 +212,11 @@ const openApi = specFileEntries.find((entry) => entry.path === "openapi.yaml");
|
|
|
221
212
|
console.log(openApi?.packagePath);
|
|
222
213
|
```
|
|
223
214
|
|
|
224
|
-
|
|
215
|
+
The snapshot's raw record files stay package-addressable (`@openpresentation/opf/spec/catalogs/<kind>/<id>.json`) for tools that read published records; documents never point at them. A host registers the catalog instead:
|
|
225
216
|
|
|
226
|
-
```
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
"narratives": {
|
|
230
|
-
"source": "pkg:@openpresentation/opf/spec/catalogs/narratives"
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
217
|
+
```js
|
|
218
|
+
import { defaultCatalog } from "@openpresentation/opf/catalog";
|
|
219
|
+
validate(deck, { catalogs: [defaultCatalog] });
|
|
234
220
|
```
|
|
235
221
|
|
|
236
222
|
## Development
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OPF 0.15 content references and their one resolution rule (FA-20). Catalog-free: this module reads the document's
|
|
3
|
+
* own `catalogs` groups and the catalogs a host registers, never any bundled data, and it never fetches.
|
|
4
|
+
*
|
|
5
|
+
* A reference is a bare `id` or `name:id`. A bare id resolves in `catalogs.custom`, then in the records embedded
|
|
6
|
+
* under `catalogs.default`, then in the registered catalog for `default.source` (the first registered catalog when
|
|
7
|
+
* the document omits `default`; nothing when `default` is false). `name:id` resolves in `catalogs.<name>`, then in
|
|
8
|
+
* the registered catalog for its source. A reference written inside an embedded record resolves in that record's
|
|
9
|
+
* own group first.
|
|
10
|
+
*/
|
|
11
|
+
/** The content kinds a catalog group holds, keyed by id. */
|
|
12
|
+
declare const catalogKinds: readonly ["layouts", "themes", "colorSchemes", "fontSchemes", "narratives", "audiences", "purposes", "tones"];
|
|
13
|
+
type CatalogKind = (typeof catalogKinds)[number];
|
|
14
|
+
/** A content reference: a bare id or `name:id`. */
|
|
15
|
+
declare const CATALOG_REFERENCE_PATTERN: RegExp;
|
|
16
|
+
/** A catalog group name. `default` and `custom` are reserved. */
|
|
17
|
+
declare const CATALOG_GROUP_PATTERN: RegExp;
|
|
18
|
+
/** Records of one kind, keyed by id. */
|
|
19
|
+
type CatalogRecordMap = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
20
|
+
/** A catalog's records by kind, then by id: the shape of a document's `catalogs.<group>` without `source`. */
|
|
21
|
+
type CatalogRecords = {
|
|
22
|
+
readonly [K in CatalogKind]?: CatalogRecordMap;
|
|
23
|
+
};
|
|
24
|
+
/** A catalog a host registers. `source` is matched against `catalogs.<group>.source`. */
|
|
25
|
+
interface Catalog extends CatalogRecords {
|
|
26
|
+
/** The catalog's identity: an HTTPS URL or a `pkg:` reference. Never fetched. */
|
|
27
|
+
readonly source: string;
|
|
28
|
+
}
|
|
29
|
+
/** The one option every entry point that resolves references accepts. */
|
|
30
|
+
interface CatalogOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Catalogs the host registered, matched by `source`. The first is the host default: bare ids use it when the
|
|
33
|
+
* document omits `catalogs.default`. Omitted or empty: only the records the document embeds resolve.
|
|
34
|
+
*/
|
|
35
|
+
catalogs?: readonly Catalog[];
|
|
36
|
+
}
|
|
37
|
+
/** A reference that resolved. */
|
|
38
|
+
interface ResolvedReference {
|
|
39
|
+
kind: CatalogKind;
|
|
40
|
+
/** The reference as written. */
|
|
41
|
+
reference: string;
|
|
42
|
+
/** The record's key. */
|
|
43
|
+
id: string;
|
|
44
|
+
/** The group it resolved in: `custom`, `default` or a named group. */
|
|
45
|
+
group: string;
|
|
46
|
+
/** That group's source (the host default's source for an omitted `default`). */
|
|
47
|
+
source?: string;
|
|
48
|
+
/** `document` when the record is embedded, `host` when it came from a registered catalog. */
|
|
49
|
+
origin: 'document' | 'host';
|
|
50
|
+
record: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Where a resolved record came from, without the record itself: what an engine records as provenance
|
|
54
|
+
* (`resolveSlideContext().resolved.provenance`, `resolveDesignRecords().provenance`).
|
|
55
|
+
*/
|
|
56
|
+
type RecordProvenance = Omit<ResolvedReference, 'record'>;
|
|
57
|
+
/** Reported when a reference resolves nowhere. Never thrown, except under `strictReferences`. */
|
|
58
|
+
interface UnresolvedReferenceDiagnostic {
|
|
59
|
+
code: 'unresolved-reference';
|
|
60
|
+
kind: CatalogKind;
|
|
61
|
+
/** The reference as written, such as `acme:hero`. */
|
|
62
|
+
reference: string;
|
|
63
|
+
/** Where it is written, dotted: `slides.3.layout`, `design.theme`, `catalogs.acme.themes.brand.colorScheme`. */
|
|
64
|
+
path: string;
|
|
65
|
+
/** The group the reference names: its prefix, or `default` for a bare id. */
|
|
66
|
+
group: string;
|
|
67
|
+
/** That group's source, when one is known. */
|
|
68
|
+
source?: string;
|
|
69
|
+
/** What the engine uses instead: automatic composition (layouts) or the engine default record. */
|
|
70
|
+
fallback: 'automatic' | 'engine-default';
|
|
71
|
+
message: string;
|
|
72
|
+
}
|
|
73
|
+
/** Thrown by `resolveSlideContext` and `paginate` under `strictReferences` when a reference resolves nowhere. */
|
|
74
|
+
/**
|
|
75
|
+
* Thrown by every entry point that takes the `catalogs` option when it is not an array of registered catalogs
|
|
76
|
+
* (`{ source: string, <kind>: { <id>: record } }` with known kinds). `code` is always `invalid-catalogs`.
|
|
77
|
+
*/
|
|
78
|
+
declare class OPFCatalogsOptionError extends TypeError {
|
|
79
|
+
readonly code = "invalid-catalogs";
|
|
80
|
+
constructor(entry: string, detail: string);
|
|
81
|
+
}
|
|
82
|
+
declare class OPFUnresolvedReferenceError extends Error {
|
|
83
|
+
readonly diagnostics: UnresolvedReferenceDiagnostic[];
|
|
84
|
+
constructor(diagnostics: UnresolvedReferenceDiagnostic[]);
|
|
85
|
+
}
|
|
86
|
+
/** Split a reference into its group prefix and id; undefined for anything that is not a reference. */
|
|
87
|
+
declare function parseReference(reference: unknown): {
|
|
88
|
+
group?: string;
|
|
89
|
+
id: string;
|
|
90
|
+
} | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The source of group `name` as resolution uses it: the group's own `source`, or for an omitted (or source-less)
|
|
93
|
+
* `default` the first registered catalog's source. Undefined for `custom`, for `default: false` and for an
|
|
94
|
+
* undeclared named group.
|
|
95
|
+
*/
|
|
96
|
+
declare function catalogGroupSource(document: unknown, name: string, options?: CatalogOptions): string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Resolve one reference. `group` is the group of the record the reference is written in, which is searched first.
|
|
99
|
+
* Undefined when the reference is malformed, names an undeclared group or resolves nowhere.
|
|
100
|
+
*/
|
|
101
|
+
declare function resolveReference(document: unknown, kind: CatalogKind, reference: unknown, options?: CatalogOptions & {
|
|
102
|
+
group?: string;
|
|
103
|
+
}): ResolvedReference | undefined;
|
|
104
|
+
/** The diagnostic for a reference that resolves nowhere, naming the reference and the source it was looked for in. */
|
|
105
|
+
declare function unresolvedReference(document: unknown, kind: CatalogKind, reference: string, path: string, options?: CatalogOptions): UnresolvedReferenceDiagnostic;
|
|
106
|
+
/** One place a document writes a content reference. */
|
|
107
|
+
interface CatalogReferenceSite {
|
|
108
|
+
kind: CatalogKind;
|
|
109
|
+
/** The reference as written. */
|
|
110
|
+
reference: string;
|
|
111
|
+
/** JSON Pointer segments of the string. */
|
|
112
|
+
path: readonly (string | number)[];
|
|
113
|
+
/** For a reference written inside an embedded record: that record's group, searched first. */
|
|
114
|
+
group?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Every content reference a document writes, in document order: the root narrative, audience, purpose and tone, the
|
|
118
|
+
* language's font schemes, the deck and slide designs, each slide's layout, and (with `records`) the references
|
|
119
|
+
* inside embedded records. Free-form audience and purpose text is not a reference and is not listed.
|
|
120
|
+
*/
|
|
121
|
+
declare function catalogReferenceSites(document: unknown, options?: {
|
|
122
|
+
records?: boolean;
|
|
123
|
+
slides?: boolean;
|
|
124
|
+
}): CatalogReferenceSite[];
|
|
125
|
+
/** Records a picker can offer for `kind`: the document's embedded records, then those of the registered catalogs its groups name, with the reference to write for each. */
|
|
126
|
+
declare function catalogRecords(document: unknown, kind: CatalogKind, options?: CatalogOptions): ResolvedReference[];
|
|
127
|
+
|
|
128
|
+
export { type CatalogKind as C, OPFCatalogsOptionError as O, type RecordProvenance as R, type UnresolvedReferenceDiagnostic as U, type Catalog as a, type CatalogOptions as b, CATALOG_GROUP_PATTERN as c, CATALOG_REFERENCE_PATTERN as d, type CatalogRecordMap as e, type CatalogRecords as f, type CatalogReferenceSite as g, OPFUnresolvedReferenceError as h, type ResolvedReference as i, catalogGroupSource as j, catalogKinds as k, catalogRecords as l, catalogReferenceSites as m, parseReference as p, resolveReference as r, unresolvedReference as u };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { C as CatalogKind } from './catalog-refs-BSfGELpt.js';
|
|
2
|
+
import { SchemaName } from './schemas.js';
|
|
3
|
+
|
|
4
|
+
/** Kinds of catalog display metadata: published by catalogs for pickers, never referenced by documents. */
|
|
5
|
+
declare const catalogDisplayKinds: readonly ["chartTypes", "languages", "socialPlatforms"];
|
|
6
|
+
type CatalogDisplayKind = (typeof catalogDisplayKinds)[number];
|
|
7
|
+
/** Every kind of record a catalog publishes: the content kinds documents reference, and the display kinds. */
|
|
8
|
+
type CatalogRecordKind = CatalogKind | CatalogDisplayKind;
|
|
9
|
+
/** The companion schema each catalog record kind validates against. */
|
|
10
|
+
declare const catalogSchemaNames: Readonly<Record<CatalogRecordKind, SchemaName>>;
|
|
11
|
+
|
|
12
|
+
export { type CatalogDisplayKind as C, type CatalogRecordKind as a, catalogSchemaNames as b, catalogDisplayKinds as c };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { a as Catalog } from './catalog-refs-BSfGELpt.js';
|
|
2
|
+
import { C as CatalogDisplayKind } from './catalog-schemas-CinPh5WA.js';
|
|
3
|
+
import './schemas.js';
|
|
4
|
+
import './json-BFSdESOE.js';
|
|
5
|
+
|
|
6
|
+
/** A lightweight summary entry inside a catalog's `index.json`. */
|
|
7
|
+
interface CatalogIndexRecord {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly file: string;
|
|
11
|
+
readonly [key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
/** Parsed shape of a catalog's `index.json`. */
|
|
14
|
+
interface CatalogIndex {
|
|
15
|
+
readonly $schema: string;
|
|
16
|
+
/** Catalog kind as its default-catalog URL segment, e.g. `chart-types`. */
|
|
17
|
+
readonly kind?: string;
|
|
18
|
+
readonly version: string;
|
|
19
|
+
readonly description: string;
|
|
20
|
+
/** SHA-256 of the canonical JSON of the index-ordered records (see docs/default-catalog.md). */
|
|
21
|
+
readonly contentSha256?: string;
|
|
22
|
+
readonly records: readonly CatalogIndexRecord[];
|
|
23
|
+
readonly [key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface LayoutPreviewRecord {
|
|
27
|
+
/** Layout slug — matches `spec/catalogs/layouts/<id>.json` when available, and otherwise the pptx.gallery extended catalog. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** Filename relative to `spec/previews/layouts/`. */
|
|
30
|
+
file: string;
|
|
31
|
+
/** UTF-8 byte length of the HTML. */
|
|
32
|
+
bytes: number;
|
|
33
|
+
}
|
|
34
|
+
interface LayoutPreviewIndex {
|
|
35
|
+
$schema: string;
|
|
36
|
+
version: string;
|
|
37
|
+
description: string;
|
|
38
|
+
records: readonly LayoutPreviewRecord[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Static HTML for a given layout preview. Each snippet is a self-contained
|
|
42
|
+
* Tailwind-styled fragment intended to fill a 16:9 thumbnail container.
|
|
43
|
+
*
|
|
44
|
+
* The CSS variables used by the snippets are:
|
|
45
|
+
* --background, --foreground, --card, --muted, --muted-foreground,
|
|
46
|
+
* --accent, --border
|
|
47
|
+
*
|
|
48
|
+
* Consumers should apply these on a parent element (or import the
|
|
49
|
+
* pptx.gallery design tokens).
|
|
50
|
+
*/
|
|
51
|
+
declare const layoutPreviews: Readonly<Record<string, string>>;
|
|
52
|
+
/** Catalog index — the list of available preview slugs and metadata. */
|
|
53
|
+
declare const layoutPreviewIndex: LayoutPreviewIndex;
|
|
54
|
+
/** Slugs of every layout that ships an HTML preview, sorted alphabetically. */
|
|
55
|
+
declare const layoutPreviewSlugs: readonly string[];
|
|
56
|
+
/** Whether an HTML preview exists for the given slug. */
|
|
57
|
+
declare function hasLayoutPreview(slug: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Look up the HTML preview for a layout slug. Returns `undefined` for slugs
|
|
60
|
+
* with no shipped preview — callers should fall back to a generic renderer in
|
|
61
|
+
* that case. Exported from `@openpresentation/opf/catalog`.
|
|
62
|
+
*/
|
|
63
|
+
declare function getLayoutPreview(slug: string): string | undefined;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* `@openpresentation/opf/catalog`: the pinned snapshot of the default catalog pptx.gallery publishes (spec/catalogs,
|
|
67
|
+
* pinned by spec/catalogs/manifest.json), shaped for hosts to register. The only entry of the package that carries
|
|
68
|
+
* catalog data; the root and every other subpath resolve only what a document embeds and what a host registers.
|
|
69
|
+
*
|
|
70
|
+
* ```js
|
|
71
|
+
* import { defaultCatalog } from '@openpresentation/opf/catalog';
|
|
72
|
+
* validate(document, { catalogs: [defaultCatalog] });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/** The source the default catalog is registered under, and the `source` of a document's `catalogs.default`. */
|
|
77
|
+
declare const DEFAULT_CATALOG_SOURCE = "https://www.pptx.gallery";
|
|
78
|
+
/**
|
|
79
|
+
* The default catalog: every content record of the snapshot, by kind and then by id, with no `$schema` or `id` (the
|
|
80
|
+
* key is the id). Register it with every entry point that resolves references: `{ catalogs: [defaultCatalog] }`.
|
|
81
|
+
*/
|
|
82
|
+
declare const defaultCatalog: Catalog;
|
|
83
|
+
/**
|
|
84
|
+
* Display metadata for pickers: chart types, languages and social platforms by id. Documents never reference these
|
|
85
|
+
* records; chart.type, the language tag and Socials keys are engine vocabularies.
|
|
86
|
+
*/
|
|
87
|
+
declare const catalogDisplay: Readonly<Record<CatalogDisplayKind, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
|
|
88
|
+
/** Each kind's `index.json` in the snapshot: the record summaries and their content hash. */
|
|
89
|
+
declare const catalogIndexes: Readonly<Record<string, CatalogIndex>>;
|
|
90
|
+
|
|
91
|
+
export { type CatalogIndex, type CatalogIndexRecord, DEFAULT_CATALOG_SOURCE, type LayoutPreviewIndex, type LayoutPreviewRecord, catalogDisplay, catalogIndexes, defaultCatalog, getLayoutPreview, hasLayoutPreview, layoutPreviewIndex, layoutPreviewSlugs, layoutPreviews };
|