@openpresentation/opf 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -95,20 +95,29 @@ var presentation = {
95
95
  ]
96
96
  },
97
97
  "audience": {
98
- "type": "array",
99
- "items": {
100
- "oneOf": [
101
- {
102
- "type": "string"
98
+ "oneOf": [
99
+ {
100
+ "type": "string"
101
+ },
102
+ {
103
+ "type": "array",
104
+ "items": {
105
+ "oneOf": [
106
+ {
107
+ "type": "string"
108
+ },
109
+ {
110
+ "$ref": "#/$defs/Audience"
111
+ }
112
+ ]
103
113
  },
104
- {
105
- "$ref": "#/$defs/Audience"
106
- }
107
- ]
108
- },
109
- "minItems": 1,
110
- "description": "Intended audiences for the presentation. Each item accepts either:\n- A string shorthand: free-form description ('Series B investors'), an audiences catalog id ('executives'), an HTTPS URL, or a 'pkg:' reference.\n- An inline Audience object for custom audience metadata or catalog-backed overrides. Object form mirrors https://openpresentation.org/schema/opf-audience/v1 without '$schema'.\n\nResolution order for catalog ids and references: inline catalogs.audiences.records[] \u2192 catalogs.audiences.source \u2192 default catalog at https://www.pptx.gallery/audiences.",
114
+ "minItems": 1
115
+ }
116
+ ],
117
+ "description": "Intended audiences for the presentation. Accepts either:\n- A single string shorthand: free-form description ('Series B investors'), an audiences catalog id ('executives'), an HTTPS URL, or a 'pkg:' reference.\n- An array of string shorthands and/or inline Audience objects for custom audience metadata or catalog-backed overrides. Object form mirrors https://openpresentation.org/schema/opf-audience/v1 without '$schema'.\n\nResolution order for catalog ids and references: inline catalogs.audiences.records[] \u2192 catalogs.audiences.source \u2192 default catalog at https://www.pptx.gallery/audiences.",
111
118
  "examples": [
119
+ "executives",
120
+ "Biology Students and Wildlife Enthusiasts",
112
121
  [
113
122
  "executives"
114
123
  ],
@@ -2463,7 +2472,7 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
2463
2472
  "items": {
2464
2473
  "$ref": "#/$defs/ListItem"
2465
2474
  },
2466
- "description": "Full-slide generic list payload. Presence of this field infers type 'list'."
2475
+ "description": "Full-slide generic list payload. Presence of this field infers type 'list'. At slide root, multiple content payload kinds with no explicit type, blocks, or regions are accepted as shorthand for layout-agnostic blocks."
2467
2476
  },
2468
2477
  "bullets": {
2469
2478
  "type": "array",
@@ -2533,7 +2542,7 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
2533
2542
  "items": {
2534
2543
  "$ref": "#/$defs/ContentPayload"
2535
2544
  },
2536
- "description": "Layout-agnostic content blocks rendered together as a composed payload when exact placement is unspecified."
2545
+ "description": "Layout-agnostic content blocks rendered together as a composed payload when exact placement is unspecified. At slide root, multiple content payload kinds with no explicit type, blocks, or regions are accepted as shorthand for equivalent blocks."
2537
2546
  },
2538
2547
  "design": {
2539
2548
  "$ref": "#/$defs/Design",
@@ -6329,7 +6338,7 @@ var audiences = [
6329
6338
  "decisionPower": "advisory",
6330
6339
  "attentionBudgetMinutes": 45,
6331
6340
  "recommendedNarratives": [
6332
- "engineering-update",
6341
+ "status-update",
6333
6342
  "challenge-resolution",
6334
6343
  "innovation",
6335
6344
  "weekly-progress"
@@ -6845,7 +6854,7 @@ var tones = [
6845
6854
  "weekly-progress",
6846
6855
  "status-update",
6847
6856
  "company-intro",
6848
- "all-hands"
6857
+ "focus"
6849
6858
  ],
6850
6859
  "tags": [
6851
6860
  "internal",
@@ -6915,7 +6924,7 @@ var tones = [
6915
6924
  "challenge-resolution",
6916
6925
  "innovation",
6917
6926
  "conference-talk",
6918
- "engineering-update"
6927
+ "status-update"
6919
6928
  ],
6920
6929
  "tags": [
6921
6930
  "technical",
@@ -7018,7 +7027,7 @@ var tones = [
7018
7027
  "If you take one thing from this section, take this."
7019
7028
  ],
7020
7029
  "recommendedNarratives": [
7021
- "all-hands",
7030
+ "focus",
7022
7031
  "company-intro",
7023
7032
  "weekly-progress",
7024
7033
  "performance-review"
@@ -24765,6 +24774,413 @@ var catalogEntries = [
24765
24774
  "yu-gothic.json"
24766
24775
  ], records: fontSchemes, index: catalogIndexes.fontSchemes }
24767
24776
  ];
24777
+
24778
+ // src/generated/catalog-ids.ts
24779
+ var catalogIds = {
24780
+ audiences: [
24781
+ "executives",
24782
+ "board",
24783
+ "engineering-team",
24784
+ "investors",
24785
+ "customers",
24786
+ "sales-team",
24787
+ "marketing-team",
24788
+ "all-hands",
24789
+ "candidates",
24790
+ "regulators"
24791
+ ],
24792
+ purposes: [
24793
+ "inform",
24794
+ "decide",
24795
+ "align",
24796
+ "persuade",
24797
+ "educate",
24798
+ "report",
24799
+ "pitch",
24800
+ "sell",
24801
+ "plan"
24802
+ ],
24803
+ tones: [
24804
+ "formal",
24805
+ "casual",
24806
+ "inspirational",
24807
+ "technical",
24808
+ "persuasive",
24809
+ "authoritative",
24810
+ "conversational"
24811
+ ],
24812
+ themes: [
24813
+ "bold",
24814
+ "classic",
24815
+ "dark",
24816
+ "minimal"
24817
+ ],
24818
+ layouts: [
24819
+ "blank",
24820
+ "chart-1x",
24821
+ "chart-2x",
24822
+ "chart-3x",
24823
+ "code-1x",
24824
+ "image-1x",
24825
+ "image-2x",
24826
+ "image-3x",
24827
+ "image-bleed",
24828
+ "list-1x",
24829
+ "list-2x",
24830
+ "list-3x",
24831
+ "list-4x",
24832
+ "list-5x",
24833
+ "list-6x",
24834
+ "media-1x",
24835
+ "number-1x",
24836
+ "number-2x",
24837
+ "number-3x",
24838
+ "number-4x",
24839
+ "number-5x",
24840
+ "number-6x",
24841
+ "table-1x",
24842
+ "text-1x",
24843
+ "text-2x",
24844
+ "text-3x",
24845
+ "title",
24846
+ "title-subtitle"
24847
+ ],
24848
+ chartTypes: [
24849
+ "100pct-bullet-bar",
24850
+ "100pct-bullet-bar-2x",
24851
+ "100pct-bullet-bar-3x",
24852
+ "100pct-bullet-column",
24853
+ "100pct-bullet-column-2x",
24854
+ "100pct-bullet-column-3x",
24855
+ "100pct-progress-bar",
24856
+ "100pct-stacked-area-2x",
24857
+ "100pct-stacked-area-3x",
24858
+ "100pct-stacked-bar-2x",
24859
+ "100pct-stacked-bar-3x",
24860
+ "100pct-stacked-column-2x",
24861
+ "100pct-stacked-column-3x",
24862
+ "area",
24863
+ "australia",
24864
+ "bar",
24865
+ "box-and-whisker",
24866
+ "box-and-whisker-2x",
24867
+ "box-and-whisker-3x",
24868
+ "bullet-bar",
24869
+ "bullet-bar-2x",
24870
+ "bullet-bar-3x",
24871
+ "bullet-column",
24872
+ "bullet-column-2x",
24873
+ "bullet-column-3x",
24874
+ "canada",
24875
+ "clustered-bar-2x",
24876
+ "clustered-column",
24877
+ "column",
24878
+ "dot-plot",
24879
+ "dot-plot-2x",
24880
+ "dot-plot-3x",
24881
+ "dot-plot-4x",
24882
+ "dot-plot-5x",
24883
+ "dot-plot-6x",
24884
+ "doughnut",
24885
+ "dumbbell",
24886
+ "filled-radar",
24887
+ "funnel",
24888
+ "histogram",
24889
+ "line",
24890
+ "line-2x",
24891
+ "line-3x",
24892
+ "line-with-high-low",
24893
+ "line-with-high-low-and-markers",
24894
+ "line-with-markers",
24895
+ "line-with-markers-2x",
24896
+ "line-with-markers-3x",
24897
+ "pareto",
24898
+ "pie",
24899
+ "radar",
24900
+ "radar-with-markers",
24901
+ "scatter",
24902
+ "sparkline",
24903
+ "sparkline-2x",
24904
+ "sparkline-3x",
24905
+ "sparkline-4x",
24906
+ "sparkline-5x",
24907
+ "sparkline-6x",
24908
+ "stacked-area-2x",
24909
+ "stacked-area-3x",
24910
+ "stacked-bar-2x",
24911
+ "stacked-bar-3x",
24912
+ "stacked-column-2x",
24913
+ "stacked-column-3x",
24914
+ "stacked-line-2x",
24915
+ "stacked-line-3x",
24916
+ "stacked-line-with-markers-2x",
24917
+ "stacked-line-with-markers-3x",
24918
+ "treemap",
24919
+ "treemap-2x",
24920
+ "treemap-3x",
24921
+ "united-kingdom",
24922
+ "united-states",
24923
+ "waterfall",
24924
+ "world"
24925
+ ],
24926
+ narratives: [
24927
+ "problem-solution",
24928
+ "scqa",
24929
+ "strategic-narrative",
24930
+ "golden-circle",
24931
+ "conference-talk",
24932
+ "transformation-arc",
24933
+ "pitch-deck",
24934
+ "early-startup-pitch",
24935
+ "venture-pitch",
24936
+ "persuasive-sales",
24937
+ "company-intro",
24938
+ "marketing-strategy",
24939
+ "product-launch",
24940
+ "strategic-advisory",
24941
+ "challenge-resolution",
24942
+ "project-proposal",
24943
+ "failure-analysis",
24944
+ "classic-story",
24945
+ "business-narrative",
24946
+ "rags-to-riches",
24947
+ "underdog-victory",
24948
+ "survival-story",
24949
+ "educate",
24950
+ "persuade",
24951
+ "reveal",
24952
+ "justice",
24953
+ "innovation",
24954
+ "focus",
24955
+ "qbr",
24956
+ "business-review",
24957
+ "board-meeting",
24958
+ "weekly-progress",
24959
+ "status-update",
24960
+ "performance-review",
24961
+ "survey-analysis",
24962
+ "trend-analysis",
24963
+ "employee-review",
24964
+ "performance-improvement-plan",
24965
+ "capacity-planning"
24966
+ ],
24967
+ socialPlatforms: [
24968
+ "linkedin",
24969
+ "x",
24970
+ "github",
24971
+ "youtube",
24972
+ "instagram",
24973
+ "facebook",
24974
+ "tiktok",
24975
+ "threads",
24976
+ "mastodon",
24977
+ "bluesky"
24978
+ ],
24979
+ languages: [
24980
+ "afrikaans",
24981
+ "albanian",
24982
+ "amharic",
24983
+ "arabic",
24984
+ "armenian",
24985
+ "aymara",
24986
+ "azerbaijani",
24987
+ "bengali",
24988
+ "berber-latin",
24989
+ "bosnian-latin",
24990
+ "bulgarian",
24991
+ "catalan",
24992
+ "cebuano",
24993
+ "chinese-simplified",
24994
+ "chinese-traditional",
24995
+ "chittagonian",
24996
+ "croatian",
24997
+ "czech",
24998
+ "danish",
24999
+ "dutch",
25000
+ "english",
25001
+ "english-au",
25002
+ "english-ca",
25003
+ "english-gb",
25004
+ "english-in",
25005
+ "english-us",
25006
+ "estonian",
25007
+ "filipino",
25008
+ "finnish",
25009
+ "french",
25010
+ "fulfulde",
25011
+ "galician",
25012
+ "georgian",
25013
+ "german",
25014
+ "greek",
25015
+ "gujarati",
25016
+ "hausa",
25017
+ "hebrew",
25018
+ "hindi",
25019
+ "hungarian",
25020
+ "igbo",
25021
+ "indonesian",
25022
+ "italian",
25023
+ "japanese",
25024
+ "kannada",
25025
+ "kazakh",
25026
+ "khmer",
25027
+ "kinyarwanda",
25028
+ "korean",
25029
+ "kurmanji",
25030
+ "latvian",
25031
+ "lithuanian",
25032
+ "macedonian",
25033
+ "malagasy",
25034
+ "malay",
25035
+ "malayalam",
25036
+ "maori",
25037
+ "marathi",
25038
+ "mongolian",
25039
+ "nepali",
25040
+ "norwegian",
25041
+ "odia",
25042
+ "oromo",
25043
+ "pashto",
25044
+ "persian",
25045
+ "polish",
25046
+ "portuguese",
25047
+ "punjabi-gurmukhi",
25048
+ "punjabi-shahmukhi",
25049
+ "romanian",
25050
+ "russian",
25051
+ "serbian-cyrillic",
25052
+ "serbian-latin",
25053
+ "shona",
25054
+ "slovak",
25055
+ "slovenian",
25056
+ "somali",
25057
+ "spanish",
25058
+ "swahili",
25059
+ "swedish",
25060
+ "tagalog",
25061
+ "tajik",
25062
+ "tamil",
25063
+ "telugu",
25064
+ "thai",
25065
+ "turkish",
25066
+ "ukrainian",
25067
+ "urdu",
25068
+ "uzbek-latin",
25069
+ "vietnamese-quoc-ngu",
25070
+ "xhosa",
25071
+ "yoruba",
25072
+ "zulu"
25073
+ ],
25074
+ colorSchemes: [
25075
+ "black-and-white",
25076
+ "bold-red",
25077
+ "boost",
25078
+ "burnt-orange",
25079
+ "cool-horizon",
25080
+ "corporate-blue",
25081
+ "deep-purple",
25082
+ "forest-green",
25083
+ "golden-yellow",
25084
+ "luxury",
25085
+ "pastel-red",
25086
+ "slate-gray",
25087
+ "steel-blue",
25088
+ "vibes"
25089
+ ],
25090
+ fontSchemes: [
25091
+ "angsana-new",
25092
+ "aparajita",
25093
+ "aptos",
25094
+ "arabic-typesetting",
25095
+ "arial",
25096
+ "batang",
25097
+ "bookman",
25098
+ "calibri",
25099
+ "century-schoolbook",
25100
+ "consolas",
25101
+ "constantia",
25102
+ "courier-new",
25103
+ "daunpenh",
25104
+ "david",
25105
+ "dilleniaupc",
25106
+ "fangsong",
25107
+ "garamond",
25108
+ "gautami",
25109
+ "georgia",
25110
+ "gisha",
25111
+ "grandview",
25112
+ "gungsuh",
25113
+ "impact",
25114
+ "kalinga",
25115
+ "kartika",
25116
+ "khmer-ui",
25117
+ "latha",
25118
+ "lucida-sans",
25119
+ "malgun-gothic",
25120
+ "mangal",
25121
+ "meiryo",
25122
+ "microsoft-jhenghei",
25123
+ "microsoft-yahei",
25124
+ "mingliu",
25125
+ "miriam",
25126
+ "montserrat",
25127
+ "ms-mincho",
25128
+ "nirmala-ui",
25129
+ "noto-naksh-arabic",
25130
+ "noto-nastaliq-urdu",
25131
+ "noto-sans",
25132
+ "noto-sans-arabic",
25133
+ "noto-sans-armenian",
25134
+ "noto-sans-bengali",
25135
+ "noto-sans-devangari",
25136
+ "noto-sans-ethiopic",
25137
+ "noto-sans-georgian",
25138
+ "noto-sans-gujarati",
25139
+ "noto-sans-gurmukhi",
25140
+ "noto-sans-hebrew",
25141
+ "noto-sans-jp",
25142
+ "noto-sans-kannada",
25143
+ "noto-sans-khmer",
25144
+ "noto-sans-kr",
25145
+ "noto-sans-malayalam",
25146
+ "noto-sans-mongolian",
25147
+ "noto-sans-oriya",
25148
+ "noto-sans-sc",
25149
+ "noto-sans-tamil",
25150
+ "noto-sans-tc",
25151
+ "noto-sans-telugu",
25152
+ "noto-sans-thai",
25153
+ "nyala",
25154
+ "open-sans",
25155
+ "pmingliu",
25156
+ "poppins",
25157
+ "pt-serif",
25158
+ "raavi",
25159
+ "raleway",
25160
+ "roboto",
25161
+ "rockwell",
25162
+ "sakkal-majalla",
25163
+ "seaford",
25164
+ "segoe-ui",
25165
+ "segoe-ui-light",
25166
+ "shonar-bangla",
25167
+ "shruti",
25168
+ "simsun",
25169
+ "skeena",
25170
+ "sylfaen",
25171
+ "tahoma",
25172
+ "tenorite",
25173
+ "times-new-roman",
25174
+ "traditional-arabic",
25175
+ "trebuchet-ms",
25176
+ "tunga",
25177
+ "verdana",
25178
+ "vrinda",
25179
+ "yu-gothic"
25180
+ ]
25181
+ };
25182
+
25183
+ // src/validator.ts
24768
25184
  var OPFValidationError = class extends Error {
24769
25185
  issues;
24770
25186
  result;
@@ -24997,6 +25413,12 @@ function inferredKinds(value) {
24997
25413
  if (hasOwn(value, "timeline")) kinds.push("timeline");
24998
25414
  return kinds;
24999
25415
  }
25416
+ function isImplicitBlocksComposition(value, inferred, options) {
25417
+ if (options.allowBlocks !== true || hasOwn(value, "blocks")) {
25418
+ return false;
25419
+ }
25420
+ return inferred.length > 1;
25421
+ }
25000
25422
  function validateContentPayload(value, path, options = {}) {
25001
25423
  const issues = [];
25002
25424
  const explicitType = value.type;
@@ -25023,6 +25445,9 @@ function validateContentPayload(value, path, options = {}) {
25023
25445
  return issues;
25024
25446
  }
25025
25447
  if (!kind && inferred.length > 1) {
25448
+ if (isImplicitBlocksComposition(value, inferred, options)) {
25449
+ return issues;
25450
+ }
25026
25451
  issues.push(semanticIssue(path, "content payload mixes fields from incompatible content types", {
25027
25452
  inferredTypes: inferred
25028
25453
  }));
@@ -25155,6 +25580,126 @@ function validatePresentationSemantics(value) {
25155
25580
  });
25156
25581
  return issues;
25157
25582
  }
25583
+ var bareIdPattern = /^[a-z0-9][a-z0-9-]*$/;
25584
+ function inlineCatalogEntry(context, kind) {
25585
+ const catalogsField = context.document.catalogs;
25586
+ if (!isRecord(catalogsField)) {
25587
+ return void 0;
25588
+ }
25589
+ const entry = catalogsField[kind];
25590
+ return isRecord(entry) ? entry : void 0;
25591
+ }
25592
+ function unknownIdWarning(kind, value, path, context) {
25593
+ if (typeof value !== "string" || !bareIdPattern.test(value)) {
25594
+ return void 0;
25595
+ }
25596
+ if (context) {
25597
+ const entry = inlineCatalogEntry(context, kind);
25598
+ if (entry) {
25599
+ if (Array.isArray(entry.records) && entry.records.some((record) => isRecord(record) && record.id === value)) {
25600
+ return void 0;
25601
+ }
25602
+ if (typeof entry.source === "string") {
25603
+ return void 0;
25604
+ }
25605
+ }
25606
+ }
25607
+ if (catalogIds[kind].includes(value)) {
25608
+ return void 0;
25609
+ }
25610
+ return semanticIssue(path, `unknown ${kind} catalog id '${value}'`, { kind, id: value });
25611
+ }
25612
+ function referenceObjectWarning(kind, value, path, context) {
25613
+ if (typeof value === "string") {
25614
+ return unknownIdWarning(kind, value, path, context);
25615
+ }
25616
+ if (isRecord(value)) {
25617
+ return unknownIdWarning(kind, value.id, pathFor(path, "id"), context);
25618
+ }
25619
+ return void 0;
25620
+ }
25621
+ function pushIfDefined(issues, issue) {
25622
+ if (issue) {
25623
+ issues.push(issue);
25624
+ }
25625
+ }
25626
+ function designReferenceWarnings(design, path, context) {
25627
+ if (!isRecord(design)) {
25628
+ return [];
25629
+ }
25630
+ const issues = [];
25631
+ pushIfDefined(issues, referenceObjectWarning("themes", design.theme, pathFor(path, "theme"), context));
25632
+ pushIfDefined(issues, referenceObjectWarning("colorSchemes", design.colorScheme, pathFor(path, "colorScheme"), context));
25633
+ pushIfDefined(issues, referenceObjectWarning("fontSchemes", design.fontScheme, pathFor(path, "fontScheme"), context));
25634
+ if (isRecord(design.theme)) {
25635
+ const themePath = pathFor(path, "theme");
25636
+ pushIfDefined(issues, referenceObjectWarning("colorSchemes", design.theme.colorScheme, pathFor(themePath, "colorScheme"), context));
25637
+ pushIfDefined(issues, referenceObjectWarning("fontSchemes", design.theme.fontScheme, pathFor(themePath, "fontScheme"), context));
25638
+ }
25639
+ return issues;
25640
+ }
25641
+ function chartTypeWarnings(payload, path, context) {
25642
+ if (!isRecord(payload)) {
25643
+ return [];
25644
+ }
25645
+ const issues = [];
25646
+ if (isRecord(payload.chart)) {
25647
+ pushIfDefined(issues, unknownIdWarning("chartTypes", payload.chart.type, `${pathFor(path, "chart")}/type`, context));
25648
+ }
25649
+ if (Array.isArray(payload.blocks)) {
25650
+ payload.blocks.forEach((block, index) => {
25651
+ issues.push(...chartTypeWarnings(block, `${pathFor(path, "blocks")}/${index}`, context));
25652
+ });
25653
+ }
25654
+ return issues;
25655
+ }
25656
+ function presentationReferenceWarnings(value) {
25657
+ if (!isRecord(value) || !Array.isArray(value.slides)) {
25658
+ return [];
25659
+ }
25660
+ const context = { document: value };
25661
+ const issues = [];
25662
+ if (typeof value.narrative === "string") {
25663
+ pushIfDefined(issues, unknownIdWarning("narratives", value.narrative, "/narrative", context));
25664
+ }
25665
+ issues.push(...designReferenceWarnings(value.design, "/design", context));
25666
+ value.slides.forEach((slide, index) => {
25667
+ if (!isRecord(slide)) {
25668
+ return;
25669
+ }
25670
+ const slidePath = `/slides/${index}`;
25671
+ issues.push(...designReferenceWarnings(slide.design, pathFor(slidePath, "design"), context));
25672
+ issues.push(...chartTypeWarnings(slide, slidePath, context));
25673
+ for (const key of Object.keys(slide)) {
25674
+ if (promotedRegionKeySet.has(key)) {
25675
+ issues.push(...chartTypeWarnings(slide[key], pathFor(slidePath, key), context));
25676
+ }
25677
+ }
25678
+ });
25679
+ return issues;
25680
+ }
25681
+ var catalogCrossLinkFields = {
25682
+ audience: { recommendedNarratives: "narratives", recommendedTones: "tones" },
25683
+ purpose: { recommendedNarratives: "narratives", recommendedTones: "tones" },
25684
+ tone: { recommendedNarratives: "narratives" }
25685
+ };
25686
+ function catalogCrossLinkWarnings(schemaName, value) {
25687
+ const fields = catalogCrossLinkFields[schemaName];
25688
+ if (!fields || !isRecord(value)) {
25689
+ return [];
25690
+ }
25691
+ const issues = [];
25692
+ for (const [field, kind] of Object.entries(fields)) {
25693
+ const links = value[field];
25694
+ if (!Array.isArray(links)) {
25695
+ continue;
25696
+ }
25697
+ links.forEach((link, index) => {
25698
+ pushIfDefined(issues, unknownIdWarning(kind, link, `${pathFor("/", field)}/${index}`));
25699
+ });
25700
+ }
25701
+ return issues;
25702
+ }
25158
25703
  function validateLanguageSemantics(value) {
25159
25704
  if (!isRecord(value)) {
25160
25705
  return [];
@@ -25170,14 +25715,20 @@ function validate(value, schemaOrKind = "presentation") {
25170
25715
  const resolved = resolveValidator(schemaOrKind);
25171
25716
  const valid = resolved.validate(value) === true;
25172
25717
  const errors = valid ? [] : (resolved.validate.errors ?? []).map(toIssue);
25718
+ const warnings = [];
25173
25719
  if (resolved.schemaName === "presentation") {
25174
25720
  errors.push(...validatePresentationSemantics(value));
25721
+ warnings.push(...presentationReferenceWarnings(value));
25175
25722
  } else if (resolved.schemaName === "language") {
25176
25723
  errors.push(...validateLanguageSemantics(value));
25177
25724
  }
25725
+ if (resolved.schemaName) {
25726
+ warnings.push(...catalogCrossLinkWarnings(resolved.schemaName, value));
25727
+ }
25178
25728
  return {
25179
25729
  valid: errors.length === 0,
25180
25730
  errors,
25731
+ warnings,
25181
25732
  schemaName: resolved.schemaName,
25182
25733
  catalogKind: resolved.catalogKind
25183
25734
  };
@@ -25204,6 +25755,12 @@ function assertValidCatalogRecord(kind, value) {
25204
25755
 
25205
25756
  // src/generated/spec-files.ts
25206
25757
  var specFileEntries = [
25758
+ {
25759
+ "path": "README.md",
25760
+ "packagePath": "@openpresentation/opf/spec/README.md",
25761
+ "kind": "spec",
25762
+ "mediaType": "text/markdown"
25763
+ },
25207
25764
  {
25208
25765
  "path": "catalogs/audiences/all-hands.json",
25209
25766
  "packagePath": "@openpresentation/opf/spec/catalogs/audiences/all-hands.json",
@@ -28062,6 +28619,7 @@ var specFileEntries = [
28062
28619
  }
28063
28620
  ];
28064
28621
  var specFilePaths = [
28622
+ "README.md",
28065
28623
  "catalogs/audiences/all-hands.json",
28066
28624
  "catalogs/audiences/board.json",
28067
28625
  "catalogs/audiences/candidates.json",
@@ -28540,10 +29098,10 @@ var specFilePaths = [
28540
29098
  "schemas/tone.schema.json"
28541
29099
  ];
28542
29100
  var specFileKinds = [
29101
+ "spec",
28543
29102
  "catalogRecord",
28544
29103
  "catalogIndex",
28545
29104
  "openapi",
28546
- "spec",
28547
29105
  "reference",
28548
29106
  "schema"
28549
29107
  ];