@nyuccl/smile 0.2.0-beta.1 → 0.2.0-beta.3
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/PresentationModeView.d.vue.ts +1 -1
- package/dist/runtime/components/builtins/PresentationModeView.vue.d.ts +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/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/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/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 +2 -2
package/dist/module.json
CHANGED
|
@@ -84,10 +84,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
84
84
|
};
|
|
85
85
|
}>> & Readonly<{}>, {
|
|
86
86
|
title: string;
|
|
87
|
-
description: string | unknown[];
|
|
88
87
|
subtitle: string;
|
|
89
88
|
siteAuthor: Record<string, any>;
|
|
90
89
|
projectAuthors: unknown[];
|
|
91
90
|
info: unknown[];
|
|
91
|
+
description: string | unknown[];
|
|
92
92
|
sections: unknown[];
|
|
93
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -84,10 +84,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
84
84
|
};
|
|
85
85
|
}>> & Readonly<{}>, {
|
|
86
86
|
title: string;
|
|
87
|
-
description: string | unknown[];
|
|
88
87
|
subtitle: string;
|
|
89
88
|
siteAuthor: Record<string, any>;
|
|
90
89
|
projectAuthors: unknown[];
|
|
91
90
|
info: unknown[];
|
|
91
|
+
description: string | unknown[];
|
|
92
92
|
sections: unknown[];
|
|
93
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import
|
|
2
|
+
import _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;
|
|
@@ -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;
|
|
@@ -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>;
|
|
@@ -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 _seedrandom from 'seedrandom'
|
|
24
24
|
import { v4 as uuidv4 } from 'uuid'
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
|
|
25
|
+
import _sha256 from 'crypto-js/sha256'
|
|
26
|
+
import _Base64url from 'crypto-js/enc-base64'
|
|
27
|
+
import _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 _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 _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 _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 _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 _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.3",
|
|
4
4
|
"description": "SMILE experiment framework as a Nuxt module",
|
|
5
5
|
"author": "Todd Gureckis <gureckis@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"dev": "pnpm run dev:prepare && nuxt dev playground",
|
|
91
91
|
"dev:build": "nuxt build playground",
|
|
92
92
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
93
|
-
"release": "bumpp && node scripts/sync-starter-version.js && pnpm run lint && pnpm run test && pnpm run prepack && changelogen --
|
|
93
|
+
"release": "bumpp && node scripts/sync-starter-version.js && git add starter-template/package.json && git commit --amend --no-edit && pnpm run lint && pnpm run test && pnpm run prepack && changelogen --no-bump && pnpm publish --access public --tag beta && git push --follow-tags",
|
|
94
94
|
"lint": "eslint .",
|
|
95
95
|
"test": "vitest run",
|
|
96
96
|
"test:watch": "vitest watch",
|