fubi 0.4.8 → 1.0.0-beta.2

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.
Files changed (103) hide show
  1. package/.prettierignore +9 -0
  2. package/.prettierrc +23 -0
  3. package/.vscode/extensions.json +3 -0
  4. package/config.toml +3 -0
  5. package/demo/index.html +64 -0
  6. package/index.html +19 -0
  7. package/package.json +43 -39
  8. package/publish.js +77 -0
  9. package/src/components/App.svelte +17 -0
  10. package/src/components/Debug.svelte +39 -0
  11. package/src/components/Layout.svelte +47 -0
  12. package/src/components/comment/CommentCard.svelte +49 -0
  13. package/src/components/comment/CommentFocusElement.svelte +14 -0
  14. package/src/components/comment/CommentMenu.svelte +18 -0
  15. package/src/components/comment/CommentPriority.svelte +31 -0
  16. package/src/components/comment/CommentReplyButton.svelte +35 -0
  17. package/src/components/comment/CommentUser.svelte +22 -0
  18. package/src/components/icons/AlertIcon.svelte +7 -0
  19. package/src/components/icons/CancelIcon.svelte +8 -0
  20. package/src/components/icons/CheckCircle.svelte +7 -0
  21. package/src/components/icons/CheckIcon.svelte +7 -0
  22. package/src/components/icons/CheckSmallIcon.svelte +7 -0
  23. package/src/components/icons/ChevronLeftIcon.svelte +7 -0
  24. package/src/components/icons/ChevronRightIcon.svelte +7 -0
  25. package/src/components/icons/ChevronsUpIcon.svelte +8 -0
  26. package/src/components/icons/DotsIcon.svelte +9 -0
  27. package/src/components/icons/PlusIcon.svelte +8 -0
  28. package/src/components/index.ts +0 -0
  29. package/src/components/toolbar/ButtonToolbar.svelte +29 -0
  30. package/src/components/toolbar/Menu.svelte +42 -0
  31. package/src/components/toolbar/Toolbar.svelte +55 -0
  32. package/src/components/ui/Button.svelte +33 -0
  33. package/src/components/ui/ButtonIcon.svelte +31 -0
  34. package/src/components/ui/ButtonSmall.svelte +12 -0
  35. package/src/components/ui/ButtonTabbar.svelte +35 -0
  36. package/src/components/ui/Chip.svelte +28 -0
  37. package/src/components/ui/Icon.svelte +38 -0
  38. package/src/components/ui/Input.svelte +9 -0
  39. package/src/components/ui/List.svelte +18 -0
  40. package/src/components/ui/ListItem.svelte +87 -0
  41. package/src/components/ui/ListLoader.svelte +20 -0
  42. package/src/components/ui/Loader.svelte +39 -0
  43. package/src/components/ui/Logo.svelte +20 -0
  44. package/src/components/ui/Msg.svelte +21 -0
  45. package/src/components/ui/Navbar.svelte +33 -0
  46. package/src/components/ui/Page.svelte +67 -0
  47. package/src/components/ui/Tabbar.svelte +60 -0
  48. package/src/components/ui/Toggle.svelte +8 -0
  49. package/src/components/ui/Window.svelte +61 -0
  50. package/src/index.ts +28 -0
  51. package/src/lib/actions.ts +58 -0
  52. package/src/lib/haptics.ts +94 -0
  53. package/src/lib/logger.ts +22 -0
  54. package/src/lib/routes.ts +37 -0
  55. package/src/lib/utils.ts +27 -0
  56. package/src/modules/app.svelte.ts +66 -0
  57. package/src/modules/auth.svelte.ts +80 -0
  58. package/src/modules/collection.svelte.ts +79 -0
  59. package/src/modules/comments.svelte.ts +34 -0
  60. package/src/modules/dom.svelte.ts +26 -0
  61. package/src/modules/domains.svelte.ts +91 -0
  62. package/src/modules/environment.svelte.ts +10 -0
  63. package/src/modules/events.svelte.ts +23 -0
  64. package/src/modules/folders.svelte.ts +64 -0
  65. package/src/modules/home.svelte.ts +29 -0
  66. package/src/modules/hover.svelte.ts +3 -0
  67. package/src/modules/index.ts +28 -0
  68. package/src/modules/keys.svelte.ts +72 -0
  69. package/src/modules/module.svelte.ts +47 -0
  70. package/src/modules/navbar.svelte.ts +11 -0
  71. package/src/modules/pages.svelte.ts +126 -0
  72. package/src/modules/project.svelte.ts +70 -0
  73. package/src/modules/router.svelte.ts +99 -0
  74. package/src/modules/tabbar.svelte.ts +21 -0
  75. package/src/modules/teams.svelte.ts +0 -0
  76. package/src/modules/toolbar.svelte.ts +34 -0
  77. package/src/modules/watch.svelte.ts +8 -0
  78. package/src/modules/win.svelte.ts +273 -0
  79. package/src/pages/Comments.svelte +32 -0
  80. package/src/pages/Error.svelte +25 -0
  81. package/src/pages/Folders.svelte +53 -0
  82. package/src/pages/Login.svelte +44 -0
  83. package/src/pages/Pages.svelte +75 -0
  84. package/src/pages/Thread.svelte +11 -0
  85. package/src/styles/global.css +16 -0
  86. package/src/styles/router.css +79 -0
  87. package/src/styles/styles.css +159 -0
  88. package/src/styles/tailwind.css +115 -0
  89. package/src/styles/variables.css +99 -0
  90. package/src/test.ts +22 -0
  91. package/src/types/fubi.ts +0 -0
  92. package/src/types/msg.ts +5 -0
  93. package/src/types/pocketbase.ts +7 -0
  94. package/src/types/user.ts +8 -0
  95. package/svelte.config.js +11 -0
  96. package/tsconfig.json +41 -0
  97. package/vite.config.ts +40 -0
  98. package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
  99. package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
  100. package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
  101. package/dist/fonts/inter-latin-700-normal.woff2 +0 -0
  102. package/dist/fubi.iife.js +0 -108
  103. package/dist/fubi.js +0 -9802
