solid-ui 2.4.27-13192548 → 2.4.27-17005e61
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/README.md +5 -1
- package/dist/670.solid-ui.min.js +1 -0
- package/dist/805.solid-ui.min.js +3 -0
- package/dist/805.solid-ui.min.js.LICENSE.txt +58 -0
- package/dist/805.solid-ui.min.js.map +1 -0
- package/dist/_2b19.solid-ui.js +14 -0
- package/dist/_2b19.solid-ui.js.map +1 -0
- package/dist/solid-ui.js +8558 -21946
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.LICENSE.txt +4 -67
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +12134 -0
- package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -0
- package/lib/acl/access-controller.d.ts +2 -3
- package/lib/acl/access-controller.d.ts.map +1 -1
- package/lib/acl/access-controller.js +17 -15
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.d.ts.map +1 -1
- package/lib/acl/access-groups.js +78 -8
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts.map +1 -1
- package/lib/acl/acl-control.js +10 -11
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +1 -1
- package/lib/acl/acl.js +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts.map +1 -1
- package/lib/acl/add-agent-buttons.js +4 -3
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/chat/bookmarks.js +7 -6
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +104 -248
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/infinite.js +426 -604
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/keys.d.ts +6 -0
- package/lib/chat/keys.d.ts.map +1 -0
- package/lib/chat/keys.js +298 -0
- package/lib/chat/keys.js.map +1 -0
- package/lib/chat/message.js +191 -285
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +276 -464
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/signature.d.ts +27 -0
- package/lib/chat/signature.d.ts.map +1 -0
- package/lib/chat/signature.js +110 -0
- package/lib/chat/signature.js.map +1 -0
- package/lib/chat/thread.js +144 -166
- package/lib/chat/thread.js.map +1 -1
- package/lib/footer/index.d.ts.map +1 -1
- package/lib/footer/index.js +5 -1
- package/lib/footer/index.js.map +1 -1
- package/lib/header/index.d.ts.map +1 -1
- package/lib/header/index.js +41 -20
- package/lib/header/index.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +13 -15
- package/lib/login/login.js.map +1 -1
- package/lib/preferences.js +0 -4
- package/lib/preferences.js.map +1 -1
- package/lib/style.js +60 -2
- package/lib/style.js.map +1 -1
- package/lib/utils/cryptoKeyHelpers.d.ts +6 -0
- package/lib/utils/cryptoKeyHelpers.d.ts.map +1 -0
- package/lib/utils/cryptoKeyHelpers.js +235 -0
- package/lib/utils/cryptoKeyHelpers.js.map +1 -0
- package/lib/utils/headerFooterHelpers.d.ts +0 -4
- package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
- package/lib/utils/headerFooterHelpers.js +0 -27
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons.d.ts.map +1 -1
- package/lib/widgets/buttons.js +43 -49
- package/lib/widgets/buttons.js.map +1 -1
- package/package.json +9 -8
- package/lib/acl/styles.d.ts +0 -90
- package/lib/acl/styles.d.ts.map +0 -1
- package/lib/acl/styles.js +0 -98
- package/lib/acl/styles.js.map +0 -1
- package/lib/footer/styleMap.d.ts +0 -8
- package/lib/footer/styleMap.d.ts.map +0 -1
- package/lib/footer/styleMap.js +0 -15
- package/lib/footer/styleMap.js.map +0 -1
- package/lib/header/styleMap.d.ts +0 -117
- package/lib/header/styleMap.d.ts.map +0 -1
- package/lib/header/styleMap.js +0 -139
- package/lib/header/styleMap.js.map +0 -1
- package/lib/jss/index.d.ts +0 -20
- package/lib/jss/index.d.ts.map +0 -1
- package/lib/jss/index.js +0 -47
- package/lib/jss/index.js.map +0 -1
package/lib/style.js
CHANGED
|
@@ -19,7 +19,7 @@ var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to lin
|
|
|
19
19
|
var style = {
|
|
20
20
|
// styleModule
|
|
21
21
|
|
|
22
|
-
checkboxStyle: '
|
|
22
|
+
checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
|
|
23
23
|
checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
|
|
24
24
|
fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
|
|
25
25
|
formSelectSTyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
|
|
@@ -83,7 +83,65 @@ var style = {
|
|
|
83
83
|
// Buttons
|
|
84
84
|
renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',
|
|
85
85
|
imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
|
|
86
|
-
linkDivStyle: 'width:2em; padding:0.5em; height: 4em;'
|
|
86
|
+
linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
|
|
87
|
+
// ACL
|
|
88
|
+
aclControlBoxContainer: 'margin: 1em',
|
|
89
|
+
aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
|
|
90
|
+
aclControlBoxStatus: 'display: none; margin: 1rem 0',
|
|
91
|
+
aclControlBoxStatusRevealed: 'display: block',
|
|
92
|
+
aclGroupContent: 'maxWidth: 650',
|
|
93
|
+
accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',
|
|
94
|
+
accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',
|
|
95
|
+
defaultsController: 'display: flex',
|
|
96
|
+
defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',
|
|
97
|
+
bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
|
|
98
|
+
group: 'color: #888',
|
|
99
|
+
group1: 'color: green',
|
|
100
|
+
group2: 'color: #cc0',
|
|
101
|
+
group3: 'color: orange',
|
|
102
|
+
group5: 'color: red',
|
|
103
|
+
group9: 'color: blue',
|
|
104
|
+
group13: 'color: purple',
|
|
105
|
+
trustedAppAddApplicationsTable: 'background-color: #eee',
|
|
106
|
+
trustedAppCancelButton: 'float: right',
|
|
107
|
+
trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',
|
|
108
|
+
temporaryStatusInit: 'background: green',
|
|
109
|
+
temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
|
|
110
|
+
// header
|
|
111
|
+
headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',
|
|
112
|
+
headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
|
|
113
|
+
headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
|
|
114
|
+
headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
|
|
115
|
+
headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',
|
|
116
|
+
headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
|
|
117
|
+
headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
|
|
118
|
+
headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
|
|
119
|
+
headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
|
|
120
|
+
headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
|
|
121
|
+
headerUserMenuListItem: 'border-bottom: solid 1px #000000',
|
|
122
|
+
headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
|
|
123
|
+
headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
|
|
124
|
+
headerBannerLink: 'display: block',
|
|
125
|
+
headerBannerRightMenu: 'display: flex',
|
|
126
|
+
headerBannerLogin: 'margin-left: auto',
|
|
127
|
+
allChildrenVisible: 'display:true',
|
|
128
|
+
headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
|
|
129
|
+
headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
|
|
130
|
+
headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
|
|
131
|
+
headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
|
|
132
|
+
// may just be 65px round($icon-size * 352 / 322);
|
|
133
|
+
|
|
134
|
+
// footer
|
|
135
|
+
footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
|
|
136
|
+
// buttons
|
|
137
|
+
primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
138
|
+
primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
139
|
+
primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
140
|
+
primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
141
|
+
secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
142
|
+
secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
143
|
+
secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
144
|
+
secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'
|
|
87
145
|
};
|
|
88
146
|
exports.style = style;
|
|
89
147
|
style.setStyle = function setStyle(ele, styleName) {
|
package/lib/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectSTyle","textInputStyle","textInputStyleUneditable","textInputSize","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","tabBorderRadius","messageBodyStyle","pendingeditModifier","highlightColor","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingColor","formHeadingStyle","formTextInput","formGroupStyle","concat","formFieldLabelStyle","formFieldNameBoxStyle","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n\n// These must all end with semicolon so they can be appended to.\n\nconst formBorderColor = '#888888' // Mid-grey\nconst lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology\nconst formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up\n// The latter we put in when switching awy from using tables. Getting allignment between\n// fields in different groups though is hard problem.\n\nexport const style = { // styleModule\n\n checkboxStyle: 'colour: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectSTyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputSize: 20, // Default text input size in characters roughly\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n tabBorderRadius: '0.2em',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formBorderColor, // originally was brown; now grey\n formHeadingColor: '#888888', // originally was brown; now grey\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxWidth,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;'\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,eAAe,GAAG,SAAS,EAAC;AAClC,IAAMC,mBAAmB,GAAG,SAAS,EAAC;AACtC,IAAMC,qBAAqB,GAAG,KAAK,EAAC;AACpC;AACA;;AAEO,IAAMC,KAAK,GAAG;EAAE;;EAErBC,aAAa,EAAE,8EAA8E;EAC7FC,kBAAkB,EAAE,0GAA0G;EAE9HC,eAAe,EAAE,wCAAwC;EACzDC,eAAe,EACb,yHAAyH;EAC3HC,cAAc,EACZ,yHAAyH;EAC3HC,wBAAwB;EAAE;EACxB,2HAA2H;EAC7HC,aAAa,EAAE,EAAE;EAAE;EACnBC,WAAW,EACP,2HAA2H;EAAE;EACjIC,YAAY,EAAE,wEAAwE;EACtFC,SAAS,EAAE,6DAA6D;EACxEC,gBAAgB,EAAE,wCAAwC;EAC1DC,cAAc,EAAE,kIAAkI;EAAE;EACpJC,iBAAiB,EAAE,0HAA0H;EAC7IC,eAAe,EAAE,OAAO;EACxBC,gBAAgB,EACd,wIAAwI;EAC1IC,mBAAmB,EAAE,cAAc;EACnCC,cAAc,EAAE,SAAS;EAAE;;EAE3B;EACAC,eAAe,EAAE,2EAA2E;EAC5FC,gBAAgB,EAAE,mHAAmH;EACrIC,oBAAoB,EAAE,4BAA4B;EAElD;EACAC,iBAAiB,EAAE,qDAAqD;EAAE;;EAE1E;EACAC,aAAa,EAAE,yFAAyF;EAAE;EAC1GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;EAC3GC,aAAa,EAAE,0FAA0F;EAAE;;EAE3G5B,eAAe,EAAfA,eAAe;EAAE;EACjB6B,gBAAgB,EAAE,SAAS;EAAE;EAC7BC,gBAAgB,EAAE,2FAA2F;EAAE;EAC/GC,aAAa,EAAE,iDAAiD;EAAE;EAClEC,cAAc,EAAE,2CAAAC,MAAA,CAA2CjC,eAAe,8BAA2B;EAAA,2CAAAiC,MAAA,CACxDjC,eAAe,wEAAAiC,MAAA,CAChBjC,eAAe,wEAAAiC,MAAA,CACfjC,eAAe,6BAA0B;EAAA,CACpF;EAEDkC,mBAAmB,aAAAD,MAAA,CAAahC,mBAAmB,8BAA2B;EAC9EC,qBAAqB,EAArBA,qBAAqB;EACrBiC,qBAAqB,mDAAAF,MAAA,CAAmD/B,qBAAqB,MAAG;EAChGkC,wBAAwB,EAAE,MAAM;EAChCC,kCAAkC,EAAE,MAAM;EAC1CC,cAAc,EAAE,MAAM;EACtBC,qBAAqB,EAAE,MAAM;EAC7BC,uBAAuB,EAAE,gEAAgE,GACzF,kEAAkE;EAElE;EACAC,gBAAgB,EAAE,kGAAkG;EACpHC,aAAa,EAAE,4CAA4C;EAC3DC,YAAY,EAAE;AAChB,CAAC;AAAAC,OAAA,CAAAzC,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAAC0C,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAAC3C,KAAK,GAAGA,KAAK,CAAC4C,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAGzC,KAAK,EAAC"}
|
|
1
|
+
{"version":3,"file":"style.js","names":["formBorderColor","lowProfileLinkColor","formFieldNameBoxWidth","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectSTyle","textInputStyle","textInputStyleUneditable","textInputSize","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","tabBorderRadius","messageBodyStyle","pendingeditModifier","highlightColor","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingColor","formHeadingStyle","formTextInput","formGroupStyle","concat","formFieldLabelStyle","formFieldNameBoxStyle","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerLoginInput","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n\n// These must all end with semicolon so they can be appended to.\n\nconst formBorderColor = '#888888' // Mid-grey\nconst lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology\nconst formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up\n// The latter we put in when switching awy from using tables. Getting allignment between\n// fields in different groups though is hard problem.\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectSTyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputSize: 20, // Default text input size in characters roughly\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n tabBorderRadius: '0.2em',\n messageBodyStyle:\n 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',\n pendingeditModifier: 'color: #bbb;',\n highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formBorderColor, // originally was brown; now grey\n formHeadingColor: '#888888', // originally was brown; now grey\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxWidth,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',\n aclControlBoxStatus: 'display: none; margin: 1rem 0',\n aclControlBoxStatusRevealed: 'display: block',\n aclGroupContent: 'maxWidth: 650',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',\n defaultsController: 'display: flex',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',\n group: 'color: #888',\n group1: 'color: green',\n group2: 'color: #cc0',\n group3: 'color: orange',\n group5: 'color: red',\n group9: 'color: blue',\n group13: 'color: purple',\n\n trustedAppAddApplicationsTable: 'background-color: #eee',\n trustedAppCancelButton: 'float: right',\n trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',\n temporaryStatusInit: 'background: green',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear',\n\n // header\n headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',\n headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',\n headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',\n headerBannerLink: 'display: block',\n headerBannerRightMenu: 'display: flex',\n headerBannerLogin: 'margin-left: auto',\n allChildrenVisible: 'display:true',\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',\n\n // buttons\n primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',\n\n secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',\n\n secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,eAAe,GAAG,SAAS,EAAC;AAClC,IAAMC,mBAAmB,GAAG,SAAS,EAAC;AACtC,IAAMC,qBAAqB,GAAG,KAAK,EAAC;AACpC;AACA;;AAEO,IAAMC,KAAK,GAAG;E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kCAAkC;EAC1DC,mBAAmB,EAAE,kIAAkI;EACvJC,YAAY,EAAE,sHAAsH;EACpIC,gBAAgB,EAAE,gBAAgB;EAClCC,qBAAqB,EAAE,eAAe;EACtCC,iBAAiB,EAAE,mBAAmB;EACtCC,kBAAkB,EAAE,cAAc;EAClCC,sBAAsB,EAAE,qEAAqE;EAC7FC,oBAAoB,EAAE,mDAAmD;EACzEC,oBAAoB,EAAE,mDAAmD;EACzEC,gBAAgB,EAAE,wFAAwF;EAAE;;EAE5G;EACAC,MAAM,EAAE,8EAA8E;EAEtF;EACAC,aAAa,EAAE,oRAAoR;EAEnSC,kBAAkB,EAAE,sTAAsT;EAE1UC,qBAAqB,EAAE,mRAAmR;EAE1SC,0BAA0B,EAAE,wTAAwT;EAEpVC,eAAe,EAAE,mRAAmR;EAEpSC,oBAAoB,EAAE,sTAAsT;EAE5UC,uBAAuB,EAAE,qRAAqR;EAE9SC,4BAA4B,EAAE;AAEhC,CAAC;AAAAC,OAAA,CAAA7F,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAAC8F,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAAC/F,KAAK,GAAGA,KAAK,CAACgG,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAG7F,KAAK,EAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NamedNode } from 'rdflib';
|
|
2
|
+
export declare const pubKeyUrl: (webId: NamedNode) => Promise<string>;
|
|
3
|
+
export declare function publicKeyExists(webId: NamedNode): Promise<string | undefined>;
|
|
4
|
+
export declare const privKeyUrl: (webId: NamedNode) => Promise<string>;
|
|
5
|
+
export declare function privateKeyExists(webId: NamedNode): Promise<string | undefined>;
|
|
6
|
+
//# sourceMappingURL=cryptoKeyHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoKeyHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/cryptoKeyHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AA0BlC,eAAO,MAAM,SAAS,UAAiB,SAAS,oBAI/C,CAAA;AAED,wBAAsB,eAAe,CAAE,KAAK,EAAE,SAAS,+BAItD;AAED,eAAO,MAAM,UAAU,UAAiB,SAAS,oBAIhD,CAAA;AAED,wBAAsB,gBAAgB,CAAE,KAAK,EAAE,SAAS,+BAIvD"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.privKeyUrl = void 0;
|
|
9
|
+
exports.privateKeyExists = privateKeyExists;
|
|
10
|
+
exports.pubKeyUrl = void 0;
|
|
11
|
+
exports.publicKeyExists = publicKeyExists;
|
|
12
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
14
|
+
var debug = _interopRequireWildcard(require("../debug"));
|
|
15
|
+
var _signature = require("../chat/signature");
|
|
16
|
+
var _solidLogic = require("solid-logic");
|
|
17
|
+
var ns = _interopRequireWildcard(require("../ns"));
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
+
var getPodRoot = /*#__PURE__*/function () {
|
|
21
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(webId) {
|
|
22
|
+
var _podRoot;
|
|
23
|
+
var webIdURL, storages, podRoot, path, _res$headers$get, res;
|
|
24
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
25
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
webIdURL = new URL(webId.uri); // find storages in webId document
|
|
28
|
+
_context.next = 3;
|
|
29
|
+
return _solidLogic.store.fetcher.load(webId.uri);
|
|
30
|
+
case 3:
|
|
31
|
+
storages = _solidLogic.store.each(webId, ns.space('storage'), null, webId.doc());
|
|
32
|
+
if (storages !== null && storages !== void 0 && storages.length) {
|
|
33
|
+
_context.next = 19;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
// find storage recursively in webId URL
|
|
37
|
+
path = webIdURL.pathname;
|
|
38
|
+
case 6:
|
|
39
|
+
if (!path.length) {
|
|
40
|
+
_context.next = 17;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
path = path.substring(0, path.lastIndexOf('/'));
|
|
44
|
+
podRoot = _solidLogic.store.sym(webIdURL.origin + path + '/');
|
|
45
|
+
_context.next = 11;
|
|
46
|
+
return _solidLogic.store.fetcher.webOperation('HEAD', podRoot.uri);
|
|
47
|
+
case 11:
|
|
48
|
+
res = _context.sent;
|
|
49
|
+
if (!((_res$headers$get = res.headers.get('link')) !== null && _res$headers$get !== void 0 && _res$headers$get.includes(ns.space('Storage').value))) {
|
|
50
|
+
_context.next = 14;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
return _context.abrupt("break", 17);
|
|
54
|
+
case 14:
|
|
55
|
+
if (!path) debug.warn("Current user storage not found for\n".concat(webId));
|
|
56
|
+
_context.next = 6;
|
|
57
|
+
break;
|
|
58
|
+
case 17:
|
|
59
|
+
_context.next = 21;
|
|
60
|
+
break;
|
|
61
|
+
case 19:
|
|
62
|
+
// give preference to storage in webId root
|
|
63
|
+
podRoot = storages.find(function (storage) {
|
|
64
|
+
return webIdURL.origin === new URL(storage.value).origin;
|
|
65
|
+
});
|
|
66
|
+
if (!podRoot) podRoot = storages[0];
|
|
67
|
+
case 21:
|
|
68
|
+
return _context.abrupt("return", (_podRoot = podRoot) === null || _podRoot === void 0 ? void 0 : _podRoot.value);
|
|
69
|
+
case 22:
|
|
70
|
+
case "end":
|
|
71
|
+
return _context.stop();
|
|
72
|
+
}
|
|
73
|
+
}, _callee);
|
|
74
|
+
}));
|
|
75
|
+
return function getPodRoot(_x) {
|
|
76
|
+
return _ref.apply(this, arguments);
|
|
77
|
+
};
|
|
78
|
+
}();
|
|
79
|
+
var pubKeyUrl = /*#__PURE__*/function () {
|
|
80
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(webId) {
|
|
81
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
82
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
_context2.prev = 0;
|
|
85
|
+
_context2.next = 3;
|
|
86
|
+
return getPodRoot(webId);
|
|
87
|
+
case 3:
|
|
88
|
+
_context2.t0 = _context2.sent;
|
|
89
|
+
return _context2.abrupt("return", _context2.t0 + 'profile/keys/publicKey.ttl');
|
|
90
|
+
case 7:
|
|
91
|
+
_context2.prev = 7;
|
|
92
|
+
_context2.t1 = _context2["catch"](0);
|
|
93
|
+
throw new Error(_context2.t1);
|
|
94
|
+
case 10:
|
|
95
|
+
case "end":
|
|
96
|
+
return _context2.stop();
|
|
97
|
+
}
|
|
98
|
+
}, _callee2, null, [[0, 7]]);
|
|
99
|
+
}));
|
|
100
|
+
return function pubKeyUrl(_x2) {
|
|
101
|
+
return _ref2.apply(this, arguments);
|
|
102
|
+
};
|
|
103
|
+
}();
|
|
104
|
+
exports.pubKeyUrl = pubKeyUrl;
|
|
105
|
+
function publicKeyExists(_x3) {
|
|
106
|
+
return _publicKeyExists.apply(this, arguments);
|
|
107
|
+
}
|
|
108
|
+
function _publicKeyExists() {
|
|
109
|
+
_publicKeyExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(webId) {
|
|
110
|
+
var publicKeyUrl;
|
|
111
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
112
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
_context4.next = 2;
|
|
115
|
+
return pubKeyUrl(webId);
|
|
116
|
+
case 2:
|
|
117
|
+
publicKeyUrl = _context4.sent;
|
|
118
|
+
_context4.next = 5;
|
|
119
|
+
return keyExists(webId, publicKeyUrl, 'PublicKey');
|
|
120
|
+
case 5:
|
|
121
|
+
return _context4.abrupt("return", _context4.sent);
|
|
122
|
+
case 6:
|
|
123
|
+
case "end":
|
|
124
|
+
return _context4.stop();
|
|
125
|
+
}
|
|
126
|
+
}, _callee4);
|
|
127
|
+
}));
|
|
128
|
+
return _publicKeyExists.apply(this, arguments);
|
|
129
|
+
}
|
|
130
|
+
var privKeyUrl = /*#__PURE__*/function () {
|
|
131
|
+
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(webId) {
|
|
132
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
133
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
_context3.prev = 0;
|
|
136
|
+
_context3.next = 3;
|
|
137
|
+
return getPodRoot(webId);
|
|
138
|
+
case 3:
|
|
139
|
+
_context3.t0 = _context3.sent;
|
|
140
|
+
return _context3.abrupt("return", _context3.t0 + 'profile/keys/privateKey.ttl');
|
|
141
|
+
case 7:
|
|
142
|
+
_context3.prev = 7;
|
|
143
|
+
_context3.t1 = _context3["catch"](0);
|
|
144
|
+
throw new Error(_context3.t1);
|
|
145
|
+
case 10:
|
|
146
|
+
case "end":
|
|
147
|
+
return _context3.stop();
|
|
148
|
+
}
|
|
149
|
+
}, _callee3, null, [[0, 7]]);
|
|
150
|
+
}));
|
|
151
|
+
return function privKeyUrl(_x4) {
|
|
152
|
+
return _ref3.apply(this, arguments);
|
|
153
|
+
};
|
|
154
|
+
}();
|
|
155
|
+
exports.privKeyUrl = privKeyUrl;
|
|
156
|
+
function privateKeyExists(_x5) {
|
|
157
|
+
return _privateKeyExists.apply(this, arguments);
|
|
158
|
+
}
|
|
159
|
+
function _privateKeyExists() {
|
|
160
|
+
_privateKeyExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(webId) {
|
|
161
|
+
var privateKeyUrl;
|
|
162
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
163
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
164
|
+
case 0:
|
|
165
|
+
_context5.next = 2;
|
|
166
|
+
return privKeyUrl(webId);
|
|
167
|
+
case 2:
|
|
168
|
+
privateKeyUrl = _context5.sent;
|
|
169
|
+
_context5.next = 5;
|
|
170
|
+
return keyExists(webId, privateKeyUrl, 'PrivateKey');
|
|
171
|
+
case 5:
|
|
172
|
+
return _context5.abrupt("return", _context5.sent);
|
|
173
|
+
case 6:
|
|
174
|
+
case "end":
|
|
175
|
+
return _context5.stop();
|
|
176
|
+
}
|
|
177
|
+
}, _callee5);
|
|
178
|
+
}));
|
|
179
|
+
return _privateKeyExists.apply(this, arguments);
|
|
180
|
+
}
|
|
181
|
+
function keyExists(_x6, _x7, _x8) {
|
|
182
|
+
return _keyExists.apply(this, arguments);
|
|
183
|
+
}
|
|
184
|
+
function _keyExists() {
|
|
185
|
+
_keyExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(webId, keyUrl, keyType) {
|
|
186
|
+
var key, _err$response, data, contentType, response;
|
|
187
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
188
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
189
|
+
case 0:
|
|
190
|
+
_context6.prev = 0;
|
|
191
|
+
_context6.next = 3;
|
|
192
|
+
return _solidLogic.store.fetcher.load(keyUrl);
|
|
193
|
+
case 3:
|
|
194
|
+
key = _solidLogic.store.any(webId, _solidLogic.store.sym(_signature.CERT + keyType));
|
|
195
|
+
return _context6.abrupt("return", key === null || key === void 0 ? void 0 : key.value);
|
|
196
|
+
case 7:
|
|
197
|
+
_context6.prev = 7;
|
|
198
|
+
_context6.t0 = _context6["catch"](0);
|
|
199
|
+
if (!((_context6.t0 === null || _context6.t0 === void 0 ? void 0 : (_err$response = _context6.t0.response) === null || _err$response === void 0 ? void 0 : _err$response.status) === 404)) {
|
|
200
|
+
_context6.next = 24;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
_context6.prev = 10;
|
|
204
|
+
// create privateKey resource
|
|
205
|
+
data = '';
|
|
206
|
+
contentType = 'text/turtle';
|
|
207
|
+
_context6.next = 15;
|
|
208
|
+
return _solidLogic.store.fetcher.webOperation('PUT', keyUrl, {
|
|
209
|
+
data: data,
|
|
210
|
+
contentType: contentType
|
|
211
|
+
});
|
|
212
|
+
case 15:
|
|
213
|
+
response = _context6.sent;
|
|
214
|
+
_context6.next = 22;
|
|
215
|
+
break;
|
|
216
|
+
case 18:
|
|
217
|
+
_context6.prev = 18;
|
|
218
|
+
_context6.t1 = _context6["catch"](10);
|
|
219
|
+
debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context6.t1);
|
|
220
|
+
throw _context6.t1;
|
|
221
|
+
case 22:
|
|
222
|
+
delete _solidLogic.store.fetcher.requested[keyUrl]; // delete cached 404 error
|
|
223
|
+
return _context6.abrupt("return", undefined);
|
|
224
|
+
case 24:
|
|
225
|
+
debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context6.t0);
|
|
226
|
+
throw _context6.t0;
|
|
227
|
+
case 26:
|
|
228
|
+
case "end":
|
|
229
|
+
return _context6.stop();
|
|
230
|
+
}
|
|
231
|
+
}, _callee6, null, [[0, 7], [10, 18]]);
|
|
232
|
+
}));
|
|
233
|
+
return _keyExists.apply(this, arguments);
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=cryptoKeyHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoKeyHelpers.js","names":["debug","_interopRequireWildcard","require","_signature","_solidLogic","ns","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getPodRoot","_ref","_asyncToGenerator2","_regenerator","mark","_callee","webId","_podRoot","webIdURL","storages","podRoot","path","_res$headers$get","res","wrap","_callee$","_context","prev","next","URL","uri","store","fetcher","load","each","space","doc","length","pathname","substring","lastIndexOf","sym","origin","webOperation","sent","headers","includes","value","abrupt","warn","concat","find","storage","stop","_x","apply","arguments","pubKeyUrl","_ref2","_callee2","_callee2$","_context2","t0","t1","Error","_x2","exports","publicKeyExists","_x3","_publicKeyExists","_callee4","publicKeyUrl","_callee4$","_context4","keyExists","privKeyUrl","_ref3","_callee3","_callee3$","_context3","_x4","privateKeyExists","_x5","_privateKeyExists","_callee5","privateKeyUrl","_callee5$","_context5","_x6","_x7","_x8","_keyExists","_callee6","keyUrl","keyType","_err$response","data","contentType","response","_callee6$","_context6","any","CERT","status","log","requested","undefined"],"sources":["../../src/utils/cryptoKeyHelpers.ts"],"sourcesContent":["import * as debug from '../debug'\nimport { CERT } from '../chat/signature'\nimport { store } from 'solid-logic'\nimport * as ns from '../ns'\nimport { NamedNode } from 'rdflib'\n\nconst getPodRoot = async (webId: NamedNode) => {\n const webIdURL = new URL(webId.uri)\n // find storages in webId document\n await store.fetcher.load(webId.uri)\n const storages = store.each(webId, ns.space('storage'), null, webId.doc())\n var podRoot: NamedNode | undefined\n if (!storages?.length) {\n // find storage recursively in webId URL\n let path = webIdURL.pathname\n while (path.length) {\n path = path.substring(0, path.lastIndexOf('/'))\n podRoot = store.sym(webIdURL.origin + path + '/')\n const res = await store.fetcher.webOperation('HEAD', podRoot.uri)\n if (res.headers.get('link')?.includes(ns.space('Storage').value)) break\n if (!path) debug.warn(`Current user storage not found for\\n${webId}`)\n }\n } else {\n // give preference to storage in webId root\n podRoot = storages.find((storage) => webIdURL.origin === new URL(storage.value).origin) as NamedNode\n if (!podRoot) podRoot = storages[0] as NamedNode\n }\n return podRoot?.value\n}\n\nexport const pubKeyUrl = async (webId: NamedNode) => {\n try {\n return await getPodRoot(webId) + 'profile/keys/publicKey.ttl'\n } catch (err) { throw new Error(err) }\n}\n\nexport async function publicKeyExists (webId: NamedNode) {\n // find publickey\n const publicKeyUrl = await pubKeyUrl(webId)\n return await keyExists(webId, publicKeyUrl, 'PublicKey')\n}\n\nexport const privKeyUrl = async (webId: NamedNode) => {\n try {\n return await getPodRoot(webId) + 'profile/keys/privateKey.ttl'\n } catch (err) { throw new Error(err) }\n}\n\nexport async function privateKeyExists (webId: NamedNode) {\n // find privateKey\n const privateKeyUrl = await privKeyUrl(webId)\n return await keyExists(webId, privateKeyUrl, 'PrivateKey')\n}\n\ntype KeyType = 'PublicKey' | 'PrivateKey'\n\nasync function keyExists (webId: NamedNode, keyUrl: string, keyType: KeyType) {\n try {\n await store.fetcher.load(keyUrl)\n const key = store.any(webId, store.sym(CERT + keyType))\n return key?.value // as NamedNode\n } catch (err) {\n if (err?.response?.status === 404) { // If PATCH on some server do not all create intermediate containers\n try {\n // create privateKey resource\n const data = ''\n const contentType = 'text/turtle'\n const response = await store.fetcher.webOperation('PUT', keyUrl, {\n data,\n contentType\n })\n } catch (err) {\n debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + err)\n throw err\n }\n delete store.fetcher.requested[keyUrl] // delete cached 404 error\n return undefined\n }\n debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + err)\n throw err\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA2B,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,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,GAAAO,SAAA,CAAArC,EAAM,CAAC;UAAA,MAAAqC,SAAA,CAAArC,EAAA;QAAA;UAGnE,OAAOhC,iBAAK,CAACC,OAAO,CAACyE,SAAS,CAACZ,MAAM,CAAC,EAAC;UAAA,OAAAO,SAAA,CAAApD,MAAA,WAChC0D,SAAS;QAAA;UAElB5H,KAAK,CAAC0H,GAAG,CAAC,gCAAgC,GAAGX,MAAM,GAAG,IAAI,GAAAO,SAAA,CAAAtC,EAAM,CAAC;UAAA,MAAAsC,SAAA,CAAAtC,EAAA;QAAA;QAAA;UAAA,OAAAsC,SAAA,CAAA/C,IAAA;MAAA;IAAA,GAAAuC,QAAA;EAAA,CAGpE;EAAA,OAAAD,UAAA,CAAApC,KAAA,OAAAC,SAAA;AAAA"}
|
|
@@ -4,10 +4,6 @@ type ThrottleOptions = {
|
|
|
4
4
|
throttling?: boolean;
|
|
5
5
|
trailing?: boolean;
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
8
|
-
* @ignore exporting this only for the unit test
|
|
9
|
-
*/
|
|
10
|
-
export declare function addStyleClassToElement(element: any, styleClasses: string[], type?: string): void;
|
|
11
7
|
/**
|
|
12
8
|
* @ignore exporting this only for the unit test
|
|
13
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerFooterHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/headerFooterHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"headerFooterHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/headerFooterHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,QAAQ,CAAA;AAIzE,KAAK,eAAe,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED;;GAEG;AACH,wBAAgB,MAAM,IAAK,SAAS,CAGnC;AACD;GACG;AACH,wBAAsB,WAAW,CAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAkD9F;AACD;;GAEG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAIvE;AACD;;GAEG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAgC9G"}
|
|
@@ -4,45 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.addStyleClassToElement = addStyleClassToElement;
|
|
8
7
|
exports.getName = getName;
|
|
9
8
|
exports.getPod = getPod;
|
|
10
9
|
exports.getPodOwner = getPodOwner;
|
|
11
10
|
exports.throttle = throttle;
|
|
12
11
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
13
|
var _rdflib = require("rdflib");
|
|
16
14
|
var _ = require("..");
|
|
17
|
-
var _styleMap = require("../header/styleMap");
|
|
18
|
-
var _styleMap2 = require("../footer/styleMap");
|
|
19
|
-
var _jss = require("../jss");
|
|
20
15
|
/*
|
|
21
16
|
Copied from mashlib/src/global/metadata.ts
|
|
22
17
|
*/
|
|
23
18
|
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
function getStyle(styleClass, type) {
|
|
28
|
-
if (type && type === 'footer') {
|
|
29
|
-
return _styleMap2.styleMap[styleClass];
|
|
30
|
-
} else {
|
|
31
|
-
return _styleMap.styleMap[styleClass];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @ignore exporting this only for the unit test
|
|
37
|
-
*/
|
|
38
|
-
function addStyleClassToElement(element, styleClasses, type) {
|
|
39
|
-
styleClasses.forEach(function (styleClass) {
|
|
40
|
-
var style = getStyle(styleClass, type);
|
|
41
|
-
var _getClasses = (0, _jss.getClasses)(document.head, (0, _defineProperty2["default"])({}, styleClass, style)),
|
|
42
|
-
classes = _getClasses.classes;
|
|
43
|
-
element.classList.add(classes[styleClass]);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
19
|
/**
|
|
47
20
|
* @ignore exporting this only for the unit test
|
|
48
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerFooterHelpers.js","names":["_rdflib","require","_","_styleMap","_styleMap2","_jss","getStyle","styleClass","type","footerStyleMap","headerStyleMap","addStyleClassToElement","element","styleClasses","forEach","style","_getClasses","getClasses","document","head","_defineProperty2","classes","classList","add","getPod","sym","location","origin","site","getPodOwner","_x","_x2","_getPodOwner","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","pod","store","response","containerTurtle","podOwner","guess","wrap","_callee$","_context","prev","next","any","ns","ldp","fetcher","webOperation","uri","initFetchOptions","headers","accept","sent","responseText","parse","t0","console","error","abrupt","holds","rdf","space","warn","solid","load","doc","t1","concat","t2","stop","getName","user","anyValue","vcard","foaf","throttle","func","wait","options","length","undefined","context","args","result","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","setTimeout"],"sources":["../../src/utils/headerFooterHelpers.ts"],"sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { IndexedFormula, LiveStore, NamedNode, parse, sym } from 'rdflib'\nimport { ns } from '..'\nimport { styleMap as headerStyleMap } from '../header/styleMap'\nimport { styleMap as footerStyleMap } from '../footer/styleMap'\nimport { getClasses } from '../jss'\n\n/* @ts-ignore no-console */\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n/**\n * @internal\n */\nfunction getStyle (styleClass, type?) {\n if (type && type === 'footer') {\n return footerStyleMap[styleClass]\n } else {\n return headerStyleMap[styleClass]\n }\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function addStyleClassToElement (element: any, styleClasses: string[], type?: string) {\n styleClasses.forEach((styleClass) => {\n const style = getStyle(styleClass, type)\n const { classes } = getClasses(document.head, { [styleClass]: style })\n element.classList.add(classes[styleClass])\n })\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n */\nexport async function getPodOwner (pod: NamedNode, store: LiveStore): Promise<NamedNode | null> {\n // This is a massive guess. In future\n // const podOwner = sym(`${pod.uri}profile/card#me`)\n/* eslint-disable no-console */\n try {\n // load turtle Container representation\n if (!store.any(pod, null, ns.ldp('Container'), pod)) {\n const response = await store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n parse(containerTurtle as string, store, pod.uri, 'text/turtle')\n }\n } catch (err) {\n console.error('Error loading pod ' + pod + ': ' + err)\n return null\n }\n if (!store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod)) {\n console.warn('Pod ' + pod + ' does not declare itself as a space:Storage')\n return null\n }\n const podOwner = store.any(pod, ns.solid('owner'), null, pod) ||\n store.any(null, ns.space('storage'), pod, pod)\n if (podOwner) {\n try {\n await store.fetcher.load((podOwner as NamedNode).doc())\n } catch (err) {\n console.warn('Unable to load profile of pod owner ' + podOwner)\n return null\n }\n if (!store.holds(podOwner, ns.space('storage'), pod, (podOwner as NamedNode).doc())) {\n console.warn(`Pod owner ${podOwner} does NOT list pod ${pod} as their storage`)\n }\n return podOwner as NamedNode// Success!\n } else { // pod owner not declared in pod\n // @@ TODO: This is given the structure that NSS provides\n // This is a massive guess. For old pods which don't have owner link\n const guess = sym(`${pod.uri}profile/card#me`)\n try {\n // @ts-ignore LiveStore always has fetcher\n await store.fetcher.load(guess)\n } catch (err) {\n console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\\'t load it.')\n return null\n }\n if (store.holds(guess, ns.space('storage'), pod, guess.doc())) {\n console.warn('Using guessed pod owner webid but it links back.')\n return guess\n }\n return null\n }\n /* eslint-enable no-console */\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getName (store: IndexedFormula, user: NamedNode): string {\n return store.anyValue(user, ns.vcard('fn'), null, user.doc()) ||\n store.anyValue(user, ns.foaf('name'), null, user.doc()) ||\n user.uri\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAPA;AACA;AACA;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,EACTC,MAAW;EACb,IAAIC,OAAY,GAAG,IAAI;EACvB,IAAIC,QAAQ,GAAG,CAAC;EAChB,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAA,EAAe;IACxBD,QAAQ,GAAG,CAACP,OAAO,CAACS,OAAO,GAAG,CAAC,GAAGC,IAAI,CAACC,GAAG,EAAE;IAC5CL,OAAO,GAAG,IAAI;IACdD,MAAM,GAAGP,IAAI,CAAClD,KAAK,CAACuD,OAAO,EAAEC,IAAI,CAAC;IAClC,IAAI,CAACE,OAAO,EAAEH,OAAO,GAAGC,IAAI,GAAG,IAAI;EACrC,CAAC;EACD,OAAO,YAAY;IACjB,IAAMO,GAAG,GAAGD,IAAI,CAACC,GAAG,EAAE;IACtB,IAAI,CAACJ,QAAQ,IAAI,CAACP,OAAO,CAACS,OAAO,EAAEF,QAAQ,GAAGI,GAAG;IACjD,IAAMC,SAAS,GAAGb,IAAI,IAAIY,GAAG,GAAGJ,QAAQ,CAAC;IACzC;IACAJ,OAAO,GAAG,IAAI;IACdC,IAAI,GAAGvD,SAAS;IAChB,IAAI+D,SAAS,IAAI,CAAC,IAAIA,SAAS,GAAGb,IAAI,EAAE;MACtC,IAAIO,OAAO,EAAE;QACXO,YAAY,CAACP,OAAO,CAAC;QACrBA,OAAO,GAAG,IAAI;MAChB;MACAC,QAAQ,GAAGI,GAAG;MACdN,MAAM,GAAGP,IAAI,CAAClD,KAAK,CAACuD,OAAO,EAAEC,IAAI,CAAC;MAClC,IAAI,CAACE,OAAO,EAAEH,OAAO,GAAGC,IAAI,GAAG,IAAI;IACrC,CAAC,MAAM,IAAI,CAACE,OAAO,IAAIN,OAAO,CAACc,QAAQ,KAAK,KAAK,EAAE;MACjDR,OAAO,GAAGS,UAAU,CAACP,KAAK,EAAEI,SAAS,CAAC;IACxC;IACA,OAAOP,MAAM;EACf,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"headerFooterHelpers.js","names":["_rdflib","require","_","getPod","sym","document","location","origin","site","getPodOwner","_x","_x2","_getPodOwner","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","pod","store","response","containerTurtle","podOwner","guess","wrap","_callee$","_context","prev","next","any","ns","ldp","fetcher","webOperation","uri","initFetchOptions","headers","accept","sent","responseText","parse","t0","console","error","abrupt","holds","rdf","space","warn","solid","load","doc","t1","concat","t2","stop","getName","user","anyValue","vcard","foaf","throttle","func","wait","options","length","undefined","context","args","result","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","setTimeout"],"sources":["../../src/utils/headerFooterHelpers.ts"],"sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { IndexedFormula, LiveStore, NamedNode, parse, sym } from 'rdflib'\nimport { ns } from '..'\n\n/* @ts-ignore no-console */\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n */\nexport async function getPodOwner (pod: NamedNode, store: LiveStore): Promise<NamedNode | null> {\n // This is a massive guess. In future\n // const podOwner = sym(`${pod.uri}profile/card#me`)\n/* eslint-disable no-console */\n try {\n // load turtle Container representation\n if (!store.any(pod, null, ns.ldp('Container'), pod)) {\n const response = await store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n parse(containerTurtle as string, store, pod.uri, 'text/turtle')\n }\n } catch (err) {\n console.error('Error loading pod ' + pod + ': ' + err)\n return null\n }\n if (!store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod)) {\n console.warn('Pod ' + pod + ' does not declare itself as a space:Storage')\n return null\n }\n const podOwner = store.any(pod, ns.solid('owner'), null, pod) ||\n store.any(null, ns.space('storage'), pod, pod)\n if (podOwner) {\n try {\n await store.fetcher.load((podOwner as NamedNode).doc())\n } catch (err) {\n console.warn('Unable to load profile of pod owner ' + podOwner)\n return null\n }\n if (!store.holds(podOwner, ns.space('storage'), pod, (podOwner as NamedNode).doc())) {\n console.warn(`Pod owner ${podOwner} does NOT list pod ${pod} as their storage`)\n }\n return podOwner as NamedNode// Success!\n } else { // pod owner not declared in pod\n // @@ TODO: This is given the structure that NSS provides\n // This is a massive guess. For old pods which don't have owner link\n const guess = sym(`${pod.uri}profile/card#me`)\n try {\n // @ts-ignore LiveStore always has fetcher\n await store.fetcher.load(guess)\n } catch (err) {\n console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\\'t load it.')\n return null\n }\n if (store.holds(guess, ns.space('storage'), pod, guess.doc())) {\n console.warn('Using guessed pod owner webid but it links back.')\n return guess\n }\n return null\n }\n /* eslint-enable no-console */\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getName (store: IndexedFormula, user: NamedNode): string {\n return store.anyValue(user, ns.vcard('fn'), null, user.doc()) ||\n store.anyValue(user, ns.foaf('name'), null, user.doc()) ||\n user.uri\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAWA;AACA;AACA;AACO,SAASE,MAA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Gb,IAAI,EAAE;MACtC,IAAIO,OAAO,EAAE;QACXO,YAAY,CAACP,OAAO,CAAC;QACrBA,OAAO,GAAG,IAAI;MAChB;MACAC,QAAQ,GAAGI,GAAG;MACdN,MAAM,GAAGP,IAAI,CAAClD,KAAK,CAACuD,OAAO,EAAEC,IAAI,CAAC;MAClC,IAAI,CAACE,OAAO,EAAEH,OAAO,GAAGC,IAAI,GAAG,IAAI;IACrC,CAAC,MAAM,IAAI,CAACE,OAAO,IAAIN,OAAO,CAACc,QAAQ,KAAK,KAAK,EAAE;MACjDR,OAAO,GAAGS,UAAU,CAACP,KAAK,EAAEI,SAAS,CAAC;IACxC;IACA,OAAOP,MAAM;EACf,CAAC;AACH"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.versionInfo = void 0;
|
|
7
7
|
var versionInfo = {
|
|
8
|
-
buildTime: '2023-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-05-06T21:42:04Z',
|
|
9
|
+
commit: '17005e619868ccdb8e3bcdeb178376f49054d7c7',
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-ui': '2.4.27',
|
|
12
12
|
npm: '8.19.4',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-05-06T21:42:04Z',\n commit: '17005e619868ccdb8e3bcdeb178376f49054d7c7',\n npmInfo:\n{\n 'solid-ui': '2.4.27',\n npm: '8.19.4',\n node: '16.20.0',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.0',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.10',\n openssl: '1.1.1t+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;EACzBC,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC;AAAAC,OAAA,CAAAtB,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttons.d.ts","sourceRoot":"","sources":["../../src/widgets/buttons.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAsB,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"buttons.d.ts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