@plitzi/sdk-elements 0.38.6 → 0.38.8

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 (120) hide show
  1. package/CHANGELOG.md +397 -0
  2. package/dist/Element/ServerStaticShell.d.ts +7 -1
  3. package/dist/Element/ServerStaticShell.mjs +11 -11
  4. package/dist/Element/hooks/useInternalItems.mjs +2 -1
  5. package/dist/Element/hooks/useRscData.d.ts +1 -1
  6. package/dist/components/MarkdownDocument/MarkdownDocument.d.ts +32 -0
  7. package/dist/components/MarkdownDocument/MarkdownDocument.mjs +32 -0
  8. package/dist/components/MarkdownDocument/components/CodeBlock/CodeBlock.d.ts +14 -0
  9. package/dist/components/MarkdownDocument/components/CodeBlock/CodeBlock.mjs +34 -0
  10. package/dist/components/MarkdownDocument/components/CodeBlock/index.d.ts +3 -0
  11. package/dist/components/MarkdownDocument/components/CodeBlock/index.mjs +5 -0
  12. package/dist/components/MarkdownDocument/helpers/hastText.d.ts +10 -0
  13. package/dist/components/MarkdownDocument/helpers/hastText.mjs +4 -0
  14. package/dist/components/MarkdownDocument/helpers/markdownComponents.d.ts +10 -0
  15. package/dist/components/MarkdownDocument/helpers/markdownComponents.mjs +89 -0
  16. package/dist/components/MarkdownDocument/helpers/markdownParts.d.ts +16 -0
  17. package/dist/components/MarkdownDocument/helpers/markdownParts.mjs +4 -0
  18. package/dist/components/MarkdownDocument/helpers/rehypeHeadingAnchors.d.ts +8 -0
  19. package/dist/components/MarkdownDocument/helpers/rehypeHeadingAnchors.mjs +20 -0
  20. package/dist/components/MarkdownDocument/helpers/syntaxHighlighter.d.ts +3 -0
  21. package/dist/components/MarkdownDocument/helpers/syntaxHighlighter.mjs +24 -0
  22. package/dist/components/MarkdownDocument/index.d.ts +5 -0
  23. package/dist/components/MarkdownDocument/index.mjs +6 -0
  24. package/dist/dataSource/GlobalSources.mjs +101 -113
  25. package/dist/elements/advanced/Custom/declaration.d.ts +5 -1
  26. package/dist/elements/advanced/Custom/declaration.mjs +5 -1
  27. package/dist/elements/advanced/Custom/index.d.ts +5 -1
  28. package/dist/elements/basic/Button/declaration.d.ts +46 -34
  29. package/dist/elements/basic/Button/declaration.mjs +18 -42
  30. package/dist/elements/basic/Button/index.d.ts +46 -34
  31. package/dist/elements/basic/Dropdown/DropdownPopup/declaration.d.ts +2 -0
  32. package/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs +2 -0
  33. package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +2 -0
  34. package/dist/elements/basic/Dropdown/index.d.ts +2 -0
  35. package/dist/elements/basic/Heading/declaration.d.ts +5 -1
  36. package/dist/elements/basic/Heading/declaration.mjs +5 -1
  37. package/dist/elements/basic/Heading/index.d.ts +5 -1
  38. package/dist/elements/basic/Link/Link.d.ts +7 -1
  39. package/dist/elements/basic/Link/Link.mjs +27 -27
  40. package/dist/elements/basic/Link/Settings.d.ts +2 -1
  41. package/dist/elements/basic/Link/Settings.mjs +42 -29
  42. package/dist/elements/basic/Link/ariaCurrent.d.ts +12 -0
  43. package/dist/elements/basic/Link/ariaCurrent.mjs +11 -0
  44. package/dist/elements/basic/Link/declaration.d.ts +5 -1
  45. package/dist/elements/basic/Link/declaration.mjs +7 -4
  46. package/dist/elements/basic/Link/index.d.ts +5 -1
  47. package/dist/elements/basic/Markdown/Markdown.d.ts +6 -1
  48. package/dist/elements/basic/Markdown/Markdown.mjs +19 -15
  49. package/dist/elements/basic/Markdown/Settings.d.ts +2 -1
  50. package/dist/elements/basic/Markdown/Settings.mjs +16 -10
  51. package/dist/elements/basic/Markdown/declaration.d.ts +32 -5
  52. package/dist/elements/basic/Markdown/declaration.mjs +37 -7
  53. package/dist/elements/basic/Markdown/hooks/useMarkdownClassNames.d.ts +7 -0
  54. package/dist/elements/basic/Markdown/hooks/useMarkdownClassNames.mjs +13 -0
  55. package/dist/elements/basic/Markdown/index.d.ts +32 -5
  56. package/dist/elements/basic/RichText/RichText.mjs +27 -20
  57. package/dist/elements/basic/RichText/classHtmlParts.d.ts +14 -0
  58. package/dist/elements/basic/RichText/classHtmlParts.mjs +48 -0
  59. package/dist/elements/basic/RichText/declaration.d.ts +28 -1
  60. package/dist/elements/basic/RichText/declaration.mjs +31 -2
  61. package/dist/elements/basic/RichText/index.d.ts +28 -1
  62. package/dist/elements/basic/Text/declaration.d.ts +0 -2
  63. package/dist/elements/basic/Text/declaration.mjs +1 -5
  64. package/dist/elements/basic/Text/index.d.ts +0 -2
  65. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +20 -18
  66. package/dist/elements/basic/ThemeToggle/declaration.d.ts +48 -4
  67. package/dist/elements/basic/ThemeToggle/declaration.mjs +32 -8
  68. package/dist/elements/basic/ThemeToggle/index.d.ts +48 -4
  69. package/dist/elements/declarations/index.d.ts +781 -318
  70. package/dist/elements/form/FormControl/FormControl.mjs +51 -53
  71. package/dist/elements/form/FormControl/Settings.mjs +4 -0
  72. package/dist/elements/form/FormControl/components/Label.d.ts +3 -1
  73. package/dist/elements/form/FormControl/components/Label.mjs +5 -5
  74. package/dist/elements/form/FormControl/declaration.d.ts +479 -233
  75. package/dist/elements/form/FormControl/declaration.mjs +142 -76
  76. package/dist/elements/form/FormControl/helpers/isChecked.d.ts +8 -0
  77. package/dist/elements/form/FormControl/helpers/isChecked.mjs +4 -0
  78. package/dist/elements/form/FormControl/hocs/withFieldValue.mjs +2 -6
  79. package/dist/elements/form/FormControl/index.d.ts +479 -233
  80. package/dist/elements/form/FormControl/inputs/Checkbox.d.ts +7 -3
  81. package/dist/elements/form/FormControl/inputs/Checkbox.mjs +7 -6
  82. package/dist/elements/form/FormControl/inputs/Input.d.ts +6 -1
  83. package/dist/elements/form/FormControl/inputs/Input.mjs +29 -29
  84. package/dist/elements/form/FormControl/inputs/Select.d.ts +4 -1
  85. package/dist/elements/form/FormControl/inputs/Select.mjs +15 -15
  86. package/dist/elements/internal/NotFound/declaration.d.ts +5 -1
  87. package/dist/elements/internal/NotFound/declaration.mjs +5 -1
  88. package/dist/elements/internal/NotFound/index.d.ts +5 -1
  89. package/dist/elements/internal/Page/declaration.d.ts +1 -2
  90. package/dist/elements/internal/Page/declaration.mjs +2 -3
  91. package/dist/elements/internal/Page/index.d.ts +1 -2
  92. package/dist/elements/media/Image/declaration.d.ts +3 -2
  93. package/dist/elements/media/Image/declaration.mjs +3 -2
  94. package/dist/elements/media/Image/index.d.ts +3 -2
  95. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +89 -80
  96. package/dist/elements/provider/ApiContainer/hooks/useApi.mjs +23 -23
  97. package/dist/elements/provider/ApiContainer/hooks/useProviderWrite.mjs +5 -5
  98. package/dist/elements/structure/Carousel/CarouselTrack/declaration.d.ts +4 -1
  99. package/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs +4 -1
  100. package/dist/elements/structure/Carousel/CarouselTrack/index.d.ts +4 -1
  101. package/dist/elements/structure/Carousel/index.d.ts +4 -1
  102. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +2 -2
  103. package/dist/elements/structure/DialogContainer/declaration.d.ts +72 -12
  104. package/dist/elements/structure/DialogContainer/declaration.mjs +58 -17
  105. package/dist/elements/structure/DialogContainer/index.d.ts +72 -12
  106. package/dist/elements/structure/List/declaration.d.ts +5 -1
  107. package/dist/elements/structure/List/declaration.mjs +5 -1
  108. package/dist/elements/structure/List/index.d.ts +5 -1
  109. package/dist/elements/structure/ModalContainer/declaration.d.ts +36 -16
  110. package/dist/elements/structure/ModalContainer/declaration.mjs +42 -24
  111. package/dist/elements/structure/ModalContainer/index.d.ts +36 -16
  112. package/dist/elements/structure/Pagination/Pagination.mjs +23 -23
  113. package/dist/elements/structure/Pagination/declaration.d.ts +5 -1
  114. package/dist/elements/structure/Pagination/declaration.mjs +8 -2
  115. package/dist/elements/structure/Pagination/index.d.ts +5 -1
  116. package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.mjs +2 -1
  117. package/dist/index.d.ts +781 -318
  118. package/package.json +77 -13
  119. package/dist/elements/basic/Link/isCurrentPage.d.ts +0 -5
  120. package/dist/elements/basic/Link/isCurrentPage.mjs +0 -12
