@pie-element/select-text 12.1.0-next.0 → 12.1.1-next.1

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.
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ feedbackEnabled: false,
9
+ highlightChoices: false,
10
+ maxSelections: 0,
11
+ mode: 'sentence',
12
+ partialScoring: false,
13
+ prompt: '',
14
+ promptEnabled: true,
15
+ rationale: '',
16
+ rationaleEnabled: true,
17
+ scoringType: 'auto',
18
+ studentInstructionsEnabled: true,
19
+ teacherInstructions: '',
20
+ teacherInstructionsEnabled: true,
21
+ text: '',
22
+ tokens: [],
23
+ toolbarEditorPosition: 'bottom'
24
+ };
25
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","names":["feedbackEnabled","highlightChoices","maxSelections","mode","partialScoring","prompt","promptEnabled","rationale","rationaleEnabled","scoringType","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","text","tokens","toolbarEditorPosition"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n feedbackEnabled: false,\n highlightChoices: false,\n maxSelections: 0,\n mode: 'sentence',\n partialScoring: false,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'auto',\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n text: '',\n tokens: [],\n toolbarEditorPosition: 'bottom',\n};\n"],"mappings":";;;;;;iCAAe;EACbA,eAAe,EAAE,KAAK;EACtBC,gBAAgB,EAAE,KAAK;EACvBC,aAAa,EAAE,CAAC;EAChBC,IAAI,EAAE,UAAU;EAChBC,cAAc,EAAE,KAAK;EACrBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,WAAW,EAAE,MAAM;EACnBC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,IAAI,EAAE,EAAE;EACRC,MAAM,EAAE,EAAE;EACVC,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.createCorrectResponseSession = void 0;
8
+ exports.createDefaultModel = createDefaultModel;
9
+ exports.validate = exports.outcome = exports.normalizeSession = exports.normalize = exports.model = exports.getPartialScore = exports.getCorrectness = void 0;
10
+ var _debug = _interopRequireDefault(require("debug"));
11
+ var _lodashEs = require("lodash-es");
12
+ var _feedback = require("@pie-lib/feedback");
13
+ var _controllerUtils = require("@pie-lib/controller-utils");
14
+ var _defaults = _interopRequireDefault(require("./defaults"));
15
+ const log = (0, _debug.default)('@pie-element:select-text:controller');
16
+ const equalTokens = (token1 = {}, token2 = {}) => token1?.start === token2?.start && token1?.end === token2?.end ||
17
+ // this case is used for the cases when the token's start & end were recalculated
18
+ token1?.start === token2?.oldStart && token1?.end === token2?.oldEnd;
19
+ const normalizeTokens = (tokens = [], selectedTokens = [], evaluateMode = false) => (tokens || []).map(token => {
20
+ const isCorrect = !!token.correct;
21
+ // search if correct token is missing from session
22
+ const isMissing = isCorrect && !(selectedTokens || []).find(selectedToken => equalTokens(token, selectedToken));
23
+ return {
24
+ ...token,
25
+ correct: evaluateMode ? isCorrect : undefined,
26
+ isMissing: evaluateMode ? isMissing : undefined
27
+ };
28
+ });
29
+ const getCorrectness = (tokens, selected) => {
30
+ const correct = tokens.filter(t => t.correct === true);
31
+ if (correct.length === 0) {
32
+ return 'unknown';
33
+ }
34
+ const correctSelected = getCorrectSelected(tokens, selected);
35
+ if (correctSelected.length === selected.length) {
36
+ if (correctSelected.length === correct.length) {
37
+ return 'correct';
38
+ } else if (correctSelected.length > 0) {
39
+ return 'partially-correct';
40
+ }
41
+ }
42
+ if (correctSelected.length > 0) {
43
+ return 'partially-correct';
44
+ }
45
+ return 'incorrect';
46
+ };
47
+ exports.getCorrectness = getCorrectness;
48
+ const getCorrectSelected = (tokens, selected) => (selected || []).filter(s => tokens.findIndex(token => token.correct && equalTokens(token, s)) !== -1);
49
+ const getPartialScore = (question, session, totalCorrect) => {
50
+ if (!session || (0, _lodashEs.isEmpty)(session)) {
51
+ return 0;
52
+ }
53
+ const correctCount = getCorrectSelected(question.tokens, session.selectedTokens).length;
54
+ const correctTokens = (question.tokens || []).filter(t => t.correct === true);
55
+ const extraSelected = session.selectedTokens ? session.selectedTokens.length > correctTokens.length : 0;
56
+ const incorrectCount = extraSelected ? session.selectedTokens && session.selectedTokens.length - correctCount : 0;
57
+ const count = correctCount - incorrectCount;
58
+ const positiveCount = count < 0 ? 0 : count;
59
+ return totalCorrect.length ? parseFloat((positiveCount / totalCorrect.length).toFixed(2)) : 0;
60
+ };
61
+ exports.getPartialScore = getPartialScore;
62
+ const outcome = (question, session, env) => new Promise(resolve => {
63
+ if (!session || (0, _lodashEs.isEmpty)(session)) {
64
+ resolve({
65
+ score: 0,
66
+ empty: true
67
+ });
68
+ }
69
+ session = normalizeSession(session);
70
+ if (env.mode !== 'evaluate') {
71
+ resolve({
72
+ score: undefined,
73
+ completed: undefined
74
+ });
75
+ } else {
76
+ const enabled = _controllerUtils.partialScoring.enabled(question, env, true);
77
+ const totalCorrect = question.tokens.filter(t => t.correct);
78
+ const score = getPartialScore(question, session, totalCorrect);
79
+ resolve({
80
+ score: enabled ? score : score === 1 ? 1 : 0
81
+ });
82
+ }
83
+ });
84
+ exports.outcome = outcome;
85
+ function createDefaultModel(model = {}) {
86
+ return new Promise(resolve => {
87
+ resolve({
88
+ ..._defaults.default,
89
+ ...model
90
+ });
91
+ });
92
+ }
93
+ const normalizeSession = session => ({
94
+ selectedTokens: [],
95
+ ...session
96
+ });
97
+ exports.normalizeSession = normalizeSession;
98
+ const normalize = question => ({
99
+ ..._defaults.default,
100
+ ...question
101
+ });
102
+ exports.normalize = normalize;
103
+ const model = (question, session, env) => {
104
+ session = session || {
105
+ selectedToken: []
106
+ };
107
+ session.selectedTokens = session.selectedTokens || [];
108
+ const normalizedQuestion = normalize(question);
109
+ return new Promise(resolve => {
110
+ log('[model]', 'normalizedQuestion: ', normalizedQuestion);
111
+ log('[model]', 'session: ', session);
112
+ const tokens = normalizeTokens(normalizedQuestion.tokens, session.selectedTokens, env.mode === 'evaluate');
113
+ log('[model] tokens:', tokens);
114
+ const correctness = env.mode === 'evaluate' ? getCorrectness(normalizedQuestion.tokens, session.selectedTokens) : undefined;
115
+ const fb = env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled ? (0, _feedback.getFeedbackForCorrectness)(correctness, normalizedQuestion.feedback) : Promise.resolve(undefined);
116
+ fb.then(feedback => {
117
+ const out = {
118
+ tokens,
119
+ highlightChoices: normalizedQuestion.highlightChoices,
120
+ prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,
121
+ text: normalizedQuestion.text,
122
+ disabled: env.mode !== 'gather',
123
+ maxSelections: normalizedQuestion.maxSelections,
124
+ correctness,
125
+ env,
126
+ feedback,
127
+ incorrect: env.mode === 'evaluate' ? correctness !== 'correct' : undefined,
128
+ language: normalizedQuestion.language,
129
+ extraCSSRules: normalizedQuestion.extraCSSRules
130
+ };
131
+ if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
132
+ out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;
133
+ out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;
134
+ } else {
135
+ out.rationale = null;
136
+ out.teacherInstructions = null;
137
+ }
138
+ resolve(out);
139
+ });
140
+ });
141
+ };
142
+ exports.model = model;
143
+ const createCorrectResponseSession = (question, env) => {
144
+ return new Promise(resolve => {
145
+ if (env.mode !== 'evaluate' && env.role === 'instructor') {
146
+ const {
147
+ tokens
148
+ } = question;
149
+ const selectedTokens = tokens.filter(t => t.correct);
150
+ resolve({
151
+ id: '1',
152
+ selectedTokens
153
+ });
154
+ } else {
155
+ resolve(null);
156
+ }
157
+ });
158
+ };
159
+
160
+ // remove all html tags
161
+ exports.createCorrectResponseSession = createCorrectResponseSession;
162
+ const getInnerText = html => (html || '').replaceAll(/<[^>]*>/g, '');
163
+
164
+ // remove all html tags except img, iframe and source tag for audio
165
+ const getContent = html => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
166
+ const validate = (model = {}, config = {}) => {
167
+ const {
168
+ tokens
169
+ } = model;
170
+ const {
171
+ minTokens = 2,
172
+ maxTokens,
173
+ maxSelections
174
+ } = config;
175
+ const errors = {};
176
+ const nbOfTokens = (tokens || []).length;
177
+ ['teacherInstructions', 'prompt', 'rationale'].forEach(field => {
178
+ if (config[field]?.required && !getContent(model[field])) {
179
+ errors[field] = 'This field is required.';
180
+ }
181
+ });
182
+ const nbOfSelections = (tokens || []).reduce((acc, token) => token.correct ? acc + 1 : acc, 0);
183
+ if (nbOfTokens < minTokens) {
184
+ errors.tokensError = `There should be at least ${minTokens} tokens defined.`;
185
+ } else if (nbOfTokens > maxTokens) {
186
+ errors.tokensError = `No more than ${maxTokens} tokens should be defined.`;
187
+ }
188
+ if (nbOfSelections < 1) {
189
+ errors.selectionsError = 'There should be at least 1 token selected.';
190
+ } else if (nbOfSelections > maxSelections) {
191
+ errors.selectionsError = `No more than ${maxSelections} tokens should be selected.`;
192
+ }
193
+ return errors;
194
+ };
195
+ exports.validate = validate;
196
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_debug","_interopRequireDefault","require","_lodashEs","_feedback","_controllerUtils","_defaults","log","debug","equalTokens","token1","token2","start","end","oldStart","oldEnd","normalizeTokens","tokens","selectedTokens","evaluateMode","map","token","isCorrect","correct","isMissing","find","selectedToken","undefined","getCorrectness","selected","filter","t","length","correctSelected","getCorrectSelected","exports","s","findIndex","getPartialScore","question","session","totalCorrect","isEmpty","correctCount","correctTokens","extraSelected","incorrectCount","count","positiveCount","parseFloat","toFixed","outcome","env","Promise","resolve","score","empty","normalizeSession","mode","completed","enabled","partialScoring","createDefaultModel","model","defaults","normalize","normalizedQuestion","correctness","fb","feedbackEnabled","getFeedbackForCorrectness","feedback","then","out","highlightChoices","prompt","promptEnabled","text","disabled","maxSelections","incorrect","language","extraCSSRules","role","rationale","rationaleEnabled","teacherInstructions","teacherInstructionsEnabled","createCorrectResponseSession","id","getInnerText","html","replaceAll","getContent","replace","validate","config","minTokens","maxTokens","errors","nbOfTokens","forEach","field","required","nbOfSelections","reduce","acc","tokensError","selectionsError"],"sources":["../src/index.js"],"sourcesContent":["import debug from 'debug';\nimport { isEmpty } from 'lodash-es';\nimport { getFeedbackForCorrectness } from '@pie-lib/feedback';\nimport { partialScoring } from '@pie-lib/controller-utils';\nimport defaults from './defaults';\n\nconst log = debug('@pie-element:select-text:controller');\n\nconst equalTokens = (token1 = {}, token2 = {}) =>\n (token1?.start === token2?.start && token1?.end === token2?.end) ||\n // this case is used for the cases when the token's start & end were recalculated\n (token1?.start === token2?.oldStart && token1?.end === token2?.oldEnd);\n\nconst normalizeTokens = (tokens = [], selectedTokens = [], evaluateMode = false) =>\n (tokens || []).map((token) => {\n const isCorrect = !!token.correct;\n // search if correct token is missing from session\n const isMissing = isCorrect && !(selectedTokens || []).find((selectedToken) => equalTokens(token, selectedToken));\n\n return {\n ...token,\n correct: evaluateMode ? isCorrect : undefined,\n isMissing: evaluateMode ? isMissing : undefined,\n };\n });\n\nexport const getCorrectness = (tokens, selected) => {\n const correct = tokens.filter((t) => t.correct === true);\n\n if (correct.length === 0) {\n return 'unknown';\n }\n\n const correctSelected = getCorrectSelected(tokens, selected);\n\n if (correctSelected.length === selected.length) {\n if (correctSelected.length === correct.length) {\n return 'correct';\n } else if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n }\n\n if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n\n return 'incorrect';\n};\n\nconst getCorrectSelected = (tokens, selected) =>\n (selected || []).filter((s) => tokens.findIndex((token) => token.correct && equalTokens(token, s)) !== -1);\n\nexport const getPartialScore = (question, session, totalCorrect) => {\n if (!session || isEmpty(session)) {\n return 0;\n }\n\n const correctCount = getCorrectSelected(question.tokens, session.selectedTokens).length;\n const correctTokens = (question.tokens || []).filter((t) => t.correct === true);\n const extraSelected = session.selectedTokens ? session.selectedTokens.length > correctTokens.length : 0;\n const incorrectCount = extraSelected ? session.selectedTokens && session.selectedTokens.length - correctCount : 0;\n const count = correctCount - incorrectCount;\n const positiveCount = count < 0 ? 0 : count;\n\n return totalCorrect.length ? parseFloat((positiveCount / totalCorrect.length).toFixed(2)) : 0;\n};\n\nexport const outcome = (question, session, env) =>\n new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true });\n }\n\n session = normalizeSession(session);\n\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined });\n } else {\n const enabled = partialScoring.enabled(question, env, true);\n const totalCorrect = question.tokens.filter((t) => t.correct);\n const score = getPartialScore(question, session, totalCorrect);\n resolve({\n score: enabled ? score : score === 1 ? 1 : 0,\n });\n }\n });\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => {\n resolve({ ...defaults, ...model });\n });\n}\n\nexport const normalizeSession = (session) => ({ selectedTokens: [], ...session });\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport const model = (question, session, env) => {\n session = session || { selectedToken: [] };\n session.selectedTokens = session.selectedTokens || [];\n const normalizedQuestion = normalize(question);\n\n return new Promise((resolve) => {\n log('[model]', 'normalizedQuestion: ', normalizedQuestion);\n log('[model]', 'session: ', session);\n\n const tokens = normalizeTokens(normalizedQuestion.tokens, session.selectedTokens, env.mode === 'evaluate');\n log('[model] tokens:', tokens);\n\n const correctness =\n env.mode === 'evaluate' ? getCorrectness(normalizedQuestion.tokens, session.selectedTokens) : undefined;\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedbackForCorrectness(correctness, normalizedQuestion.feedback)\n : Promise.resolve(undefined);\n\n fb.then((feedback) => {\n const out = {\n tokens,\n highlightChoices: normalizedQuestion.highlightChoices,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n text: normalizedQuestion.text,\n disabled: env.mode !== 'gather',\n maxSelections: normalizedQuestion.maxSelections,\n correctness,\n env,\n feedback,\n incorrect: env.mode === 'evaluate' ? correctness !== 'correct' : undefined,\n language: normalizedQuestion.language,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n resolve(out);\n });\n });\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { tokens } = question;\n const selectedTokens = tokens.filter((t) => t.correct);\n\n resolve({\n id: '1',\n selectedTokens,\n });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { tokens } = model;\n const { minTokens = 2, maxTokens, maxSelections } = config;\n const errors = {};\n const nbOfTokens = (tokens || []).length;\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n const nbOfSelections = (tokens || []).reduce((acc, token) => (token.correct ? acc + 1 : acc), 0);\n\n if (nbOfTokens < minTokens) {\n errors.tokensError = `There should be at least ${minTokens} tokens defined.`;\n } else if (nbOfTokens > maxTokens) {\n errors.tokensError = `No more than ${maxTokens} tokens should be defined.`;\n }\n\n if (nbOfSelections < 1) {\n errors.selectionsError = 'There should be at least 1 token selected.';\n } else if (nbOfSelections > maxSelections) {\n errors.selectionsError = `No more than ${maxSelections} tokens should be selected.`;\n }\n\n return errors;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,MAAMK,GAAG,GAAG,IAAAC,cAAK,EAAC,qCAAqC,CAAC;AAExD,MAAMC,WAAW,GAAGA,CAACC,MAAM,GAAG,CAAC,CAAC,EAAEC,MAAM,GAAG,CAAC,CAAC,KAC1CD,MAAM,EAAEE,KAAK,KAAKD,MAAM,EAAEC,KAAK,IAAIF,MAAM,EAAEG,GAAG,KAAKF,MAAM,EAAEE,GAAG;AAC/D;AACCH,MAAM,EAAEE,KAAK,KAAKD,MAAM,EAAEG,QAAQ,IAAIJ,MAAM,EAAEG,GAAG,KAAKF,MAAM,EAAEI,MAAO;AAExE,MAAMC,eAAe,GAAGA,CAACC,MAAM,GAAG,EAAE,EAAEC,cAAc,GAAG,EAAE,EAAEC,YAAY,GAAG,KAAK,KAC7E,CAACF,MAAM,IAAI,EAAE,EAAEG,GAAG,CAAEC,KAAK,IAAK;EAC5B,MAAMC,SAAS,GAAG,CAAC,CAACD,KAAK,CAACE,OAAO;EACjC;EACA,MAAMC,SAAS,GAAGF,SAAS,IAAI,CAAC,CAACJ,cAAc,IAAI,EAAE,EAAEO,IAAI,CAAEC,aAAa,IAAKjB,WAA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AEA,IAAIM,cAAc,GAAG,CAAC,EAAE;IACtBL,MAAM,CAACS,eAAe,GAAG,4CAA4C;EACvE,CAAC,MAAM,IAAIJ,cAAc,GAAGzB,aAAa,EAAE;IACzCoB,MAAM,CAACS,eAAe,GAAG,gBAAgB7B,aAAa,6BAA6B;EACrF;EAEA,OAAOoB,MAAM;AACf,CAAC;AAAChE,OAAA,CAAA4D,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/select-text-controller",
3
3
  "private": true,
