@nyuccl/smile 0.2.0-beta.2 → 0.2.0-beta.4
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/dist/module.json +1 -1
- package/dist/runtime/components/builtins/ThanksView.vue +2 -1
- package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +1 -1
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.d.vue.ts +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +1 -1
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +1 -1
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +1 -1
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +1 -1
- package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +1 -1
- package/dist/runtime/composables/useAPI.js +9 -5
- package/dist/runtime/core/stepper/Stepper.js +3 -1
- package/dist/runtime/core/timeline/Timeline.js +3 -1
- package/dist/runtime/middleware/timeline.global.js +3 -1
- package/dist/runtime/plugins/seed.client.js +3 -1
- package/dist/runtime/server/api/qr.get.js +2 -1
- package/package.json +3 -3
package/dist/module.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import
|
|
2
|
+
import * as _Clipboard from "clipboard";
|
|
3
3
|
import { onMounted, ref } from "vue";
|
|
4
|
+
const Clipboard = _Clipboard.default || _Clipboard;
|
|
4
5
|
const api = useAPI();
|
|
5
6
|
const alreadyCompleted = !!api.store.cookieState.completionCode;
|
|
6
7
|
const isUploading = ref(!alreadyCompleted);
|
|
@@ -76,9 +76,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{}>, {
|
|
78
78
|
disabled: boolean;
|
|
79
|
+
orientation: string;
|
|
79
80
|
asChild: boolean;
|
|
80
81
|
as: any;
|
|
81
|
-
orientation: string;
|
|
82
82
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
83
83
|
type __VLS_Slots = {
|
|
84
84
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -76,9 +76,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{}>, {
|
|
78
78
|
disabled: boolean;
|
|
79
|
+
orientation: string;
|
|
79
80
|
asChild: boolean;
|
|
80
81
|
as: any;
|
|
81
|
-
orientation: string;
|
|
82
82
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
83
83
|
type __VLS_Slots = {
|
|
84
84
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -181,8 +181,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
181
181
|
onInteractOutside?: ((...args: any[]) => any) | undefined;
|
|
182
182
|
onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
|
|
183
183
|
}>, {
|
|
184
|
-
loop: boolean;
|
|
185
184
|
asChild: boolean;
|
|
185
|
+
loop: boolean;
|
|
186
186
|
forceMount: boolean;
|
|
187
187
|
sideOffset: number;
|
|
188
188
|
avoidCollisions: boolean;
|
|
@@ -181,8 +181,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
181
181
|
onInteractOutside?: ((...args: any[]) => any) | undefined;
|
|
182
182
|
onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
|
|
183
183
|
}>, {
|
|
184
|
-
loop: boolean;
|
|
185
184
|
asChild: boolean;
|
|
185
|
+
loop: boolean;
|
|
186
186
|
forceMount: boolean;
|
|
187
187
|
sideOffset: number;
|
|
188
188
|
avoidCollisions: boolean;
|
|
@@ -67,8 +67,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
67
67
|
}>> & Readonly<{}>, {
|
|
68
68
|
variant: string;
|
|
69
69
|
disabled: boolean;
|
|
70
|
-
asChild: boolean;
|
|
71
70
|
inset: boolean;
|
|
71
|
+
asChild: boolean;
|
|
72
72
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
73
73
|
type __VLS_Slots = {
|
|
74
74
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -67,8 +67,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
67
67
|
}>> & Readonly<{}>, {
|
|
68
68
|
variant: string;
|
|
69
69
|
disabled: boolean;
|
|
70
|
-
asChild: boolean;
|
|
71
70
|
inset: boolean;
|
|
71
|
+
asChild: boolean;
|
|
72
72
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
73
73
|
type __VLS_Slots = {
|
|
74
74
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
required: false;
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
|
-
asChild: boolean;
|
|
43
42
|
inset: boolean;
|
|
43
|
+
asChild: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
type __VLS_Slots = {
|
|
46
46
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
required: false;
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
|
-
asChild: boolean;
|
|
43
42
|
inset: boolean;
|
|
43
|
+
asChild: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
type __VLS_Slots = {
|
|
46
46
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -167,8 +167,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
167
167
|
onEntryFocus?: ((...args: any[]) => any) | undefined;
|
|
168
168
|
onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
|
|
169
169
|
}>, {
|
|
170
|
-
loop: boolean;
|
|
171
170
|
asChild: boolean;
|
|
171
|
+
loop: boolean;
|
|
172
172
|
forceMount: boolean;
|
|
173
173
|
avoidCollisions: boolean;
|
|
174
174
|
hideWhenDetached: boolean;
|
|
@@ -167,8 +167,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
167
167
|
onEntryFocus?: ((...args: any[]) => any) | undefined;
|
|
168
168
|
onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
|
|
169
169
|
}>, {
|
|
170
|
-
loop: boolean;
|
|
171
170
|
asChild: boolean;
|
|
171
|
+
loop: boolean;
|
|
172
172
|
forceMount: boolean;
|
|
173
173
|
avoidCollisions: boolean;
|
|
174
174
|
hideWhenDetached: boolean;
|
|
@@ -56,8 +56,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
56
56
|
};
|
|
57
57
|
}>> & Readonly<{}>, {
|
|
58
58
|
disabled: boolean;
|
|
59
|
-
asChild: boolean;
|
|
60
59
|
inset: boolean;
|
|
60
|
+
asChild: boolean;
|
|
61
61
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
62
|
type __VLS_Slots = {
|
|
63
63
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -56,8 +56,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
56
56
|
};
|
|
57
57
|
}>> & Readonly<{}>, {
|
|
58
58
|
disabled: boolean;
|
|
59
|
-
asChild: boolean;
|
|
60
59
|
inset: boolean;
|
|
60
|
+
asChild: boolean;
|
|
61
61
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
62
|
type __VLS_Slots = {
|
|
63
63
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -47,7 +47,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
47
47
|
required: false;
|
|
48
48
|
};
|
|
49
49
|
}>> & Readonly<{}>, {
|
|
50
|
-
asChild: boolean;
|
|
51
50
|
orientation: string;
|
|
51
|
+
asChild: boolean;
|
|
52
52
|
decorative: boolean;
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -47,7 +47,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
47
47
|
required: false;
|
|
48
48
|
};
|
|
49
49
|
}>> & Readonly<{}>, {
|
|
50
|
-
asChild: boolean;
|
|
51
50
|
orientation: string;
|
|
51
|
+
asChild: boolean;
|
|
52
52
|
decorative: boolean;
|
|
53
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -64,8 +64,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
64
64
|
};
|
|
65
65
|
}>> & Readonly<{}>, {
|
|
66
66
|
disabled: boolean;
|
|
67
|
-
completed: boolean;
|
|
68
67
|
asChild: boolean;
|
|
68
|
+
completed: boolean;
|
|
69
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
70
70
|
type __VLS_Slots = {
|
|
71
71
|
default?: ((props: {
|
|
@@ -64,8 +64,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
64
64
|
};
|
|
65
65
|
}>> & Readonly<{}>, {
|
|
66
66
|
disabled: boolean;
|
|
67
|
-
completed: boolean;
|
|
68
67
|
asChild: boolean;
|
|
68
|
+
completed: boolean;
|
|
69
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
70
70
|
type __VLS_Slots = {
|
|
71
71
|
default?: ((props: {
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
required: false;
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
|
-
loop: boolean;
|
|
43
42
|
asChild: boolean;
|
|
43
|
+
loop: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
type __VLS_Slots = {
|
|
46
46
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
39
39
|
required: false;
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
|
-
loop: boolean;
|
|
43
42
|
asChild: boolean;
|
|
43
|
+
loop: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
45
45
|
type __VLS_Slots = {
|
|
46
46
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -133,8 +133,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
133
133
|
}>, {
|
|
134
134
|
required: boolean;
|
|
135
135
|
disabled: boolean;
|
|
136
|
-
loop: boolean;
|
|
137
136
|
asChild: boolean;
|
|
137
|
+
loop: boolean;
|
|
138
138
|
rovingFocus: boolean;
|
|
139
139
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
140
140
|
type __VLS_Slots = {
|
|
@@ -133,8 +133,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
133
133
|
}>, {
|
|
134
134
|
required: boolean;
|
|
135
135
|
disabled: boolean;
|
|
136
|
-
loop: boolean;
|
|
137
136
|
asChild: boolean;
|
|
137
|
+
loop: boolean;
|
|
138
138
|
rovingFocus: boolean;
|
|
139
139
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
140
140
|
type __VLS_Slots = {
|
|
@@ -20,12 +20,11 @@ import { useRoute, useRouter, useRuntimeConfig, useNuxtApp } from '#imports'
|
|
|
20
20
|
import useSmileStore from '../stores/smilestore.js'
|
|
21
21
|
import useLog from '../stores/log.js'
|
|
22
22
|
import useTimeline from './useTimeline.js'
|
|
23
|
-
import
|
|
23
|
+
import * as _seedrandom from 'seedrandom'
|
|
24
24
|
import { v4 as uuidv4 } from 'uuid'
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
|
|
25
|
+
import * as _sha256 from 'crypto-js/sha256'
|
|
26
|
+
import * as _Base64url from 'crypto-js/enc-base64'
|
|
27
|
+
import * as _stringify from 'json-stable-stringify'
|
|
29
28
|
import {
|
|
30
29
|
randomInt,
|
|
31
30
|
shuffle,
|
|
@@ -34,6 +33,11 @@ import {
|
|
|
34
33
|
fakerDistributions,
|
|
35
34
|
} from '../utils/randomization.js'
|
|
36
35
|
|
|
36
|
+
const seedrandom = _seedrandom.default || _seedrandom
|
|
37
|
+
const sha256 = _sha256.default || _sha256
|
|
38
|
+
const Base64url = _Base64url.default || _Base64url
|
|
39
|
+
const stringify = _stringify.default || _stringify
|
|
40
|
+
|
|
37
41
|
/**
|
|
38
42
|
* SmileAPI class provides core functionality for SMILE experiments
|
|
39
43
|
* @class
|
|
@@ -3,7 +3,9 @@ import config from '../config.js'
|
|
|
3
3
|
import { StepperSerializer } from './StepperSerializer.js'
|
|
4
4
|
import StepperProxy from './StepperProxy.js'
|
|
5
5
|
import useLog from '../../stores/log.js'
|
|
6
|
-
import
|
|
6
|
+
import * as _seedrandom from 'seedrandom'
|
|
7
|
+
|
|
8
|
+
const seedrandom = _seedrandom.default || _seedrandom
|
|
7
9
|
|
|
8
10
|
// to be implemented functions
|
|
9
11
|
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @module timeline
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as _lodash from 'lodash'
|
|
7
|
+
|
|
8
|
+
const _ = _lodash.default || _lodash
|
|
7
9
|
// NOTE: RecruitmentChooser and PresentationMode views are handled via
|
|
8
10
|
// route-based modes (/dev/, /presentation/) in Nuxt, not registered here.
|
|
9
11
|
// See runtime/pages/dev/ and runtime/pages/presentation/
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
* route (`/:slug(.*)*`). So we look up route metadata from $timeline.routes
|
|
7
7
|
* instead of Vue Router's to.meta / from.meta.
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
9
|
+
import * as _seedrandom from 'seedrandom'
|
|
10
10
|
import { v4 as uuidv4 } from 'uuid'
|
|
11
11
|
import { defineNuxtRouteMiddleware, useNuxtApp, navigateTo } from '#imports'
|
|
12
12
|
import useSmileStore from '../stores/smilestore.js'
|
|
13
13
|
import useLog from '../stores/log.js'
|
|
14
14
|
import { getQueryParams, processQuery, initService } from '../utils/utils.js'
|
|
15
15
|
|
|
16
|
+
const seedrandom = _seedrandom.default || _seedrandom
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Core guard logic extracted for testability.
|
|
18
20
|
* Returns the guard decision, then runs post-guard logic if navigation is allowed.
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { defineNuxtPlugin } from '#imports'
|
|
12
12
|
import { v4 as uuidv4 } from 'uuid'
|
|
13
|
-
import
|
|
13
|
+
import * as _seedrandom from 'seedrandom'
|
|
14
14
|
import useSmileStore from '../stores/smilestore.js'
|
|
15
15
|
|
|
16
|
+
const seedrandom = _seedrandom.default || _seedrandom
|
|
17
|
+
|
|
16
18
|
export default defineNuxtPlugin(() => {
|
|
17
19
|
const store = useSmileStore()
|
|
18
20
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _QRCode from "qrcode-svg";
|
|
2
2
|
import { defineEventHandler, getQuery, getRequestURL, setResponseHeader } from "h3";
|
|
3
|
+
const QRCode = _QRCode.default || _QRCode;
|
|
3
4
|
export default defineEventHandler((event) => {
|
|
4
5
|
const query = getQuery(event);
|
|
5
6
|
const requestUrl = getRequestURL(event);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyuccl/smile",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.4",
|
|
4
4
|
"description": "SMILE experiment framework as a Nuxt module",
|
|
5
5
|
"author": "Todd Gureckis <gureckis@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@internationalized/date": "^3.7.0",
|
|
35
35
|
"@libsql/client": "^0.14.0",
|
|
36
36
|
"@nuxt/kit": "^4.3.0",
|
|
37
|
-
"@pinia/nuxt": "^0.
|
|
37
|
+
"@pinia/nuxt": "^0.11.3",
|
|
38
38
|
"@tailwindcss/vite": "^4.1.10",
|
|
39
39
|
"@vueuse/core": "^12.8.2",
|
|
40
40
|
"axios": "^1.7.9",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"lucide-vue-next": "^0.517.0",
|
|
49
49
|
"motion": "^12.3.1",
|
|
50
|
-
"pinia": "^
|
|
50
|
+
"pinia": "^3.0.4",
|
|
51
51
|
"qrcode-svg": "^1.1.0",
|
|
52
52
|
"reka-ui": "^2.6.1",
|
|
53
53
|
"seedrandom": "^3.0.5",
|