@carlonicora/nextjs-jsonapi 1.109.0 → 1.110.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.
Files changed (146) hide show
  1. package/dist/{AssistantMessageInterface-Cs1yb-gF.d.ts → AssistantMessageInterface-BNzf1etU.d.ts} +14 -1
  2. package/dist/{AssistantMessageInterface-DQ3mH5L8.d.mts → AssistantMessageInterface-DrgHDjZ5.d.mts} +14 -1
  3. package/dist/{BlockNoteEditor-3XYBZLWO.js → BlockNoteEditor-7OKW6HHN.js} +19 -20
  4. package/dist/BlockNoteEditor-7OKW6HHN.js.map +1 -0
  5. package/dist/{BlockNoteEditor-EBFZG7AL.mjs → BlockNoteEditor-K7IIWM3S.mjs} +4 -5
  6. package/dist/{BlockNoteEditor-EBFZG7AL.mjs.map → BlockNoteEditor-K7IIWM3S.mjs.map} +1 -1
  7. package/dist/BlockNoteViewer-OPSCTHKJ.mjs +31 -0
  8. package/dist/BlockNoteViewer-OPSCTHKJ.mjs.map +1 -0
  9. package/dist/BlockNoteViewer-UW5VZ5UF.js +31 -0
  10. package/dist/BlockNoteViewer-UW5VZ5UF.js.map +1 -0
  11. package/dist/billing/index.d.mts +41 -41
  12. package/dist/billing/index.d.ts +41 -41
  13. package/dist/billing/index.js +346 -347
  14. package/dist/billing/index.js.map +1 -1
  15. package/dist/billing/index.mjs +3 -4
  16. package/dist/billing/index.mjs.map +1 -1
  17. package/dist/{chunk-7E3O52U5.js → chunk-6XWW67F2.js} +25 -12
  18. package/dist/chunk-6XWW67F2.js.map +1 -0
  19. package/dist/{chunk-UHO3KUUH.js → chunk-AKXUNE3A.js} +977 -850
  20. package/dist/chunk-AKXUNE3A.js.map +1 -0
  21. package/dist/{chunk-UOYIWJEJ.mjs → chunk-CWVYU4YZ.mjs} +18 -5
  22. package/dist/{chunk-UOYIWJEJ.mjs.map → chunk-CWVYU4YZ.mjs.map} +1 -1
  23. package/dist/{chunk-CRTVAQEK.mjs → chunk-TXVVZLUQ.mjs} +1388 -1261
  24. package/dist/chunk-TXVVZLUQ.mjs.map +1 -0
  25. package/dist/{chunk-CFI4WZ5R.js → chunk-U2HR57MY.js} +111 -5
  26. package/dist/chunk-U2HR57MY.js.map +1 -0
  27. package/dist/chunk-WPAQRB5Q.mjs +7 -0
  28. package/dist/chunk-WPAQRB5Q.mjs.map +1 -0
  29. package/dist/chunk-YBZVWLPH.js +7 -0
  30. package/dist/chunk-YBZVWLPH.js.map +1 -0
  31. package/dist/{chunk-MSNNAHDB.mjs → chunk-ZYPNVEHB.mjs} +112 -6
  32. package/dist/{chunk-MSNNAHDB.mjs.map → chunk-ZYPNVEHB.mjs.map} +1 -1
  33. package/dist/client/index.d.mts +3 -4
  34. package/dist/client/index.d.ts +3 -4
  35. package/dist/client/index.js +4 -5
  36. package/dist/client/index.js.map +1 -1
  37. package/dist/client/index.mjs +3 -4
  38. package/dist/components/index.d.mts +418 -415
  39. package/dist/components/index.d.ts +418 -415
  40. package/dist/components/index.js +6 -5
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/components/index.mjs +5 -4
  43. package/dist/{config-CN23v3eJ.d.ts → config-BrkU_Ynz.d.ts} +2 -2
  44. package/dist/{config-gh88Qn4h.d.mts → config-snd2ToEB.d.mts} +2 -2
  45. package/dist/contexts/index.d.mts +15 -15
  46. package/dist/contexts/index.d.ts +15 -15
  47. package/dist/contexts/index.js +4 -5
  48. package/dist/contexts/index.js.map +1 -1
  49. package/dist/contexts/index.mjs +3 -4
  50. package/dist/core/index.d.mts +35 -4
  51. package/dist/core/index.d.ts +35 -4
  52. package/dist/core/index.js +2 -2
  53. package/dist/core/index.mjs +1 -1
  54. package/dist/features/help/index.d.mts +25 -66
  55. package/dist/features/help/index.d.ts +25 -66
  56. package/dist/features/help/index.js +114 -124
  57. package/dist/features/help/index.js.map +1 -1
  58. package/dist/features/help/index.mjs +95 -105
  59. package/dist/features/help/index.mjs.map +1 -1
  60. package/dist/features/help/server.d.mts +27 -65
  61. package/dist/features/help/server.d.ts +27 -65
  62. package/dist/features/help/server.js +4 -119
  63. package/dist/features/help/server.js.map +1 -1
  64. package/dist/features/help/server.mjs +4 -119
  65. package/dist/features/help/server.mjs.map +1 -1
  66. package/dist/help-content-config.interface-C5ESIod9.d.mts +13 -0
  67. package/dist/help-content-config.interface-C5ESIod9.d.ts +13 -0
  68. package/dist/index.d.mts +3 -3
  69. package/dist/index.d.ts +3 -3
  70. package/dist/index.js +3 -4
  71. package/dist/index.js.map +1 -1
  72. package/dist/index.mjs +2 -3
  73. package/dist/server/index.js +3 -3
  74. package/dist/server/index.mjs +1 -1
  75. package/dist/testing/index.d.mts +1 -2
  76. package/dist/testing/index.d.ts +1 -2
  77. package/package.json +1 -6
  78. package/src/client/config.ts +1 -1
  79. package/src/components/index.ts +1 -0
  80. package/src/components/viewers/BlockNoteViewer.tsx +27 -0
  81. package/src/components/viewers/BlockNoteViewerContainer.tsx +10 -0
  82. package/src/core/registry/helpStore.ts +2 -19
  83. package/src/features/assistant-message/components/parts/MessageSourcesContainer.tsx +4 -0
  84. package/src/features/assistant-message/components/parts/tabs/ContentsTab.tsx +5 -5
  85. package/src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx +3 -2
  86. package/src/features/help/components/HelpArticleBody.tsx +27 -19
  87. package/src/features/help/components/HelpHint.tsx +20 -11
  88. package/src/features/help/components/HelpSearchResultRow.tsx +16 -6
  89. package/src/features/help/components/HelpSideNav.tsx +54 -19
  90. package/src/features/help/components/__tests__/HelpAskAi.spec.tsx +1 -1
  91. package/src/features/help/components/__tests__/HelpHint.spec.tsx +17 -17
  92. package/src/features/help/components/__tests__/HelpSearchResultRow.spec.tsx +18 -19
  93. package/src/features/help/components/__tests__/HelpSideNav.spec.tsx +20 -22
  94. package/src/features/help/contexts/HelpContext.spec.tsx +1 -3
  95. package/src/features/help/index.ts +3 -6
  96. package/src/features/help/interfaces/help-content-config.interface.ts +0 -5
  97. package/src/features/help/server-entry.ts +6 -15
  98. package/src/features/help/types/help-article.types.ts +2 -4
  99. package/src/features/how-to/HowToModule.ts +14 -1
  100. package/src/features/how-to/components/forms/HowToEditor.tsx +108 -4
  101. package/src/features/how-to/data/HowTo.spec.ts +43 -0
  102. package/src/features/how-to/data/HowTo.ts +47 -4
  103. package/src/features/how-to/data/HowToInterface.ts +14 -1
  104. package/src/features/how-to/data/HowToService.ts +61 -0
  105. package/dist/BlockNoteEditor-3XYBZLWO.js.map +0 -1
  106. package/dist/chunk-3J7RQBF3.js +0 -123
  107. package/dist/chunk-3J7RQBF3.js.map +0 -1
  108. package/dist/chunk-7E3O52U5.js.map +0 -1
  109. package/dist/chunk-CFI4WZ5R.js.map +0 -1
  110. package/dist/chunk-CQID6RCF.mjs +0 -38
  111. package/dist/chunk-CQID6RCF.mjs.map +0 -1
  112. package/dist/chunk-CRTVAQEK.mjs.map +0 -1
  113. package/dist/chunk-MZTKPPET.mjs +0 -123
  114. package/dist/chunk-MZTKPPET.mjs.map +0 -1
  115. package/dist/chunk-UHO3KUUH.js.map +0 -1
  116. package/dist/chunk-YQQHAFBS.js +0 -38
  117. package/dist/chunk-YQQHAFBS.js.map +0 -1
  118. package/dist/features/help/server/createHelpAssetRouteHandler.d.mts +0 -11
  119. package/dist/features/help/server/createHelpAssetRouteHandler.d.ts +0 -11
  120. package/dist/features/help/server/createHelpAssetRouteHandler.js +0 -43
  121. package/dist/features/help/server/createHelpAssetRouteHandler.js.map +0 -1
  122. package/dist/features/help/server/createHelpAssetRouteHandler.mjs +0 -43
  123. package/dist/features/help/server/createHelpAssetRouteHandler.mjs.map +0 -1
  124. package/dist/help-content-config.interface-B9L02u9i.d.mts +0 -50
  125. package/dist/help-content-config.interface-B9L02u9i.d.ts +0 -50
  126. package/src/features/help/components/mdx/Callout.tsx +0 -21
  127. package/src/features/help/components/mdx/EntityRef.tsx +0 -18
  128. package/src/features/help/components/mdx/KeyBinding.tsx +0 -6
  129. package/src/features/help/components/mdx/Related.tsx +0 -33
  130. package/src/features/help/components/mdx/Screenshot.tsx +0 -9
  131. package/src/features/help/components/mdx/Steps.tsx +0 -21
  132. package/src/features/help/components/mdx/Video.tsx +0 -8
  133. package/src/features/help/components/mdx/mdx-server-components.ts +0 -23
  134. package/src/features/help/components/mdx/mdxComponents.ts +0 -9
  135. package/src/features/help/hooks/useHelpArticle.ts +0 -7
  136. package/src/features/help/hooks/useHelpManifest.ts +0 -5
  137. package/src/features/help/server/__tests__/createHelpAssetRouteHandler.spec.ts +0 -43
  138. package/src/features/help/server/createHelpAssetRouteHandler.ts +0 -35
  139. package/src/features/help/server/generateHelpArticleMetadata.ts +0 -18
  140. package/src/features/help/server/generateHelpArticleStaticParams.ts +0 -7
  141. package/src/features/help/server/generateHelpModeStaticParams.ts +0 -5
  142. package/src/features/help/server/getHelpContent.ts +0 -17
  143. package/src/features/help/server/index.ts +0 -8
  144. package/src/features/help/server/serializeHelpArticle.tsx +0 -46
  145. package/src/features/help/utils/__tests__/helpNavigation.spec.ts +0 -70
  146. package/src/features/help/utils/helpNavigation.ts +0 -29
