Skip to content

Commit c9422be

Browse files
committed
fix: remove use of $lib alias, it breaks packaged typings
1 parent d8d3f85 commit c9422be

24 files changed

+72
-75
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@
7676
"svelte-subscribe": "^1.0.4"
7777
},
7878
"type": "module",
79-
"svelte": "index.js"
79+
"svelte": "./index.js",
80+
"types": "./lib/index.d.ts"
8081
}

src/lib/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
export * from 'svelte-render';
33
export { Subscribe } from 'svelte-subscribe';
44
// table core
5-
export { createTable } from '$lib/createTable';
5+
export { createTable } from './createTable';
66
// models
7-
export { Table } from '$lib/createTable';
8-
export { HeaderRow } from '$lib/headerRows';
7+
export { Table } from './createTable';
8+
export { HeaderRow } from './headerRows';
99
export {
1010
HeaderCell,
1111
FlatHeaderCell,
1212
DataHeaderCell,
1313
FlatDisplayHeaderCell,
1414
GroupHeaderCell,
1515
GroupDisplayHeaderCell,
16-
} from '$lib/headerCells';
17-
export { BodyRow, DisplayBodyRow, DataBodyRow } from '$lib/bodyRows';
18-
export { BodyCell, DataBodyCell, DisplayBodyCell } from '$lib/bodyCells';
19-
export { Column, FlatColumn, DataColumn, GroupColumn, DisplayColumn } from '$lib/columns';
20-
export type { TableViewModel, TableState } from '$lib/createViewModel';
21-
export type { DataLabel, DisplayLabel, HeaderLabel } from '$lib/types/Label';
16+
} from './headerCells';
17+
export { BodyRow, DisplayBodyRow, DataBodyRow } from './bodyRows';
18+
export { BodyCell, DataBodyCell, DisplayBodyCell } from './bodyCells';
19+
export { Column, FlatColumn, DataColumn, GroupColumn, DisplayColumn } from './columns';
20+
export type { TableViewModel, TableState } from './createViewModel';
21+
export type { DataLabel, DisplayLabel, HeaderLabel } from './types/Label';

src/lib/plugins/addColumnFilters.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { keyed } from 'svelte-keyed';
22
import type { RenderConfig } from 'svelte-render';
3-
import type { BodyRow } from '$lib/bodyRows';
4-
import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '$lib/types/TablePlugin';
3+
import type { BodyRow } from '../bodyRows';
4+
import type { TablePlugin, NewTablePropSet, DeriveRowsFn } from '../types/TablePlugin';
55
import { derived, writable, type Readable, type Writable } from 'svelte/store';
6-
import type { PluginInitTableState } from '$lib/createViewModel';
7-
import type { DataBodyCell } from '$lib/bodyCells';
6+
import type { PluginInitTableState } from '../createViewModel';
7+
import type { DataBodyCell } from '../bodyCells';
88

99
export interface ColumnFiltersState<Item> {
1010
filterValues: Writable<Record<string, unknown>>;

src/lib/plugins/addColumnOrder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '$lib/types/TablePlugin';
1+
import type { DeriveFlatColumnsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin';
22
import { derived, writable, type Writable } from 'svelte/store';
33

44
export interface ColumnOrderConfig {

src/lib/plugins/addDataExport.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { BodyRow } from '$lib/bodyRows';
2-
import type { TablePlugin } from '$lib/types/TablePlugin';
3-
import { isReadable } from '$lib/utils/store';
1+
import type { BodyRow } from '../bodyRows';
2+
import type { TablePlugin } from '../types/TablePlugin';
3+
import { isReadable } from '../utils/store';
44
import { derived, get, type Readable } from 'svelte/store';
55

66
export type DataExportFormat = 'object' | 'json' | 'csv';

src/lib/plugins/addExpandedRows.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { BodyRow } from '$lib/bodyRows';
2-
import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '$lib/types/TablePlugin';
3-
import { recordSetStore, type RecordSetStore } from '$lib/utils/store';
1+
import type { BodyRow } from '../bodyRows';
2+
import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin';
3+
import { recordSetStore, type RecordSetStore } from '../utils/store';
44
import { keyed } from 'svelte-keyed';
55
import { derived, readable, type Readable, type Writable } from 'svelte/store';
66

src/lib/plugins/addFlatten.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createTable } from '$lib/createTable';
1+
import { createTable } from '../createTable';
22
import type { Sample } from 'src/routes/_createSamples';
33
import { get, readable } from 'svelte/store';
44
import { addFlatten } from './addFlatten';

src/lib/plugins/addFlatten.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { BodyRow } from '$lib/bodyRows';
2-
import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '$lib/types/TablePlugin';
1+
import type { BodyRow } from '../bodyRows';
2+
import type { DeriveRowsFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin';
33
import { derived, writable, type Readable, type Writable } from 'svelte/store';
44

55
export interface FlattenConfig {

src/lib/plugins/addGridLayout.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import type {
2-
TableAttributes,
3-
TableBodyAttributes,
4-
TableHeadAttributes,
5-
} from '$lib/createViewModel';
6-
import type { DeriveFn, NewTablePropSet, TablePlugin } from '$lib/types/TablePlugin';
1+
import type { TableAttributes, TableBodyAttributes, TableHeadAttributes } from '../createViewModel';
2+
import type { DeriveFn, NewTablePropSet, TablePlugin } from '../types/TablePlugin';
73
import { derived } from 'svelte/store';
84

95
export const addGridLayout =

src/lib/plugins/addGroupBy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createTable } from '$lib/createTable';
1+
import { createTable } from '../createTable';
22
import type { Sample } from 'src/routes/_createSamples';
33
import { get, readable } from 'svelte/store';
44
import { addGroupBy } from './addGroupBy';

0 commit comments

Comments
 (0)