pict 1.0.301 → 1.0.302
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/dist/pict.compatible.js +25 -1
- package/dist/pict.compatible.js.map +1 -1
- package/dist/pict.compatible.min.js +2 -2
- package/dist/pict.compatible.min.js.map +1 -1
- package/dist/pict.js +25 -1
- package/dist/pict.js.map +1 -1
- package/dist/pict.min.js +2 -2
- package/dist/pict.min.js.map +1 -1
- package/package.json +1 -1
- package/source/Pict-Content-Assignment.js +78 -0
- package/types/source/Pict-Content-Assignment.d.ts +30 -0
- package/types/source/Pict-Content-Assignment.d.ts.map +1 -1
package/dist/pict.compatible.js
CHANGED
|
@@ -5154,7 +5154,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
|
|
|
5154
5154
|
// presumably different callback function.
|
|
5155
5155
|
// This makes sure that own properties are retained, so that
|
|
5156
5156
|
// decorations and such are not lost along the way.
|
|
5157
|
-
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.
|
|
5157
|
+
module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],190:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],191:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.302","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.27.0","@types/jquery":"^3.5.32","@types/sinon":"^17.0.4","eslint":"^9.27.0","globals":"^16.2.0","quackage":"^1.0.42","sinon":"^20.0.0","typescript":"^5.8.3"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.1.18","pict-application":"^1.0.27","pict-provider":"^1.0.6","pict-template":"^1.0.13","pict-view":"^1.0.63"}};},{}],192:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
|
|
5158
5158
|
/* global Pict, _Pict: writeable *//**
|
|
5159
5159
|
* Simple function to load a pict Application
|
|
5160
5160
|
*
|
|
@@ -5202,6 +5202,18 @@ _this74.hasJquery=false;_this74.jQuery=false;if(_this74.inBrowser&&typeof window
|
|
|
5202
5202
|
* @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
|
|
5203
5203
|
* @param {string} pContent - The content to append.
|
|
5204
5204
|
*/_this74.customAppendFunction=null;/**
|
|
5205
|
+
* Set this to override the default mechanism for appending content to a DOM element.
|
|
5206
|
+
*
|
|
5207
|
+
* @type {(pBeforeAddress: string|HTMLElement, pContent: string) => void}
|
|
5208
|
+
* @param {string|HTMLElement} pBeforeAddress - The address of the element (a CSS selector), or the element itself.
|
|
5209
|
+
* @param {string} pContent - The content to append.
|
|
5210
|
+
*/_this74.customInsertBeforeFunction=null;/**
|
|
5211
|
+
* Set this to override the default mechanism for appending content to a DOM element.
|
|
5212
|
+
*
|
|
5213
|
+
* @type {(pAfterAddress: string|HTMLElement, pContent: string) => void}
|
|
5214
|
+
* @param {string|HTMLElement} pAfterAddress - The address of the element (a CSS selector), or the element itself.
|
|
5215
|
+
* @param {string} pContent - The content to append.
|
|
5216
|
+
*/_this74.customInsertAfterFunction=null;/**
|
|
5205
5217
|
* Set this to override the default mechanism for reading content from the DOM.
|
|
5206
5218
|
*
|
|
5207
5219
|
* @type {Function}
|
|
@@ -5243,6 +5255,18 @@ this.log.trace("PICT Content ASSIGN to [".concat(pAddress,"]:"),pContent);}}/**
|
|
|
5243
5255
|
*/},{key:"appendContent",value:function appendContent(pAddress,pContent){if(this.customAppendFunction){return this.customAppendFunction(pAddress,pContent);}else if(this.hasJquery){//FIXME: this is silly, but it makes the type system happy - it picks a different overload for each case
|
|
5244
5256
|
var tmpTargetElement=typeof pAddress==='string'?window.jQuery(pAddress):window.jQuery(pAddress);tmpTargetElement.append(pContent);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAddress==='string'?window.document.querySelectorAll(pAddress):[pAddress];for(var i=0;i<tmpTargetElementSet.length;i++){tmpTargetElementSet[i].insertAdjacentHTML("beforeend",pContent);}}else{// Just log it out for now -- nothing browser in our mix.
|
|
5245
5257
|
this.log.trace("PICT Content APPEND to [".concat(pAddress,"]:"),pContent);}}/**
|
|
5258
|
+
* Insert content before an element. The new content will be a sibling of the target element.
|
|
5259
|
+
*
|
|
5260
|
+
* @param {string|HTMLElement} pBeforeAddress - The address of the element (a CSS selector), or the element itself.
|
|
5261
|
+
* @param {string} pContent - The content to insert.
|
|
5262
|
+
*/},{key:"insertContentBefore",value:function insertContentBefore(pBeforeAddress,pContent){if(this.customInsertBeforeFunction){return this.customInsertBeforeFunction(pBeforeAddress,pContent);}else if(this.hasJquery){window.jQuery(pContent).insertBefore(pBeforeAddress);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pBeforeAddress==='string'?window.document.querySelectorAll(pBeforeAddress):[pBeforeAddress];for(var i=0;i<tmpTargetElementSet.length;i++){tmpTargetElementSet[i].insertAdjacentHTML("beforebegin",pContent);}}else{// Just log it out for now -- nothing browser in our mix.
|
|
5263
|
+
this.log.trace("PICT Content INSERT BEFORE [".concat(pBeforeAddress,"]:"),pContent);}}/**
|
|
5264
|
+
* Insert content after an element. The new content will be a sibling of the target element.
|
|
5265
|
+
*
|
|
5266
|
+
* @param {string|HTMLElement} pAfterAddress - The address of the element (a CSS selector), or the element itself.
|
|
5267
|
+
* @param {string} pContent - The content to insert.
|
|
5268
|
+
*/},{key:"insertContentAfter",value:function insertContentAfter(pAfterAddress,pContent){if(this.customInsertAfterFunction){return this.customInsertAfterFunction(pAfterAddress,pContent);}else if(this.hasJquery){window.jQuery(pContent).insertAfter(pAfterAddress);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=typeof pAfterAddress==='string'?window.document.querySelectorAll(pAfterAddress):[pAfterAddress];for(var i=0;i<tmpTargetElementSet.length;i++){tmpTargetElementSet[i].insertAdjacentHTML("afterend",pContent);}}else{// Just log it out for now -- nothing browser in our mix.
|
|
5269
|
+
this.log.trace("PICT Content INSERT AFTER [".concat(pAfterAddress,"]:"),pContent);}}/**
|
|
5246
5270
|
* Prepend content to an element.
|
|
5247
5271
|
*
|
|
5248
5272
|
* @param {string|HTMLElement} pAddress - The address of the element (a CSS selector), or the element itself.
|