@nyuccl/smile 0.2.0-beta.4 → 0.2.0-beta.5

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 (32) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +11 -0
  3. package/dist/runtime/components/builtins/PresentationModeView.d.vue.ts +1 -1
  4. package/dist/runtime/components/builtins/PresentationModeView.vue.d.ts +1 -1
  5. package/dist/runtime/components/builtins/ThanksView.vue +1 -2
  6. package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +1 -1
  7. package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +1 -1
  8. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +1 -1
  9. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +1 -1
  10. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.d.vue.ts +1 -1
  11. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +1 -1
  12. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.d.vue.ts +1 -1
  13. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +1 -1
  14. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +1 -1
  15. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +1 -1
  16. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.d.vue.ts +1 -1
  17. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +1 -1
  18. package/dist/runtime/components/ui/separator/Separator.d.vue.ts +1 -1
  19. package/dist/runtime/components/ui/separator/Separator.vue.d.ts +1 -1
  20. package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
  21. package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
  22. package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +1 -1
  23. package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +1 -1
  24. package/dist/runtime/components/ui/toggle-group/ToggleGroup.d.vue.ts +1 -1
  25. package/dist/runtime/components/ui/toggle-group/ToggleGroup.vue.d.ts +1 -1
  26. package/dist/runtime/composables/useAPI.js +4 -9
  27. package/dist/runtime/core/stepper/Stepper.js +1 -3
  28. package/dist/runtime/core/timeline/Timeline.js +1 -2
  29. package/dist/runtime/middleware/timeline.global.js +1 -3
  30. package/dist/runtime/plugins/seed.client.js +1 -3
  31. package/dist/runtime/server/api/qr.get.js +1 -2
  32. package/package.json +2 -2
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nyuccl/smile",
3
3
  "configKey": "smile",
4
- "version": "0.2.0-beta.4",
4
+ "version": "0.2.0-beta.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -39,6 +39,17 @@ const module$1 = defineNuxtModule({
39
39
  _nuxt.options.vite.plugins.push(Icons({
40
40
  compiler: "vue3"
41
41
  }));
42
+ _nuxt.options.vite.optimizeDeps = _nuxt.options.vite.optimizeDeps || {};
43
+ _nuxt.options.vite.optimizeDeps.include = _nuxt.options.vite.optimizeDeps.include || [];
44
+ _nuxt.options.vite.optimizeDeps.include.push(
45
+ "seedrandom",
46
+ "lodash",
47
+ "clipboard",
48
+ "crypto-js/sha256",
49
+ "crypto-js/enc-base64",
50
+ "json-stable-stringify",
51
+ "qrcode-svg"
52
+ );
42
53
  _nuxt.options.css.push(resolver.resolve("./runtime/css/main.css"));
43
54
  addPlugin(resolver.resolve("./runtime/plugins/store-sync.client"));
44
55
  addPlugin(resolver.resolve("./runtime/plugins/seed.client"));
@@ -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[];
87
88
  subtitle: string;
88
89
  siteAuthor: Record<string, any>;
89
90
  projectAuthors: unknown[];
90
91
  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[];
87
88
  subtitle: string;
88
89
  siteAuthor: Record<string, any>;
89
90
  projectAuthors: unknown[];
90
91
  info: unknown[];
91
- description: string | unknown[];
92
92
  sections: unknown[];
93
93
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,7 +1,6 @@
1
1
  <script setup>
2
- import * as _Clipboard from "clipboard";
2
+ import Clipboard from "clipboard";
3
3
  import { onMounted, ref } from "vue";
4
- const Clipboard = _Clipboard.default || _Clipboard;
5
4
  const api = useAPI();
6
5
  const alreadyCompleted = !!api.store.cookieState.completionCode;
7
6
  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;
80
79
  asChild: boolean;
81
80
  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;
80
79
  asChild: boolean;
81
80
  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
- asChild: boolean;
185
184
  loop: boolean;
185
+ asChild: 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
- asChild: boolean;
185
184
  loop: boolean;
185
+ asChild: 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
- inset: boolean;
71
70
  asChild: boolean;
71
+ inset: 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
- inset: boolean;
71
70
  asChild: boolean;