@@ -0,0 +1,7 @@
1
+ // src/features/help/types/help-article.types.ts
2
+ var HELP_MODES = ["tutorial", "how-to", "reference", "explanation"];
3
+
4
+ export {
5
+ HELP_MODES
6
+ };
7
+ //# sourceMappingURL=chunk-WPAQRB5Q.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/features/help/types/help-article.types.ts"],"sourcesContent":["/**\n * Help-article types for the frontend help feature. Self-contained — the\n * published frontend library stays decoupled from `@carlonicora/nestjs-neo4jsonapi`.\n */\n\nexport const HELP_MODES = [\"tutorial\", \"how-to\", \"reference\", \"explanation\"] as const;\nexport type HelpMode = (typeof HELP_MODES)[number];\n\nexport interface HelpHeading {\n depth: 2 | 3;\n slug: string;\n text: string;\n}\n\nexport interface HelpArticle {\n id: string;\n slug: string;\n mode: HelpMode;\n title: string;\n summary: string;\n order: number;\n tags: readonly string[];\n contextualKeys: readonly string[];\n aiIndexed: boolean;\n draft: boolean;\n path: string;\n headings: readonly HelpHeading[];\n relatedSlugs: readonly string[];\n lastUpdated: string;\n}\n\nexport interface HelpRedirect {\n from: string;\n to: string;\n}\n"],"mappings":";AAKO,IAAM,aAAa,CAAC,YAAY,UAAU,aAAa,aAAa;","names":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/features/help/types/help-article.types.ts
2
+ var HELP_MODES = ["tutorial", "how-to", "reference", "explanation"];
3
+
4
+
5
+
6
+ exports.HELP_MODES = HELP_MODES;
7
+ //# sourceMappingURL=chunk-YBZVWLPH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-YBZVWLPH.js","../src/features/help/types/help-article.types.ts"],"names":[],"mappings":"AAAA;ACKO,IAAM,WAAA,EAAa,CAAC,UAAA,EAAY,QAAA,EAAU,WAAA,EAAa,aAAa,CAAA;ADH3E;AACA;AACE;AACF,gCAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-YBZVWLPH.js","sourcesContent":[null,"/**\n * Help-article types for the frontend help feature. Self-contained — the\n * published frontend library stays decoupled from `@carlonicora/nestjs-neo4jsonapi`.\n */\n\nexport const HELP_MODES = [\"tutorial\", \"how-to\", \"reference\", \"explanation\"] as const;\nexport type HelpMode = (typeof HELP_MODES)[number];\n\nexport interface HelpHeading {\n depth: 2 | 3;\n slug: string;\n text: string;\n}\n\nexport interface HelpArticle {\n id: string;\n slug: string;\n mode: HelpMode;\n title: string;\n summary: string;\n order: number;\n tags: readonly string[];\n contextualKeys: readonly string[];\n aiIndexed: boolean;\n draft: boolean;\n path: string;\n headings: readonly HelpHeading[];\n relatedSlugs: readonly string[];\n lastUpdated: string;\n}\n\nexport interface HelpRedirect {\n from: string;\n to: string;\n}\n"]}
@@ -5256,7 +5256,13 @@ var HowTo = class extends Content {
5256
5256
  }
