@nyuccl/smile 0.2.0-beta.3 → 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.
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.3",
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 _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;
@@ -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;
@@ -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>;
@@ -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 _seedrandom from 'seedrandom'
23
+ import seedrandom from 'seedrandom'
24
24
  import { v4 as uuidv4 } from 'uuid'
25
- import _sha256 from 'crypto-js/sha256'
26
- import _Base64url from 'crypto-js/enc-base64'
27
- import _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 _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 _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 _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 _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 _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.3",
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",
@@ -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.9.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": "^2.3.1",
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",
@@ -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",