forked from SolidOS/mashlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
65 lines (45 loc) · 1.29 KB
/
index.js
File metadata and controls
65 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
*
* Data Mashup library
*
*/
// var dump, tabulator, UI, $rdf
dump = function(msg) {
console.log(msg.slice(0,-1))
}
// Vestigial things still in old tabulator entry point
if (typeof tabulator === 'undefined'){
tabulator = { isExtension: false} // a kludge until tabulator completely removed
tabulator.mode = 'webapp'
tabulator.preferences = { // non-persistent stand-in just for 'me' value 2016
value: [],
get: function(k){
return this.value[k]
},
set: function(k,v){
if (typeof v !== 'string'){
console.log("Non-string value of preference " + k + ": " + v)
throw "Non-string value of preference " + k + ": " + v
}
this.value[k] = v
}
}
}
var events = require('events') // load in the order which they are npm installed
var http = require('http-browserify')
// Solid-compatible UI module
// try global
UI = require('solid-ui')
$rdf = UI.rdf
if (typeof window !== 'undefined'){
window.UI = UI
}
$rdf.log = UI.log
UI.OutlineObject = require('solid-app-set/outline/manager.js')
// later in the context of a window and a document:
var dom = window.document
dom.outline = UI.outline = new UI.OutlineObject(dom)
UI.panes = require("solid-app-set")
module.exports = UI
// UI.color = require('jscolor/jscolor.js')
// ENDS