Skip to content
Permalink
Browse files

Version 1.5.0 wip

  • Loading branch information...
aisera-mikowski committed Jan 6, 2019
1 parent 0c5a710 commit 665b5397cd3cd3142815357e0c8c769d0329ca65
@@ -16,4 +16,3 @@ lib/xhi_state.json
node_modules
npm-debug.log
package-lock.json

327 README.md

Large diffs are not rendered by default.

@@ -43,7 +43,7 @@ find -type f -name "*.md" \

echo "Generating ${_loop_dir}/${_loop_basename}.html from ${_loop_file}"
"${_pandocExe}" "${_loop_file}" \
-f markdown_github \
-f gfm \
-so "${_loop_dir}/${_loop_basename}.html" \
-H "${_topDir}/config/md-github.style";
done
@@ -0,0 +1,29 @@
#!/usr/bin/env node

// Use this script to convert key.json into runtime variables
// used by core.js. Replace {XXX-config-matrix-XXX} with the
// output of this file to test basic function.
//
/*global xhi*/

'use strict';
global[ 'xhi' ] = require( '../js/xhi/00_root.js' );
require( '../js/xhi/01_util.js' );

var
keyMatrix = require( process.argv[2] ),
srcMap = keyMatrix.defaultValueMatrix,
keyMap = keyMatrix.keyMap,
aMap = xhi._00_root_._makeInstanceFn_( 'rekey' ),

solveMap
;

xhi._01_util_._makeInstanceFn_( aMap );

// Remove unused configs
delete srcMap.snippetStr;

solveMap = aMap._01_util_._makeRekeyMap_( srcMap, keyMap )

