diff --git a/components/00_Tools/_laneHandling.styl b/components/00_Tools/_laneHandling.styl deleted file mode 100644 index 6b733e5..0000000 --- a/components/00_Tools/_laneHandling.styl +++ /dev/null @@ -1,149 +0,0 @@ -_lanes = {} -_stacks = {} -_aliases = {} -_last_name = {} - - -_block_type(block_type) - - if block_type == null - block_type = called-from[1] - return block_type - -_reset_last_name(block_type=null) - block_type = _block_type(block_type) - - if block_type in _last_name - remove(_last_name, block_type) - - -_set_last_name(name, block_type=null) - block_type = _block_type(block_type) - - _last_name[block_type] = name - -_get_last_name(block_type) - block_type = _block_type(block_type) - - if block_type in _last_name - return _last_name[block_type] - else - return null - - -_push_onto_stack(block, block_type=null) - block_type = _block_type(block_type) - - if block_type in _stacks - stack = _stacks[block_type] - else - stack = () - - push(stack, block) - _stacks[block_type] = stack - -_pop_from_stack(block_type=null) - block_type = _block_type(block_type) - - if block_type in _stacks - stack = _stacks[block_type] - b = pop(stack) - if length(stack) > 0 - _stacks[block_type] - else - remove(_stacks, block_type) - return b - return null - -_pop_stack(block_type=null) - block_type = _block_type(block_type) - - if block_type in _stacks - stack = _stacks[block_type] - remove(_stacks, block_type) - return stack - else - return () - -_last_element_of_stack(block_type=null) - block_type = _block_type(block_type) - - if block_type in _stacks - stack = _stacks[block_type] - return stack[-1] - else - return null - -_set_lane(lane_name, value, block_type=null) - block_type = _block_type(block_type) - - if block_type in _lanes - lane = _lanes[block_type] - else - lane = {} - - if lane_name in lane - stack = lane[lane_name] - else - stack = () - - push(stack, value) - lane[lane_name] = stack - _lanes[block_type] = lane - -_get_lane(block_type) - block_type = _block_type(block_type) - - if block_type in _lanes - return _lanes[block_type] - else - return {} - - -_put_into_lane(key, value, block_type=null) - block_type = _block_type(block_type) - - if block_type in _lanes - lane = _lanes[block_type] - else - lane = {} - - lane[key] = value - _lanes[block_type] = lane - -_pop_lane(block_type=null) - block_type = _block_type(block_type) - - if block_type in _lanes - lane = _lanes[block_type] - remove(_lanes, block_type) - return lane - else - return {} - -_set_alias(name, alias, block_type=null) - block_type = _block_type(block_type) - - if block_type in _aliases - alias_map = _aliases[block_type] - else - alias_map = {} - - alias_map[name] = alias - _aliases[block_type] = alias_map - -_get_alias(name, block_type=null) - block_type = _block_type(block_type) - - if block_type in _aliases - alias_map = _aliases[block_type] - if name in alias_map - return alias_map[name] - else - return name - else - return name - -_reset_aliases() - for key in keys(_aliases) - remove(_aliases, key) \ No newline at end of file diff --git a/components/01_Layouts/_layouts.styl b/components/01_Layouts/_layouts.styl index f40faca..3c35c29 100644 --- a/components/01_Layouts/_layouts.styl +++ b/components/01_Layouts/_layouts.styl @@ -1,4 +1,3 @@ @import 'flexRow/_flexRow' @import 'flexGrid/_flexGrid' -@import 'fan/_fan' -@import 'alignment/_alignment' \ No newline at end of file +@import 'fan/_fan' \ No newline at end of file diff --git a/components/02_ContentShape/_contentShape.styl b/components/02_ContentShape/_contentShape.styl index 912234f..4c96ea1 100644 --- a/components/02_ContentShape/_contentShape.styl +++ b/components/02_ContentShape/_contentShape.styl @@ -1,4 +1,5 @@ @import 'aspectRatio/_aspectRatio' @import 'focalPoint/_focalPoint' @import 'shape/_shape' -@import 'truncation/_truncation' \ No newline at end of file +@import 'truncation/_truncation' +@import 'alignment/_alignment' \ No newline at end of file diff --git a/components/01_Layouts/alignment/_alignment.styl b/components/02_ContentShape/alignment/_alignment.styl similarity index 100% rename from components/01_Layouts/alignment/_alignment.styl rename to components/02_ContentShape/alignment/_alignment.styl diff --git a/components/01_Layouts/alignment/alignment.config.json b/components/02_ContentShape/alignment/alignment.config.json similarity index 100% rename from components/01_Layouts/alignment/alignment.config.json rename to components/02_ContentShape/alignment/alignment.config.json diff --git a/components/01_Layouts/alignment/alignment.hbs b/components/02_ContentShape/alignment/alignment.hbs similarity index 100% rename from components/01_Layouts/alignment/alignment.hbs rename to components/02_ContentShape/alignment/alignment.hbs