Skip to content

Commit 1ec0fa8

Browse files
committed
first working shadcn port
1 parent dabecca commit 1ec0fa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1114
-389
lines changed

api/asdf/oplog

8 KB
Binary file not shown.

api/fdsa/oplog

8 KB
Binary file not shown.

api/nodes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ const init = node => {
4242
}
4343
};
4444
const getNodes = async (req, res) => {
45-
console.log('test');
45+
console.log('test', req.body);
4646
try {
4747
const publicKey = Buffer.from(req.body.hostKey.publicKey, 'hex')
48+
console.log({ publicKey })
4849
const sub = node.getSub({ publicKey }, 'getNodes');
4950
const output = await node.runKey(sub.publicKey, {});
5051
console.log('output', output)
@@ -60,7 +61,7 @@ const init = node => {
6061
try {
6162
const publicKey = Buffer.from(req.body.hostKey.publicKey, 'hex')
6263
const kp = node.getSub({ publicKey }, 'startNode')
63-
const output = await node.runKey(kp.publicKey, { nodes: [{ name: req.params.name, callKey: req.body.sub, env:req.body.env }] });
64+
const output = await node.runKey(kp.publicKey, { nodes: [{ name: req.params.name, callKey: req.body.sub, env: req.body.env }] });
6465
if (typeof output == "object") res.write(JSON.stringify(output));
6566
else if (typeof output == "string") res.write(output);
6667
res.status(200).end()

api/qwer/oplog

8 KB
Binary file not shown.

api/stores.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const init = () => {
2222
const db = await prepDb('./' + req.params.db)
2323
console.log(req.body, req.params)
2424
await db.put(req.params.name, JSON.stringify(req.body))
25-
res.write("{success:true}")
25+
res.write(`{"success":"true"}`)
2626
res.status(200).end()
2727
};
2828

api/task/bitfield

0 Bytes
Binary file not shown.

api/task/data

+77-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,80 @@
22
hyperbee
33

44

5-
test�[{"name":"test","before":"console.log('before:', params);","after":"console.log('after', out);","output":[],"sub":{"publicKey":"c1fd2f2722ae1451d3d60fbeb1f5d8cb9a3eaa233332b926fb31269eaec92254"}}]
5+
test�[{"name":"test","before":"console.log('before:', params);","after":"console.log('after', out);","output":[],"sub":{"publicKey":"c1fd2f2722ae1451d3d60fbeb1f5d8cb9a3eaa233332b926fb31269eaec92254"}}]
6+

7+

8+
 undefined[]
9+

10+

11+
 undefined[]
12+

13+

14+
 undefined[]
15+

16+

17+
 undefined[]
18+

19+

20+
 undefined[]
21+

22+

23+
 undefined[]
24+

25+

26+
 undefined[]
27+

28+

29+
  undefined[]
30+

31+

32+

33+
 undefined[]
34+

35+

36+
  undefined[]
37+

38+

39+
  undefined[]
40+

41+

42+
 undefined[]
43+

44+

45+
 undefined[]
46+

47+

48+
 undefined[]
49+

50+

51+
 undefined[]
52+

53+

54+
 undefined[]
55+

56+

57+
 undefined[]
58+

59+

60+
 undefined[]
61+

62+

63+
 undefined[]
64+

65+

66+
test[]
67+

68+

69+
test[]
70+

71+

72+
 undefined[]
73+

74+

75+
 undefined[]
76+

77+

78+
test[]
79+

80+

81+
 undefined[]

api/task/oplog

115 Bytes
Binary file not shown.

api/task/tree

1.88 KB
Binary file not shown.

api/tasks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const init = (node) => {
88
const db = await prepDb('./tasks')
99
console.log(req.body, req.params)
1010
await db.put(req.params.name, JSON.stringify(req.body))
11-
res.write("{success:true}")
11+
res.write(`{"success":"true"}`)
1212
res.status(200).end()
1313
};
1414

api/vcxz/oplog

8 KB
Binary file not shown.

api/zxcv/oplog

8 KB
Binary file not shown.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import Root from "./label.svelte";
2+
3+
export {
4+
Root,
5+
//
6+
Root as Label
7+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script lang="ts">
2+
import { Label as LabelPrimitive } from "bits-ui";
3+
import { cn } from "$lib/utils";
4+
5+
type $$Props = LabelPrimitive.Props;
6+
type $$Events = LabelPrimitive.Events;
7+
8+
let className: $$Props["class"] = undefined;
9+
export { className as class };
10+
</script>
11+
12+
<LabelPrimitive.Root
13+
class={cn(
14+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
15+
className
16+
)}
17+
{...$$restProps}
18+
on:mousedown
19+
>
20+
<slot />
21+
</LabelPrimitive.Root>
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Select as SelectPrimitive } from "bits-ui";
2+
3+
import Root from "./select.svelte";
4+
import Label from "./select-label.svelte";
5+
import Item from "./select-item.svelte";
6+
import Content from "./select-content.svelte";
7+
import Trigger from "./select-trigger.svelte";
8+
import Separator from "./select-separator.svelte";
9+
10+
const Group = SelectPrimitive.Group;
11+
const Input = SelectPrimitive.Input;
12+
const Value = SelectPrimitive.Value;
13+
export {
14+
Root,
15+
Group,
16+
Input,
17+
Label,
18+
Item,
19+
Value,
20+
Content,
21+
Trigger,
22+
Separator,
23+
//
24+
Root as Select,
25+
Group as SelectGroup,
26+
Input as SelectInput,
27+
Label as SelectLabel,
28+
Item as SelectItem,
29+
Value as SelectValue,
30+
Content as SelectContent,
31+
Trigger as SelectTrigger,
32+
Separator as SelectSeparator
33+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
import { cn, flyAndScale } from "$lib/utils";
4+
import { scale } from "svelte/transition";
5+
6+
type $$Props = SelectPrimitive.ContentProps;
7+
type $$Events = SelectPrimitive.ContentEvents;
8+
export let inTransition: $$Props["inTransition"] = flyAndScale;
9+
export let inTransitionConfig: $$Props["inTransitionConfig"] = undefined;
10+
export let outTransition: $$Props["outTransition"] = scale;
11+
export let outTransitionConfig: $$Props["outTransitionConfig"] = {
12+
start: 0.95,
13+
opacity: 0,
14+
duration: 50
15+
};
16+
17+
let className: $$Props["class"] = undefined;
18+
export { className as class };
19+
</script>
20+
21+
<SelectPrimitive.Content
22+
{inTransition}
23+
{inTransitionConfig}
24+
{outTransition}
25+
{outTransitionConfig}
26+
class={cn(
27+
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md outline-none",
28+
className
29+
)}
30+
{...$$restProps}
31+
on:keydown
32+
>
33+
<div class="w-full p-1">
34+
<slot />
35+
</div>
36+
</SelectPrimitive.Content>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
import { Check } from "lucide-svelte";
4+
import { cn } from "$lib/utils";
5+
6+
type $$Props = SelectPrimitive.ItemProps;
7+
type $$Events = SelectPrimitive.ItemEvents;
8+
9+
let className: $$Props["class"] = undefined;
10+
export let value: $$Props["value"];
11+
export let label: $$Props["label"] = undefined;
12+
export let disabled: $$Props["disabled"] = undefined;
13+
export { className as class };
14+
</script>
15+
16+
<SelectPrimitive.Item
17+
{value}
18+
{disabled}
19+
{label}
20+
class={cn(
21+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
22+
className
23+
)}
24+
{...$$restProps}
25+
on:click
26+
on:keydown
27+
on:focusin
28+
on:focusout
29+
on:pointerleave
30+
on:pointermove
31+
>
32+
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
33+
<SelectPrimitive.ItemIndicator>
34+
<Check class="h-4 w-4" />
35+
</SelectPrimitive.ItemIndicator>
36+
</span>
37+
<slot />
38+
</SelectPrimitive.Item>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
import { cn } from "$lib/utils";
4+
5+
type $$Props = SelectPrimitive.LabelProps;
6+
7+
let className: $$Props["class"] = undefined;
8+
export { className as class };
9+
</script>
10+
11+
<SelectPrimitive.Label
12+
class={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
13+
{...$$restProps}
14+
>
15+
<slot />
16+
</SelectPrimitive.Label>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
import { cn } from "$lib/utils";
4+
5+
type $$Props = SelectPrimitive.SeparatorProps;
6+
7+
let className: $$Props["class"] = undefined;
8+
export { className as class };
9+
</script>
10+
11+
<SelectPrimitive.Separator
12+
class={cn("-mx-1 my-1 h-px bg-muted", className)}
13+
{...$$restProps}
14+
/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
import { ChevronDown } from "lucide-svelte";
4+
import { cn } from "$lib/utils";
5+
6+
type $$Props = SelectPrimitive.TriggerProps;
7+
type $$Events = SelectPrimitive.TriggerEvents;
8+
9+
let className: $$Props["class"] = undefined;
10+
export { className as class };
11+
</script>
12+
13+
<SelectPrimitive.Trigger
14+
class={cn(
15+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
16+
className
17+
)}
18+
{...$$restProps}
19+
let:builder
20+
on:click
21+
on:keydown
22+
>
23+
<slot {builder} />
24+
<div>
25+
<ChevronDown class="h-4 w-4 opacity-50" />
26+
</div>
27+
</SelectPrimitive.Trigger>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import { Select as SelectPrimitive } from "bits-ui";
3+
4+
type $$Props = SelectPrimitive.Props;
5+
6+
export let selected: $$Props["selected"] = undefined;
7+
export let open: $$Props["open"] = undefined;
8+
</script>
9+
10+
<SelectPrimitive.Root bind:selected bind:open {...$$restProps}>
11+
<slot />
12+
</SelectPrimitive.Root>

0 commit comments

Comments
 (0)