@mathstack/app-kit 2.1.0 → 2.2.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.
Files changed (61) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +36 -36
  3. package/{src/lib/baseline-styles → baseline-styles}/_css-reset.scss +118 -118
  4. package/{src/lib/baseline-styles → baseline-styles}/_grid.scss +4 -4
  5. package/{src/lib/baseline-styles → baseline-styles}/_index.scss +6 -6
  6. package/{src/lib/baseline-styles → baseline-styles}/_sass-utils.scss +23 -23
  7. package/{src/lib/baseline-styles → baseline-styles}/_themes.scss +19 -19
  8. package/{src/lib/baseline-styles → baseline-styles}/_typography.scss +232 -232
  9. package/{src/lib/baseline-styles → baseline-styles}/_webkit-scrollbar.scss +22 -22
  10. package/{src/lib/baseline-styles → baseline-styles}/theming/_colors.scss +46 -46
  11. package/{src/lib/baseline-styles → baseline-styles}/theming/_index.scss +2 -2
  12. package/{src/lib/baseline-styles → baseline-styles}/theming/_typography.scss +32 -32
  13. package/fesm2022/mathstack-app-kit.mjs +843 -0
  14. package/fesm2022/mathstack-app-kit.mjs.map +1 -0
  15. package/package.json +14 -7
  16. package/types/mathstack-app-kit.d.ts +394 -0
  17. package/.eslintrc.json +0 -34
  18. package/ng-package.json +0 -15
  19. package/project.json +0 -76
  20. package/src/lib/assets/assets-resource.ts +0 -18
  21. package/src/lib/assets/assets-service.spec.ts +0 -54
  22. package/src/lib/assets/assets-service.ts +0 -73
  23. package/src/lib/assets/index.ts +0 -2
  24. package/src/lib/content-parsing/index.ts +0 -2
  25. package/src/lib/content-parsing/markdown-parser.ts +0 -197
  26. package/src/lib/content-parsing/shiki-highlighter.ts +0 -219
  27. package/src/lib/core/scss/_colors.scss +0 -37
  28. package/src/lib/core/scss/_functions.scss +0 -4
  29. package/src/lib/core/scss/_placeholders.scss +0 -1
  30. package/src/lib/core/scss/_vars.scss +0 -15
  31. package/src/lib/core/testing/stubs/services/assets.resource.stub.ts +0 -3
  32. package/src/lib/core/testing/stubs/services/main.service.stub.ts +0 -5
  33. package/src/lib/core/utilities/deep-merge.spec.ts +0 -29
  34. package/src/lib/core/utilities/deep-merge.ts +0 -21
  35. package/src/lib/core/utilities/index.ts +0 -2
  36. package/src/lib/core/utilities/safe-assign.spec.ts +0 -41
  37. package/src/lib/core/utilities/safe-assign.ts +0 -42
  38. package/src/lib/documentation-display/active-heading-tracker.ts +0 -61
  39. package/src/lib/documentation-display/document-index/document-index.component.html +0 -34
  40. package/src/lib/documentation-display/document-index/document-index.component.scss +0 -56
  41. package/src/lib/documentation-display/document-index/document-index.component.spec.ts +0 -0
  42. package/src/lib/documentation-display/document-index/document-index.component.ts +0 -39
  43. package/src/lib/documentation-display/documentation-config-parser.ts +0 -92
  44. package/src/lib/documentation-display/documentation-content-service.ts +0 -118
  45. package/src/lib/documentation-display/documentation-display.component.html +0 -33
  46. package/src/lib/documentation-display/documentation-display.component.scss +0 -142
  47. package/src/lib/documentation-display/documentation-display.component.spec.ts +0 -0
  48. package/src/lib/documentation-display/documentation-display.component.ts +0 -129
  49. package/src/lib/documentation-display/index.ts +0 -6
  50. package/src/lib/documentation-display/navigation-siblings/navigation-siblings.component.html +0 -31
  51. package/src/lib/documentation-display/navigation-siblings/navigation-siblings.component.scss +0 -68
  52. package/src/lib/documentation-display/navigation-siblings/navigation-siblings.component.spec.ts +0 -0
  53. package/src/lib/documentation-display/navigation-siblings/navigation-siblings.component.ts +0 -52
  54. package/src/lib/ng-utilities/index.ts +0 -2
  55. package/src/lib/ng-utilities/ng-on-changes.spec.ts +0 -117
  56. package/src/lib/ng-utilities/ng-on-changes.ts +0 -50
  57. package/src/lib/ng-utilities/run-ng-change-detection-then.ts +0 -40
  58. package/src/public-api.ts +0 -6
  59. package/tsconfig.lib.json +0 -16
  60. package/tsconfig.lib.prod.json +0 -11
  61. package/tsconfig.spec.json +0 -10
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Mathematica
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mathematica
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,36 +1,36 @@
1
- # AppDevKit
2
-
3
- ## Overview
4
-
5
- The app-kit is a library of miscellaneous utilities, styles, and components that are specific to
6
- neither the `@mathstack/ui` nor the `@mathstack/viz` libraries.
7
-
8
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version
9
- 19.2.0.
10
-
11
- ## Code scaffolding
12
-
13
- Run `ng generate component component-name --project app-kit` to generate a new component. You can
14
- also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project app-kit`.
15
-
16
- > Note: Don't forget to add `--project app-kit` or else it will be added to the default project in
17
- > your `angular.json` file.
18
-
19
- ## Build
20
-
21
- Run `ng build app-kit` to build the project. The build artifacts will be stored in the `dist`
22
- directory.
23
-
24
- ## Publishing
25
-
26
- After building your library with `ng build app-kit`, go to the dist folder `cd dist/app-kit` and run
27
- `npm publish`.
28
-
29
- ## Running unit tests
30
-
31
- Run `ng test app-kit` to execute the unit tests via [Karma](https://karma-runner.github.io).
32
-
33
- ## Further help
34
-
35
- To get more help on the Angular CLI use `ng help` or go check out the
36
- [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
1
+ # AppDevKit
2
+
3
+ ## Overview
4
+
5
+ The app-kit is a library of miscellaneous utilities, styles, and components that are specific to
6
+ neither the `@mathstack/ui` nor the `@mathstack/viz` libraries.
7
+
8
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version
9
+ 19.2.0.
10
+
11
+ ## Code scaffolding
12
+
13
+ Run `ng generate component component-name --project app-kit` to generate a new component. You can
14
+ also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project app-kit`.
15
+
16
+ > Note: Don't forget to add `--project app-kit` or else it will be added to the default project in
17
+ > your `angular.json` file.
18
+
19
+ ## Build
20
+
21
+ Run `ng build app-kit` to build the project. The build artifacts will be stored in the `dist`
22
+ directory.
23
+
24
+ ## Publishing
25
+
26
+ After building your library with `ng build app-kit`, go to the dist folder `cd dist/app-kit` and run
27
+ `npm publish`.
28
+
29
+ ## Running unit tests
30
+
31
+ Run `ng test app-kit` to execute the unit tests via [Karma](https://karma-runner.github.io).
32
+
33
+ ## Further help
34
+
35
+ To get more help on the Angular CLI use `ng help` or go check out the
36
+ [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -1,118 +1,118 @@
1
- @mixin css-reset($default-font: var(--hsi-adk-font-sans), $color-text: #000) {
2
- $system-font-family:
3
- -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica,
4
- Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
5
-
6
- *,
7
- *::before,
8
- *::after {
9
- box-sizing: border-box;
10
- }
11
-
12
- body {
13
- min-height: 100vh;
14
- width: 100vw;
15
- overflow-x: hidden;
16
- background: white;
17
- font-family: $default-font, $system-font-family;
18
- color: $color-text;
19
- font-size: 1rem;
20
- }
21
-
22
- body,
23
- h1,
24
- h2,
25
- h3,
26
- h4,
27
- p,
28
- figure,
29
- blockquote,
30
- dl,
31
- dd {
32
- margin: 0;
33
- }
34
-
35
- p {
36
- line-height: 1.5;
37
- }
38
-
39
- button,
40
- a {
41
- cursor: pointer;
42
- color: $color-text;
43
- }
44
-
45
- button {
46
- border: none;
47
- background: none;
48
- padding: 0;
49
- padding-block: 0;
50
- padding-inline: 0;
51
- }
52
-
53
- a {
54
- text-decoration: none;
55
- }
56
-
57
- ul[role='list'],
58
- ol[role='list'] {
59
- list-style: none;
60
- }
61
-
62
- html:focus-within {
63
- scroll-behavior: smooth;
64
- }
65
-
66
- a:not([class]) {
67
- text-decoration-skip-ink: auto;
68
- }
69
-
70
- img,
71
- picture {
72
- max-width: 100%;
73
- display: block;
74
- }
75
-
76
- input,
77
- button,
78
- textarea,
79
- select {
80
- font: inherit;
81
- }
82
-
83
- fieldset {
84
- border: none;
85
- padding: 0;
86
- margin: 0;
87
- padding-inline-start: 0;
88
- padding-inline-end: 0;
89
- margin-inline-start: 0;
90
- margin-inline-end: 0;
91
- padding-block-start: 0;
92
- padding-block-end: 0;
93
- min-inline-size: 0px;
94
- }
95
-
96
- legend {
97
- padding: 0;
98
- margin: 0;
99
- padding-inline-start: 0;
100
- padding-inline-end: 0;
101
- border: none;
102
- }
103
-
104
- @media (prefers-reduced-motion: reduce) {
105
- html:focus-within {
106
- scroll-behavior: auto;
107
- }
108
-
109
- *,
110
- *::before,
111
- *::after {
112
- animation-duration: 0.01ms !important;
113
- animation-iteration-count: 1 !important;
114
- transition-duration: 0.01ms !important;
115
- scroll-behavior: auto !important;
116
- }
117
- }
118
- }
1
+ @mixin css-reset($default-font: var(--hsi-adk-font-sans), $color-text: #000) {
2
+ $system-font-family:
3
+ -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica,
4
+ Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
5
+
6
+ *,
7
+ *::before,
8
+ *::after {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ body {
13
+ min-height: 100vh;
14
+ width: 100vw;
15
+ overflow-x: hidden;
16
+ background: white;
17
+ font-family: $default-font, $system-font-family;
18
+ color: $color-text;
19
+ font-size: 1rem;
20
+ }
21
+
22
+ body,
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ p,
28
+ figure,
29
+ blockquote,
30
+ dl,
31
+ dd {
32
+ margin: 0;
33
+ }
34
+
35
+ p {
36
+ line-height: 1.5;
37
+ }
38
+
39
+ button,
40
+ a {
41
+ cursor: pointer;
42
+ color: $color-text;
43
+ }
44
+
45
+ button {
46
+ border: none;
47
+ background: none;
48
+ padding: 0;
49
+ padding-block: 0;
50
+ padding-inline: 0;
51
+ }
52
+
53
+ a {
54
+ text-decoration: none;
55
+ }
56
+
57
+ ul[role='list'],
58
+ ol[role='list'] {
59
+ list-style: none;
60
+ }
61
+
62
+ html:focus-within {
63
+ scroll-behavior: smooth;
64
+ }
65
+
66
+ a:not([class]) {
67
+ text-decoration-skip-ink: auto;
68
+ }
69
+
70
+ img,
71
+ picture {
72
+ max-width: 100%;
73
+ display: block;
74
+ }
75
+
76
+ input,
77
+ button,
78
+ textarea,
79
+ select {
80
+ font: inherit;
81
+ }
82
+
83
+ fieldset {
84
+ border: none;
85
+ padding: 0;
86
+ margin: 0;
87
+ padding-inline-start: 0;
88
+ padding-inline-end: 0;
89
+ margin-inline-start: 0;
90
+ margin-inline-end: 0;
91
+ padding-block-start: 0;
92
+ padding-block-end: 0;
93
+ min-inline-size: 0px;
94
+ }
95
+
96
+ legend {
97
+ padding: 0;
98
+ margin: 0;
99
+ padding-inline-start: 0;
100
+ padding-inline-end: 0;
101
+ border: none;
102
+ }
103
+
104
+ @media (prefers-reduced-motion: reduce) {
105
+ html:focus-within {
106
+ scroll-behavior: auto;
107
+ }
108
+
109
+ *,
110
+ *::before,
111
+ *::after {
112
+ animation-duration: 0.01ms !important;
113
+ animation-iteration-count: 1 !important;
114
+ transition-duration: 0.01ms !important;
115
+ scroll-behavior: auto !important;
116
+ }
117
+ }
118
+ }
@@ -1,4 +1,4 @@
1
- @function grid($number) {
2
- $grid: 0.25rem;
3
- @return $number * $grid;
4
- }
1
+ @function grid($number) {
2
+ $grid: 0.25rem;
3
+ @return $number * $grid;
4
+ }
@@ -1,6 +1,6 @@
1
- @forward 'css-reset';
2
- @forward 'grid';
3
- @forward 'sass-utils';
4
- @forward 'themes';
5
- @forward 'typography';
6
- @forward 'webkit-scrollbar';
1
+ @forward 'css-reset';
2
+ @forward 'grid';
3
+ @forward 'sass-utils';
4
+ @forward 'themes';
5
+ @forward 'typography';
6
+ @forward 'webkit-scrollbar';
@@ -1,23 +1,23 @@
1
- @use 'sass:meta';
2
- // create mixin
3
- @mixin map-scss-vars-into-css-vars($map, $prefix: '', $key: '') {
4
- @each $name, $value in $map {
5
- // copy the map key
6
- $key-copy: $key;
7
- // create name for CSS custom property that contains:
8
- // current key + child key from nested map
9
- @if $name != 'rest' {
10
- $key: #{$key}-#{$name};
11
- }
12
- @if meta.type-of($value) == 'map' {
13
- // if value is a map, invoke it once more
14
- @include map-scss-vars-into-css-vars($value, $prefix, $key);
15
- } @else if $prefix == '' {
16
- -#{$key}: #{$value};
17
- } @else {
18
- --#{$prefix}#{$key}: #{$value};
19
- }
20
- // next iteration of loop should go with unchanged key
21
- $key: $key-copy;
22
- }
23
- }
1
+ @use 'sass:meta';
2
+ // create mixin
3
+ @mixin map-scss-vars-into-css-vars($map, $prefix: '', $key: '') {
4
+ @each $name, $value in $map {
5
+ // copy the map key
6
+ $key-copy: $key;
7
+ // create name for CSS custom property that contains:
8
+ // current key + child key from nested map
9
+ @if $name != 'rest' {
10
+ $key: #{$key}-#{$name};
11
+ }
12
+ @if meta.type-of($value) == 'map' {
13
+ // if value is a map, invoke it once more
14
+ @include map-scss-vars-into-css-vars($value, $prefix, $key);
15
+ } @else if $prefix == '' {
16
+ -#{$key}: #{$value};
17
+ } @else {
18
+ --#{$prefix}#{$key}: #{$value};
19
+ }
20
+ // next iteration of loop should go with unchanged key
21
+ $key: $key-copy;
22
+ }
23
+ }
@@ -1,19 +1,19 @@
1
- @use './sass-utils';
2
- @use './theming';
3
-
4
- /**
5
- * Create CSS color and typography variables for theming.
6
- *
7
- * Intended to be used globally (at html-level) in a consuming application, which will allow for easy overriding at a lower level.
8
- */
9
- @mixin create-theme() {
10
- @include sass-utils.map-scss-vars-into-css-vars(
11
- theming.$colors,
12
- 'hsi-adk-color'
13
- );
14
-
15
- @include sass-utils.map-scss-vars-into-css-vars(
16
- theming.$font,
17
- 'hsi-adk-font'
18
- );
19
- }
1
+ @use './sass-utils';
2
+ @use './theming';
3
+
4
+ /**
5
+ * Create CSS color and typography variables for theming.
6
+ *
7
+ * Intended to be used globally (at html-level) in a consuming application, which will allow for easy overriding at a lower level.
8
+ */
9
+ @mixin create-theme() {
10
+ @include sass-utils.map-scss-vars-into-css-vars(
11
+ theming.$colors,
12
+ 'hsi-adk-color'
13
+ );
14
+
15
+ @include sass-utils.map-scss-vars-into-css-vars(
16
+ theming.$font,
17
+ 'hsi-adk-font'
18
+ );
19
+ }