@salesforcedevs/docs-components 0.7.59-sppage-alpha2 → 0.7.76-alpha

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 (39) hide show
  1. package/lwc.config.json +3 -0
  2. package/package.json +9 -4
  3. package/src/modules/doc/amfReference/amfReference.css +0 -12
  4. package/src/modules/doc/amfReference/amfReference.html +1 -6
  5. package/src/modules/doc/amfReference/amfReference.ts +10 -37
  6. package/src/modules/doc/amfTopic/amfTopic.ts +24 -0
  7. package/src/modules/doc/breadcrumbs/breadcrumbs.html +0 -1
  8. package/src/modules/doc/breadcrumbs/breadcrumbs.ts +14 -23
  9. package/src/modules/doc/componentPlayground/componentPlayground.css +30 -0
  10. package/src/modules/doc/componentPlayground/componentPlayground.html +20 -0
  11. package/src/modules/doc/componentPlayground/componentPlayground.ts +97 -0
  12. package/src/modules/doc/content/content.html +1 -0
  13. package/src/modules/doc/content/content.ts +7 -33
  14. package/src/modules/doc/contentCallout/contentCallout.css +1 -0
  15. package/src/modules/doc/contentLayout/contentLayout.css +27 -123
  16. package/src/modules/doc/contentLayout/contentLayout.html +42 -36
  17. package/src/modules/doc/contentLayout/contentLayout.ts +152 -204
  18. package/src/modules/doc/contentMedia/contentMedia.css +1 -1
  19. package/src/modules/doc/header/header.html +8 -3
  20. package/src/modules/doc/header/header.ts +49 -10
  21. package/src/modules/doc/lwcContentLayout/lwcContentLayout.css +9 -0
  22. package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +64 -0
  23. package/src/modules/doc/lwcContentLayout/lwcContentLayout.ts +269 -0
  24. package/src/modules/doc/phase/phase.css +0 -7
  25. package/src/modules/doc/redocReference/redocReference.css +7 -0
  26. package/src/modules/doc/redocReference/redocReference.html +13 -0
  27. package/src/modules/doc/redocReference/redocReference.ts +427 -0
  28. package/src/modules/doc/specificationContent/specificationContent.css +33 -0
  29. package/src/modules/doc/specificationContent/specificationContent.html +94 -16
  30. package/src/modules/doc/specificationContent/specificationContent.ts +131 -21
  31. package/src/modules/doc/versionPicker/versionPicker.html +2 -0
  32. package/src/modules/doc/xmlContent/xmlContent.css +0 -10
  33. package/src/modules/doc/xmlContent/xmlContent.html +11 -8
  34. package/src/modules/doc/xmlContent/xmlContent.ts +76 -57
  35. package/src/modules/docHelpers/amfStyle/amfStyle.css +0 -2
  36. package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +160 -0
  37. package/src/modules/docUtils/utils/__mocks__/coveo.analytics.ts +16 -0
  38. package/src/modules/docUtils/utils/coveo.analytics.d.ts +10 -0
  39. package/src/modules/docUtils/utils/utils.ts +1 -1
