proskomma-core 0.10.1 → 0.10.2

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/dist/index.js CHANGED
@@ -15986,7 +15986,7 @@ var bitset = {
15986
15986
  })(bitset, bitsetExports);
15987
15987
  const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
15988
15988
  const name = "proskomma-core";
15989
- const version = "0.10.1";
15989
+ const version = "0.10.2";
15990
15990
  const description$b = "A Scripture Runtime Engine";
15991
15991
  const files = [
15992
15992
  "dist"
@@ -18613,12 +18613,21 @@ const unsuccinctifyItems = (docSet, succinct2, options2, nextToken, openScopes)
18613
18613
  } else if (item[0] === "scope" && item[1] === "start") {
18614
18614
  scopes.add(item[2]);
18615
18615
  if (Object.keys(options2).length === 0 || options2.scopes) {
18616
- ret.push(item);
18616
+ if (Object.keys(options2).length === 0 || !options2.excludeScopeTypes || options2.excludeScopeTypes.length === 0) {
18617
+ ret.push(item);
18618
+ } else if (!options2.excludeScopeTypes.includes(item[2].split("/")[0])) {
18619
+ ret.push(item);
18620
+ }
18617
18621
  }
18618
18622
  } else if (item[0] === "scope" && item[1] === "end") {
18619
18623
  scopes.delete(item[2]);
18620
18624
  if (Object.keys(options2).length === 0 || options2.scopes) {
18621
- ret.push(item);
18625
+ if (Object.keys(options2).length === 0 || !options2.excludeScopeTypes || options2.excludeScopeTypes.length === 0) {
18626
+ ret.push(item);
18627
+ } else if (!options2.excludeScopeTypes.includes(item[2].split("/")[0])) {
18628
+ ret.push(item);
18629
+ } else
18630
+ ;
18622
18631
  }
18623
18632
  } else if (item[0] === "graft") {
18624
18633
  if (Object.keys(options2).length === 0 || options2.grafts) {
@@ -44135,6 +44144,8 @@ type Block {
44135
44144
  withScriptureCV: String
44136
44145
  """If true, adds scope and nextToken information to each token"""
44137
44146
  includeContext: Boolean
44147
+ """Do not return scopes types in list (eg milestone)"""
44148
+ excludeScopeTypes: [String!]
44138
44149
  ) : [Item!]!
44139
44150
  """A list of tokens from the c (content) field of the block"""
44140
44151
  tokens(
@@ -44213,6 +44224,7 @@ const blockResolvers = {
44213
44224
  tokens: true,
44214
44225
  scopes: true,
44215
44226
  grafts: true,
44227
+ excludeScopeTypes: args.excludeScopeTypes || [],
44216
44228
  requiredScopes: args.withScopes || [],
44217
44229
  anyScope: args.anyScope || false
44218
44230
  });
package/dist/index.mjs CHANGED
@@ -15984,7 +15984,7 @@ var bitset = {
15984
15984
  })(bitset, bitsetExports);
15985
15985
  const BitSet = /* @__PURE__ */ getDefaultExportFromCjs(bitsetExports);
15986
15986
  const name = "proskomma-core";
15987
- const version = "0.10.1";
15987
+ const version = "0.10.2";
15988
15988
  const description$b = "A Scripture Runtime Engine";
15989
15989
  const files = [
15990
15990
  "dist"
@@ -18611,12 +18611,21 @@ const unsuccinctifyItems = (docSet, succinct2, options2, nextToken, openScopes)
18611
18611
  } else if (item[0] === "scope" && item[1] === "start") {
18612
18612
  scopes.add(item[2]);
18613
18613
  if (Object.keys(options2).length === 0 || options2.scopes) {
18614
- ret.push(item);
18614
+ if (Object.keys(options2).length === 0 || !options2.excludeScopeTypes || options2.excludeScopeTypes.length === 0) {
18615
+ ret.push(item);
18616
+ } else if (!options2.excludeScopeTypes.includes(item[2].split("/")[0])) {
18617
+ ret.push(item);
18618
+ }
18615
18619
  }
18616
18620
  } else if (item[0] === "scope" && item[1] === "end") {
18617
18621
  scopes.delete(item[2]);
18618
18622
  if (Object.keys(options2).length === 0 || options2.scopes) {
18619
- ret.push(item);
18623
+ if (Object.keys(options2).length === 0 || !options2.excludeScopeTypes || options2.excludeScopeTypes.length === 0) {
18624
+ ret.push(item);
18625
+ } else if (!options2.excludeScopeTypes.includes(item[2].split("/")[0])) {
18626
+ ret.push(item);
18627
+ } else
18628
+ ;
18620
18629
  }
18621
18630
  } else if (item[0] === "graft") {
18622
18631
  if (Object.keys(options2).length === 0 || options2.grafts) {
@@ -44133,6 +44142,8 @@ type Block {
44133
44142
  withScriptureCV: String
44134
44143
  """If true, adds scope and nextToken information to each token"""
44135
44144
  includeContext: Boolean
44145
+ """Do not return scopes types in list (eg milestone)"""
44146
+ excludeScopeTypes: [String!]
44136
44147
  ) : [Item!]!
44137
44148
  """A list of tokens from the c (content) field of the block"""
44138
44149
  tokens(
@@ -44211,6 +44222,7 @@ const blockResolvers = {
44211
44222
  tokens: true,
44212
44223
  scopes: true,
44213
44224
  grafts: true,
44225
+ excludeScopeTypes: args.excludeScopeTypes || [],
44214
44226
  requiredScopes: args.withScopes || [],
44215
44227
  anyScope: args.anyScope || false
44216
44228
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proskomma-core",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "A Scripture Runtime Engine",
5
5
  "files": [
6
6
  "dist"