@visitwonders/assembly 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -78,6 +78,13 @@ export interface TableSignature<T = Record<string, unknown>> {
|
|
|
78
78
|
isBordered?: boolean;
|
|
79
79
|
/** Compact padding */
|
|
80
80
|
isCompact?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Inline (left/right) edge inset for the table as a whole, on the
|
|
83
|
+
* spacing-inset scale. Insets the outer side of the first and last
|
|
84
|
+
* columns so the grid lines up with its container; inter-column spacing
|
|
85
|
+
* and per-cell padding are untouched. Default `md`.
|
|
86
|
+
*/
|
|
87
|
+
paddingInline?: 'sm' | 'md' | 'lg';
|
|
81
88
|
/** Table caption for accessibility */
|
|
82
89
|
caption?: string;
|
|
83
90
|
};
|
|
@@ -99,6 +106,7 @@ export default class Table<T = Record<string, unknown>> extends Component<TableS
|
|
|
99
106
|
constructor(owner: Owner, args: TableSignature<T>['Args']);
|
|
100
107
|
get componentId(): string;
|
|
101
108
|
get visibleColumns(): ColumnDef<T>[];
|
|
109
|
+
get paddingInline(): 'sm' | 'md' | 'lg';
|
|
102
110
|
get selectedIds(): string[];
|
|
103
111
|
get sortState(): SortState | null;
|
|
104
112
|
get displayData(): T[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/data/table.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/data/table.gts"],"names":[],"mappings":"AAwxBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAqCtC,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,SAAS,EAAE,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AEF,sBAAsB,WAAY,SAAS,CAAC,CAAC,CAAC,KAAG,aAAa,GAAG,IAAI,CAKnE;IAEF,gBAAgB,WACN,SAAS,CAAC,CAAC,CAAC,KACnB,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAQhD;IAEF,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,SAAS;IAsCjB,UAAU,WAAY,SAAS,CAAC,CAAC,CAAC,KAAG,IAAI,CAgBvC;IAEF,eAAe,QAAO,IAAI,CAWxB;IAEF,eAAe,QAAS,CAAC,UAAU,UAAU,KAAG,IAAI,CA8ClD;IAEF,cAAc,QAAS,CAAC,SAAS,UAAU,KAAG,IAAI,CAUhD;IAEF,aAAa,UAAW,aAAa,KAAG,IAAI,CA8C1C;IAEF,eAAe,QAAO,IAAI,CAGxB;IAEF,WAAW,QAAO,IAAI,CAWpB;IAEF,UAAU,QAAO,IAAI,CAGnB;IAMF,QAAQ;;;;;;OAML;IAMH,cAAc,QACP,CAAC,UACE,SAAS,CAAC,CAAC,CAAC,YACV,MAAM,KACf,WAAW,CAAC,CAAC,CAAC,CAOf;CAgdH"}
|
package/dist/data/table.css
CHANGED
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
font-size: var(--font-size-md);
|
|
10
10
|
color: var(--color-text);
|
|
11
11
|
background-color: var(--color-bg-surface);
|
|
12
|
+
|
|
13
|
+
/* Edge inset: how far the first/last column sit from the table's edges.
|
|
14
|
+
Driven by @paddingInline; defaults to today's 16px. Only the outer side
|
|
15
|
+
of the edge columns reads it, so inter-column gutters never change. */
|
|
16
|
+
--_table-edge-inset: var(--spacing-inset-md);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.table_e4aed93fe[data-padding-inline="sm"] {
|
|
20
|
+
--_table-edge-inset: var(--spacing-inset-sm);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.table_e4aed93fe[data-padding-inline="lg"] {
|
|
24
|
+
--_table-edge-inset: var(--spacing-inset-lg);
|
|
12
25
|
}
|
|
13
26
|
|
|
14
27
|
.table_e4aed93fe:focus {
|
|
@@ -53,7 +66,7 @@
|
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
.header-cell_e4aed93fe {
|
|
56
|
-
padding: var(--spacing-
|
|
69
|
+
padding: var(--spacing-inset-sm) var(--spacing-inset-md);
|
|
57
70
|
font-weight: var(--font-weight-medium);
|
|
58
71
|
color: var(--color-text-secondary);
|
|
59
72
|
text-align: left;
|
|
@@ -98,7 +111,7 @@
|
|
|
98
111
|
justify-content: space-between;
|
|
99
112
|
gap: var(--spacing-1);
|
|
100
113
|
width: 100%;
|
|
101
|
-
padding: var(--spacing-
|
|
114
|
+
padding: var(--spacing-inset-sm) var(--spacing-inset-md);
|
|
102
115
|
border: none;
|
|
103
116
|
background: none;
|
|
104
117
|
font: inherit;
|
|
@@ -194,7 +207,7 @@
|
|
|
194
207
|
============================================================================ */
|
|
195
208
|
|
|
196
209
|
.cell_e4aed93fe {
|
|
197
|
-
padding: var(--spacing-
|
|
210
|
+
padding: var(--spacing-inset-sm) var(--spacing-inset-md);
|
|
198
211
|
vertical-align: middle;
|
|
199
212
|
}
|
|
200
213
|
|
|
@@ -215,6 +228,41 @@
|
|
|
215
228
|
padding-right: 0;
|
|
216
229
|
}
|
|
217
230
|
|
|
231
|
+
/* ============================================================================
|
|
232
|
+
Edge Inset (@paddingInline)
|
|
233
|
+
============================================================================
|
|
234
|
+
The inset lands on the outer side of the first and last columns only, so
|
|
235
|
+
inter-column gutters and row-background bleed stay put. It composes with
|
|
236
|
+
@isCompact: density owns the inner padding, this owns the outer edge.
|
|
237
|
+
|
|
238
|
+
A sortable header cell is zeroed and its padding lives on the sort button.
|
|
239
|
+
So on a sortable edge column the inset lands on the button, not the zeroed
|
|
240
|
+
cell. Otherwise its label would not line up with the body cells below. */
|
|
241
|
+
|
|
242
|
+
.table_e4aed93fe .header-row_e4aed93fe > .header-cell_e4aed93fe:first-child:not([data-sortable="true"]),
|
|
243
|
+
.table_e4aed93fe .row_e4aed93fe > .cell_e4aed93fe:first-child {
|
|
244
|
+
padding-inline-start: var(--_table-edge-inset);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.table_e4aed93fe .header-row_e4aed93fe > .header-cell_e4aed93fe:last-child:not([data-sortable="true"]),
|
|
248
|
+
.table_e4aed93fe .row_e4aed93fe > .cell_e4aed93fe:last-child {
|
|
249
|
+
padding-inline-end: var(--_table-edge-inset);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.table_e4aed93fe
|
|
253
|
+
.header-row_e4aed93fe
|
|
254
|
+
> .header-cell_e4aed93fe:first-child[data-sortable="true"]
|
|
255
|
+
.sort-button_e4aed93fe {
|
|
256
|
+
padding-inline-start: var(--_table-edge-inset);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.table_e4aed93fe
|
|
260
|
+
.header-row_e4aed93fe
|
|
261
|
+
> .header-cell_e4aed93fe:last-child[data-sortable="true"]
|
|
262
|
+
.sort-button_e4aed93fe {
|
|
263
|
+
padding-inline-end: var(--_table-edge-inset);
|
|
264
|
+
}
|
|
265
|
+
|
|
218
266
|
/* ============================================================================
|
|
219
267
|
Bordered Variant
|
|
220
268
|
============================================================================ */
|
package/dist/data/table.js
CHANGED
|
@@ -80,6 +80,11 @@ class Table extends Component {
|
|
|
80
80
|
get visibleColumns() {
|
|
81
81
|
return this.args.columns.filter(col => !col.hidden);
|
|
82
82
|
}
|
|
83
|
+
// Edge inset on the spacing-inset scale. Always resolves to a value so the
|
|
84
|
+
// attribute is present on every render; `md` is today's default.
|
|
85
|
+
get paddingInline() {
|
|
86
|
+
return this.args.paddingInline ?? 'md';
|
|
87
|
+
}
|
|
83
88
|
get selectedIds() {
|
|
84
89
|
return this.args.selectedIds ?? [];
|
|
85
90
|
}
|
|
@@ -378,7 +383,7 @@ class Table extends Component {
|
|
|
378
383
|
// Template
|
|
379
384
|
// ============================================================================
|
|
380
385
|
static {
|
|
381
|
-
setComponentTemplate(precompileTemplate("<table class=\"table_e4aed93fe\" data-sticky-header={{if @hasStickyHeader \"true\"}} data-striped={{if @isStriped \"true\"}} data-bordered={{if @isBordered \"true\"}} data-compact={{if @isCompact \"true\"}} data-loading={{if @isLoading \"true\"}} data-test-table tabindex=\"0\" {{this.setupRef}} {{!-- template-lint-disable no-pointer-down-event-binding --}} {{on \"mousedown\" this.handleMouseDown}} {{on \"keydown\" this.handleKeyDown}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}} ...attributes>\n {{#if @caption}}\n <caption class=\"caption_e4aed93fe\" data-test-table-caption>\n {{@caption}}\n </caption>\n {{/if}}\n\n <thead class=\"thead_e4aed93fe\" data-test-table-header>\n <tr class=\"header-row_e4aed93fe\">\n {{#if @isSelectable}}\n <th class=\"header-cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-header-checkbox>\n <Checkbox @isChecked={{this.allRowsSelected}} @isIndeterminate={{this.someRowsSelected}} @isLabelHidden={{true}} @label=\"Select all rows\" @size=\"sm\" data-table-checkbox {{on \"change\" this.handleSelectAll}} />\n </th>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <th class=\"header-cell_e4aed93fe\" data-align={{column.align}} data-sortable={{if (this.isColumnSortable column) \"true\"}} data-sorted={{if (this.getColumnSortDirection column) \"true\"}} data-sort-direction={{this.getColumnSortDirection column}} aria-sort={{this.getAriaSortValue column}} style={{if column.width (concat \"width:\" column.width \";\")}} data-test-table-header-cell data-test-column-id={{column.id}}>\n {{#if (this.isColumnSortable column)}}\n <button type=\"button\" class=\"sort-button_e4aed93fe\" {{on \"click\" (fn this.handleSort column)}} data-test-table-sort-button>\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n <span class=\"sort-icon_e4aed93fe\" aria-hidden=\"true\">\n {{#if (this.getColumnSortDirection column)}}\n {{#if (eq (this.getColumnSortDirection column) \"asc\")}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 10l4-4 4 4\" />\n </svg>\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n {{/if}}\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe icon-unsorted_e4aed93fe\">\n <path d=\"M4 6l4-3 4 3M4 10l4 3 4-3\" />\n </svg>\n {{/if}}\n </span>\n </button>\n {{else}}\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n {{/if}}\n </th>\n {{/each}}\n </tr>\n </thead>\n\n <tbody class=\"tbody_e4aed93fe\" data-test-table-body>\n {{#if @isLoading}}\n {{#if (has-block \"loading\")}}\n {{yield to=\"loading\"}}\n {{else}}\n {{!-- template-lint-disable no-unused-block-params --}}\n {{#each (repeat this.loadingRowCount)}}\n <tr class=\"row_e4aed93fe skeleton-row_e4aed93fe\" data-test-table-skeleton-row>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\">\n <Skeleton @width={{16}} @height={{16}} @radius=\"sm\" />\n </td>\n {{/if}}\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}}>\n <Skeleton @width=\"70%\" @height={{16}} />\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n {{else if this.isEmpty}}\n {{#if (has-block \"empty\")}}\n <tr class=\"empty-row_e4aed93fe\">\n <td colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{yield to=\"empty\"}}\n </td>\n </tr>\n {{else}}\n <tr class=\"empty-row_e4aed93fe\" data-test-table-empty>\n <td class=\"empty-cell_e4aed93fe\" colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{#if @emptyMessage}}\n {{@emptyMessage}}\n {{else}}\n No data available\n {{/if}}\n </td>\n </tr>\n {{/if}}\n {{else}}\n {{#each this.displayData as |row rowIndex|}}\n {{!-- template-lint-disable no-invalid-interactive --}}\n <tr id={{this.getRowElementId row}} class=\"row_e4aed93fe\" data-selected={{if (this.isRowSelected row) \"true\" \"false\"}} data-focused={{if (this.isRowFocused rowIndex) \"true\" \"false\"}} data-disabled={{if (@isRowDisabled row) \"true\" \"false\"}} data-clickable={{if @onRowClick \"true\"}} aria-selected={{if @isSelectable (if (this.isRowSelected row) \"true\" \"false\")}} data-test-table-row data-test-row-id={{this.getRowId row}} {{on \"click\" (fn this.handleRowClick row)}}>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-row-checkbox>\n <Checkbox @isChecked={{this.isRowSelected row}} @isDisabled={{@isRowDisabled row}} @isLabelHidden={{true}} @label=\"Select row\" @size=\"sm\" data-table-checkbox {{on \"click\" (fn this.handleRowSelect row)}} />\n </td>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}} data-test-table-cell data-test-column-id={{column.id}}>\n {{#if (has-block \"cell\")}}\n {{yield (this.getCellContext row column rowIndex) to=\"cell\"}}\n {{else}}\n {{this.formatCellValue row column}}\n {{/if}}\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n </tbody>\n</table>", {
|
|
386
|
+
setComponentTemplate(precompileTemplate("<table class=\"table_e4aed93fe\" data-sticky-header={{if @hasStickyHeader \"true\"}} data-striped={{if @isStriped \"true\"}} data-bordered={{if @isBordered \"true\"}} data-compact={{if @isCompact \"true\"}} data-padding-inline={{this.paddingInline}} data-loading={{if @isLoading \"true\"}} data-test-table tabindex=\"0\" {{this.setupRef}} {{!-- template-lint-disable no-pointer-down-event-binding --}} {{on \"mousedown\" this.handleMouseDown}} {{on \"keydown\" this.handleKeyDown}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}} ...attributes>\n {{#if @caption}}\n <caption class=\"caption_e4aed93fe\" data-test-table-caption>\n {{@caption}}\n </caption>\n {{/if}}\n\n <thead class=\"thead_e4aed93fe\" data-test-table-header>\n <tr class=\"header-row_e4aed93fe\">\n {{#if @isSelectable}}\n <th class=\"header-cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-header-checkbox>\n <Checkbox @isChecked={{this.allRowsSelected}} @isIndeterminate={{this.someRowsSelected}} @isLabelHidden={{true}} @label=\"Select all rows\" @size=\"sm\" data-table-checkbox {{on \"change\" this.handleSelectAll}} />\n </th>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <th class=\"header-cell_e4aed93fe\" data-align={{column.align}} data-sortable={{if (this.isColumnSortable column) \"true\"}} data-sorted={{if (this.getColumnSortDirection column) \"true\"}} data-sort-direction={{this.getColumnSortDirection column}} aria-sort={{this.getAriaSortValue column}} style={{if column.width (concat \"width:\" column.width \";\")}} data-test-table-header-cell data-test-column-id={{column.id}}>\n {{#if (this.isColumnSortable column)}}\n <button type=\"button\" class=\"sort-button_e4aed93fe\" {{on \"click\" (fn this.handleSort column)}} data-test-table-sort-button>\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n <span class=\"sort-icon_e4aed93fe\" aria-hidden=\"true\">\n {{#if (this.getColumnSortDirection column)}}\n {{#if (eq (this.getColumnSortDirection column) \"asc\")}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 10l4-4 4 4\" />\n </svg>\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe\">\n <path d=\"M4 6l4 4 4-4\" />\n </svg>\n {{/if}}\n {{else}}\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon_e4aed93fe icon-unsorted_e4aed93fe\">\n <path d=\"M4 6l4-3 4 3M4 10l4 3 4-3\" />\n </svg>\n {{/if}}\n </span>\n </button>\n {{else}}\n <span class=\"header-text_e4aed93fe\">{{column.header}}</span>\n {{/if}}\n </th>\n {{/each}}\n </tr>\n </thead>\n\n <tbody class=\"tbody_e4aed93fe\" data-test-table-body>\n {{#if @isLoading}}\n {{#if (has-block \"loading\")}}\n {{yield to=\"loading\"}}\n {{else}}\n {{!-- template-lint-disable no-unused-block-params --}}\n {{#each (repeat this.loadingRowCount)}}\n <tr class=\"row_e4aed93fe skeleton-row_e4aed93fe\" data-test-table-skeleton-row>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\">\n <Skeleton @width={{16}} @height={{16}} @radius=\"sm\" />\n </td>\n {{/if}}\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}}>\n <Skeleton @width=\"70%\" @height={{16}} />\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n {{else if this.isEmpty}}\n {{#if (has-block \"empty\")}}\n <tr class=\"empty-row_e4aed93fe\">\n <td colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{yield to=\"empty\"}}\n </td>\n </tr>\n {{else}}\n <tr class=\"empty-row_e4aed93fe\" data-test-table-empty>\n <td class=\"empty-cell_e4aed93fe\" colspan={{if @isSelectable (add (len this.visibleColumns) 1) (len this.visibleColumns)}}>\n {{#if @emptyMessage}}\n {{@emptyMessage}}\n {{else}}\n No data available\n {{/if}}\n </td>\n </tr>\n {{/if}}\n {{else}}\n {{#each this.displayData as |row rowIndex|}}\n {{!-- template-lint-disable no-invalid-interactive --}}\n <tr id={{this.getRowElementId row}} class=\"row_e4aed93fe\" data-selected={{if (this.isRowSelected row) \"true\" \"false\"}} data-focused={{if (this.isRowFocused rowIndex) \"true\" \"false\"}} data-disabled={{if (@isRowDisabled row) \"true\" \"false\"}} data-clickable={{if @onRowClick \"true\"}} aria-selected={{if @isSelectable (if (this.isRowSelected row) \"true\" \"false\")}} data-test-table-row data-test-row-id={{this.getRowId row}} {{on \"click\" (fn this.handleRowClick row)}}>\n {{#if @isSelectable}}\n <td class=\"cell_e4aed93fe checkbox-cell_e4aed93fe\" data-test-table-row-checkbox>\n <Checkbox @isChecked={{this.isRowSelected row}} @isDisabled={{@isRowDisabled row}} @isLabelHidden={{true}} @label=\"Select row\" @size=\"sm\" data-table-checkbox {{on \"click\" (fn this.handleRowSelect row)}} />\n </td>\n {{/if}}\n\n {{#each this.visibleColumns as |column|}}\n <td class=\"cell_e4aed93fe\" data-align={{column.align}} data-test-table-cell data-test-column-id={{column.id}}>\n {{#if (has-block \"cell\")}}\n {{yield (this.getCellContext row column rowIndex) to=\"cell\"}}\n {{else}}\n {{this.formatCellValue row column}}\n {{/if}}\n </td>\n {{/each}}\n </tr>\n {{/each}}\n {{/if}}\n </tbody>\n</table>", {
|
|
382
387
|
strictMode: true,
|
|
383
388
|
scope: () => ({
|
|
384
389
|
on,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visitwonders/assembly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "The default blueprint for Embroider v2 addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -77,21 +77,6 @@
|
|
|
77
77
|
"declarations",
|
|
78
78
|
"dist"
|
|
79
79
|
],
|
|
80
|
-
"scripts": {
|
|
81
|
-
"build": "rollup --config",
|
|
82
|
-
"format": "prettier . --cache --write",
|
|
83
|
-
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
84
|
-
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
|
|
85
|
-
"lint:format": "prettier . --cache --check",
|
|
86
|
-
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
87
|
-
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
88
|
-
"lint:js": "eslint . --cache",
|
|
89
|
-
"lint:js:fix": "eslint . --fix",
|
|
90
|
-
"lint:types": "ember-tsc",
|
|
91
|
-
"prepack": "rm -rf declarations dist && rollup --config",
|
|
92
|
-
"start": "rollup --config --watch",
|
|
93
|
-
"test": "echo 'A v2 addon does not have tests, run tests in showcase'"
|
|
94
|
-
},
|
|
95
80
|
"dependencies": {
|
|
96
81
|
"@arthur5005/dnd-kit-ember": "^0.1.2",
|
|
97
82
|
"@embroider/addon-shim": "^1.8.9",
|
|
@@ -228,5 +213,19 @@
|
|
|
228
213
|
"./typography/heading.js": "./dist/_app_/typography/heading.js",
|
|
229
214
|
"./typography/text.js": "./dist/_app_/typography/text.js"
|
|
230
215
|
}
|
|
216
|
+
},
|
|
217
|
+
"scripts": {
|
|
218
|
+
"build": "rollup --config",
|
|
219
|
+
"format": "prettier . --cache --write",
|
|
220
|
+
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
|
221
|
+
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
|
|
222
|
+
"lint:format": "prettier . --cache --check",
|
|
223
|
+
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
224
|
+
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
225
|
+
"lint:js": "eslint . --cache",
|
|
226
|
+
"lint:js:fix": "eslint . --fix",
|
|
227
|
+
"lint:types": "ember-tsc",
|
|
228
|
+
"start": "rollup --config --watch",
|
|
229
|
+
"test": "echo 'A v2 addon does not have tests, run tests in showcase'"
|
|
231
230
|
}
|
|
232
|
-
}
|
|
231
|
+
}
|