@pie-element/image-cloze-association 5.8.0 → 5.8.1-next.48

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.
@@ -112,8 +112,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
112
112
  language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options)
113
113
  };
114
114
 
115
- var getPluginProps = function getPluginProps(props) {
116
- return Object.assign(_objectSpread({}, baseInputConfiguration), props || {});
115
+ var getPluginProps = function getPluginProps() {
116
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
117
+ return _objectSpread(_objectSpread({}, baseInputConfiguration), props);
117
118
  };
118
119
 
119
120
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","dropdown","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","baseInputConfiguration","contentDimensions","maxImageWidth","maxImageHeight","settingsPanelDisabled","spellCheck","withRubric","mathMlOptions","language","languageChoices","spellCheckEnabled","panelProperties","teacherInstructionsEnabled","label","rubricEnabled","enabled","options","getPluginProps","Object","assign","config","Properties","promptHolder","prompt","onTeacherInstructionsChanged","inputConfiguration","React","Component","styles","theme","width","paddingTop","spacing","unit","marginBottom","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAAeC,MAAf;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;IAEaC,I;;;;;;;;;;;;;;;qHACoB,UAACC,mBAAD,EAAyB;AACtD,YAAKC,KAAL,CAAWC,cAAX,iCAA+B,MAAKD,KAAL,CAAWE,K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AAA,KAAK,EAAE0C,sBAAUC,MAAV,CAAiBC,UAJT;AAKf1C,EAAAA,aAAa,EAAEwC,sBAAUC,MAAV,CAAiBC,UALjB;AAMfxC,EAAAA,YAAY,EAAEsC,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB,CANC;AAUfvC,EAAAA,kBAAkB,EAAEqC,sBAAUI,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADc;AAElC,cAAQF,sBAAUG,IAAV,CAAeD;AAFW,GAAhB;AAVL,CAAjB;;eAgBe,wBAAWV,MAAX,EAAmBtC,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { settings, layout, InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst { Panel, toggle, dropdown } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n };\n\n render() {\n const { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport, uploadSoundSupport } =\n this.props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n } = configuration || {};\n const { spellCheckEnabled } = model || {};\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n {model && model.teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n <div>Image cloze association</div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
1
+ {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","dropdown","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","baseInputConfiguration","contentDimensions","maxImageWidth","maxImageHeight","settingsPanelDisabled","spellCheck","withRubric","mathMlOptions","language","languageChoices","spellCheckEnabled","panelProperties","teacherInstructionsEnabled","label","rubricEnabled","enabled","options","getPluginProps","config","Properties","promptHolder","prompt","onTeacherInstructionsChanged","inputConfiguration","React","Component","styles","theme","width","paddingTop","spacing","unit","marginBottom","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAAoCC,kBAApC,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAAoCD,kBAApC,CAAeC,MAAf;AAAA,IAAuBC,QAAvB,GAAoCF,kBAApC,CAAuBE,QAAvB;;IAEaC,I;;;;;;;;;;;;;;;qHACoB,UAACC,mBAAD,EAAyB;AACtD,YAAKC,KAAL,CAAWC,cAAX,iCAA+B,MAAKD,KAAL,CAAWE,KAA1C;AAAiDH,QAAAA,mBAAmB,EAAnBA;AAAjD;AACD,K;;;;;;WAED,kBAAS;AACP,wBACE,KAAKC,KADP;AAAA,UAAQG,OAAR,eAAQA,OAAR;AAAA,UAAiBD,KAAjB,eAAiBA,KAAjB;AAAA,UAAwBE,aAAxB,eAAwBA,aAAxB;AAAA,UAAuCH,cAAvC,eAAuCA,cAAvC;AAAA,UAAuDI,sBAAvD,eAAuDA,sBAAvD;AAAA,UAA+EC,YAA/E,eAA+EA,YAA/E;AAAA,UAA6FC,kBAA7F,eAA6FA,kBAA7F;;AAEA,iBAYIH,aAAa,IAAI,EAZrB;AAAA,uCACEI,sBADF;AAAA,UACEA,sBADF,sCAC2B,EAD3B;AAAA,uCAEEC,iBAFF;AAAA,UAEEA,iBAFF,sCAEsB,EAFtB;AAAA,oCAGEC,aAHF;AAAA,UAGEA,aAHF,mCAGkB,EAHlB;AAAA,qCAIEC,cAJF;AAAA,UAIEA,cAJF,oCAImB,EA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3B;AAYE,QAAA,aAAa,EAAED;AAZjB,QADF,CAhBJ,eAkCE,uEAlCF,CADF;AAsCD;;;EA1EuBiB,kBAAMC,S;;;;AA6EhC,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBP,IAAAA,YAAY,EAAE;AACZQ,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGZC,MAAAA,YAAY,EAAEL,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAHvB;AADW,GAAZ;AAAA,CAAf;;AAQAzC,IAAI,CAAC2C,SAAL,GAAiB;AACftC,EAAAA,OAAO,EAAEuC,sBAAUC,MAAV,CAAiBC,UADX;AAEf3C,EAAAA,cAAc,EAAEyC,sBAAUG,IAFX;AAGfxC,EAAAA,sBAAsB,EAAEqC,sBAAUG,IAHnB;AAIf3C,EAAAA,KAAK,EAAEwC,sBAAUC,MAAV,CAAiBC,UAJT;AAKfxC,EAAAA,aAAa,EAAEsC,sBAAUC,MAAV,CAAiBC,UALjB;AAMftC,EAAAA,YAAY,EAAEoC,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB,CANC;AAUfrC,EAAAA,kBAAkB,EAAEmC,sBAAUI,KAAV,CAAgB;AAClCC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADc;AAElC,cAAQF,sBAAUG,IAAV,CAAeD;AAFW,GAAhB;AAVL,CAAjB;;eAgBe,wBAAWV,MAAX,EAAmBpC,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { settings, layout, InputContainer } from '@pie-lib/pie-toolbox/config-ui';\nimport { EditableHtml } from '@pie-lib/pie-toolbox/editable-html';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst { Panel, toggle, dropdown } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({ ...this.props.model, teacherInstructions });\n };\n\n render() {\n const { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport, uploadSoundSupport } =\n this.props;\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n maxImageWidth = {},\n maxImageHeight = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n } = configuration || {};\n const { spellCheckEnabled } = model || {};\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Properties: panelProperties,\n }}\n />\n }\n >\n {model && model.teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </InputContainer>\n )}\n\n <div>Image cloze association</div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-configure-events": "^1.3.0",
12
- "@pie-lib/pie-toolbox": "1.9.0",
12
+ "@pie-lib/pie-toolbox": "1.11.1",
13
13
  "debug": "^3.1.0",