5257
5257
  _description;
5258
5258
  _pages;
5259
- _helpContentSlug;
5259
+ _howToType;
5260
+ _slug;
5261
+ _order;
5262
+ _summary;
5263
+ _tags;
5264
+ _contextualKeys;
5265
+ _draft;
5260
5266
  /**
5261
5267
  * Parse pages from backend JSON string (handles legacy single string + JSON array)
5262
5268
  */
@@ -5282,8 +5288,26 @@ var HowTo = class extends Content {
5282
5288
  get pages() {
5283
5289
  return this._pages;
5284
5290
  }
5285
- get helpContentSlug() {
5286
- return this._helpContentSlug;
5291
+ get howToType() {
5292
+ return this._howToType;
5293
+ }
5294
+ get slug() {
5295
+ return this._slug;
5296
+ }
5297
+ get order() {
5298
+ return this._order;
5299
+ }
5300
+ get summary() {
5301
+ return this._summary;
5302
+ }
5303
+ get tags() {
5304
+ return this._tags ?? [];
5305
+ }
5306
+ get contextualKeys() {
5307
+ return this._contextualKeys ?? [];
5308
+ }
5309
+ get draft() {
5310
+ return this._draft ?? false;
5287
5311
  }
5288
5312
  rehydrate(data) {
5289
5313
  super.rehydrate(data);
@@ -5300,7 +5324,13 @@ var HowTo = class extends Content {
5300
5324
  this._description = rawDescription;
5301
5325
  }
5302
5326
  this._pages = data.jsonApi.attributes.pages;
5303
- this._helpContentSlug = data.jsonApi.attributes.helpContentSlug;
5327
+ this._howToType = data.jsonApi.attributes.howToType;
5328
+ this._slug = data.jsonApi.attributes.slug;
5329
+ this._order = data.jsonApi.attributes.order;
5330
+ this._summary = data.jsonApi.attributes.summary;
5331
+ this._tags = data.jsonApi.attributes.tags ?? [];
5332
+ this._contextualKeys = data.jsonApi.attributes.contextualKeys ?? [];
5333
+ this._draft = data.jsonApi.attributes.draft ?? false;
5304
5334
  return this;
5305
5335
  }
5306
5336
  createJsonApi(data) {
@@ -5317,6 +5347,13 @@ var HowTo = class extends Content {
5317
5347
  super.addContentInput(response, data);
5318
5348
  if (data.description !== void 0) response.data.attributes.description = JSON.stringify(data.description);
5319
5349
  if (data.pages !== void 0) response.data.attributes.pages = data.pages;
5350
+ if (data.howToType !== void 0) response.data.attributes.howToType = data.howToType;
5351
+ if (data.slug !== void 0) response.data.attributes.slug = data.slug;
5352
+ if (data.order !== void 0) response.data.attributes.order = data.order;
5353
+ if (data.summary !== void 0) response.data.attributes.summary = data.summary;
5354
+ if (data.tags !== void 0) response.data.attributes.tags = data.tags;
5355
+ if (data.contextualKeys !== void 0) response.data.attributes.contextualKeys = data.contextualKeys;
5356
+ if (data.draft !== void 0) response.data.attributes.draft = data.draft;
5320
5357
  return response;
5321
5358
  }
5322
5359
  };
@@ -5330,7 +5367,20 @@ var HowToModule = /* @__PURE__ */ __name((factory) => factory({
5330
5367
  icon: LifeBuoyIcon,
5331
5368
  inclusions: {
5332
5369
  lists: {
5333
- fields: [createJsonApiInclusion("howtos", [`name`, `description`, `pages`, `helpContentSlug`])]
5370
+ fields: [
5371
+ createJsonApiInclusion("howtos", [
5372
+ "name",
5373
+ "description",
5374
+ "pages",
5375
+ "howToType",
5376
+ "slug",
5377
+ "order",
5378
+ "summary",
5379
+ "tags",
5380
+ "contextualKeys",
5381
+ "draft"
5382
+ ])
5383
+ ]
5334
5384
  }
5335
5385
  }
5336
5386
  }), "HowToModule");
@@ -5394,6 +5444,62 @@ var HowToService = class extends AbstractService {
5394
5444
  endpoint: new EndpointCreator({ endpoint: Modules.HowTo, id: params.howToId }).generate()
5395
5445
  });
5396
5446
  }