@@ -0,0 +1,16 @@
1
+ .fubi-scroll-disabled {
2
+ overflow: hidden !important;
3
+ touch-action: none;
4
+ }
5
+
6
+ @media (pointer: coarse) {
7
+ .fubi-scroll-touch-disabled,
8
+ .fubi-scroll-touch-disabled body {
9
+ overflow: hidden !important;
10
+ touch-action: none;
11
+ }
12
+ }
13
+
14
+ html {
15
+ touch-action: pan-y;
16
+ }
@@ -0,0 +1,79 @@
1
+ .page {
2
+ transform: translateX(calc(100% + var(--fubi-window-right))) rotateY(var(--fubi-rotate-to));
3
+ position: absolute;
4
+ transition: box-shadow 300ms ease-out;
5
+ }
6
+
7
+ .page.page-current {
8
+ transform: translateX(0%);
9
+ position: relative;
10
+ }
11
+
12
+ .window {
13
+ perspective: 1200px;
14
+ }
15
+
16
+ /* Router animations */
17
+
18
+ /* forward, next */
19
+ .router-transition-forward .page-next {
20
+ animation: next-to-current var(--fubi-router-duration-forward) forwards;
21
+ animation-timing-function: var(--ease-out-cubic);
22
+ z-index: 2;
23
+ }
24
+
25
+ /* forward, current */
26
+ .router-transition-forward .page-current {
27
+ animation: current-to-prev var(--fubi-router-duration-forward) forwards;
28
+ animation-timing-function: var(--ease-in-out);
29
+ z-index: 1;
30
+ }
31
+
32
+ /* back, previous */
33
+ .router-transition-back .page-current {
34
+ animation: current-to-next var(--fubi-router-duration-back) forwards;
35
+ animation-timing-function: cubic-bezier(0.2, 0, 0.4, 1);
36
+ }
37
+
38
+ /* back, current */
39
+ .router-transition-back .page-previous {
40
+ animation: prev-to-current var(--fubi-router-duration-forward) forwards;
41
+ animation-timing-function: var(--ease-out);
42
+ }
43
+
44
+ @keyframes next-to-current {
45
+ from {
46
+ transform: translateX(calc(100% + var(--fubi-window-right))) rotateY(var(--fubi-rotate-to));
47
+ }
48
+ to {
49
+ transform: translateX(0%) rotateY(0deg);
50
+ }
51
+ }
52
+
53
+ @keyframes current-to-next {
54
+ from {
55
+ transform: translateX(0%) rotateY(0deg);
56
+ }
57
+ to {
58
+ transform: translateX(calc(100% + var(--fubi-window-right))) rotateY(var(--fubi-rotate-to));
59
+ }
60
+ }
61
+
62
+ @keyframes current-to-prev {
63
+ from {
64
+ transform: translateX(0%) translateZ(0) rotateY(0deg);
65
+ }
66
+ to {
67
+ transform: translateX(var(--fubi-translate-x-difference)) translateZ(var(--fubi-translate-z-difference))
68
+ rotateY(0deg);
69
+ }
70
+ }
71
+ @keyframes prev-to-current {
72
+ from {
73
+ transform: translateX(var(--fubi-translate-x-difference)) translateZ(var(--fubi-translate-z-difference))
74
+ rotateY(0deg);
75
+ }
76
+ to {
77
+ transform: translateX(0%) translateZ(0) rotateY(0deg);
78
+ }
79
+ }
@@ -0,0 +1,159 @@
1
+ @import "tailwindcss";
2
+ @import "./tailwind.css";
3
+ @import "./variables.css";
4
+ @import "./router.css";
5
+
6
+ @custom-variant dark (&:is(.dark *));
7
+
8
+ [data-conte-portal] {
9
+ @apply isolate;
10
+ }
11
+
12
+ .xxx {
13
+ @apply bg-sky-500/10;
14
+ }
15
+
16
+ .xxxx {
17
+ @apply bg-sky-500/10 border border-sky-500/20;
18
+ }
19
+
20
+ .bordered {
21
+ box-shadow:
22
+ inset 0px 0px 0px 1px rgba(255, 255, 255, 0.1),
23
+ inset 0px 2px 4px 0px rgba(255, 255, 255, 0.1);
24
+ }
25
+
26
+ .glass {
27
+ box-shadow:
28
+ inset 0.7px 0.7px 0.5px 0px rgba(255, 255, 255, 0.15),
29
+ inset -0.7px -0.7px 0.5px 0px rgba(255, 255, 255, 0.15),
30
+ 0px 8px 12px 0px rgba(0, 0, 0, 0.15);
31
+ }
32
+
33
+ .rim {
34
+ box-shadow:
35
+ inset 0px 0.7px 2px 0px rgba(255, 255, 255, 0.2),
36
+ inset 0px 0.5px 0.5px 0.7px rgba(255, 255, 255, 0.05);
37
+ }
38
+
39
+ .lift {
40
+ box-shadow:
41
+ inset 0px 0.7px 1px 0px rgba(255, 255, 255, 0.1),
42
+ 0px 2px 10px 0px rgba(0, 0, 0, 0.1),
43
+ 0px 4px 8px 0px rgba(0, 0, 0, 0.05);
44
+ }
45
+
46
+ @media (pointer: coarse) {
47
+ .page.rim {
48
+ box-shadow: inset 0px 0.7px 0px 0px rgba(255, 255, 255, 0.2);
49
+ }
50
+ }
51
+
52
+ /* reset input autocomplete color */
53
+ input:-webkit-autofill,
54
+ input:-webkit-autofill:hover,
55
+ input:-webkit-autofill:focus,
56
+ input:-webkit-autofill:active {
57
+ -webkit-background-clip: text;
58
+ -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
59
+ transition: background-color 5000s ease-in-out 0s;
60
+ box-shadow: inset 0 0 20px 20px transparent;
61
+ }
62
+
63
+ input {
64
+ min-width: 0px;
65
+ }
66
+
67
+ /* .page-content {
68
+ mask-image: linear-gradient(
69
+ to bottom,
70
+ rgba(0, 0, 0, 0) 0px,
71
+ rgba(0, 0, 0, 0.01) 7px,
72
+ rgba(0, 0, 0, 0.04) 13px,
73
+ rgba(0, 0, 0, 0.08) 20px,
74
+ rgba(0, 0, 0, 0.15) 27px,
75
+ rgba(0, 0, 0, 0.23) 33px,
76
+ rgba(0, 0, 0, 0.33) 40px,
77
+ rgba(0, 0, 0, 0.44) 47px,
78
+ rgba(0, 0, 0, 0.56) 53px,
79
+ rgba(0, 0, 0, 0.67) 60px,
80
+ rgba(0, 0, 0, 0.77) 67px,
81
+ rgba(0, 0, 0, 0.85) 73px,
82
+ rgba(0, 0, 0, 0.92) 80px,
83
+ rgba(0, 0, 0, 0.96) 87px,
84
+ rgba(0, 0, 0, 0.99) 93px,
85
+ rgba(0, 0, 0, 1) 100px
86
+ );
87
+ } */
88
+
89
+ @media (pointer: coarse) {
90
+ /* .page-content {
91
+ mask-image: linear-gradient(
92
+ to bottom,
93
+ rgba(0, 0, 0, 0) 0px,
94
+ rgba(0, 0, 0, 0.01) 8px,
95
+ rgba(0, 0, 0, 0.04) 16px,
96
+ rgba(0, 0, 0, 0.08) 24px,
97
+ rgba(0, 0, 0, 0.15) 32px,
98
+ rgba(0, 0, 0, 0.23) 40px,
99
+ rgba(0, 0, 0, 0.33) 48px,
100
+ rgba(0, 0, 0, 0.44) 56px,
101
+ rgba(0, 0, 0, 0.56) 64px,
102
+ rgba(0, 0, 0, 0.67) 72px,
103
+ rgba(0, 0, 0, 0.77) 80px,
104
+ rgba(0, 0, 0, 0.85) 88px,
105
+ rgba(0, 0, 0, 0.92) 96px,
106
+ rgba(0, 0, 0, 0.96) 104px,
107
+ rgba(0, 0, 0, 0.99) 112px,
108
+ rgba(0, 0, 0, 1) 120px
109
+ );
110
+ } */
111
+ }
112
+
113
+ .window-inner::-webkit-scrollbar,
114
+ .hide-scrollbar::-webkit-scrollbar {
115
+ display: none;
116
+ }
117
+ /* list loading animations */
118
+ @keyframes list-loading {
119
+ 0% {
120
+ background-color: rgba(100, 116, 139, 0.06);
121
+ transform: scale(1);
122
+ }
123
+ 30% {
124
+ background-color: rgba(100, 116, 139, 0.08);
125
+ transform: scale(1.02);
126
+ }
127
+ 60% {
128
+ background-color: rgba(100, 116, 139, 0.06);
129
+ transform: scale(1);
130
+ }
131
+ 100% {
132
+ background-color: rgba(100, 116, 139, 0.06);
133
+ transform: scale(1);
134
+ }
135
+ }
136
+
137
+ .animate-list-loading {
138
+ animation: list-loading 1s infinite;
139
+ animation-timing-function: ease-in-out;
140
+ }
141
+
142
+ .animate-list-loading:first-child {
143
+ animation-delay: 0s;
144
+ }
145
+ .animate-list-loading:nth-child(2) {
146
+ animation-delay: 0.1s;
147
+ }
148
+ .animate-list-loading:nth-child(3) {
149
+ animation-delay: 0.2s;
150
+ }
151
+
152
+ /* global focus visible settings */
153
+ .focus-visible {
154
+ @apply focus:outline-0 focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-sky-500;
155
+ }
156
+
157
+ .focus-within {
158
+ @apply focus:outline-0 focus-within:outline focus-within:outline-offset-2 focus-within:outline-sky-500;
159
+ }
@@ -0,0 +1,115 @@
1
+ @custom-variant touch {
2
+ @media (hover: none) and (pointer: coarse) {
3
+ @slot;
4
+ }
5
+ }
6
+
7
+ @custom-variant mouse {
8
+ @media (pointer: fine) {
9
+ @slot;
10
+ }
11
+ }
12
+
13
+ @theme {
14
+ --spacing: 0.0625rem;
15
+
16
+ /* Easing functions */
17
+ --ease-in-cubic: cubic-bezier(0.5, 0, 0.6, 0.2);
18
+ --ease-out-cubic: cubic-bezier(0.2, 0.6, 0.35, 1);
19
+ --ease-in-out-cubic: cubic-bezier(0.6, 0, 0.35, 1);
20
+ --ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
21
+ --ease-in-quart: cubic-bezier(0.9, 0, 0.7, 0.2);
22
+ --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
23
+ --ease-in-out-quart: cubic-bezier(0.8, 0, 0.2, 1);
24
+ --ease-in-out-quint: cubic-bezier(0.655, 0, 0, 1);
25
+
26
+ --ease-spring: linear(
27
+ 0,
28
+ 0.0018,
29
+ 0.0069 1.15%,
30
+ 0.026 2.3%,
31
+ 0.0637,
32
+ 0.1135 5.18%,
33
+ 0.2229 7.78%,
34
+ 0.5977 15.84%,
35
+ 0.7014,
36
+ 0.7904,
37
+ 0.8641,
38
+ 0.9228,
39
+ 0.9676 28.8%,
40
+ 1.0032 31.68%,
41
+ 1.0225,
42
+ 1.0352 36.29%,
43
+ 1.0431 38.88%,
44
+ 1.046 42.05%,
45
+ 1.0448 44.35%,
46
+ 1.0407 47.23%,
47
+ 1.0118 61.63%,
48
+ 1.0025 69.41%,
49
+ 0.9981 80.35%,
50
+ 0.9992 99.94%
51
+ );
52
+ --spring-duration: 0.8333s;
53
+
54
+ /*
55
+ --color-slate: oklch(31.116% 0.01639 237.26);
56
+ --color-slate-50: oklch(76.037% 0.02274 218.68);
57
+ --color-slate-100: oklch(72.44% 0.02616 222.72);
58
+ --color-slate-200: oklch(64.988% 0.03295 223.16);
59
+ --color-slate-300: oklch(57.092% 0.0344 228.68);
60
+ --color-slate-400: oklch(48.772% 0.02808 231);
61
+ --color-slate-500: oklch(40.043% 0.02349 236.38);
62
+ --color-slate-600: oklch(31.116% 0.01639 237.26);
63
+ --color-slate-700: oklch(26.802% 0.01367 239.13);
64
+ --color-slate-800: oklch(22.403% 0.00987 248.27);
65
+ --color-slate-900: oklch(18.029% 0.00781 248.26);
66
+ --color-slate-950: oklch(15.77% 0.00539 248.17);
67
+ */
68
+
69
+ --color-slate: oklch(28.306% 0.01341 229.47);
70
+ --color-slate-50: oklch(93.154% 0.00509 228.82);
71
+ --color-slate-100: oklch(89.335% 0.00937 232.38);
72
+ --color-slate-200: oklch(81.599% 0.01569 229.01);
73
+ --color-slate-300: oklch(73.621% 0.02321 226.26);
74
+ --color-slate-400: oklch(65.341% 0.0308 231.74);
75
+ --color-slate-500: oklch(56.892% 0.03261 230.77);
76
+ --color-slate-600: oklch(47.781% 0.02727 232.41);
77
+ --color-slate-700: oklch(38.424% 0.0207 225.75);
78
+ --color-slate-800: oklch(28.306% 0.01341 229.47);
79
+ --color-slate-900: oklch(21.782% 0.00848 223.87);
80
+ --color-slate-950: oklch(18.333% 0.0075 229.36);
81
+
82
+ /* 'gray': {
83
+ DEFAULT: '#8C8C8C',
84
+ 50: '#E8E8E8',
85
+ 100: '#DEDEDE',
86
+ 200: '#C9C9C9',
87
+ 300: '#B5B5B5',
88
+ 400: '#A1A1A1',
89
+ 500: '#8C8C8C',
90
+ 600: '#707070',
91
+ 700: '#545454',
92
+ 800: '#383838',
93
+ 900: '#1C1C1C',
94
+ 950: '#0E0E0E'
95
+ }, */
96
+
97
+ --safe-area-top: env(safe-area-inset-top);
98
+ --safe-area-right: env(safe-area-inset-right);
99
+ --safe-area-bottom: env(safe-area-inset-bottom);
100
+ --safe-area-left: env(safe-area-inset-left);
101
+ }
102
+
103
+ @media (hover: none) and (pointer: coarse) {
104
+ @theme {
105
+ /*--spacing: 0.06875rem;*/
106
+ }
107
+ }
108
+
109
+ .flex-center {
110
+ @apply flex items-center justify-center;
111
+ }
112
+
113
+ .absolute-center {
114
+ @apply absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2;
115
+ }
@@ -0,0 +1,99 @@
1
+ :host {
2
+ --tw-divide-y-reverse: 0;
3
+ --tw-border-style: solid;
4
+ --tw-font-weight: initial;
5
+ --tw-tracking: initial;
6
+ --tw-translate-x: 0;
7
+ --tw-translate-y: 0;
8
+ --tw-translate-z: 0;
9
+ --tw-rotate-x: rotateX(0);
10
+ --tw-rotate-y: rotateY(0);
11
+ --tw-rotate-z: rotateZ(0);
12
+ --tw-skew-x: skewX(0);
13
+ --tw-skew-y: skewY(0);
14
+ --tw-space-x-reverse: 0;
15
+ --tw-gradient-position: initial;
16
+ --tw-gradient-from: #0000;
17
+ --tw-gradient-via: #0000;
18
+ --tw-gradient-to: #0000;
19
+ --tw-gradient-stops: initial;
20
+ --tw-gradient-via-stops: initial;
21
+ --tw-gradient-from-position: 0%;
22
+ --tw-gradient-via-position: 50%;
23
+ --tw-gradient-to-position: 100%;
24
+ --tw-shadow: 0 0 #0000;
25
+ --tw-shadow-color: initial;
26
+ --tw-inset-shadow: 0 0 #0000;
27
+ --tw-inset-shadow-color: initial;
28
+ --tw-ring-color: initial;
29
+ --tw-ring-shadow: 0 0 #0000;
30
+ --tw-inset-ring-color: initial;
31
+ --tw-inset-ring-shadow: 0 0 #0000;
32
+ --tw-ring-inset: initial;
33
+ --tw-ring-offset-width: 0px;
34
+ --tw-ring-offset-color: #fff;
35
+ --tw-ring-offset-shadow: 0 0 #0000;
36
+ --tw-blur: initial;
37
+ --tw-brightness: initial;
38
+ --tw-contrast: initial;
39
+ --tw-grayscale: initial;
40
+ --tw-hue-rotate: initial;
41
+ --tw-invert: initial;
42
+ --tw-opacity: initial;
43
+ --tw-saturate: initial;
44
+ --tw-sepia: initial;
45
+ --tw-drop-shadow: initial;
46
+ --tw-duration: initial;
47
+ --tw-ease: initial;
48
+ --tw-outline-style: solid;
49
+ --px: 0.5px;
50
+ --tw-scroll-snap-strictness: proximity;
51
+
52
+ /* Fubi */
53
+ --fubi-toolbar-height: 44px;
54
+ --fubi-toolbar-bottom: 1rem;
55
+ --fubi-toolbar-right: 1rem;
56
+
57
+ --fubi-navbar-height: 52px;
58
+ --fubi-navbar-height-touch: 66px;
59
+
60
+ --fubi-tabbar-height: 68px;
61
+ --fubi-tabbar-height-touch: 72px;
62
+
63
+ --fubi-window-right: 16px;
64
+ --fubi-window-bottom: calc(var(--fubi-toolbar-height) + var(--fubi-toolbar-bottom) + 4px);
65
+
66
+ --fubi-window-bg: transparent;
67
+ --fubi-page-bg: #151c24;
68
+ --fubi-page-from-bg: #1e2730;
69
+ --fubi-page-to-bg: #101316;
70
+
71
+ --fubi-ease-forward: cubic-bezier(0.2, 1, 0.3, 1);
72
+ --fubi-ease-back: cubic-bezier(0.4, 0, 0.7, 0.1);
73
+ --fubi-router-duration-forward: 400ms;
74
+ --fubi-router-duration-back: 300ms;
75
+
76
+ --fubi-rounded: 38px;
77
+ --fubi-rounded-mouse: 32px;
78
+
79
+ /* router */
80
+ --fubi-rotate-to: 40deg;
81
+
82
+ --fubi-translate-x-difference: 0%;
83
+ --fubi-translate-z-difference: -300px;
84
+ }
85
+
86
+ @media (pointer: coarse) {
87
+ :host {
88
+ --fubi-rotate-to: 0deg;
89
+
90
+ --fubi-translate-x-difference: -30%;
91
+ --fubi-translate-z-difference: 0px;
92
+
93
+ --fubi-toolbar-height: 50px;
94
+ }
95
+
96
+ .router-transition-forward .page-current {
97
+ animation-timing-function: var(--fubi-ease-forward);
98
+ }
99
+ }
package/src/test.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { mount } from "svelte";
2
+ import App from "./components/App.svelte";
3
+
4
+ import styles from "./styles/styles.css?inline";
5
+ import stylesGlobal from "./styles/global.css?inline";
6
+
7
+ const root = document.createElement("div");
8
+ root.id = "fubi-shadow-root";
9
+
10
+ const shadowRoot = root.attachShadow({ mode: "open" });
11
+ shadowRoot.innerHTML = `<style>${styles}</style>`;
12
+
13
+ const wrapper = document.createElement("div");
14
+ wrapper.id = "fubi-wrapper";
15
+ shadowRoot.appendChild(wrapper);
16
+
17
+ document.body.appendChild(root);
18
+ document.head.insertAdjacentHTML("beforeend", `<style id="fubi-global-styles">${stylesGlobal}</style>`);
19
+
20
+ mount(App, { target: wrapper, props: { projectId: "lqwmo71n75ihvyj", wrapper } });
21
+
22
+ export default app;
File without changes
@@ -0,0 +1,5 @@
1
+ export type MsgType = {
2
+ type: "info" | "success" | "error";
3
+ text: string;
4
+ visible: boolean;
5
+ };
@@ -0,0 +1,7 @@
1
+ import type { RecordModel } from "pocketbase";
2
+
3
+ export interface CollectionItem extends RecordModel {
4
+ id: string;
5
+ created: string;
6
+ updated: string;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { CollectionItem } from "@/types/pocketbase";
2
+ export interface UserType extends CollectionItem {
3
+ avatar?: string;
4
+ email: string;
5
+ emailVisibility: boolean;
6
+ name: string;
7
+ verified: boolean;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
2
+
3
+ export default {
4
+ preprocess: vitePreprocess(),
5
+ compilerOptions: {
6
+ runes: true,
7
+ experimental: {
8
+ async: true
9
+ }
10
+ }
11
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "outDir": "dist",
10
+ "rootDir": "./src",
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "resolveJsonModule": true,
16
+ "allowJs": false,
17
+ "types": ["node", "vite/client"],
18
+ "paths": {
19
+ "@modules": ["./src/modules"],
20
+ "@modules/*": ["./src/modules/*"],
21
+ "@pages": ["./src/pages"],
22
+ "@pages/*": ["./src/pages/*"],
23
+ "@components": ["./src/components"],
24
+ "@components/*": ["./src/components/*"],
25
+ "@lib": ["./src/lib"],
26
+ "@lib/*": ["./src/lib/*"],
27
+ "@ui": ["./src/components/ui"],
28
+ "@ui/*": ["./src/components/ui/*"],
29
+ "@icons": ["./src/components/icons"],
30
+ "@icons/*": ["./src/components/icons/*"],
31
+ "@logger": ["./src/lib/logger.ts"],
32
+ "@utils": ["./src/lib/utils.ts"],
33
+ "@/types": ["./src/types"],
34
+ "@/types/*": ["./src/types/*"],
35
+ "@styles": ["./src/styles"],
36
+ "@styles/*": ["./src/styles/*"]
37
+ }
38
+ },
39
+ "include": ["src/**/*", "src/modules/.old-window.svelte.ts", "src/modules/.old-window.svelte.ts"],
40
+ "exclude": ["node_modules", "dist", "./src/test.ts"]
41
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,40 @@
1
+ import { defineConfig } from "vite";
2
+ import { svelte } from "@sveltejs/vite-plugin-svelte";
3
+ import { resolve } from "path";
4
+ import tailwindcss from "@tailwindcss/vite";
5
+
6
+ export default defineConfig({
7
+ plugins: [svelte(), tailwindcss()],
8
+ optimizeDeps: {
9
+ exclude: ["bits-ui"],
10
+ include: ["bits-ui > svelte-toolbelt"],
11
+ },
12
+ ssr: {
13
+ noExternal: ["bits-ui"],
14
+ },
15
+ build: {
16
+ lib: {
17
+ entry: {
18
+ index: resolve(__dirname, "src/index.ts"),
19
+ },
20
+ formats: ["es"],
21
+ },
22
+ rollupOptions: {
23
+ external: ["vite", "pocketbase"],
24
+ },
25
+ },
26
+ resolve: {
27
+ alias: {
28
+ "@modules": resolve(__dirname, "src/modules"),
29
+ "@pages": resolve(__dirname, "src/pages"),
30
+ "@components": resolve(__dirname, "src/components"),
31
+ "@lib": resolve(__dirname, "src/lib"),
32
+ "@ui": resolve(__dirname, "src/components/ui"),
33
+ "@icons": resolve(__dirname, "src/components/icons"),
34
+ "@logger": resolve(__dirname, "src/lib/logger.ts"),
35
+ "@utils": resolve(__dirname, "src/lib/utils.ts"),
36
+ "@/types": resolve(__dirname, "src/types"),
37
+ "@styles": resolve(__dirname, "src/styles"),
38
+ },
39
+ },
40
+ });