issue-pane 2.4.10 → 2.4.11-b4735355

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/newTracker.js CHANGED
@@ -3,6 +3,7 @@ import { store } from 'solid-logic'
3
3
 
4
4
  const $rdf = UI.rdf
5
5
  const ns = UI.ns
6
+ const kb = store
6
7
  const updater = store.updater
7
8
 
8
9
  /* Button for making a whole new tracker
@@ -20,13 +21,25 @@ export function newTrackerButton (thisTracker, context) {
20
21
  ws,
21
22
  base
22
23
  ) {
24
+ function morph (x) {
25
+ // Move any URIs in this space into that space
26
+ if (x.elements !== undefined) return x.elements.map(morph) // Morph within lists
27
+ if (x.uri === undefined) return x
28
+ let u = x.uri
29
+ if (u === stateStore.uri) return newStore // special case
30
+ if (u.slice(0, oldBase.length) === oldBase) {
31
+ u = base + u.slice(oldBase.length)
32
+ }
33
+ return kb.sym(u)
34
+ }
35
+
23
36
  const appPathSegment = 'issuetracker.w3.org' // how to allocate this string and connect to
24
37
  // console.log("Ready to make new instance at "+ws)
25
38
  const sp = UI.ns.space
26
- const store = context.session.store
39
+ const kb = context.session.store
27
40
 
28
41
  if (!base) {
29
- base = store.any(ws, sp('uriPrefix')).value
42
+ base = kb.any(ws, sp('uriPrefix')).value
30
43
  if (base.slice(-1) !== '/') {
31
44
  $rdf.log.error(
32
45
  appPathSegment + ': No / at end of uriPrefix ' + base
@@ -39,29 +52,17 @@ export function newTrackerButton (thisTracker, context) {
39
52
  }
40
53
  }
41
54
 
42
- const stateStore = store.any(thisTracker, ns.wf('stateStore'))
43
- const newStore = store.sym(base + 'store.ttl')
55
+ const stateStore = kb.any(thisTracker, ns.wf('stateStore'))
56
+ const newStore = kb.sym(base + 'store.ttl')
44
57
 
45
58
  const here = thisTracker.doc()
46
59
 
47
60
  const oldBase = here.uri.slice(0, here.uri.lastIndexOf('/') + 1)
48
61
 
49
- const morph = function (x) {
50
- // Move any URIs in this space into that space
51
- if (x.elements !== undefined) return x.elements.map(morph) // Morph within lists
52
- if (x.uri === undefined) return x
53
- let u = x.uri
54
- if (u === stateStore.uri) return newStore // special case
55
- if (u.slice(0, oldBase.length) === oldBase) {
56
- u = base + u.slice(oldBase.length)
57
- $rdf.log.debug(' Map ' + x.uri + ' to ' + u)
58
- }
59
- return store.sym(u)
60
- }
61
62
  const there = morph(here)
62
63
  const newTracker = morph(thisTracker)
63
64
 
64
- const myConfig = store.statementsMatching(
65
+ const myConfig = kb.statementsMatching(
65
66
  undefined,
66
67
  undefined,
67
68
  undefined,
@@ -69,7 +70,7 @@ export function newTrackerButton (thisTracker, context) {
69
70
  )
70
71
  for (let i = 0; i < myConfig.length; i++) {
71
72
  const st = myConfig[i]
72
- store.add(
73
+ kb.add(
73
74
  morph(st.subject),
74
75
  morph(st.predicate),
75
76
  morph(st.object),
@@ -79,15 +80,15 @@ export function newTrackerButton (thisTracker, context) {
79
80
 
80
81
  // Keep a paper trail @@ Revisit when we have non-public ones @@ Privacy
81
82
  //
82
- store.add(newTracker, UI.ns.space('inspiration'), thisTracker, stateStore)
83
+ kb.add(newTracker, UI.ns.space('inspiration'), thisTracker, stateStore)
83
84
 
84
- store.add(newTracker, UI.ns.space('inspiration'), thisTracker, there)
85
+ kb.add(newTracker, UI.ns.space('inspiration'), thisTracker, there)
85
86
 
86
87
  // $rdf.log.debug("\n Ready to put " + kb.statementsMatching(undefined, undefined, undefined, there)); //@@
87
88
 
88
89
  updater.put(
89
90
  there,
90
- store.statementsMatching(undefined, undefined, undefined, there),
91
+ kb.statementsMatching(undefined, undefined, undefined, there),
91
92
  'text/turtle',
92
93
  function (uri2, ok, message) {
93
94
  if (ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "issue-pane",
3
- "version": "2.4.10",
3
+ "version": "2.4.11-b4735355",
4
4
  "description": "Solid-compatible Panes: issue editor",
5
5
  "main": "./issuePane.js",
6
6
  "scripts": {
@@ -8,8 +8,8 @@
8
8
  "lint": "eslint '*.js'",
9
9
  "lint-fix": "eslint '*.js' --fix",
10
10
  "test": "npm run lint",
11
- "prepublishOnly": "npm test",
12
- "postpublish": "git push origin main --follow-tags"
11
+ "ignore:prepublishOnly": "npm test",
12
+ "ignore:postpublish": "git push origin main --follow-tags"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -34,16 +34,16 @@
34
34
  },
35
35
  "homepage": "https://github.com/solid/issue-pane",
36
36
  "dependencies": {
37
- "pane-registry": "^2.4.7",
38
- "rdflib": "^2.2.17",
39
- "solid-logic": "^1.3.14",
40
- "solid-ui": "^2.4.19"
37
+ "pane-registry": "^2.4.9",
38
+ "rdflib": "^2.2.19",
39
+ "solid-logic": "^1.3.16",
40
+ "solid-ui": "^2.4.20"
41
41
  },
42
42
  "devDependencies": {
43
- "eslint": "^7.32.0",
43
+ "eslint": "^8.12.0",
44
+ "eslint-plugin-import": "^2.25.4",
44
45
  "husky": "^7.0.4",
45
- "lint-staged": "^11.2.6",
46
- "standard": "^16.0.4"
46
+ "lint-staged": "^12.3.7"
47
47
  },
48
48
  "husky": {
49
49
  "hooks": {
package/tbl-bug-22.png CHANGED
File without changes
File without changes
File without changes
package/ui.js CHANGED
File without changes
package/ui.ttl CHANGED
File without changes
package/wf.js CHANGED
File without changes
package/wf.ttl CHANGED
File without changes