@tanstack/svelte-table 8.0.0-alpha.67
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/build/cjs/_virtual/_rollupPluginBabelHelpers.js +61 -0
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/build/cjs/index.js +107 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/placeholder.svelte.js +58 -0
- package/build/cjs/placeholder.svelte.js.map +1 -0
- package/build/cjs/render-component.js +79 -0
- package/build/cjs/render-component.js.map +1 -0
- package/build/esm/index.js +235 -0
- package/build/esm/index.js.map +1 -0
- package/build/stats-html.html +2689 -0
- package/build/stats-react.json +182 -0
- package/build/types/index.d.ts +11 -0
- package/build/types/render-component.d.ts +3 -0
- package/build/umd/index.development.js +249 -0
- package/build/umd/index.development.js.map +1 -0
- package/build/umd/index.production.js +12 -0
- package/build/umd/index.production.js.map +1 -0
- package/package.json +42 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +105 -0
- package/src/placeholder.svelte +5 -0
- package/src/render-component.ts +78 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SvelteComponent,
|
|
3
|
+
create_component,
|
|
4
|
+
destroy_component,
|
|
5
|
+
init,
|
|
6
|
+
mount_component,
|
|
7
|
+
noop,
|
|
8
|
+
safe_not_equal,
|
|
9
|
+
transition_in,
|
|
10
|
+
transition_out,
|
|
11
|
+
create_ssr_component,
|
|
12
|
+
validate_component,
|
|
13
|
+
} from 'svelte/internal'
|
|
14
|
+
|
|
15
|
+
function create_fragment(ctx: any, Comp: any, props: any) {
|
|
16
|
+
let c: any
|
|
17
|
+
let current: any
|
|
18
|
+
c = new Comp({ props, $$inline: true })
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
c() {
|
|
22
|
+
create_component(c.$$.fragment)
|
|
23
|
+
},
|
|
24
|
+
m(target: any, anchor: any) {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
mount_component(c, target, anchor)
|
|
27
|
+
current = true
|
|
28
|
+
},
|
|
29
|
+
p: noop,
|
|
30
|
+
i(local: any) {
|
|
31
|
+
if (current) return
|
|
32
|
+
transition_in(c.$$.fragment, local)
|
|
33
|
+
current = true
|
|
34
|
+
},
|
|
35
|
+
o(local: any) {
|
|
36
|
+
transition_out(c.$$.fragment, local)
|
|
37
|
+
current = false
|
|
38
|
+
},
|
|
39
|
+
d(detaching: any) {
|
|
40
|
+
destroy_component(c, detaching)
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function renderClient(Comp: any, props: any): any {
|
|
46
|
+
return class WrapperComp extends SvelteComponent {
|
|
47
|
+
constructor(options: any) {
|
|
48
|
+
super()
|
|
49
|
+
init(
|
|
50
|
+
this,
|
|
51
|
+
options,
|
|
52
|
+
null,
|
|
53
|
+
(ctx: any) => create_fragment(ctx, Comp, props),
|
|
54
|
+
safe_not_equal,
|
|
55
|
+
{},
|
|
56
|
+
undefined
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function renderServer(Comp: any, props: any) {
|
|
63
|
+
const WrapperComp = create_ssr_component(
|
|
64
|
+
($$result: any, $$props: any, $$bindings: any, slots: any) => {
|
|
65
|
+
return `${validate_component(Comp, 'Comp').$$render(
|
|
66
|
+
$$result,
|
|
67
|
+
props,
|
|
68
|
+
{},
|
|
69
|
+
{}
|
|
70
|
+
)}`
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return WrapperComp
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const renderComponent =
|
|
78
|
+
typeof window === 'undefined' ? renderServer : renderClient
|