@powerlines/plugin-alloy 0.26.237 → 0.26.238
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/core/components/index.cjs +1 -9
- package/dist/core/components/index.d.cts +1 -5
- package/dist/core/components/index.d.mts +1 -5
- package/dist/core/components/index.mjs +1 -5
- package/dist/core/components/infrastructure-file.cjs +6 -3
- package/dist/core/components/infrastructure-file.d.cts +1 -1
- package/dist/core/components/infrastructure-file.d.cts.map +1 -1
- package/dist/core/components/infrastructure-file.d.mts +1 -1
- package/dist/core/components/infrastructure-file.mjs +5 -2
- package/dist/core/contexts/index.cjs +1 -11
- package/dist/core/contexts/index.d.cts +1 -3
- package/dist/core/contexts/index.d.mts +1 -3
- package/dist/core/contexts/index.mjs +1 -3
- package/dist/core/index.cjs +2 -23
- package/dist/core/index.d.cts +2 -10
- package/dist/core/index.d.mts +2 -10
- package/dist/core/index.mjs +2 -10
- package/dist/helpers/capnp.cjs +2 -2
- package/dist/helpers/capnp.mjs +2 -2
- package/dist/index.cjs +10 -2
- package/dist/index.d.cts +10 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +10 -4
- package/dist/index.mjs +10 -2
- package/dist/render.cjs +67 -48
- package/dist/render.d.cts +33 -2
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts +33 -2
- package/dist/render.mjs +68 -49
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/plugin.d.cts +7 -4
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +7 -4
- package/dist/typescript/components/builtin-file.cjs +6 -6
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +2 -2
- package/dist/typescript/components/builtin-file.mjs +2 -2
- package/dist/typescript/components/entry-file.cjs +2 -2
- package/dist/typescript/components/entry-file.d.cts +1 -1
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +1 -1
- package/dist/typescript/components/entry-file.mjs +1 -1
- package/dist/typescript/components/index.cjs +1 -56
- package/dist/typescript/components/index.d.cts +1 -12
- package/dist/typescript/components/index.d.mts +1 -12
- package/dist/typescript/components/index.mjs +1 -12
- package/dist/typescript/index.cjs +1 -64
- package/dist/typescript/index.d.cts +1 -17
- package/dist/typescript/index.d.mts +1 -17
- package/dist/typescript/index.mjs +1 -17
- package/package.json +18 -639
- package/dist/core/components/output.cjs +0 -40
- package/dist/core/components/output.d.cts +0 -22
- package/dist/core/components/output.d.cts.map +0 -1
- package/dist/core/components/output.d.mts +0 -22
- package/dist/core/components/output.d.mts.map +0 -1
- package/dist/core/components/output.mjs +0 -40
- package/dist/core/components/output.mjs.map +0 -1
- package/dist/core/components/single-line-comment.cjs +0 -22
- package/dist/core/components/single-line-comment.d.cts +0 -19
- package/dist/core/components/single-line-comment.d.cts.map +0 -1
- package/dist/core/components/single-line-comment.d.mts +0 -19
- package/dist/core/components/single-line-comment.d.mts.map +0 -1
- package/dist/core/components/single-line-comment.mjs +0 -22
- package/dist/core/components/single-line-comment.mjs.map +0 -1
- package/dist/core/components/source-file.cjs +0 -64
- package/dist/core/components/source-file.d.cts +0 -30
- package/dist/core/components/source-file.d.cts.map +0 -1
- package/dist/core/components/source-file.d.mts +0 -30
- package/dist/core/components/source-file.d.mts.map +0 -1
- package/dist/core/components/source-file.mjs +0 -62
- package/dist/core/components/source-file.mjs.map +0 -1
- package/dist/core/components/spacing.cjs +0 -19
- package/dist/core/components/spacing.d.cts +0 -19
- package/dist/core/components/spacing.d.cts.map +0 -1
- package/dist/core/components/spacing.d.mts +0 -19
- package/dist/core/components/spacing.d.mts.map +0 -1
- package/dist/core/components/spacing.mjs +0 -19
- package/dist/core/components/spacing.mjs.map +0 -1
- package/dist/core/contexts/meta.cjs +0 -40
- package/dist/core/contexts/meta.d.cts +0 -46
- package/dist/core/contexts/meta.d.cts.map +0 -1
- package/dist/core/contexts/meta.d.mts +0 -46
- package/dist/core/contexts/meta.d.mts.map +0 -1
- package/dist/core/contexts/meta.mjs +0 -37
- package/dist/core/contexts/meta.mjs.map +0 -1
- package/dist/core/contexts/schema.cjs +0 -38
- package/dist/core/contexts/schema.d.cts +0 -26
- package/dist/core/contexts/schema.d.cts.map +0 -1
- package/dist/core/contexts/schema.d.mts +0 -26
- package/dist/core/contexts/schema.d.mts.map +0 -1
- package/dist/core/contexts/schema.mjs +0 -35
- package/dist/core/contexts/schema.mjs.map +0 -1
- package/dist/core/helpers/code.cjs +0 -33
- package/dist/core/helpers/code.d.cts +0 -28
- package/dist/core/helpers/code.d.cts.map +0 -1
- package/dist/core/helpers/code.d.mts +0 -28
- package/dist/core/helpers/code.d.mts.map +0 -1
- package/dist/core/helpers/code.mjs +0 -33
- package/dist/core/helpers/code.mjs.map +0 -1
- package/dist/core/helpers/index.cjs +0 -4
- package/dist/core/helpers/index.d.cts +0 -2
- package/dist/core/helpers/index.d.mts +0 -2
- package/dist/core/helpers/index.mjs +0 -3
- package/dist/hcl/components/block-declaration.cjs +0 -33
- package/dist/hcl/components/block-declaration.d.cts +0 -19
- package/dist/hcl/components/block-declaration.d.cts.map +0 -1
- package/dist/hcl/components/block-declaration.d.mts +0 -19
- package/dist/hcl/components/block-declaration.d.mts.map +0 -1
- package/dist/hcl/components/block-declaration.mjs +0 -33
- package/dist/hcl/components/block-declaration.mjs.map +0 -1
- package/dist/hcl/components/hcl-file.cjs +0 -82
- package/dist/hcl/components/hcl-file.d.cts +0 -25
- package/dist/hcl/components/hcl-file.d.cts.map +0 -1
- package/dist/hcl/components/hcl-file.d.mts +0 -25
- package/dist/hcl/components/hcl-file.d.mts.map +0 -1
- package/dist/hcl/components/hcl-file.mjs +0 -81
- package/dist/hcl/components/hcl-file.mjs.map +0 -1
- package/dist/hcl/components/index.cjs +0 -11
- package/dist/hcl/components/index.d.cts +0 -5
- package/dist/hcl/components/index.d.mts +0 -5
- package/dist/hcl/components/index.mjs +0 -6
- package/dist/hcl/components/packer-file.cjs +0 -28
- package/dist/hcl/components/packer-file.d.cts +0 -16
- package/dist/hcl/components/packer-file.d.cts.map +0 -1
- package/dist/hcl/components/packer-file.d.mts +0 -16
- package/dist/hcl/components/packer-file.d.mts.map +0 -1
- package/dist/hcl/components/packer-file.mjs +0 -28
- package/dist/hcl/components/packer-file.mjs.map +0 -1
- package/dist/hcl/components/terraform-file.cjs +0 -29
- package/dist/hcl/components/terraform-file.d.cts +0 -17
- package/dist/hcl/components/terraform-file.d.cts.map +0 -1
- package/dist/hcl/components/terraform-file.d.mts +0 -17
- package/dist/hcl/components/terraform-file.d.mts.map +0 -1
- package/dist/hcl/components/terraform-file.mjs +0 -29
- package/dist/hcl/components/terraform-file.mjs.map +0 -1
- package/dist/hcl/index.cjs +0 -12
- package/dist/hcl/index.d.cts +0 -6
- package/dist/hcl/index.d.mts +0 -6
- package/dist/hcl/index.mjs +0 -7
- package/dist/markdown/components/alert.cjs +0 -74
- package/dist/markdown/components/alert.d.cts +0 -52
- package/dist/markdown/components/alert.d.cts.map +0 -1
- package/dist/markdown/components/alert.d.mts +0 -52
- package/dist/markdown/components/alert.d.mts.map +0 -1
- package/dist/markdown/components/alert.mjs +0 -69
- package/dist/markdown/components/alert.mjs.map +0 -1
- package/dist/markdown/components/front-matter.cjs +0 -30
- package/dist/markdown/components/front-matter.d.cts +0 -13
- package/dist/markdown/components/front-matter.d.cts.map +0 -1
- package/dist/markdown/components/front-matter.d.mts +0 -13
- package/dist/markdown/components/front-matter.d.mts.map +0 -1
- package/dist/markdown/components/front-matter.mjs +0 -30
- package/dist/markdown/components/front-matter.mjs.map +0 -1
- package/dist/markdown/components/heading.cjs +0 -23
- package/dist/markdown/components/heading.d.cts +0 -17
- package/dist/markdown/components/heading.d.cts.map +0 -1
- package/dist/markdown/components/heading.d.mts +0 -17
- package/dist/markdown/components/heading.d.mts.map +0 -1
- package/dist/markdown/components/heading.mjs +0 -23
- package/dist/markdown/components/heading.mjs.map +0 -1
- package/dist/markdown/components/index.cjs +0 -20
- package/dist/markdown/components/index.d.cts +0 -6
- package/dist/markdown/components/index.d.mts +0 -6
- package/dist/markdown/components/index.mjs +0 -7
- package/dist/markdown/components/markdown-file.cjs +0 -146
- package/dist/markdown/components/markdown-file.d.cts +0 -25
- package/dist/markdown/components/markdown-file.d.cts.map +0 -1
- package/dist/markdown/components/markdown-file.d.mts +0 -25
- package/dist/markdown/components/markdown-file.d.mts.map +0 -1
- package/dist/markdown/components/markdown-file.mjs +0 -145
- package/dist/markdown/components/markdown-file.mjs.map +0 -1
- package/dist/markdown/components/markdown-table.cjs +0 -106
- package/dist/markdown/components/markdown-table.d.cts +0 -37
- package/dist/markdown/components/markdown-table.d.cts.map +0 -1
- package/dist/markdown/components/markdown-table.d.mts +0 -37
- package/dist/markdown/components/markdown-table.d.mts.map +0 -1
- package/dist/markdown/components/markdown-table.mjs +0 -104
- package/dist/markdown/components/markdown-table.mjs.map +0 -1
- package/dist/markdown/contexts/index.cjs +0 -7
- package/dist/markdown/contexts/index.d.cts +0 -2
- package/dist/markdown/contexts/index.d.mts +0 -2
- package/dist/markdown/contexts/index.mjs +0 -3
- package/dist/markdown/contexts/markdown-table.cjs +0 -37
- package/dist/markdown/contexts/markdown-table.d.cts +0 -35
- package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
- package/dist/markdown/contexts/markdown-table.d.mts +0 -35
- package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
- package/dist/markdown/contexts/markdown-table.mjs +0 -34
- package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
- package/dist/markdown/index.cjs +0 -27
- package/dist/markdown/index.d.cts +0 -9
- package/dist/markdown/index.d.mts +0 -9
- package/dist/markdown/index.mjs +0 -10
- package/dist/types/components.cjs +0 -9
- package/dist/types/components.d.cts +0 -137
- package/dist/types/components.d.cts.map +0 -1
- package/dist/types/components.d.mts +0 -137
- package/dist/types/components.d.mts.map +0 -1
- package/dist/types/components.mjs +0 -10
- package/dist/types/components.mjs.map +0 -1
- package/dist/typescript/components/class-declaration.cjs +0 -305
- package/dist/typescript/components/class-declaration.d.cts +0 -139
- package/dist/typescript/components/class-declaration.d.cts.map +0 -1
- package/dist/typescript/components/class-declaration.d.mts +0 -139
- package/dist/typescript/components/class-declaration.d.mts.map +0 -1
- package/dist/typescript/components/class-declaration.mjs +0 -300
- package/dist/typescript/components/class-declaration.mjs.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
- package/dist/typescript/components/dynamic-import-statement.d.cts +0 -30
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +0 -30
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
- package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
- package/dist/typescript/components/interface-declaration.cjs +0 -257
- package/dist/typescript/components/interface-declaration.d.cts +0 -78
- package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
- package/dist/typescript/components/interface-declaration.d.mts +0 -78
- package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
- package/dist/typescript/components/interface-declaration.mjs +0 -254
- package/dist/typescript/components/interface-declaration.mjs.map +0 -1
- package/dist/typescript/components/object-declaration.cjs +0 -131
- package/dist/typescript/components/object-declaration.d.cts +0 -24
- package/dist/typescript/components/object-declaration.d.cts.map +0 -1
- package/dist/typescript/components/object-declaration.d.mts +0 -24
- package/dist/typescript/components/object-declaration.d.mts.map +0 -1
- package/dist/typescript/components/object-declaration.mjs +0 -130
- package/dist/typescript/components/object-declaration.mjs.map +0 -1
- package/dist/typescript/components/property-name.cjs +0 -31
- package/dist/typescript/components/property-name.d.cts +0 -21
- package/dist/typescript/components/property-name.d.cts.map +0 -1
- package/dist/typescript/components/property-name.d.mts +0 -21
- package/dist/typescript/components/property-name.d.mts.map +0 -1
- package/dist/typescript/components/property-name.mjs +0 -31
- package/dist/typescript/components/property-name.mjs.map +0 -1
- package/dist/typescript/components/record-expression.cjs +0 -12
- package/dist/typescript/components/record-expression.d.cts +0 -9
- package/dist/typescript/components/record-expression.d.cts.map +0 -1
- package/dist/typescript/components/record-expression.d.mts +0 -9
- package/dist/typescript/components/record-expression.d.mts.map +0 -1
- package/dist/typescript/components/record-expression.mjs +0 -12
- package/dist/typescript/components/record-expression.mjs.map +0 -1
- package/dist/typescript/components/tsdoc-schema.cjs +0 -166
- package/dist/typescript/components/tsdoc-schema.d.cts +0 -21
- package/dist/typescript/components/tsdoc-schema.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc-schema.d.mts +0 -21
- package/dist/typescript/components/tsdoc-schema.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc-schema.mjs +0 -165
- package/dist/typescript/components/tsdoc-schema.mjs.map +0 -1
- package/dist/typescript/components/tsdoc.cjs +0 -486
- package/dist/typescript/components/tsdoc.d.cts +0 -163
- package/dist/typescript/components/tsdoc.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc.d.mts +0 -163
- package/dist/typescript/components/tsdoc.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc.mjs +0 -465
- package/dist/typescript/components/tsdoc.mjs.map +0 -1
- package/dist/typescript/components/type-declaration.cjs +0 -38
- package/dist/typescript/components/type-declaration.d.cts +0 -15
- package/dist/typescript/components/type-declaration.d.cts.map +0 -1
- package/dist/typescript/components/type-declaration.d.mts +0 -15
- package/dist/typescript/components/type-declaration.d.mts.map +0 -1
- package/dist/typescript/components/type-declaration.mjs +0 -38
- package/dist/typescript/components/type-declaration.mjs.map +0 -1
- package/dist/typescript/components/type-parameters.cjs +0 -82
- package/dist/typescript/components/type-parameters.d.cts +0 -22
- package/dist/typescript/components/type-parameters.d.cts.map +0 -1
- package/dist/typescript/components/type-parameters.d.mts +0 -22
- package/dist/typescript/components/type-parameters.d.mts.map +0 -1
- package/dist/typescript/components/type-parameters.mjs +0 -82
- package/dist/typescript/components/type-parameters.mjs.map +0 -1
- package/dist/typescript/components/typescript-file.cjs +0 -231
- package/dist/typescript/components/typescript-file.d.cts +0 -46
- package/dist/typescript/components/typescript-file.d.cts.map +0 -1
- package/dist/typescript/components/typescript-file.d.mts +0 -46
- package/dist/typescript/components/typescript-file.d.mts.map +0 -1
- package/dist/typescript/components/typescript-file.mjs +0 -229
- package/dist/typescript/components/typescript-file.mjs.map +0 -1
- package/dist/typescript/contexts/index.cjs +0 -4
- package/dist/typescript/contexts/index.d.cts +0 -2
- package/dist/typescript/contexts/index.d.mts +0 -2
- package/dist/typescript/contexts/index.mjs +0 -3
- package/dist/typescript/contexts/lexical-scope.cjs +0 -25
- package/dist/typescript/contexts/lexical-scope.d.cts +0 -12
- package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +0 -12
- package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.mjs +0 -25
- package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
- package/dist/typescript/contexts/member-scope.cjs +0 -23
- package/dist/typescript/contexts/member-scope.d.cts +0 -18
- package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/member-scope.d.mts +0 -18
- package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/member-scope.mjs +0 -23
- package/dist/typescript/contexts/member-scope.mjs.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.cjs +0 -25
- package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -13
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -13
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
- package/dist/typescript/helpers/index.cjs +0 -6
- package/dist/typescript/helpers/index.d.cts +0 -3
- package/dist/typescript/helpers/index.d.mts +0 -3
- package/dist/typescript/helpers/index.mjs +0 -4
- package/dist/typescript/helpers/utilities.cjs +0 -15
- package/dist/typescript/helpers/utilities.d.cts +0 -11
- package/dist/typescript/helpers/utilities.d.cts.map +0 -1
- package/dist/typescript/helpers/utilities.d.mts +0 -11
- package/dist/typescript/helpers/utilities.d.mts.map +0 -1
- package/dist/typescript/helpers/utilities.mjs +0 -14
- package/dist/typescript/helpers/utilities.mjs.map +0 -1
- package/dist/yaml/components/index.cjs +0 -5
- package/dist/yaml/components/index.d.cts +0 -2
- package/dist/yaml/components/index.d.mts +0 -2
- package/dist/yaml/components/index.mjs +0 -3
- package/dist/yaml/components/yaml-file.cjs +0 -148
- package/dist/yaml/components/yaml-file.d.cts +0 -31
- package/dist/yaml/components/yaml-file.d.cts.map +0 -1
- package/dist/yaml/components/yaml-file.d.mts +0 -31
- package/dist/yaml/components/yaml-file.d.mts.map +0 -1
- package/dist/yaml/components/yaml-file.mjs +0 -147
- package/dist/yaml/components/yaml-file.mjs.map +0 -1
- package/dist/yaml/index.cjs +0 -6
- package/dist/yaml/index.d.cts +0 -3
- package/dist/yaml/index.d.mts +0 -3
- package/dist/yaml/index.mjs +0 -4
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_markdown_contexts_markdown_table = require('../contexts/markdown-table.cjs');
|
|
3
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
5
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
7
|
-
|
|
8
|
-
//#region src/markdown/components/markdown-table.tsx
|
|
9
|
-
/**
|
|
10
|
-
* Component that provides a context for rendering markdown tables.
|
|
11
|
-
*/
|
|
12
|
-
function MarkdownTable(props) {
|
|
13
|
-
const [{ children, columns, data }] = (0, _alloy_js_core.splitProps)(props, [
|
|
14
|
-
"children",
|
|
15
|
-
"columns",
|
|
16
|
-
"data"
|
|
17
|
-
]);
|
|
18
|
-
if (data.length === 0) return null;
|
|
19
|
-
const cols = (0, _alloy_js_core.computed)(() => columns && columns.length > 0 ? columns : Object.keys(data[0] ?? {}).map((name, index) => ({
|
|
20
|
-
index,
|
|
21
|
-
name,
|
|
22
|
-
align: "left",
|
|
23
|
-
width: 20
|
|
24
|
-
})));
|
|
25
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_markdown_contexts_markdown_table.MarkdownTableContext.Provider, {
|
|
26
|
-
get value() {
|
|
27
|
-
return {
|
|
28
|
-
columns: cols.value,
|
|
29
|
-
data
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
get children() {
|
|
33
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
34
|
-
get when() {
|
|
35
|
-
return Boolean(children);
|
|
36
|
-
},
|
|
37
|
-
children
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Component that provides a context for rendering markdown tables.
|
|
44
|
-
*/
|
|
45
|
-
function MarkdownTableColumn(props) {
|
|
46
|
-
const [{ children, width, align, name }] = (0, _alloy_js_core.splitProps)(props, [
|
|
47
|
-
"children",
|
|
48
|
-
"width",
|
|
49
|
-
"align",
|
|
50
|
-
"name"
|
|
51
|
-
]);
|
|
52
|
-
const tableContext = require_markdown_contexts_markdown_table.useMarkdownTable();
|
|
53
|
-
const columnRef = (0, _alloy_js_core.computed)(() => tableContext?.columns.find((c) => c.name === name));
|
|
54
|
-
const indexRef = (0, _alloy_js_core.computed)(() => columnRef.value?.index ?? 0);
|
|
55
|
-
const alignRef = (0, _alloy_js_core.computed)(() => columnRef.value?.align ?? align ?? "left");
|
|
56
|
-
const widthRef = (0, _alloy_js_core.computed)(() => columnRef.value?.width ?? width ?? 20);
|
|
57
|
-
const textLength = (0, _alloy_js_core.computed)(() => {
|
|
58
|
-
return (children ? children.toString() : "").length;
|
|
59
|
-
});
|
|
60
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
61
|
-
return [
|
|
62
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
63
|
-
get when() {
|
|
64
|
-
return indexRef.value === 0;
|
|
65
|
-
},
|
|
66
|
-
children: "|"
|
|
67
|
-
}),
|
|
68
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
69
|
-
get when() {
|
|
70
|
-
return Boolean(children);
|
|
71
|
-
},
|
|
72
|
-
get children() {
|
|
73
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
|
|
74
|
-
return _alloy_js_core.code`${alignRef.value === "left" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}${children}${alignRef.value === "right" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}`;
|
|
75
|
-
} });
|
|
76
|
-
}
|
|
77
|
-
}),
|
|
78
|
-
"|"
|
|
79
|
-
];
|
|
80
|
-
} });
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Component that provides a context for rendering markdown tables.
|
|
84
|
-
*/
|
|
85
|
-
function MarkdownTableColumnHeader(props) {
|
|
86
|
-
const [{ children, name }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "name"]);
|
|
87
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(MarkdownTableColumn, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
88
|
-
name,
|
|
89
|
-
get children() {
|
|
90
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
91
|
-
get fallback() {
|
|
92
|
-
return (0, _stryke_string_format_title_case.titleCase)(name, { useDescriptions: false });
|
|
93
|
-
},
|
|
94
|
-
get when() {
|
|
95
|
-
return !(0, _stryke_type_checks_is_undefined.isUndefined)(children);
|
|
96
|
-
},
|
|
97
|
-
children
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}))];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
|
-
exports.MarkdownTable = MarkdownTable;
|
|
105
|
-
exports.MarkdownTableColumn = MarkdownTableColumn;
|
|
106
|
-
exports.MarkdownTableColumnHeader = MarkdownTableColumnHeader;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
|
|
3
|
-
//#region src/markdown/components/markdown-table.d.ts
|
|
4
|
-
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* An optional array of column definitions. If not provided, columns will be inferred from the keys of the first data object.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* This prop allows you to explicitly define the columns of the markdown table, including their order, alignment, and width. If this prop is not provided, the component will attempt to infer the columns from the keys of the first object in the `data` array. Each column definition should include the `name` of the column (which corresponds to a key in the data objects), an optional `align` property to specify text alignment (left, right, or center), and an optional `width` property to specify the width of the column in characters.
|
|
10
|
-
*/
|
|
11
|
-
columns?: MarkdownTableColumnContextInterface<T>[];
|
|
12
|
-
/**
|
|
13
|
-
* An array of data objects to be rendered in the markdown table. Each object should have keys corresponding to the column names.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* This prop is required and should contain an array of objects representing the rows of the markdown table. Each object should have keys that correspond to the `name` properties defined in the `columns` prop (or inferred from the first object if `columns` is not provided). The values of these keys will be rendered in the respective columns of the table. If the `data` array is empty, the component will render nothing.
|
|
17
|
-
*/
|
|
18
|
-
data: T[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Component that provides a context for rendering markdown tables.
|
|
22
|
-
*/
|
|
23
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): import("@alloy-js/core").Children;
|
|
24
|
-
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
25
|
-
width?: number;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Component that provides a context for rendering markdown tables.
|
|
29
|
-
*/
|
|
30
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
31
|
-
/**
|
|
32
|
-
* Component that provides a context for rendering markdown tables.
|
|
33
|
-
*/
|
|
34
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
37
|
-
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":";;;UA6BiB,mBACf,UAAU,sBAAsB,6BACxB;;;;;;;EAOR,UAAU,oCAAoC;;;;;;;EAQ9C,MAAM;;;;;iBAMQ,cACd,UAAU,sBAAsB,qBAChC,OAAO,mBAAmB,8BAAE;KAkClB,2BAA2B,iBACrC,QAAQ,KAAK,iDACb,SAAS,KAAK;EACZ;;;;;iBAMY,oBAAoB,OAAO,oDAAwB;;;;iBA6CnD,0BAA0B,OAAO,oDAAwB"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
|
|
3
|
-
//#region src/markdown/components/markdown-table.d.ts
|
|
4
|
-
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* An optional array of column definitions. If not provided, columns will be inferred from the keys of the first data object.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* This prop allows you to explicitly define the columns of the markdown table, including their order, alignment, and width. If this prop is not provided, the component will attempt to infer the columns from the keys of the first object in the `data` array. Each column definition should include the `name` of the column (which corresponds to a key in the data objects), an optional `align` property to specify text alignment (left, right, or center), and an optional `width` property to specify the width of the column in characters.
|
|
10
|
-
*/
|
|
11
|
-
columns?: MarkdownTableColumnContextInterface<T>[];
|
|
12
|
-
/**
|
|
13
|
-
* An array of data objects to be rendered in the markdown table. Each object should have keys corresponding to the column names.
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* This prop is required and should contain an array of objects representing the rows of the markdown table. Each object should have keys that correspond to the `name` properties defined in the `columns` prop (or inferred from the first object if `columns` is not provided). The values of these keys will be rendered in the respective columns of the table. If the `data` array is empty, the component will render nothing.
|
|
17
|
-
*/
|
|
18
|
-
data: T[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Component that provides a context for rendering markdown tables.
|
|
22
|
-
*/
|
|
23
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): import("@alloy-js/core").Children;
|
|
24
|
-
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
25
|
-
width?: number;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Component that provides a context for rendering markdown tables.
|
|
29
|
-
*/
|
|
30
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
31
|
-
/**
|
|
32
|
-
* Component that provides a context for rendering markdown tables.
|
|
33
|
-
*/
|
|
34
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
35
|
-
//#endregion
|
|
36
|
-
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
37
|
-
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":""}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableContext, useMarkdownTable } from "../contexts/markdown-table.mjs";
|
|
2
|
-
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { Prose, Show, code, computed, splitProps } from "@alloy-js/core";
|
|
4
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
6
|
-
|
|
7
|
-
//#region src/markdown/components/markdown-table.tsx
|
|
8
|
-
/**
|
|
9
|
-
* Component that provides a context for rendering markdown tables.
|
|
10
|
-
*/
|
|
11
|
-
function MarkdownTable(props) {
|
|
12
|
-
const [{ children, columns, data }] = splitProps(props, [
|
|
13
|
-
"children",
|
|
14
|
-
"columns",
|
|
15
|
-
"data"
|
|
16
|
-
]);
|
|
17
|
-
if (data.length === 0) return null;
|
|
18
|
-
const cols = computed(() => columns && columns.length > 0 ? columns : Object.keys(data[0] ?? {}).map((name, index) => ({
|
|
19
|
-
index,
|
|
20
|
-
name,
|
|
21
|
-
align: "left",
|
|
22
|
-
width: 20
|
|
23
|
-
})));
|
|
24
|
-
return createComponent(MarkdownTableContext.Provider, {
|
|
25
|
-
get value() {
|
|
26
|
-
return {
|
|
27
|
-
columns: cols.value,
|
|
28
|
-
data
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
get children() {
|
|
32
|
-
return createComponent(Show, {
|
|
33
|
-
get when() {
|
|
34
|
-
return Boolean(children);
|
|
35
|
-
},
|
|
36
|
-
children
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Component that provides a context for rendering markdown tables.
|
|
43
|
-
*/
|
|
44
|
-
function MarkdownTableColumn(props) {
|
|
45
|
-
const [{ children, width, align, name }] = splitProps(props, [
|
|
46
|
-
"children",
|
|
47
|
-
"width",
|
|
48
|
-
"align",
|
|
49
|
-
"name"
|
|
50
|
-
]);
|
|
51
|
-
const tableContext = useMarkdownTable();
|
|
52
|
-
const columnRef = computed(() => tableContext?.columns.find((c) => c.name === name));
|
|
53
|
-
const indexRef = computed(() => columnRef.value?.index ?? 0);
|
|
54
|
-
const alignRef = computed(() => columnRef.value?.align ?? align ?? "left");
|
|
55
|
-
const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);
|
|
56
|
-
const textLength = computed(() => {
|
|
57
|
-
return (children ? children.toString() : "").length;
|
|
58
|
-
});
|
|
59
|
-
return createComponent(Prose, { get children() {
|
|
60
|
-
return [
|
|
61
|
-
createComponent(Show, {
|
|
62
|
-
get when() {
|
|
63
|
-
return indexRef.value === 0;
|
|
64
|
-
},
|
|
65
|
-
children: "|"
|
|
66
|
-
}),
|
|
67
|
-
createComponent(Show, {
|
|
68
|
-
get when() {
|
|
69
|
-
return Boolean(children);
|
|
70
|
-
},
|
|
71
|
-
get children() {
|
|
72
|
-
return createComponent(Prose, { get children() {
|
|
73
|
-
return code`${alignRef.value === "left" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}${children}${alignRef.value === "right" ? " ".repeat(widthRef.value - textLength.value - 1) : " "}`;
|
|
74
|
-
} });
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
"|"
|
|
78
|
-
];
|
|
79
|
-
} });
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Component that provides a context for rendering markdown tables.
|
|
83
|
-
*/
|
|
84
|
-
function MarkdownTableColumnHeader(props) {
|
|
85
|
-
const [{ children, name }, rest] = splitProps(props, ["children", "name"]);
|
|
86
|
-
return [createComponent(MarkdownTableColumn, mergeProps(rest, {
|
|
87
|
-
name,
|
|
88
|
-
get children() {
|
|
89
|
-
return createComponent(Show, {
|
|
90
|
-
get fallback() {
|
|
91
|
-
return titleCase(name, { useDescriptions: false });
|
|
92
|
-
},
|
|
93
|
-
get when() {
|
|
94
|
-
return !isUndefined(children);
|
|
95
|
-
},
|
|
96
|
-
children
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}))];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader };
|
|
104
|
-
//# sourceMappingURL=markdown-table.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_markdown_contexts_markdown_table = require('./markdown-table.cjs');
|
|
3
|
-
|
|
4
|
-
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
5
|
-
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
6
|
-
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
7
|
-
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.cjs";
|
|
2
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.mjs";
|
|
2
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
3
|
-
|
|
4
|
-
//#region src/markdown/contexts/markdown-table.ts
|
|
5
|
-
/**
|
|
6
|
-
* The Powerlines context used in template rendering.
|
|
7
|
-
*/
|
|
8
|
-
const MarkdownTableColumnContext = (0, _alloy_js_core.createNamedContext)("MarkdownTableColumn", {});
|
|
9
|
-
/**
|
|
10
|
-
* Hook to access the Powerlines Context.
|
|
11
|
-
*
|
|
12
|
-
* @returns The Context.
|
|
13
|
-
*/
|
|
14
|
-
function useMarkdownTableColumn() {
|
|
15
|
-
return (0, _alloy_js_core.useContext)(MarkdownTableColumnContext);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The Powerlines context used in template rendering.
|
|
19
|
-
*/
|
|
20
|
-
const MarkdownTableContext = (0, _alloy_js_core.createContext)({
|
|
21
|
-
columns: [],
|
|
22
|
-
data: []
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* Hook to access the Powerlines Context.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Context.
|
|
28
|
-
*/
|
|
29
|
-
function useMarkdownTable() {
|
|
30
|
-
return (0, _alloy_js_core.useContext)(MarkdownTableContext);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
exports.MarkdownTableColumnContext = MarkdownTableColumnContext;
|
|
35
|
-
exports.MarkdownTableContext = MarkdownTableContext;
|
|
36
|
-
exports.useMarkdownTable = useMarkdownTable;
|
|
37
|
-
exports.useMarkdownTableColumn = useMarkdownTableColumn;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
//#region src/markdown/contexts/markdown-table.d.ts
|
|
3
|
-
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
4
|
-
index: number;
|
|
5
|
-
name: keyof T;
|
|
6
|
-
align: "left" | "right" | "center";
|
|
7
|
-
width: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The Powerlines context used in template rendering.
|
|
11
|
-
*/
|
|
12
|
-
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
13
|
-
/**
|
|
14
|
-
* Hook to access the Powerlines Context.
|
|
15
|
-
*
|
|
16
|
-
* @returns The Context.
|
|
17
|
-
*/
|
|
18
|
-
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
19
|
-
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
20
|
-
columns: MarkdownTableColumnContextInterface<T>[];
|
|
21
|
-
data: T[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* The Powerlines context used in template rendering.
|
|
25
|
-
*/
|
|
26
|
-
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
27
|
-
/**
|
|
28
|
-
* Hook to access the Powerlines Context.
|
|
29
|
-
*
|
|
30
|
-
* @returns The Context.
|
|
31
|
-
*/
|
|
32
|
-
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
35
|
-
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;UAqBiB,oCACf,UAAU,sBAAsB;EAEhC;EACA,YAAY;EACZ;EACA;;;;;cAMW,4BAA4B,iBAAiB;;;;;;iBAW1C,0BAAsB,oCAAA;UAMrB,8BACf,UAAU,sBAAsB;EAEhC,SAAS,oCAAoC;EAC7C,MAAM;;;;;cAMK,sBAAsB,iBAAiB;;;;;;iBAWpC,oBAAgB,8BAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
//#region src/markdown/contexts/markdown-table.d.ts
|
|
3
|
-
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
4
|
-
index: number;
|
|
5
|
-
name: keyof T;
|
|
6
|
-
align: "left" | "right" | "center";
|
|
7
|
-
width: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The Powerlines context used in template rendering.
|
|
11
|
-
*/
|
|
12
|
-
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
13
|
-
/**
|
|
14
|
-
* Hook to access the Powerlines Context.
|
|
15
|
-
*
|
|
16
|
-
* @returns The Context.
|
|
17
|
-
*/
|
|
18
|
-
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
19
|
-
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
20
|
-
columns: MarkdownTableColumnContextInterface<T>[];
|
|
21
|
-
data: T[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* The Powerlines context used in template rendering.
|
|
25
|
-
*/
|
|
26
|
-
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
27
|
-
/**
|
|
28
|
-
* Hook to access the Powerlines Context.
|
|
29
|
-
*
|
|
30
|
-
* @returns The Context.
|
|
31
|
-
*/
|
|
32
|
-
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
35
|
-
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createContext, createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/markdown/contexts/markdown-table.ts
|
|
4
|
-
/**
|
|
5
|
-
* The Powerlines context used in template rendering.
|
|
6
|
-
*/
|
|
7
|
-
const MarkdownTableColumnContext = createNamedContext("MarkdownTableColumn", {});
|
|
8
|
-
/**
|
|
9
|
-
* Hook to access the Powerlines Context.
|
|
10
|
-
*
|
|
11
|
-
* @returns The Context.
|
|
12
|
-
*/
|
|
13
|
-
function useMarkdownTableColumn() {
|
|
14
|
-
return useContext(MarkdownTableColumnContext);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The Powerlines context used in template rendering.
|
|
18
|
-
*/
|
|
19
|
-
const MarkdownTableContext = createContext({
|
|
20
|
-
columns: [],
|
|
21
|
-
data: []
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Hook to access the Powerlines Context.
|
|
25
|
-
*
|
|
26
|
-
* @returns The Context.
|
|
27
|
-
*/
|
|
28
|
-
function useMarkdownTable() {
|
|
29
|
-
return useContext(MarkdownTableContext);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
export { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn };
|
|
34
|
-
//# sourceMappingURL=markdown-table.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/markdown/index.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_markdown_components_alert = require('./components/alert.cjs');
|
|
3
|
-
const require_markdown_components_front_matter = require('./components/front-matter.cjs');
|
|
4
|
-
const require_markdown_components_heading = require('./components/heading.cjs');
|
|
5
|
-
const require_markdown_components_markdown_file = require('./components/markdown-file.cjs');
|
|
6
|
-
const require_markdown_contexts_markdown_table = require('./contexts/markdown-table.cjs');
|
|
7
|
-
const require_markdown_components_markdown_table = require('./components/markdown-table.cjs');
|
|
8
|
-
require('./components/index.cjs');
|
|
9
|
-
require('./contexts/index.cjs');
|
|
10
|
-
|
|
11
|
-
exports.Alert = require_markdown_components_alert.Alert;
|
|
12
|
-
exports.CautionAlert = require_markdown_components_alert.CautionAlert;
|
|
13
|
-
exports.FrontMatter = require_markdown_components_front_matter.FrontMatter;
|
|
14
|
-
exports.Heading = require_markdown_components_heading.Heading;
|
|
15
|
-
exports.ImportantAlert = require_markdown_components_alert.ImportantAlert;
|
|
16
|
-
exports.MarkdownFile = require_markdown_components_markdown_file.MarkdownFile;
|
|
17
|
-
exports.MarkdownFileHeader = require_markdown_components_markdown_file.MarkdownFileHeader;
|
|
18
|
-
exports.MarkdownTable = require_markdown_components_markdown_table.MarkdownTable;
|
|
19
|
-
exports.MarkdownTableColumn = require_markdown_components_markdown_table.MarkdownTableColumn;
|
|
20
|
-
exports.MarkdownTableColumnContext = require_markdown_contexts_markdown_table.MarkdownTableColumnContext;
|
|
21
|
-
exports.MarkdownTableColumnHeader = require_markdown_components_markdown_table.MarkdownTableColumnHeader;
|
|
22
|
-
exports.MarkdownTableContext = require_markdown_contexts_markdown_table.MarkdownTableContext;
|
|
23
|
-
exports.NoteAlert = require_markdown_components_alert.NoteAlert;
|
|
24
|
-
exports.TipAlert = require_markdown_components_alert.TipAlert;
|
|
25
|
-
exports.WarningAlert = require_markdown_components_alert.WarningAlert;
|
|
26
|
-
exports.useMarkdownTable = require_markdown_contexts_markdown_table.useMarkdownTable;
|
|
27
|
-
exports.useMarkdownTableColumn = require_markdown_contexts_markdown_table.useMarkdownTableColumn;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.cjs";
|
|
2
|
-
import { FrontMatter, FrontMatterProps } from "./components/front-matter.cjs";
|
|
3
|
-
import { Heading, HeadingProps } from "./components/heading.cjs";
|
|
4
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.cjs";
|
|
5
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.cjs";
|
|
6
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.cjs";
|
|
7
|
-
import "./components/index.cjs";
|
|
8
|
-
import "./contexts/index.cjs";
|
|
9
|
-
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Alert, AlertProps, AlertVariantProps, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.mjs";
|
|
2
|
-
import { FrontMatter, FrontMatterProps } from "./components/front-matter.mjs";
|
|
3
|
-
import { Heading, HeadingProps } from "./components/heading.mjs";
|
|
4
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps } from "./components/markdown-file.mjs";
|
|
5
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
|
|
6
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps } from "./components/markdown-table.mjs";
|
|
7
|
-
import "./components/index.mjs";
|
|
8
|
-
import "./contexts/index.mjs";
|
|
9
|
-
export { Alert, AlertProps, AlertVariantProps, CautionAlert, FrontMatter, FrontMatterProps, Heading, HeadingProps, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableContext, MarkdownTableContextInterface, MarkdownTableProps, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|
package/dist/markdown/index.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Alert, CautionAlert, ImportantAlert, NoteAlert, TipAlert, WarningAlert } from "./components/alert.mjs";
|
|
2
|
-
import { FrontMatter } from "./components/front-matter.mjs";
|
|
3
|
-
import { Heading } from "./components/heading.mjs";
|
|
4
|
-
import { MarkdownFile, MarkdownFileHeader } from "./components/markdown-file.mjs";
|
|
5
|
-
import { MarkdownTableColumnContext, MarkdownTableContext, useMarkdownTable, useMarkdownTableColumn } from "./contexts/markdown-table.mjs";
|
|
6
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader } from "./components/markdown-table.mjs";
|
|
7
|
-
import "./components/index.mjs";
|
|
8
|
-
import "./contexts/index.mjs";
|
|
9
|
-
|
|
10
|
-
export { Alert, CautionAlert, FrontMatter, Heading, ImportantAlert, MarkdownFile, MarkdownFileHeader, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnContext, MarkdownTableColumnHeader, MarkdownTableContext, NoteAlert, TipAlert, WarningAlert, useMarkdownTable, useMarkdownTableColumn };
|