14
14
  "prop-types": "^15.7.2",
15
15
  "react": "^16.8.6",
@@ -37,14 +37,10 @@ export class Root extends React.Component {
37
37
  language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),
38
38
  };
39
39
 
40
- const getPluginProps = (props) => {
41
- return Object.assign(
42
- {
43
- ...baseInputConfiguration,
44
- },
45
- props || {},
46
- );
47
- };
40
+ const getPluginProps = (props = {}) => ({
41
+ ...baseInputConfiguration,
42
+ ...props,
43
+ });
48
44
 
49
45
  return (
50
46
  <layout.ConfigLayout
@@ -11,7 +11,7 @@
11
11
  "main": "lib/index.js",
12
12
  "module": "src/index.js",
13
13
  "dependencies": {
14
- "@pie-lib/pie-toolbox": "1.9.0",
14
+ "@pie-lib/pie-toolbox": "1.11.1",
15
15
  "debug": "^4.1.1",
16
16
  "humps": "^2.0.1",
17
17
  "lodash": "^4.17.15"
@@ -7,6 +7,17 @@
7
7
  "title": "EditableHtmlConfigureProp",
8
8
  "type": "object",
9
9
  "properties": {
10
+ "math": {
11
+ "title": "EditableHtmlButtonConfigure",
12
+ "type": "object",
13
+ "properties": {
14
+ "disabled": {
15
+ "description": "Indicates if the plugin is disabled or not",
16
+ "type": "boolean",
17
+ "title": "disabled"
18
+ }
19
+ }
20
+ },
10
21
  "audio": {
11
22
  "title": "EditableHtmlButtonConfigure",
12
23
  "type": "object",
@@ -113,6 +124,17 @@
113
124
  "title": "EditableHtmlConfigureProp",
114
125
  "type": "object",
115
126
  "properties": {
127
+ "math": {
128
+ "title": "EditableHtmlButtonConfigure",
129
+ "type": "object",
130
+ "properties": {
131
+ "disabled": {
132
+ "description": "Indicates if the plugin is disabled or not",
133
+ "type": "boolean",
134
+ "title": "disabled"
135
+ }
136
+ }
137
+ },
116
138
  "audio": {
117
139
  "title": "EditableHtmlButtonConfigure",
118
140
  "type": "object",
@@ -304,6 +326,17 @@
304
326
  "title": "EditableHtmlConfigureProp",
305
327
  "type": "object",
306
328
  "properties": {
329
+ "math": {
330
+ "title": "EditableHtmlButtonConfigure",
331
+ "type": "object",
332
+ "properties": {
333
+ "disabled": {
334
+ "description": "Indicates if the plugin is disabled or not",
335
+ "type": "boolean",
336
+ "title": "disabled"
337
+ }
338
+ }
339
+ },
307
340
  "audio": {
308
341
  "title": "EditableHtmlButtonConfigure",
309
342
  "type": "object",
@@ -395,6 +428,17 @@
395
428
  "title": "EditableHtmlConfigureProp",
396
429
  "type": "object",
397
430
  "properties": {
431
+ "math": {
432
+ "title": "EditableHtmlButtonConfigure",
433
+ "type": "object",
434
+ "properties": {
435
+ "disabled": {
436
+ "description": "Indicates if the plugin is disabled or not",
437
+ "type": "boolean",
438
+ "title": "disabled"
439
+ }
440
+ }
441
+ },
398
442
  "audio": {
399
443
  "title": "EditableHtmlButtonConfigure",
400
444
  "type": "object",
@@ -6,6 +6,14 @@ The schema defines the following properties:
6
6
 
7
7
  Properties of the `baseInputConfiguration` object:
8
8
 
9
+ ## `math` (object)
10
+
11
+ Properties of the `math` object:
12
+
13
+ ### `disabled` (boolean)
14
+
15
+ Indicates if the plugin is disabled or not
16
+
9
17
  ## `audio` (object)
10
18
 
11
19
  Properties of the `audio` object:
@@ -86,6 +94,14 @@ Properties of the `teacherInstructions` object:
86
94
 
87
95
  Properties of the `inputConfiguration` object:
88
96
 
97
+ ### `math` (object)
98
+
99
+ Properties of the `math` object:
100
+
101
+ #### `disabled` (boolean)
102
+
103
+ Indicates if the plugin is disabled or not
104
+
89
105
  ### `audio` (object)
90
106
 
91
107
  Properties of the `audio` object:
@@ -232,6 +248,14 @@ The schema defines the following additional types:
232
248
 
233
249
  Properties of the `EditableHtmlConfigureProp` object:
234
250
 
251
+ ### `math` (object)
252
+
253
+ Properties of the `math` object:
254
+
255
+ #### `disabled` (boolean)
256
+
257
+ Indicates if the plugin is disabled or not
258
+
235
259
  ### `audio` (object)
236
260
 
237
261
  Properties of the `audio` object:
@@ -300,6 +324,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
300
324
 
301
325
  Properties of the `inputConfiguration` object:
302
326
 
327
+ #### `math` (object)
328
+
329
+ Properties of the `math` object:
330
+
331
+ ##### `disabled` (boolean)
332
+
333
+ Indicates if the plugin is disabled or not
334
+
303
335
  #### `audio` (object)
304
336
 
305
337
  Properties of the `audio` object:
@@ -238,6 +238,17 @@
238
238
  "title": "EditableHtmlConfigureProp",
239
239
  "type": "object",
240
240
  "properties": {
241
+ "math": {
242
+ "title": "EditableHtmlButtonConfigure",
243
+ "type": "object",
244
+ "properties": {
245
+ "disabled": {
246
+ "description": "Indicates if the plugin is disabled or not",
247
+ "type": "boolean",
248
+ "title": "disabled"
249
+ }
250
+ }
251
+ },
241
252
  "audio": {
242
253
  "title": "EditableHtmlButtonConfigure",
243
254
  "type": "object",
@@ -329,6 +340,17 @@
329
340
  "title": "EditableHtmlConfigureProp",
330
341
  "type": "object",
331
342
  "properties": {
343
+ "math": {
344
+ "title": "EditableHtmlButtonConfigure",
345
+ "type": "object",
346
+ "properties": {
347
+ "disabled": {
348
+ "description": "Indicates if the plugin is disabled or not",
349
+ "type": "boolean",
350
+ "title": "disabled"
351
+ }
352
+ }
353
+ },
332
354
  "audio": {
333
355
  "title": "EditableHtmlButtonConfigure",
334
356
  "type": "object",
@@ -190,6 +190,14 @@ The schema defines the following additional types:
190
190
 
191
191
  Properties of the `EditableHtmlConfigureProp` object:
192
192
 
193
+ ### `math` (object)
194
+
195
+ Properties of the `math` object:
196
+
197
+ #### `disabled` (boolean)
198
+
199
+ Indicates if the plugin is disabled or not
200
+
193
201
  ### `audio` (object)
194
202
 
195
203
  Properties of the `audio` object:
@@ -258,6 +266,14 @@ Properties of the `EditableHtmlPluginConfigure` object:
258
266
 
259
267
  Properties of the `inputConfiguration` object:
260
268
 
269
+ #### `math` (object)
270
+
271
+ Properties of the `math` object:
272
+
273
+ ##### `disabled` (boolean)
274
+
275
+ Indicates if the plugin is disabled or not
276
+
261
277
  #### `audio` (object)
262
278
 
263
279
  Properties of the `audio` object:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association",
3
- "version": "5.8.0",
3
+ "version": "5.8.1-next.48+a8e4e6ab2",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -10,7 +10,7 @@
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@material-ui/icons": "^3.0.1",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
- "@pie-lib/pie-toolbox": "1.9.0",
13
+ "@pie-lib/pie-toolbox": "1.11.1",
14
14
  "classnames": "^2.2.6",
15
15
  "prop-types": "^15.6.1",
16
16
  "react": "^16.8.1",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "author": "pie framework developers",
20
20
  "license": "ISC",
21
- "gitHead": "3aaaa00aa149439eb0cb72d04d6ff3eecf0ee4b5",
21
+ "gitHead": "a8e4e6ab27584435ce7ac3e964ccac2747402777",
22
22
  "scripts": {
23
23
  "postpublish": "../../scripts/postpublish"
24
24
  },