71
+ inset: 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
- inset: boolean;
43
42
  asChild: boolean;
43
+ inset: 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
- inset: boolean;
43
42
  asChild: boolean;
43
+ inset: 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
- asChild: boolean;
171
170
  loop: boolean;
171
+ asChild: 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
- asChild: boolean;
171
170
  loop: boolean;
171
+ asChild: 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
- inset: boolean;
60
59
  asChild: boolean;
60
+ inset: 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
- inset: boolean;
60
59
  asChild: boolean;
60
+ inset: 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
- orientation: string;
51
50
  asChild: boolean;
51
+ orientation: string;
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
- orientation: string;
51
50
  asChild: boolean;
51
+ orientation: string;
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
- asChild: boolean;
68
67
  completed: boolean;
68
+ asChild: 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
- asChild: boolean;
68
67
  completed: boolean;
68
+ asChild: 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
- asChild: boolean;
43
42
  loop: 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
  loop: boolean;
43
+ asChild: 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
- asChild: boolean;
137
136
  loop: boolean;
137
+ asChild: 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
- asChild: boolean;
137
136
  loop: boolean;
137
+ asChild: boolean;
138
138
  rovingFocus: boolean;
139
139
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
140
140
  type __VLS_Slots = {
@@ -20,11 +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 * as _seedrandom from 'seedrandom'
23
+ import seedrandom from 'seedrandom'
24
24
  import { v4 as uuidv4 } from 'uuid'
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'
25
+ import sha256 from 'crypto-js/sha256'
26
+ import Base64url from 'crypto-js/enc-base64'
27
+ import stringify from 'json-stable-stringify'
28
28
  import {
29
29
  randomInt,
30
30
  shuffle,
@@ -33,11 +33,6 @@ import {
33
33
  fakerDistributions,
34
34
  } from '../utils/randomization.js'
35
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
-
41
36
  /**
42
37
  * SmileAPI class provides core functionality for SMILE experiments
43
38
  * @class
@@ -3,9 +3,7 @@ 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 * as _seedrandom from 'seedrandom'
7
-
8
- const seedrandom = _seedrandom.default || _seedrandom
6
+ import seedrandom from 'seedrandom'
9
7
 
10
8
  // to be implemented functions
11
9
 
@@ -3,9 +3,8 @@
3
3
  * @module timeline
4
4
  */
5
5
 
6
- import * as _lodash from 'lodash'
6
+ import _ from 'lodash'
7
7
 
8
- const _ = _lodash.default || _lodash
9
8
  // NOTE: RecruitmentChooser and PresentationMode views are handled via
10
9
  // route-based modes (/dev/, /presentation/) in Nuxt, not registered here.
11
10
  // See runtime/pages/dev/ and runtime/pages/presentation/
@@ -6,15 +6,13 @@
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 * as _seedrandom from 'seedrandom'
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
-
18
16
  /**
19
17
  * Core guard logic extracted for testability.
20
18
  * Returns the guard decision, then runs post-guard logic if navigation is allowed.
@@ -10,11 +10,9 @@
10
10
  */
11
11
  import { defineNuxtPlugin } from '#imports'
12
12
  import { v4 as uuidv4 } from 'uuid'
13
- import * as _seedrandom from 'seedrandom'
13
+ import seedrandom from 'seedrandom'
14
14
  import useSmileStore from '../stores/smilestore.js'
15
15
 
16
- const seedrandom = _seedrandom.default || _seedrandom
17
-
18
16
  export default defineNuxtPlugin(() => {
19
17
  const store = useSmileStore()
20
18
 
@@ -1,6 +1,5 @@
1
- import * as _QRCode from "qrcode-svg";
1
+ import QRCode from "qrcode-svg";
2
2
  import { defineEventHandler, getQuery, getRequestURL, setResponseHeader } from "h3";
3
- const QRCode = _QRCode.default || _QRCode;
4
3
  export default defineEventHandler((event) => {
5
4
  const query = getQuery(event);
6
5
  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.4",
3
+ "version": "0.2.0-beta.5",
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 && 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",
93
+ "release": "bumpp --no-push && 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",