@@ -0,0 +1,160 @@
1
+ :host {
2
+ --dx-c-content-vertical-spacing: var(--dx-g-spacing-lg);
3
+ --dx-c-content-sidebar-sticky-top: calc(
4
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
5
+ );
6
+ --dx-c-sidebar-height: calc(
7
+ 100vh -
8
+ calc(
9
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
10
+ )
11
+ );
12
+ --dx-c-content-scroll-margin-top: calc(
13
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
14
+ var(--dx-g-spacing-2xl)
15
+ );
16
+
17
+ display: block;
18
+ }
19
+
20
+ doc-breadcrumbs {
21
+ --dx-c-popover-z-index: 5;
22
+
23
+ display: block;
24
+ margin-bottom: var(--dx-g-spacing-2xl);
25
+ }
26
+
27
+ .read {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: var(--dx-g-spacing-xs, 8px);
31
+ margin-bottom: var(--dx-g-spacing-lg, 16px);
32
+ color: var(--dx-g-gray-30, #3e3e3c);
33
+ font-size: var(--dx-g-font-size-sm, 14px);
34
+ }
35
+
36
+ .read svg {
37
+ flex-shrink: 0;
38
+ }
39
+
40
+ dx-sidebar,
41
+ dx-sidebar-old {
42
+ --dx-c-sidebar-vertical-padding: var(--dx-g-spacing-md);
43
+
44
+ z-index: calc(var(--dx-g-z-index-100) + 5);
45
+ }
46
+
47
+ dx-toc {
48
+ --dx-c-toc-width: unset;
49
+
50
+ height: calc(100% - var(--dx-c-content-vertical-spacing) * 2);
51
+ margin: var(--dx-c-content-vertical-spacing) 0;
52
+ overflow-y: auto;
53
+ }
54
+
55
+ dx-sidebar,
56
+ dx-toc {
57
+ display: block;
58
+ }
59
+
60
+ /* offset page jump link due to fixed header */
61
+ ::slotted(doc-heading) {
62
+ scroll-margin-top: var(--dx-c-content-scroll-margin-top);
63
+ }
64
+
65
+ .content {
66
+ display: flex;
67
+ position: relative;
68
+ }
69
+
70
+ .content-body-doc-phase-container {
71
+ flex: 1;
72
+ border-left: 1px solid var(--dx-g-gray-90);
73
+ }
74
+
75
+ .doc-phase-wrapper,
76
+ .version-wrapper {
77
+ /* NOTE: If you are changing z-index value here, ensure it's less than z-index of dx-sidebar in contentLayout.css */
78
+ z-index: var(--dx-g-z-index-100);
79
+ }
80
+
81
+ .doc-phase-wrapper {
82
+ position: sticky;
83
+ }
84
+
85
+ /* We don't want second component to sticky */
86
+ .version-wrapper {
87
+ position: static;
88
+ }
89
+
90
+ .content-body-container {
91
+ display: flex;
92
+ flex-direction: row;
93
+ justify-content: center;
94
+ max-width: var(--dx-g-doc-content-max-width);
95
+
96
+ /* Derived this manually by substracting (topHeader, doc header, banner and the content). */
97
+ min-height: 62vh;
98
+ margin: auto;
99
+ padding: 0 var(--dx-g-global-header-padding-horizontal);
100
+ margin-bottom: calc(2 * (var(--dx-g-spacing-5xl) + 4px));
101
+ }
102
+
103
+ .content-body {
104
+ margin: var(--dx-g-spacing-md) 0 0;
105
+ max-width: 1000px;
106
+ flex: 1;
107
+ width: 0;
108
+ }
109
+
110
+ .is-sticky {
111
+ align-self: flex-start;
112
+ position: sticky;
113
+ top: var(--dx-c-content-sidebar-sticky-top);
114
+ }
115
+
116
+ .right-nav-bar {
117
+ margin-left: var(--dx-g-spacing-2xl);
118
+ }
119
+
120
+ @media screen and (max-width: 1024px) {
121
+ .right-nav-bar {
122
+ display: none;
123
+ }
124
+ }
125
+
126
+ @media screen and (max-width: 800px) {
127
+ .content-body {
128
+ margin-top: var(--dx-c-content-vertical-spacing);
129
+ }
130
+
131
+ .content-body-doc-phase-container {
132
+ border-left: 0;
133
+ }
134
+ }
135
+
136
+ @media screen and (max-width: 768px) {
137
+ .is-sticky {
138
+ width: 100%;
139
+ }
140
+
141
+ .content {
142
+ flex-direction: column;
143
+ }
144
+
145
+ .content-body-container {
146
+ padding-right: 0;
147
+ padding-left: 0;
148
+ overflow-x: auto;
149
+ margin-bottom: calc(var(--dx-g-spacing-5xl) + 4px);
150
+ }
151
+
152
+ .left-nav-bar {
153
+ height: unset;
154
+ }
155
+
156
+ .content-body {
157
+ margin-left: var(--dx-g-spacing-mlg, 20px);
158
+ margin-right: var(--dx-g-spacing-mlg, 20px);
159
+ }
160
+ }
@@ -0,0 +1,16 @@
1
+ export class CoveoAnalyticsClient {
2
+ private config: { token: string; endpoint: string };
3
+
4
+ constructor(config: { token: string; endpoint: string }) {
5
+ this.config = config;
6
+ }
7
+
8
+ sendViewEvent(event: {
9
+ contentIdKey: string;
10
+ contentType?: string;
11
+ contentIdValue: string;
12
+ }): void {
13
+ // Mock implementation
14
+ console.log("Mock Coveo Analytics event:", event);
15
+ }
16
+ }
@@ -0,0 +1,10 @@
1
+ declare module "coveo.analytics/dist/browser.mjs" {
2
+ export class CoveoAnalyticsClient {
3
+ constructor(config: { token: string; endpoint: string });
4
+ sendViewEvent(event: {
5
+ contentIdKey: string;
6
+ contentType?: string;
7
+ contentIdValue: string;
8
+ }): void;
9
+ }
10
+ }
@@ -1,4 +1,4 @@
1
- import { CoveoAnalyticsClient } from "coveo.analytics";
1
+ import { CoveoAnalyticsClient } from "coveo.analytics/dist/browser.mjs"; // This fix is required for Node 20 upgrade, so that Coveo analytics is loaded properly by LWR.
2
2
 
3
3
  export const oldVersionDocInfo = (latestVersionLink: string) => {
4
4
  return {