5447
+ static async findPublished(params = {}) {
5448
+ const endpoint = new EndpointCreator({ endpoint: `public/${Modules.HowTo.name}` });
5449
+ if (params.howToType) endpoint.addAdditionalParam("type", params.howToType);
5450
+ return this.callApi({
5451
+ type: Modules.HowTo,
5452
+ method: "GET" /* GET */,
5453
+ endpoint: endpoint.generate()
5454
+ });
5455
+ }
5456
+ static async findPublishedArticle(params) {
5457
+ return this.callApi({
5458
+ type: Modules.HowTo,
5459
+ method: "GET" /* GET */,
5460
+ endpoint: new EndpointCreator({
5461
+ endpoint: `public/${Modules.HowTo.name}`,
5462
+ id: params.howToType,
5463
+ childEndpoint: params.slug
5464
+ }).generate()
5465
+ });
5466
+ }
5467
+ static async findRelated(params) {
5468
+ return this.callApi({
5469
+ type: Modules.HowTo,
5470
+ method: "GET" /* GET */,
5471
+ endpoint: new EndpointCreator({
5472
+ endpoint: `public/${Modules.HowTo.name}`,
5473
+ id: params.howToType,
5474
+ childEndpoint: params.slug,
5475
+ childId: "related"
5476
+ }).generate()
5477
+ });
5478
+ }
5479
+ static async addRelated(params) {
5480
+ return this.callApi({
5481
+ type: Modules.HowTo,
5482
+ method: "POST" /* POST */,
5483
+ endpoint: new EndpointCreator({
5484
+ endpoint: Modules.HowTo,
5485
+ id: params.howToId,
5486
+ childEndpoint: "related",
5487
+ childId: params.relatedId
5488
+ }).generate()
5489
+ });
5490
+ }
5491
+ static async removeRelated(params) {
5492
+ await this.callApi({
5493
+ type: Modules.HowTo,
5494
+ method: "DELETE" /* DELETE */,
5495
+ endpoint: new EndpointCreator({
5496
+ endpoint: Modules.HowTo,
5497
+ id: params.howToId,
5498
+ childEndpoint: "related",
5499
+ childId: params.relatedId
5500
+ }).generate()
5501
+ });
5502
+ }
5397
5503
  };
5398
5504
 
5399
5505
  // src/features/assistant/AssistantModule.ts
@@ -7665,4 +7771,4 @@ export {
7665
7771
  AuditLogService,
7666
7772
  AuditLogModule
7667
7773
  };
7668
- //# sourceMappingURL=chunk-MSNNAHDB.mjs.map
7774
+ //# sourceMappingURL=chunk-ZYPNVEHB.mjs.map