console.log( JSON.stringify( solveMap ) );
@@ -472,7 +472,7 @@ function grepFileFn ( filename, pattern_str ) {
// false
// ],
// [ 'node_modules/powercss/dist/pcss.js',
// 'js/vendor/pcss-1.4.5.js',
// 'js/vendor/pcss-1.4.6.js',
// false
// ]
// ],
Binary file not shown.
@@ -64,7 +64,7 @@ standard considers ES5.1 the latest usable version.
=== ECMA, ECMAScript, and ES
Development on the JavaScript language has accelerated over the past decade as
vendors have stopped competing and started collaborating on making the
lanugage better all centered around the ECMAScript specifications. All these
language better all centered around the ECMAScript specifications. All these
acronymns can be confusing so let's clear things up.

https://en.wikipedia.org/wiki/Ecma_International[ECMA International]
@@ -765,16 +765,20 @@ as shown in Diagram X.1 and Figure X.2.

[source]
----
spa # Root, also referred to as _00_root_
spa._01_util_ # Core utility
_02_data_ # Data management (AJAX, Websockets)
_03_model_ # Core logic
_04_utilb_ # Browser utilities
_05_css_lb_ # Feature support
_06_lb_ # Feature modules
_07_shell_ # Browser interface
_08_app_ # Application bundle
----
_00_root_ # Root
_01_util_ # Core utility
_02_01_data_mock_ # Data prereq - mock module
_02_data_ # Data controller, fetch and push (AJAX, Websockets)
_03_model_ # Core logic
_05_01_css_icons_ # Styling prereq - icons
_05_02_css_base_ # Styling prereq - basic css
_05_03_css_litebox_ # Styling prerep - litebox css
_05_css_ # Dynamic styling controller
_06_litebox_ # Feature module, litebox
_07_shell_ # Browser interface
_08_01_shared_ # App prereq, shared config
_08_app_ # App main
---
.Figure X.2 -- SPA architecture

This file was deleted.

@@ -26,14 +26,12 @@ See the diagram below.
| 01_util | | | Utils | | : +---------+ |
| Utils |<-----+--+----------+ | : | 06_* | |
+---------+ | ...))) | Feature |<--+
| | | Modules | |
v +---------+---------+ |
+-----------+ | |
| 00_root | | +-------------+ |
| namespace | | | 05_css_* | |
+-----------+ | | 06_css |<--+
| | Feature CSS |
+-----+-------------+
| v | Modules | |
v +-------------+ +---------+ |
+-----------+ | 05_css_* | |
| 00_root | | 05_css |<--------------------+
| namespace | | Feature CSS |
+-----------+ +-------------+
================================ DATA FLOW ============================ >>>>
```
@@ -11,8 +11,8 @@
var
libList = [
'js/vendor/taffy-2.7.3.js',
'js/vendor/pcss-1.4.5.js',
'js/vendor/pcss.cfg-1.4.5.js',
'js/vendor/pcss-1.4.6.js',
'js/vendor/pcss.cfg-1.4.6.js',
'js/vendor/jquery-3.3.1.js',
'js/plugin/jquery.deferred.whenAll-1.0.0.js',
'js/vendor/jquery.event.dragscroll-1.0.0.js',
@@ -11,8 +11,8 @@
var
libList = [
'js/vendor/taffy-2.7.3.js',
'js/vendor/pcss-1.4.5.js',
'js/vendor/pcss.cfg-1.4.5.js',
'js/vendor/pcss-1.4.6.js',
'js/vendor/pcss.cfg-1.4.6.js',
'js/vendor/jquery-3.3.1.js',
'js/plugin/jquery.deferred.whenAll-1.0.0.js',
'js/vendor/jquery.event.dragscroll-1.0.0.js',
@@ -3,7 +3,7 @@
// Create root namespace map 'tb02'
xhi._00_root_._makeInstanceFn_( 'tb02' );
tb02._extendSymbolMapFn_(
'vMap',
'_vMap_',
{ _appendChild : 'appendChild',
_change_ : 'change',
_charAt_ : 'charAt',
@@ -0,0 +1,5 @@
/*global xhi, tb02 */
// == BEGIN MODULE tb02._05_02_css_base_ ===============================
// Create tb02._05_02_css_base_
xhi._05_02_css_base_._makeInstanceFn_( tb02 );
// == . END MODULE tb02._05_02_css_base_ ===============================
@@ -0,0 +1,5 @@
/*global xhi, tb02 */
// == BEGIN MODULE tb02._05_03_css_lb_ =================================
// Create tb02._05_03_css_lb_
xhi._05_03_css_lb_._makeInstanceFn_( tb02 );
// == . END MODULE tb02._05_03_css_lb ==================================
@@ -1,6 +1,6 @@
/*global xhiCSS, tb02*/
// == BEGIN MODULE tb02._06_css_ =======================================
tb02._06_css_ = (function () {
// == BEGIN MODULE tb02._05_css_ =======================================
tb02._05_css_ = (function () {
// == BEGIN MODULE SCOPE VARIABLES ===================================
'use strict';
var
@@ -346,7 +346,7 @@ tb02._06_css_ = (function () {
input_palette_idx = __castInt( arg_palette_idx, __n1 ),
local_map_key = aKey + '-_palette_map_',
local_idx_key = aKey + '-_palette_idx_',
palette_map_list = aMap._05_css_base_._paletteMapList_,
palette_map_list = aMap._05_02_css_base_._paletteMapList_,
palette_map_count = palette_map_list[ vMap._length_ ],

solve_idx, solve_map,
@@ -404,16 +404,16 @@ tb02._06_css_ = (function () {
// BEGIN public method /getPaletteCount/
function getPaletteCount () {
var
palette_map_list = aMap._05_css_base_._paletteMapList_;
palette_map_list = aMap._05_02_css_base_._paletteMapList_;
return palette_map_list[ vMap._length_ ];
}
// . END public method /getPaletteCount/

// BEGIN public method /getPaletteMixinMap/
function getPaletteMixinMap () {
var
palette_list = aMap._05_css_base_._paletteMapList_,
palette_idx = stateMap._palette_idx_;
palette_list = aMap._05_css_02_base_._paletteMapList_,
palette_idx = stateMap._palette_idx_;
return palette_list[ palette_idx ];
}
// . END public method /getPaletteMixinMap/
@@ -422,7 +422,7 @@ tb02._06_css_ = (function () {
function setPaletteIdx( arg_idx ) {
var
idx = __util._castInt_( arg_idx, 0 ),
palette_map_list = aMap._05_css_base_._paletteMapList_,
palette_map_list = aMap._05_02_css_base_._paletteMapList_,
palette_idx = stateMap._palette_idx_,
palette_count = palette_map_list[ vMap._length_ ],
palette_mixin_map;
@@ -462,7 +462,7 @@ tb02._06_css_ = (function () {
// Initialize pcss (xhiCSS) and merge mixin maps
xhiCSS._initModule_({ _style_el_prefix_ : aKey });
xhiCSS._setGlobalMixinMap_({
_mixin_map_ : aMap._05_css_base_._globalMixinMap_
_mixin_map_ : aMap._05_02_css_base_._globalMixinMap_
});
xhiCSS._setGlobalMixinMap_({
_mixin_map_ : configMap._mixin_map_,
@@ -473,12 +473,12 @@ tb02._06_css_ = (function () {
xhiCSS._setVsheet_({
_vsheet_id_ : '_base_',
_mode_str_ : '_add_',
_selector_list_ : aMap._05_css_base_._selectorList_
_selector_list_ : aMap._05_02_css_base_._selectorList_
});
xhiCSS._setVsheet_({
_vsheet_id_ : '_lb_',
_mode_str_ : '_add_',
_selector_list_ : aMap._05_css_lb_._selectorList_
_selector_list_ : aMap._05_03_css_lb_._selectorList_
});
xhiCSS._setVsheet_({
_vsheet_id_ : '_shell_',
@@ -512,4 +512,4 @@ tb02._06_css_ = (function () {
};
// == . END PUBLIC METHODS ===========================================
}());
// == . END MODULE tb02._06_css_ =======================================
// == . END MODULE tb02._05_css_ =======================================

This file was deleted.

This file was deleted.

@@ -419,7 +419,7 @@ tb02._07_shell_ = (function ( $ ) {
var $body = $( 'body' );

// Initialize styling
tb02._06_css_._initModuleFn_();
tb02._05_css_._initModuleFn_();

// Set up screen
$body[ vMap._html_ ]( configMap._main_tmplt_ );
@@ -13,8 +13,8 @@
'use strict';
var
libList = [
'js/vendor/pcss-1.4.5.js',
'js/vendor/pcss.cfg-1.4.5.js',
'js/vendor/pcss-1.4.6.js',
'js/vendor/pcss.cfg-1.4.6.js',
'js/vendor/jquery-3.3.1.js',
'js/plugin/jquery.deferred.whenAll-1.0.0.js',
'js/vendor/jquery.event.gevent-1.1.6.js',
@@ -28,11 +28,11 @@
// 'js/xhi/02_fake.js', // not used currently
// 'js/xhi/03_model.js', // custom
'js/xhi/04_utilb.js',
'js/xhi/05_css_base.js',
'js/xhi/05_css_lb.js',
'js/xhi/05_02_css_base.js',
'js/xhi/05_03_css_lb.js',
'js/xhi/05_css.js',
// 'js/xhi/05_css_shell.js', // custom
// 'js/xhi/06_css.js', // custom
'js/xhi/06_lb.js',
'js/xhi/06_lb.js', // custom
// 'js/xhi/07_shell.js', // custom

// App libs
@@ -41,9 +41,9 @@
'js/app-tb02/tb02.02_data.js',
'js/app-tb02/tb02.03_model.js',
'js/app-tb02/tb02.04_utilb.js',
'js/app-tb02/tb02.05_css_base.js',
'js/app-tb02/tb02.05_css_lb.js',
'js/app-tb02/tb02.06_css.js',
'js/app-tb02/tb02.05_02_css_base.js',
'js/app-tb02/tb02.05_03_css_lb.js',
'js/app-tb02/tb02.05_css.js',
'js/app-tb02/tb02.06_lb.js',
'js/app-tb02/tb02.07_shell.js'
],
@@ -75,6 +75,7 @@ xhi._00_root_ = (function () {
_body_ : 'body',
_call_ : 'call',
_cancel_ : 'cancel',
_closest_ : 'closest',
_concat_ : 'concat',
_css_ : 'css',
_empty_ : 'empty',
@@ -121,6 +122,8 @@ xhi._00_root_ = (function () {
_substr_ : 'substr',
_target_ : 'target',
_text_ : 'text',
_reject_ : 'reject',
_resolve_ : 'resolve',
_then_ : 'then',
_toFixed_ : 'toFixed',
_toString_ : 'toString',
@@ -143,6 +146,26 @@ xhi._00_root_ = (function () {
;
// == . END MODULE SCOPE VARIABLES ===================================

// == BEGIN PRIVATE METHODS ==========================================
// BEGIN private method /makeCloneMap/
// We use this instead of Object.assign to remain
// compatible with IE11
function makeCloneMap ( map ) {
var
key_list = vMap._makeKeyListFn_( map ),
key_count = key_list.length,
clone_map = {},
idx, key;

for ( idx = nMap._0_; idx < key_count; idx++ ) {
key = key_list[ idx ];
clone_map[ key ] = map[ key ];
}
return clone_map;
}
// . END private method /makeCloneMap/
// == . END PRIVATE METHODS ==========================================

// == BEGIN PUBLIC METHODS ===========================================
// BEGIN public method /getGlobalObjFn/
function getGlobalObjFn () {
@@ -157,8 +180,8 @@ xhi._00_root_ = (function () {
// BEGIN public method /makeInstanceFn/
function makeInstanceFn ( aKey, arg_option_map ) {
var
instanceNmap = Object.assign( {}, nMap ),
instanceVmap = Object.assign( {}, vMap ),
instanceNmap = makeCloneMap( nMap ),
instanceVmap = makeCloneMap( vMap ),
option_map = vMap._typeofFn_( arg_option_map ) === 'object'
? arg_option_map : {},

@@ -175,7 +198,7 @@ xhi._00_root_ = (function () {
//
function extendSymbolMapFn ( symbol_key, extend_map ) {
var
lookup_map = { nMap : instanceNmap, vMap : instanceVmap },
lookup_map = { _nMap_ : instanceNmap, _vMap_ : instanceVmap },
target_map = lookup_map[ symbol_key ],

extend_key_list, extend_key_count, key_idx, extend_key
@@ -221,19 +244,8 @@ xhi._00_root_ = (function () {
}
// BEGIN public method /makeInstanceFn/

// BEGIN public method /getFn/
function getMapFn() {
var mode_str = this;
if ( mode_str === '_vMap_' ) { return vMap; }
if ( mode_str === '_nMap_' ) { return nMap; }
}
// . END public method /getFn/

// getMapFn gets the default nMap and vMap, not the instance values
return {
_getGlobalObjFn_ : getGlobalObjFn,
_getNmap_ : getMapFn.bind( '_nMap_' ),
_getVmap_ : getMapFn.bind( '_vMap_' ),
_makeInstanceFn_ : makeInstanceFn
};
// == . END PUBLIC METHODS ===========================================

0 comments on commit 665b539

Please sign in to comment.
You can’t perform that action at this time.