@@ -55,7 +55,19 @@ declare const declaration: {
55
55
  readonly displayMode: "desktop";
56
56
  readonly style: {
57
57
  readonly base: {
58
- readonly default: {};
58
+ readonly default: {
59
+ 'padding-top': string;
60
+ 'padding-left': string;
61
+ 'padding-right': string;
62
+ 'padding-bottom': string;
63
+ cursor: string;
64
+ 'font-size': string;
65
+ 'line-height': string;
66
+ 'border-top-left-radius': string;
67
+ 'border-top-right-radius': string;
68
+ 'border-bottom-left-radius': string;
69
+ 'border-bottom-right-radius': string;
70
+ };
59
71
  };
60
72
  };
61
73
  readonly subTypes: {
@@ -65,17 +77,17 @@ declare const declaration: {
65
77
  readonly style: {
66
78
  readonly base: {
67
79
  readonly default: {
68
- readonly 'padding-top': "6px";
69
- readonly 'padding-left': "12px";
70
- readonly 'padding-right': "12px";
71
- readonly 'padding-bottom': "6px";
72
- readonly cursor: "pointer";
73
- readonly 'font-size': "16px";
74
- readonly 'line-height': "1.5";
75
- readonly 'border-top-left-radius': "4px";
76
- readonly 'border-top-right-radius': "4px";
77
- readonly 'border-bottom-left-radius': "4px";
78
- readonly 'border-bottom-right-radius': "4px";
80
+ 'padding-top': string;
81
+ 'padding-left': string;
82
+ 'padding-right': string;
83
+ 'padding-bottom': string;
84
+ cursor: string;
85
+ 'font-size': string;
86
+ 'line-height': string;
87
+ 'border-top-left-radius': string;
88
+ 'border-top-right-radius': string;
89
+ 'border-bottom-left-radius': string;
90
+ 'border-bottom-right-radius': string;
79
91
  };
80
92
  };
81
93
  };
@@ -86,17 +98,17 @@ declare const declaration: {
86
98
  readonly style: {
87
99
  readonly base: {
88
100
  readonly default: {
89
- readonly 'padding-top': "6px";
90
- readonly 'padding-left': "12px";
91
- readonly 'padding-right': "12px";
92
- readonly 'padding-bottom': "6px";
93
- readonly cursor: "pointer";
94
- readonly 'font-size': "16px";
95
- readonly 'line-height': "1.5";
96
- readonly 'border-top-left-radius': "4px";
97
- readonly 'border-top-right-radius': "4px";
98
- readonly 'border-bottom-left-radius': "4px";
99
- readonly 'border-bottom-right-radius': "4px";
101
+ 'padding-top': string;
102
+ 'padding-left': string;
103
+ 'padding-right': string;
104
+ 'padding-bottom': string;
105
+ cursor: string;
106
+ 'font-size': string;
107
+ 'line-height': string;
108
+ 'border-top-left-radius': string;
109
+ 'border-top-right-radius': string;
110
+ 'border-bottom-left-radius': string;
111
+ 'border-bottom-right-radius': string;
100
112
  };
101
113
  };
102
114
  };
@@ -107,17 +119,17 @@ declare const declaration: {
107
119
  readonly style: {
108
120
  readonly base: {
109
121
  readonly default: {
110
- readonly 'padding-top': "6px";
111
- readonly 'padding-left': "12px";
112
- readonly 'padding-right': "12px";
113
- readonly 'padding-bottom': "6px";
114
- readonly cursor: "pointer";
115
- readonly 'font-size': "16px";
116
- readonly 'line-height': "1.5";
117
- readonly 'border-top-left-radius': "4px";
118
- readonly 'border-top-right-radius': "4px";
119
- readonly 'border-bottom-left-radius': "4px";
120
- readonly 'border-bottom-right-radius': "4px";
122
+ 'padding-top': string;
123
+ 'padding-left': string;
124
+ 'padding-right': string;
125
+ 'padding-bottom': string;
126
+ cursor: string;
127
+ 'font-size': string;
128
+ 'line-height': string;
129
+ 'border-top-left-radius': string;
130
+ 'border-top-right-radius': string;
131
+ 'border-bottom-left-radius': string;
132
+ 'border-bottom-right-radius': string;
121
133
  };
122
134
  };
123
135
  };
@@ -1,6 +1,18 @@
1
1
  import { elementDeclaration as e, valuesOf as t } from "@plitzi/sdk-shared/authoring/declare";
2
2
  //#region src/elements/basic/Button/declaration.ts
3
- var n = e()({
3
+ var n = {
4
+ "padding-top": "6px",
5
+ "padding-left": "12px",
6
+ "padding-right": "12px",
7
+ "padding-bottom": "6px",
8
+ cursor: "pointer",
9
+ "font-size": "16px",
10
+ "line-height": "1.5",
11
+ "border-top-left-radius": "4px",
12
+ "border-top-right-radius": "4px",
13
+ "border-bottom-left-radius": "4px",
14
+ "border-bottom-right-radius": "4px"
15
+ }, r = e()({
4
16
  type: "button",
5
17
  attributeValues: {
6
18
  subType: t()([
@@ -53,58 +65,22 @@ var n = e()({
53
65
  defaultStyle: {
54
66
  name: "Button",
55
67
  displayMode: "desktop",
56
- style: { base: { default: {} } },
68
+ style: { base: { default: n } },
57
69
  subTypes: {
58
70
  button: {
59
71
  name: "Default Button",
60
72
  displayMode: "desktop",
61
- style: { base: { default: {
62
- "padding-top": "6px",
63
- "padding-left": "12px",
64
- "padding-right": "12px",
65
- "padding-bottom": "6px",
66
- cursor: "pointer",
67
- "font-size": "16px",
68
- "line-height": "1.5",
69
- "border-top-left-radius": "4px",
70
- "border-top-right-radius": "4px",
71
- "border-bottom-left-radius": "4px",
72
- "border-bottom-right-radius": "4px"
73
- } } }
73
+ style: { base: { default: n } }
74
74
  },
75
75
  reset: {
76
76
  name: "Reset Button",
77
77
  displayMode: "desktop",
78
- style: { base: { default: {
79
- "padding-top": "6px",
80
- "padding-left": "12px",
81
- "padding-right": "12px",
82
- "padding-bottom": "6px",
83
- cursor: "pointer",
84
- "font-size": "16px",
85
- "line-height": "1.5",
86
- "border-top-left-radius": "4px",
87
- "border-top-right-radius": "4px",
88
- "border-bottom-left-radius": "4px",
89
- "border-bottom-right-radius": "4px"
90
- } } }
78
+ style: { base: { default: n } }
91
79
  },
92
80
  submit: {
93
81
  name: "Submit Button",
94
82
  displayMode: "desktop",
95
- style: { base: { default: {
96
- "padding-top": "6px",
97
- "padding-left": "12px",
98
- "padding-right": "12px",
99
- "padding-bottom": "6px",
100
- cursor: "pointer",
101
- "font-size": "16px",
102
- "line-height": "1.5",
103
- "border-top-left-radius": "4px",
104
- "border-top-right-radius": "4px",
105
- "border-bottom-left-radius": "4px",
106
- "border-bottom-right-radius": "4px"
107
- } } }
83
+ style: { base: { default: n } }
108
84
  }
109
85
  }
110
86
  },
@@ -112,4 +88,4 @@ var n = e()({
112
88
  }
113
89
  });
114
90
  //#endregion
115
- export { n as default };
91
+ export { r as default };
@@ -54,7 +54,19 @@ declare const Button: {
54
54
  readonly displayMode: "desktop";
55
55
  readonly style: {
56
56
  readonly base: {
57
- readonly default: {};
57
+ readonly default: {
58
+ 'padding-top': string;
59
+ 'padding-left': string;
60
+ 'padding-right': string;
61
+ 'padding-bottom': string;
62
+ cursor: string;
63
+ 'font-size': string;
64
+ 'line-height': string;
65
+ 'border-top-left-radius': string;
66
+ 'border-top-right-radius': string;
67
+ 'border-bottom-left-radius': string;
68
+ 'border-bottom-right-radius': string;
69
+ };
58
70
  };
59
71
  };
60
72
  readonly subTypes: {
@@ -64,17 +76,17 @@ declare const Button: {
64
76
  readonly style: {
65
77
  readonly base: {
66
78
  readonly default: {
67
- readonly 'padding-top': "6px";
68
- readonly 'padding-left': "12px";
69
- readonly 'padding-right': "12px";
70
- readonly 'padding-bottom': "6px";
71
- readonly cursor: "pointer";
72
- readonly 'font-size': "16px";
73
- readonly 'line-height': "1.5";
74
- readonly 'border-top-left-radius': "4px";
75
- readonly 'border-top-right-radius': "4px";
76
- readonly 'border-bottom-left-radius': "4px";
77
- readonly 'border-bottom-right-radius': "4px";
79
+ 'padding-top': string;
80
+ 'padding-left': string;
81
+ 'padding-right': string;
82
+ 'padding-bottom': string;
83
+ cursor: string;
84
+ 'font-size': string;
85
+ 'line-height': string;
86
+ 'border-top-left-radius': string;
87
+ 'border-top-right-radius': string;
88
+ 'border-bottom-left-radius': string;
89
+ 'border-bottom-right-radius': string;
78
90
  };
79
91
  };
80
92
  };
@@ -85,17 +97,17 @@ declare const Button: {
85
97
  readonly style: {
86
98
  readonly base: {
87
99
  readonly default: {
88
- readonly 'padding-top': "6px";
89
- readonly 'padding-left': "12px";
90
- readonly 'padding-right': "12px";
91
- readonly 'padding-bottom': "6px";
92
- readonly cursor: "pointer";
93
- readonly 'font-size': "16px";
94
- readonly 'line-height': "1.5";
95
- readonly 'border-top-left-radius': "4px";
96
- readonly 'border-top-right-radius': "4px";
97
- readonly 'border-bottom-left-radius': "4px";
98
- readonly 'border-bottom-right-radius': "4px";
100
+ 'padding-top': string;
101
+ 'padding-left': string;
102
+ 'padding-right': string;
103
+ 'padding-bottom': string;
104
+ cursor: string;
105
+ 'font-size': string;
106
+ 'line-height': string;
107
+ 'border-top-left-radius': string;
108
+ 'border-top-right-radius': string;
109
+ 'border-bottom-left-radius': string;
110
+ 'border-bottom-right-radius': string;
99
111
  };
100
112
  };
101
113
  };
@@ -106,17 +118,17 @@ declare const Button: {
106
118
  readonly style: {
107
119
  readonly base: {
108
120
  readonly default: {
109
- readonly 'padding-top': "6px";
110
- readonly 'padding-left': "12px";
111
- readonly 'padding-right': "12px";
112
- readonly 'padding-bottom': "6px";
113
- readonly cursor: "pointer";
114
- readonly 'font-size': "16px";
115
- readonly 'line-height': "1.5";
116
- readonly 'border-top-left-radius': "4px";
117
- readonly 'border-top-right-radius': "4px";
118
- readonly 'border-bottom-left-radius': "4px";
119
- readonly 'border-bottom-right-radius': "4px";
121
+ 'padding-top': string;
122
+ 'padding-left': string;
123
+ 'padding-right': string;
124
+ 'padding-bottom': string;
125
+ cursor: string;
126
+ 'font-size': string;
127
+ 'line-height': string;
128
+ 'border-top-left-radius': string;
129
+ 'border-top-right-radius': string;
130
+ 'border-bottom-left-radius': string;
131
+ 'border-bottom-right-radius': string;
120
132
  };
121
133
  };
122
134
  };
@@ -43,6 +43,8 @@ declare const declaration: {
43
43
  readonly base: {
44
44
  readonly default: {
45
45
  readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
46
+ readonly 'min-height': "24px";
47
+ readonly 'min-width': "24px";
46
48
  readonly 'padding-right': "4px";
47
49
  readonly 'padding-bottom': "4px";
48
50
  readonly 'padding-left': "4px";
@@ -37,6 +37,8 @@ var t = e()({
37
37
  displayMode: "desktop",
38
38
  style: { base: { default: {
39
39
  "background-color": "light-dark(white, oklch(0.21 0.006 285.885))",
40
+ "min-height": "24px",
41
+ "min-width": "24px",
40
42
  "padding-right": "4px",
41
43
  "padding-bottom": "4px",
42
44
  "padding-left": "4px",
@@ -42,6 +42,8 @@ declare const DropdownPopup: {
42
42
  readonly base: {
43
43
  readonly default: {
44
44
  readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
45
+ readonly 'min-height': "24px";
46
+ readonly 'min-width': "24px";
45
47
  readonly 'padding-right': "4px";
46
48
  readonly 'padding-bottom': "4px";
47
49
  readonly 'padding-left': "4px";
@@ -47,6 +47,8 @@ declare const Dropdown: {
47
47
  readonly base: {
48
48
  readonly default: {
49
49
  readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
50
+ readonly 'min-height': "24px";
51
+ readonly 'min-width': "24px";
50
52
  readonly 'padding-right': "4px";
51
53
  readonly 'padding-bottom': "4px";
52
54
  readonly 'padding-left': "4px";
@@ -47,7 +47,11 @@ declare const declaration: {
47
47
  readonly displayMode: "desktop";
48
48
  readonly style: {
49
49
  readonly base: {
50
- readonly default: {};
50
+ readonly default: {
51
+ readonly 'margin-top': "25px";
52
+ readonly 'margin-bottom': "25px";
53
+ readonly 'font-weight': 700;
54
+ };
51
55
  };
52
56
  };
53
57
  readonly subTypes: {
@@ -44,7 +44,11 @@ var n = e()({
44
44
  defaultStyle: {
45
45
  name: "Heading",
46
46
  displayMode: "desktop",
47
- style: { base: { default: {} } },
47
+ style: { base: { default: {
48
+ "margin-top": "25px",
49
+ "margin-bottom": "25px",
50
+ "font-weight": 700
51
+ } } },
48
52
  subTypes: {
49
53
  h1: {
50
54
  name: "H1 Heading",
@@ -46,7 +46,11 @@ declare const Heading: {
46
46
  readonly displayMode: "desktop";
47
47
  readonly style: {
48
48
  readonly base: {
49
- readonly default: {};
49
+ readonly default: {
50
+ readonly 'margin-top': "25px";
51
+ readonly 'margin-bottom': "25px";
52
+ readonly 'font-weight': 700;
53
+ };
50
54
  };
51
55
  };
52
56
  readonly subTypes: {
@@ -32,8 +32,14 @@ export type LinkProps = {
32
32
  icon?: string;
33
33
  /** Which side of the words the icon sits on. */
34
34
  iconPlacement?: IconPlacement;
35
+ /**
36
+ * Where the link is current. `page` (the default): on the page it leads to and nowhere else. `section`: on that page
37
+ * and every page under its path — `/automations/runs` stays lit on `/automations/runs/42`, a journal's link on its
38
+ * articles — announced there as the current entry (`aria-current="true"`) rather than the current page.
39
+ */
40
+ current?: 'page' | 'section';
35
41
  };
36
- declare const Link: ({ ref, children, className, href, target, mode, hash, label, content, contentPlacement, icon, iconPlacement }: LinkProps) => import('react').JSX.Element;
42
+ declare const Link: ({ ref, children, className, href, target, mode, hash, label, content, contentPlacement, icon, iconPlacement, current }: LinkProps) => import('react').JSX.Element;
37
43
  declare const _default: {
38
44
  (props: import('../../../Element/hocs/withElement').WithElementProps<LinkProps>): import('react').JSX.Element;
39
45
  displayName: string;
@@ -2,7 +2,7 @@ import e from "../../../Element/hocs/withElement.mjs";
2
2
  import t from "../../../Element/hooks/useElement.mjs";
3
3
  import { RootElement as n } from "../../../Element/RootElement.mjs";
4
4
  import r from "../../../Element/ElementWords.mjs";
5
- import { isCurrentPage as i } from "./isCurrentPage.mjs";
5
+ import { ariaCurrent as i } from "./ariaCurrent.mjs";
6
6
  import { useMemo as a } from "react";
7
7
  import o from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
8
8
  import { useSdkStore as s } from "@plitzi/sdk-shared/store";
@@ -11,84 +11,84 @@ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
11
  import d from "clsx";
12
12
  import { getPageFullPath as f } from "@plitzi/sdk-navigation/NavigationHelper";
13
13
  //#region src/elements/basic/Link/Link.tsx
14
- var p = ({ ref: e, children: p, className: m = "", href: h = "#", target: g = "self", mode: _ = "page", hash: v = "", label: y = "", content: b = "", contentPlacement: x = "after", icon: S = "", iconPlacement: C = "before" }) => {
15
- let { style: w, definition: { styleSelectors: T } } = t(), { settings: { previewMode: E } } = o(), [[D, O, k, A, j, M]] = s([
14
+ var p = ({ ref: e, children: p, className: m = "", href: h = "#", target: g = "self", mode: _ = "page", hash: v = "", label: y = "", content: b = "", contentPlacement: x = "after", icon: S = "", iconPlacement: C = "before", current: w = "page" }) => {
15
+ let { style: T, definition: { styleSelectors: E } } = t(), { settings: { previewMode: D } } = o(), [[O, k, A, j, M, N]] = s([
16
16
  "pageDefinitions",
17
17
  "schema.pageFolders",
18
18
  "navigation.routeParams",
19
19
  "navigation.queryParams",
20
20
  "navigation.navigate",
21
21
  "navigation.href"
22
- ]), N = a(() => {
22
+ ]), P = a(() => {
23
23
  if (_ === "external") return h;
24
24
  if (_ === "internal") {
25
25
  let e = `/${h}`.replaceAll(/[/]+/gim, "/");
26
26
  try {
27
27
  let t = c(e, {
28
- ...A,
29
- ...k
28
+ ...j,
29
+ ...A
30
30
  }, !0);
31
31
  return typeof t == "string" ? t : e;
32
32
  } catch {}
33
33
  return e;
34
34
  }
35
- return f(D, O, h, !0);
35
+ return f(O, k, h, !0);
36
36
  }, [
37
37
  _,
38
38
  h,
39
- D,
40
39
  O,
41
- A,
42
- k
43
- ]), P = _ !== "external" && v ? `${N}#${v}` : N, F = _ !== "external" && i(N, M), I = (e) => {
44
- if (!E) return;
40
+ k,
41
+ j,
42
+ A
43
+ ]), F = _ !== "external" && v ? `${P}#${v}` : P, I = _ === "external" ? void 0 : i(P, N, w), L = (e) => {
44
+ if (!D) return;
45
45
  e.stopPropagation();
46
46
  let t = g !== "self" || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0;
47
- (_ === "page" || _ === "internal") && !t && (e.preventDefault(), j(P));
48
- }, L = a(() => {
47
+ (_ === "page" || _ === "internal") && !t && (e.preventDefault(), M(F));
48
+ }, R = a(() => {
49
49
  let t = {
50
50
  ref: e,
51
- style: w,
51
+ style: T,
52
52
  target: `_${g}`,
53
53
  ...g === "blank" ? { rel: "noopener noreferrer" } : {},
54
54
  "aria-label": y || void 0,
55
- "aria-current": F ? "page" : void 0,
55
+ "aria-current": I,
56
56
  className: d("plitzi-component__link", m)
57
57
  };
58
- return E ? {
58
+ return D ? {
59
59
  ...t,
60
- href: P
60
+ href: F
61
61
  } : {
62
62
  ...t,
63
- "href-disabled": P
63
+ "href-disabled": F
64
64
  };
65
65
  }, [
66
66
  e,
67
- w,
67
+ T,
68
68
  g,
69
69
  y,
70
- F,
70
+ I,
71
71
  m,
72
- E,
73
- P
72
+ D,
73
+ F
74
74
  ]);
75
75
  return /* @__PURE__ */ u(n, {
76
76
  tag: "a",
77
- ...L,
78
- onClick: I,
77
+ ...R,
78
+ onClick: L,
79
79
  children: [
80
80
  x === "before" && /* @__PURE__ */ l(r, {
81
81
  content: b,
82
82
  icon: S,
83
83
  iconPlacement: C,
84
- iconClassName: T.icon
84
+ iconClassName: E.icon
85
85
  }),
86
86
  p,
87
87
  x === "after" && /* @__PURE__ */ l(r, {
88
88
  content: b,
89
89
  icon: S,
90
90
  iconPlacement: C,
91
- iconClassName: T.icon
91
+ iconClassName: E.icon
92
92
  })
93
93
  ]
94
94
  });
@@ -8,7 +8,8 @@ type SettingsProps = {
8
8
  contentPlacement?: 'before' | 'after';
9
9
  icon?: string;
10
10
  iconPlacement?: 'before' | 'after';
11
+ current?: 'page' | 'section';
11
12
  onUpdate?: (key: string, value: string | boolean | number) => void;
12
13
  };
13
- declare const Settings: ({ mode, href, hash, target, label, content, contentPlacement, icon, iconPlacement, onUpdate }: SettingsProps) => import('react').JSX.Element;
14
+ declare const Settings: ({ mode, href, hash, target, label, content, contentPlacement, icon, iconPlacement, current, onUpdate }: SettingsProps) => import('react').JSX.Element;
14
15
  export default Settings;