4
- "version": "8.1.0-next.0",
4
+ "version": "8.1.1-next.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/controller-utils": "1.1.1-next.1",
10
- "@pie-lib/feedback": "1.1.1-next.1",
9
+ "@pie-lib/controller-utils": "1.2.0-next.3",
10
+ "@pie-lib/feedback": "1.2.0-next.3",
11
11
  "debug": "^4.1.1",
12
12
  "lodash-es": "^4.17.23"
13
13
  },
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "12.1.0-next.0",
7
+ "version": "12.1.1-next.1",
8
8
  "description": "",
9
9
  "dependencies": {
10
10
  "@emotion/react": "^11.14.0",
@@ -12,17 +12,17 @@
12
12
  "@mui/icons-material": "^7.3.4",
13
13
  "@mui/material": "^7.3.4",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/correct-answer-toggle": "3.1.1-next.1",
16
- "@pie-lib/math-rendering": "4.1.1-next.1",
17
- "@pie-lib/render-ui": "5.1.1-next.1",
18
- "@pie-lib/text-select": "2.1.1-next.1",
15
+ "@pie-lib/correct-answer-toggle": "3.2.0-next.4",
16
+ "@pie-lib/math-rendering": "4.2.0-next.3",
17
+ "@pie-lib/render-ui": "5.2.0-next.4",
18
+ "@pie-lib/text-select": "2.2.0-next.4",
19
19
  "prop-types": "^15.8.1",
20
20
  "react": "18.3.1",
21
21
  "react-dom": "18.3.1"
22
22
  },
23
23
  "author": "",
24
24
  "license": "ISC",
25
- "gitHead": "38eb4b4700ca4eaad440566dfc50623ff8876a92",
25
+ "gitHead": "9cc4a1cd183a260a03c7d817e0085517112a1a56",
26
26
  "scripts": {
27
27
  "postpublish": "../../scripts/postpublish"
28
28
  },