sproutcore 1.4.5 → 1.5.0.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +35 -0
- data/VERSION.yml +2 -2
- data/lib/Buildfile +13 -4
- data/lib/buildtasks/build.rake +20 -17
- data/lib/buildtasks/manifest.rake +143 -78
- data/lib/buildtasks/target.rake +1 -0
- data/lib/doc_templates/sproutcore/index.tmpl +18 -4
- data/lib/doc_templates/sproutcore/publish.js +1 -1
- data/lib/frameworks/sproutcore/Buildfile +24 -13
- data/lib/frameworks/sproutcore/{CHANGELOG-1.4.md → CHANGELOG.md} +0 -0
- data/lib/frameworks/sproutcore/apps/greenhouse/controllers/file.js +8 -48
- data/lib/frameworks/sproutcore/apps/greenhouse/core.js +3 -5
- data/lib/frameworks/sproutcore/apps/greenhouse/data_source.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/app_page.js +26 -4
- data/lib/frameworks/sproutcore/apps/greenhouse/english.lproj/strings.js +7 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/main.js +1 -1
- data/lib/frameworks/sproutcore/apps/greenhouse/models/design.js +6 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/models/dir.js +8 -7
- data/lib/frameworks/sproutcore/apps/greenhouse/models/file.js +2 -2
- data/lib/frameworks/sproutcore/apps/greenhouse/states/inspector.js +133 -125
- data/lib/frameworks/sproutcore/apps/greenhouse/states/library.js +121 -112
- data/lib/frameworks/sproutcore/apps/greenhouse/states/main.js +233 -191
- data/lib/frameworks/sproutcore/apps/greenhouse/states/modals.js +265 -258
- data/lib/frameworks/sproutcore/apps/greenhouse/states/ready.js +153 -141
- data/lib/frameworks/sproutcore/apps/test_controls/Buildfile +0 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/buttons.js +21 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/categories.js +108 -0
- data/lib/frameworks/sproutcore/apps/test_controls/controllers/category.js +36 -0
- data/lib/frameworks/sproutcore/apps/test_controls/core.js +29 -0
- data/lib/frameworks/sproutcore/apps/test_controls/main.js +14 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/buttons_page.js +142 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/checkboxes_page.js +45 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/flow_layout_page.js +84 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/list_page.js +40 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/loading.rhtml +9 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.css +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/main_page.js +144 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/progress_page.js +42 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/radio_page.js +48 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/scroll_page.js +76 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/segmented_page.js +98 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/select_page.js +60 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/sliders_page.js +53 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/strings.js +50 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/tab_page.js +44 -0
- data/lib/frameworks/sproutcore/apps/test_controls/resources/text_field_page.js +41 -0
- data/lib/frameworks/sproutcore/apps/test_controls/theme.js +34 -0
- data/lib/frameworks/sproutcore/apps/welcome/controllers/targets.js +7 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/images/main-bg.png +0 -0
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.css +24 -6
- data/lib/frameworks/sproutcore/apps/welcome/english.lproj/main_page.js +36 -46
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/array.js +175 -195
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/controller.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/controllers/object.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/core.js +201 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/object.js +23 -23
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/ext/run_loop.js +47 -47
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/mixins/delegate_support.js +36 -36
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/responder_context.js +55 -55
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/mixins/selection_support.js +45 -45
- data/lib/frameworks/sproutcore/frameworks/amber/mixins/string.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/main.js +4 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/panes/pane.js +123 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/observable_protocol.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/protocols/sparse_array_delegate.js +40 -40
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/core.css +0 -103
- data/lib/frameworks/sproutcore/frameworks/{foundation/english.lproj → amber/resources}/view.css +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/application.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/browser.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/core_query.js +141 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/cursor.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/device.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/event.js +34 -14
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/page.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/platform.js +30 -10
- data/lib/frameworks/sproutcore/frameworks/amber/system/ready.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/render_context.js +330 -255
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/root_responder.js +152 -60
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/selection_set.js +140 -145
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/system/sparse_array.js +101 -87
- data/lib/frameworks/sproutcore/frameworks/amber/system/theme.js +316 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/system/timer.js +149 -147
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils.js +174 -0
- data/lib/frameworks/sproutcore/frameworks/amber/system/utils/rect.js +98 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/array_case.js +41 -41
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/enum_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/null_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/selection_support.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/array/single_case.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/empty_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/multiple_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/controllers/object/single_enumerable_case.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/mixins/responder_context.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/mixins/string.js +55 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/builder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/core_query/within.js +7 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/json.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/locale.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/begin.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/element.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/end.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/get.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_attr.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_basic.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_className.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/helpers_style.js +11 -3
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/join.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/push_text.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/tag.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/render_context/update.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeKeyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMainPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/makeMenuPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/root_responder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/root_responder/targetForAction.js +46 -9
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/add.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/copy.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/indexSetForSource.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/isEqual.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/selection_set/remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{runtime → amber}/tests/system/sparse_array.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/system/theme.js +77 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invalidate.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/invokeLater.js +7 -5
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/isPaused.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/performAction.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/timer/schedule.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/normalizeURL.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/system/utils/rect.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/main_pane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/append_remove.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/firstResponder.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/keyPane.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/layout.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/pane/sendEvent.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/pane/sendTouchEvent.js +267 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/animation.js +320 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build.js +85 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/build_children.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/clippingFrame.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertFrames.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/convertLayouts.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/createLayer.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/destroyLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/didAppendToDocument.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/findLayerInParentLayer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/init.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/insertBefore.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisible.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/isVisibleInWindow.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layer.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutChildViews.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutDidChange.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/layoutStyle.js +135 -64
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/parentViewDidChange.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/prepareContext.js +16 -8
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/removeChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/render.js +37 -5
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/render_delegate_support.js +163 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/replaceChild.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/theme.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayer.js +12 -10
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/updateLayerLocation.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/tests/views/view/view.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/tests/views/view/viewDidResize.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/base.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/amber/views/layout_style.js +478 -0
- data/lib/frameworks/sproutcore/frameworks/{foundation → amber}/views/view.js +1719 -1029
- data/lib/frameworks/sproutcore/frameworks/animation/core.js +32 -18
- data/lib/frameworks/sproutcore/frameworks/animation/tests/core.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/bench.js +14 -0
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +24 -17
- data/lib/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +1 -13
- data/lib/frameworks/sproutcore/frameworks/bootstrap/tests/system/browser.js +72 -0
- data/lib/frameworks/sproutcore/frameworks/datastore/models/child_record.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +66 -4
- data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +4 -1
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +58 -10
- data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +5 -14
- data/lib/frameworks/sproutcore/frameworks/debug/invoke_once_last_debugging.js +4 -5
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +27 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/english.lproj/segmented.css +5 -8
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +30 -4
- data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +130 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +20 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +9 -27
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +32 -26
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +57 -11
- data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/button.js +78 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/checkbox.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js +24 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/disclosure.js +41 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/helpers/slicing.js +34 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/image_button.js +30 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/master_detail.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/menu.js +47 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/panel.js +28 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/picker.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/progress.js +175 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/radio_group.js +109 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segment.js +70 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/segmented.js +58 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/slider.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/source_list.js +8 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/toolbar.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/well.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/render_delegates/workspace.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +79 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/integration/dialog.js +7 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/ui.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +45 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/button/ui.js +33 -13
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +11 -17
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/image_button/ui.js +25 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/list_item.js +128 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -10
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +35 -15
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +153 -208
- data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +18 -48
- data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +26 -25
- data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +3 -20
- data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +112 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +74 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +388 -309
- data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +257 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +8 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +237 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +181 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +3 -2
- data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +14 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +59 -164
- data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +80 -47
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +84 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +320 -289
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +212 -76
- data/lib/frameworks/sproutcore/frameworks/desktop/views/slider.js +33 -36
- data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +347 -248
- data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +41 -9
- data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +2 -21
- data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +251 -0
- data/lib/frameworks/sproutcore/frameworks/documentation/core.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/default_styles.css +5 -0
- data/lib/frameworks/sproutcore/frameworks/forms/english.lproj/strings.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/edit_mode.js +43 -0
- data/lib/frameworks/sproutcore/frameworks/forms/mixins/emptiness.js +95 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form.js +22 -0
- data/lib/frameworks/sproutcore/frameworks/forms/renderer_delegates/form_row.js +21 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_checkbox_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_label.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_radio_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_row.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/tests/views/form_text_field.js +15 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form.js +280 -0
- data/lib/frameworks/sproutcore/frameworks/forms/views/form_row.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +5 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/core.js +0 -150
- data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/benchmark.css +146 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +2 -14
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/favicon.ico +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/images/sproutcore.png +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/strings.js +0 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +4 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +81 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +144 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +113 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/license.js +24 -26
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +39 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +244 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +68 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/editable.js +8 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/flowed_layout.js +626 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/gestureable.js +214 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editable.js +89 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_editor_delegate.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +25 -33
- data/lib/frameworks/sproutcore/frameworks/foundation/mixins/string.js +57 -209
- data/lib/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +7 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/canvas_image.js +100 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/container.js +18 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/image.js +97 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/label.js +111 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/render_delegates/render_delegate.js +17 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +360 -156
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/system/cookie.js +35 -35
- data/lib/frameworks/sproutcore/frameworks/foundation/system/core_query.js +19 -2012
- data/lib/frameworks/sproutcore/frameworks/foundation/system/exception_handler.js +3 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/gesture.js +363 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/{image_cache.js → image_queue.js} +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/module.js +576 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/request.js +19 -22
- data/lib/frameworks/sproutcore/frameworks/foundation/system/response.js +73 -61
- data/lib/frameworks/sproutcore/frameworks/foundation/system/routes.js +122 -23
- data/lib/frameworks/sproutcore/frameworks/foundation/system/staticqueue.js +53 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/task_queue.js +18 -15
- data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +82 -90
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/colors.js +80 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +76 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/range.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/string_measurement.js +247 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +2 -2
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +2 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +2 -57
- data/lib/frameworks/sproutcore/frameworks/{runtime → foundation}/tests/system/cookie.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/setClass.js +13 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +99 -49
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/routes.js +24 -20
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/methods.js +9 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +31 -6
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +454 -44
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +10 -1
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/{view → text_field}/nextValidKeyView.js +0 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/validators/number.js +1 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +9 -8
- data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/foundation/views/image.js +381 -105
- data/lib/frameworks/sproutcore/frameworks/foundation/views/label.js +44 -171
- data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +69 -16
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffer.js +376 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +205 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-sc.js +7 -0
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +7179 -0
- data/lib/frameworks/sproutcore/frameworks/media/views/audio.js +4 -2
- data/lib/frameworks/sproutcore/frameworks/media/views/controls.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/media/views/simple_controls.js +1 -2
- data/lib/frameworks/sproutcore/frameworks/mini/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +366 -333
- data/lib/frameworks/sproutcore/frameworks/runtime/debug/test_suites/array/rangeObserver.js +73 -73
- data/lib/frameworks/sproutcore/frameworks/runtime/license.js +29 -28
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +160 -150
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/comparable.js +9 -9
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/copyable.js +15 -15
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +228 -220
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/freezable.js +27 -27
- data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +355 -305
- data/lib/frameworks/sproutcore/frameworks/runtime/private/chain_observer.js +32 -32
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_queue.js +53 -51
- data/lib/frameworks/sproutcore/frameworks/runtime/private/observer_set.js +49 -106
- data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +252 -252
- data/lib/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +22 -22
- data/lib/frameworks/sproutcore/frameworks/runtime/system/error.js +31 -31
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +234 -234
- data/lib/frameworks/sproutcore/frameworks/runtime/system/logger.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +167 -157
- data/lib/frameworks/sproutcore/frameworks/runtime/system/range_observer.js +84 -85
- data/lib/frameworks/sproutcore/frameworks/runtime/system/run_loop.js +104 -91
- data/lib/frameworks/sproutcore/frameworks/runtime/system/set.js +102 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +19 -49
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +53 -126
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +62 -33
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable.js +41 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +133 -98
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/observer_set.js +50 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/range_observer/create.js +11 -11
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/set.js +71 -45
- data/lib/frameworks/sproutcore/frameworks/statechart/core.js +3 -9
- data/lib/frameworks/sproutcore/frameworks/statechart/debug/monitor.js +136 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/system/state.js +636 -99
- data/lib/frameworks/sproutcore/frameworks/statechart/system/statechart.js +951 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/async.js +94 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/event_handling/advanced_event_handling.js +310 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/namespace/access_substates.js +252 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/state/is_current_state.js +64 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_history_state.js +88 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_advanced.js +234 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_async.js +123 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_basic.js +139 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/goto_state_intermediate.js +119 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/with_concurrent_states/send_event.js +183 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/default_responder.js +90 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_history_state.js +200 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state.js +256 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/goto_state_async.js +187 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/send_event.js +122 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/state_plugin.js +99 -0
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/without_concurrent_states/transient.js +162 -0
- data/lib/frameworks/sproutcore/frameworks/table/views/table_cell.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_head.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/table/views/table_row.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
- data/lib/frameworks/sproutcore/lib/index.rhtml +24 -1
- data/lib/frameworks/sproutcore/license.js +31 -30
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/dark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/light.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/18px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/ace/44px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_capsule.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/24px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/normal_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_active_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/dark/30px/selected_button_pointer.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/active_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/button/popup/normal_select.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/14px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_checked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/checkbox/ace/16px/checkbox_unchecked_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/collection/source-list/selection.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_closed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/disclosure/ace/disclosure_open_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/checkmark_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/down.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/menu_item.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/menu/up.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/panel/panel.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_empty.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/picker/popover/popover_pointers_notoolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_indeterminate_content.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/progress/ace/progress_view_track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_mixed_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/radio/radio_unselected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/horizontal/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/thumb.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/scroller/vertical/track_and_arrows_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/18px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/24px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/30px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_normal.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/segmented/44px/segmented_selected_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/14px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/16px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/knob_active.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/22px/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/slider/ace/track.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/psds/toolbar/toolbar.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_handle.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_off.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/designs/switch/switch_on.psd +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/body.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/button.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/18px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/button.css +34 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/44px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/ace/button.css +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/button.js +69 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/button.css +84 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_capsule.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/24px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/button.css +66 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/normal_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_active_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/30px/selected_button_pointer.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/dark/button.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/active_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/normal_select.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/button/popup/select.css +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/14px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox.css +40 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_checked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/16px/checkbox_unchecked_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/checkbox/ace/checkbox.css +7 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list.css +4 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +17 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/selection.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source-list.js +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/source-list/source_list_view.css +36 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure.css +24 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_closed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/disclosure/ace/disclosure_open_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/loading.css +50 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/master-detail/master-detail.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/checkmark_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/down.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.css +76 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/menu_item.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/menu/up.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/pane/pane.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.css +13 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.js +20 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/panel/panel.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/ace/picker.js +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/picker.js +32 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.css +111 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.js +12 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_empty.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/popover_pointers_notoolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/picker/popover/workspace.js +28 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_content.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/ace/progress_view_track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/progress/progress.js +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio.css +63 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_mixed_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/radio/radio_unselected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal.css +78 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/horizontal_touch.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/horizontal/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/thumb.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/track_and_arrows_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical.css +80 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/scroller/vertical/vertical_touch.css +92 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/18px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/24px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented.css +91 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/30px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented.css +95 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_normal.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/44px/segmented_selected_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/segmented/segmented.css +79 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/14px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/16px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/knob_active.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/slider.css +27 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/22px/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/slider.js +48 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/slider/ace/track.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +5 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/tab/tab.css +3 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/toolbar/toolbar.png +0 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.css +8 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/well/well.js +19 -0
- data/lib/frameworks/sproutcore/themes/ace/theme.js +14 -0
- data/lib/frameworks/sproutcore/themes/empty_theme/theme.js +16 -0
- data/lib/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +16 -21
- data/lib/sproutcore.rb +9 -2
- data/lib/sproutcore/builders.rb +2 -1
- data/lib/sproutcore/builders/base.rb +7 -2
- data/lib/sproutcore/builders/combine.rb +49 -1
- data/lib/sproutcore/builders/html.rb +2 -0
- data/lib/sproutcore/builders/javascript.rb +1 -1
- data/lib/sproutcore/builders/minify.rb +12 -12
- data/lib/sproutcore/builders/module.rb +72 -0
- data/lib/sproutcore/builders/string_wrapper.rb +43 -0
- data/lib/sproutcore/helpers/entry_sorter.rb +5 -9
- data/lib/sproutcore/helpers/static_helper.rb +13 -9
- data/lib/sproutcore/models/manifest_entry.rb +2 -2
- data/lib/sproutcore/models/target.rb +25 -11
- data/lib/sproutcore/rack/dev.rb +3 -3
- data/lib/sproutcore/tools.rb +51 -2
- data/lib/sproutcore/tools/build.rb +35 -7
- data/lib/sproutcore/version.rb +1 -0
- data/spec/buildtasks/manifest/prepare_build_tasks/bundle_spec.rb +5 -5
- data/spec/fixtures/builder_tests/Buildfile +2 -2
- data/spec/lib/builders/bundle_spec.rb +8 -8
- data/spec/lib/builders/strings_spec.rb +1 -0
- data/sproutcore.gemspec +9 -2
- data/vendor/chance/.gitignore +5 -0
- data/vendor/chance/Gemfile +4 -0
- data/vendor/chance/Rakefile +2 -0
- data/vendor/chance/bin/chance +72 -0
- data/vendor/chance/chance.gemspec +28 -0
- data/vendor/chance/lib/chance.rb +139 -0
- data/vendor/chance/lib/chance/imager.rb +13 -0
- data/vendor/chance/lib/chance/imagers/data_url.rb +34 -0
- data/vendor/chance/lib/chance/importer.rb +64 -0
- data/vendor/chance/lib/chance/instance.rb +225 -0
- data/vendor/chance/lib/chance/parser.rb +831 -0
- data/vendor/chance/lib/chance/perf.rb +17 -0
- data/vendor/chance/lib/chance/sass_extensions.rb +24 -0
- data/vendor/chance/lib/chance/slicing.rb +104 -0
- data/vendor/chance/lib/chance/version.rb +3 -0
- data/vendor/chance/test/case/abc.png +0 -0
- data/vendor/chance/test/case/more/abc.png +0 -0
- data/vendor/chance/test/case/more/another.css +4 -0
- data/vendor/chance/test/case/test1.css +22 -0
- data/vendor/chance/test/case/test2.css +6 -0
- data/vendor/sproutcore/SCCompiler.jar +0 -0
- data/vendor/sproutcore/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor → vendor/sproutcore/lib}/yuicompressor-2.4.2.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/build.xml +74 -0
- data/vendor/sproutcore/src/SCCompiler/lib/args4j-2.0.12.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/htmlcompressor-0.9.3.jar +0 -0
- data/{lib/sproutcore/vendor/yui-compressor/SCyuicompressor-2.4.2.jar → vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.2.jar} +0 -0
- data/vendor/sproutcore/src/SCCompiler/lib/yuicompressor-2.4.4.jar +0 -0
- data/vendor/sproutcore/src/SCCompiler/manifest.mf +3 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/build-impl.xml +894 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/genfiles.properties +8 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/config.properties +0 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.properties +10 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/private/private.xml +4 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.properties +90 -0
- data/vendor/sproutcore/src/SCCompiler/nbproject/project.xml +15 -0
- data/vendor/sproutcore/src/SCCompiler/src/com/sproutcore/Main.java +348 -0
- metadata +686 -177
- data/lib/frameworks/sproutcore/CHANGELOG +0 -93
- data/lib/frameworks/sproutcore/frameworks/datejs/core.js +0 -865
- data/lib/frameworks/sproutcore/frameworks/datejs/english.lproj/en-US.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/extras.js +0 -332
- data/lib/frameworks/sproutcore/frameworks/datejs/license.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/datejs/parser.js +0 -1116
- data/lib/frameworks/sproutcore/frameworks/datejs/spanish.lproj/es-CO.js +0 -186
- data/lib/frameworks/sproutcore/frameworks/datejs/sugarpak.js +0 -475
- data/lib/frameworks/sproutcore/frameworks/datejs/time.js +0 -269
- data/lib/frameworks/sproutcore/frameworks/datejs/validators/datejs.js +0 -34
- data/lib/frameworks/sproutcore/frameworks/foundation/protocols/inline_editor_delegate.js +0 -84
- data/lib/frameworks/sproutcore/frameworks/foundation/system/bundle.js +0 -337
- data/lib/frameworks/sproutcore/frameworks/foundation/system/ready.js +0 -197
- data/lib/frameworks/sproutcore/frameworks/foundation/system/utils.js +0 -710
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +0 -1334
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_dimensions.js +0 -387
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_selector.js +0 -405
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +0 -25
- data/lib/frameworks/sproutcore/frameworks/statechart/mixins/statechart.js +0 -336
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/basic.js +0 -90
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/history.js +0 -71
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/nested.js +0 -59
- data/lib/frameworks/sproutcore/frameworks/statechart/tests/transient.js +0 -148
- data/lib/sproutcore/builders/bundle.rb +0 -63
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'chance/imager'
|
2
|
+
require "base64"
|
3
|
+
|
4
|
+
|
5
|
+
module Chance
|
6
|
+
|
7
|
+
# The DataURL Imager creates CSS with data urls for each slice.
|
8
|
+
class DataURLImager < Chance::Imager
|
9
|
+
|
10
|
+
def css
|
11
|
+
output = ""
|
12
|
+
slices = @slices
|
13
|
+
|
14
|
+
slices.each do |name, slice|
|
15
|
+
# so, the path should be the path in the chance instance
|
16
|
+
output += "." + slice[:css_name] + " { "
|
17
|
+
output += "background: url("
|
18
|
+
output += '"data:image/png;base64,'
|
19
|
+
|
20
|
+
base64Image = Base64.encode64(slice[:image].to_blob(:fast_rgba))
|
21
|
+
|
22
|
+
output += base64Image
|
23
|
+
|
24
|
+
output += '"'
|
25
|
+
output += ");"
|
26
|
+
output += "} \n"
|
27
|
+
end
|
28
|
+
|
29
|
+
return output
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require "sass"
|
2
|
+
|
3
|
+
module Chance
|
4
|
+
|
5
|
+
# Chance creates an in-memory file that @imports all other files. As these
|
6
|
+
# other files are preprocessed _and_ not in a place that Sass knows how to
|
7
|
+
# find, Chance has to have its own importer.
|
8
|
+
class Importer < Sass::Importers::Base
|
9
|
+
|
10
|
+
def initialize(imager)
|
11
|
+
@imager = imager
|
12
|
+
end
|
13
|
+
|
14
|
+
# SCSS's cache tries to serialize this; we can't allow that.
|
15
|
+
def marshal_dump
|
16
|
+
return ""
|
17
|
+
end
|
18
|
+
|
19
|
+
def marshal_load(data)
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
def find_relative(name, base, options)
|
24
|
+
find(name, options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def find(name, options)
|
28
|
+
if name == "chance_images"
|
29
|
+
css = @imager.css
|
30
|
+
name = "_chance_images.scss"
|
31
|
+
else
|
32
|
+
css = Chance.get_file(name[0..-6])
|
33
|
+
|
34
|
+
if css.nil?
|
35
|
+
return nil
|
36
|
+
end
|
37
|
+
|
38
|
+
css = css[:parsed_css]
|
39
|
+
end
|
40
|
+
|
41
|
+
Sass::Engine.new(css, options.merge({
|
42
|
+
:syntax => :scss,
|
43
|
+
:importer => self,
|
44
|
+
:filename => name
|
45
|
+
}))
|
46
|
+
end
|
47
|
+
|
48
|
+
def mtime(name, options)
|
49
|
+
f = Chance.get_file(name[0..-6])
|
50
|
+
return nil if f.nil?
|
51
|
+
|
52
|
+
return f[:mtime]
|
53
|
+
end
|
54
|
+
|
55
|
+
def key(name, options)
|
56
|
+
[self.class.name + ":" + name, File.basename(name)]
|
57
|
+
end
|
58
|
+
|
59
|
+
def to_s
|
60
|
+
"Chance Importer"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
@@ -0,0 +1,225 @@
|
|
1
|
+
require 'set'
|
2
|
+
require 'compass'
|
3
|
+
|
4
|
+
require 'chance/parser'
|
5
|
+
require 'chance/imagers/data_url'
|
6
|
+
require 'chance/sass_extensions'
|
7
|
+
|
8
|
+
require 'chance/perf'
|
9
|
+
require 'chance/slicing'
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
Compass.discover_extensions!
|
14
|
+
Compass.configure_sass_plugin!
|
15
|
+
|
16
|
+
|
17
|
+
module Chance
|
18
|
+
|
19
|
+
class FileNotFoundError < StandardError
|
20
|
+
attr_reader :path
|
21
|
+
def initialize(path)
|
22
|
+
@path = path
|
23
|
+
end
|
24
|
+
def message
|
25
|
+
"File not mapped in Chance instance: #{path}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Chance::Instance represents an instance of the chance processor.
|
30
|
+
# In a SproutCore package, an "instance" would likely be a language folder.
|
31
|
+
#
|
32
|
+
# An instance has a list of files (instance-relative paths mapped
|
33
|
+
# to paths already registered with Chance). This collection of files
|
34
|
+
# should include CSS files, image files, and any other kind of file
|
35
|
+
# needed to generate the output.
|
36
|
+
#
|
37
|
+
# When you call update(), Chance will process everything (or
|
38
|
+
# re-process it) and put the result in its "css" property.
|
39
|
+
class Instance
|
40
|
+
include Slicing
|
41
|
+
|
42
|
+
@@generation = 0
|
43
|
+
|
44
|
+
attr_accessor :css
|
45
|
+
|
46
|
+
def initialize(options = {})
|
47
|
+
@options = options
|
48
|
+
@options[:theme] = "" if @options[:theme].nil?
|
49
|
+
|
50
|
+
if @options[:theme].length > 0 and @options[:theme][0] != "."
|
51
|
+
@options[:theme] = "." + @options[:theme].to_s
|
52
|
+
end
|
53
|
+
|
54
|
+
@files = { }
|
55
|
+
@css = nil
|
56
|
+
end
|
57
|
+
|
58
|
+
# maps a path relative to the instance to a file identifier
|
59
|
+
# registered with chance via Chance::addFile.
|
60
|
+
#
|
61
|
+
# If a Chance instance represents a SproutCore language folder,
|
62
|
+
# the relative path would be the path inside of that folder.
|
63
|
+
# The identifier would be a name of a file that you added to
|
64
|
+
# Chance using add_file.
|
65
|
+
def map_file(path, identifier)
|
66
|
+
path = path.to_s
|
67
|
+
file = Chance.has_file(identifier)
|
68
|
+
|
69
|
+
raise FileNotFoundError.new(path) unless file
|
70
|
+
|
71
|
+
@files[path] = identifier
|
72
|
+
end
|
73
|
+
|
74
|
+
# unmaps a path from its identifier. In short, removes a file
|
75
|
+
# from this Chance instance. The file will remain in Chance's "virtual filesystem".
|
76
|
+
def unmap_file(path)
|
77
|
+
path = path.to_s
|
78
|
+
@files.delete path
|
79
|
+
end
|
80
|
+
|
81
|
+
# Using a path relative to this instance, gets an actual Chance file
|
82
|
+
# hash, with any necessary preprocessing already performed. For instance,
|
83
|
+
# content will have been read, and if it is an image file, will have been
|
84
|
+
# loaded as an actual image.
|
85
|
+
def get_file(path)
|
86
|
+
raise FileNotFoundError.new(path) unless @files[path]
|
87
|
+
|
88
|
+
return Chance.get_file(@files[path])
|
89
|
+
end
|
90
|
+
|
91
|
+
# Generates the output CSS.
|
92
|
+
# This parses the imput files, prepares the images, and runs the CSS
|
93
|
+
# through SCSS. The resulting CSS is saved in the css attribute.
|
94
|
+
def update
|
95
|
+
begin
|
96
|
+
# SCSS code executing needs to know what the current instance of Chance is,
|
97
|
+
# so that lookups for slices, etc. work.
|
98
|
+
Chance._current_instance = self
|
99
|
+
|
100
|
+
# Step 1: preprocess CSS, determining order and parsing the slices out.
|
101
|
+
# The output of this process is a "virtual" file that imports all of the
|
102
|
+
# SCSS files used by this Chance instance. This also sets up the @slices hash.
|
103
|
+
import_css = _preprocess
|
104
|
+
|
105
|
+
# Step 2: Slice images. The sliced canvases are saved in the individual slice
|
106
|
+
# hashes.
|
107
|
+
slice_images
|
108
|
+
|
109
|
+
# Step 3: Generate CSS and images needed for output. For now, we hard-code
|
110
|
+
# data url imager. Later, we will have a spriting imager.
|
111
|
+
@imager = Chance::DataURLImager.new(@slices, self)
|
112
|
+
|
113
|
+
# The main CSS file we pass to the Sass Engine will import the CSS the imager
|
114
|
+
# created, and then all of the individual files (using the import CSS generated
|
115
|
+
# in Step 1)
|
116
|
+
#
|
117
|
+
|
118
|
+
# Importer, if we support it; we'll just keep it off for now.
|
119
|
+
# if Chance::SUPPORTS_IMPORTERS
|
120
|
+
# importer = Importer.new(@imager)
|
121
|
+
# css = "@import 'chance_images';\n" + import_css
|
122
|
+
# cache_store = Sass::CacheStores::Filesystem.new("./tmp/.scss-cache")
|
123
|
+
# else
|
124
|
+
importer = nil
|
125
|
+
css = @imager.css + "\n" + import_css
|
126
|
+
cache_store = nil
|
127
|
+
# end
|
128
|
+
|
129
|
+
# Step 4: Apply Sass Engine
|
130
|
+
engine = Sass::Engine.new(css, Compass.sass_engine_options.merge({
|
131
|
+
:syntax => :scss,
|
132
|
+
:importer => importer,
|
133
|
+
:filename => "chance_main.css",
|
134
|
+
:cache_store => cache_store
|
135
|
+
}))
|
136
|
+
|
137
|
+
css = engine.render
|
138
|
+
ensure
|
139
|
+
Chance._current_instance = nil
|
140
|
+
end
|
141
|
+
|
142
|
+
@css = css
|
143
|
+
end
|
144
|
+
|
145
|
+
# Looks up a slice that has been found by parsing the CSS. This is used by
|
146
|
+
# the Sass extensions that handle writing things like slice offset, etc.
|
147
|
+
def get_slice(name)
|
148
|
+
return @slices[name]
|
149
|
+
end
|
150
|
+
|
151
|
+
private
|
152
|
+
|
153
|
+
#
|
154
|
+
# COMBINING CSS
|
155
|
+
#
|
156
|
+
#
|
157
|
+
# _include_file is the recursive method in the depth-first-search
|
158
|
+
# that creates the ordered list of files.
|
159
|
+
#
|
160
|
+
# To determine if a file is already included, we use the class variable
|
161
|
+
# "generation", which we increment each pass.
|
162
|
+
#
|
163
|
+
# The list is created in the variable @file_list.
|
164
|
+
#
|
165
|
+
def _include_file(file)
|
166
|
+
return if not file =~ /\.css$/
|
167
|
+
|
168
|
+
file = Chance.get_file(file)
|
169
|
+
|
170
|
+
return if file.nil?
|
171
|
+
return if file[:included] === @@generation
|
172
|
+
|
173
|
+
requires = file[:requires]
|
174
|
+
requires.each {|r| _include_file(@files[r]) } unless requires.nil?
|
175
|
+
|
176
|
+
file[:included] = @@generation
|
177
|
+
|
178
|
+
@file_list.push(file)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Determines the order of the files, parses them using the Chance parser,
|
182
|
+
# and returns a file with an SCSS @import directive for each file.
|
183
|
+
def _preprocess
|
184
|
+
@slices = {}
|
185
|
+
@options[:slices] = @slices
|
186
|
+
|
187
|
+
@@generation = @@generation + 1
|
188
|
+
files = @files.values
|
189
|
+
@file_list = []
|
190
|
+
|
191
|
+
files.each {|f| _include_file(f) }
|
192
|
+
|
193
|
+
@file_list.map {|file|
|
194
|
+
# The parser accepts single files that contain many files. As such,
|
195
|
+
# its method of determing the current file name is a marker in the
|
196
|
+
# file. We may want to consider changing this to a parser option
|
197
|
+
# now that we don't need this feature so much, but this works for now.
|
198
|
+
content = "@_chance_file " + @files.invert[file[:path]] + ";\n"
|
199
|
+
content += "$theme: '" + @options[:theme] + "';"
|
200
|
+
content += file[:content]
|
201
|
+
|
202
|
+
parser = Chance::Parser.new(content, @options)
|
203
|
+
parser.parse
|
204
|
+
file[:parsed_css] = parser.css
|
205
|
+
|
206
|
+
# NO IMPORTERS FOR NOW
|
207
|
+
#if Chance::SUPPORTS_IMPORTERS
|
208
|
+
# css = "@import \"" + file [:path] + ".scss\";"
|
209
|
+
#else
|
210
|
+
tmp_path = "./tmp/chance/" + file[:path] + ".scss"
|
211
|
+
FileUtils.mkdir_p(File.dirname(tmp_path))
|
212
|
+
|
213
|
+
f = File.new(tmp_path, "w")
|
214
|
+
f.write(parser.css)
|
215
|
+
f.close
|
216
|
+
|
217
|
+
css = "@import \"" + tmp_path + "\";"
|
218
|
+
# end
|
219
|
+
|
220
|
+
css
|
221
|
+
}.join("\n")
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,831 @@
|
|
1
|
+
# THE PARSER
|
2
|
+
#
|
3
|
+
# The parser will not bother splitting into tokens. We are _a_
|
4
|
+
# step up from Regular Expressions, not a thousand steps.
|
5
|
+
#
|
6
|
+
# In short, we keep track of two things: { } and strings.
|
7
|
+
#
|
8
|
+
# Other than that, we look for @theme, slices(), and slice(),
|
9
|
+
# in their various forms.
|
10
|
+
#
|
11
|
+
# Our method is to scan until we hit a delimiter followed by any
|
12
|
+
# of the following:
|
13
|
+
#
|
14
|
+
# - @theme
|
15
|
+
# - @include slices(
|
16
|
+
# - slices(
|
17
|
+
# - slice(
|
18
|
+
#
|
19
|
+
# Options
|
20
|
+
# --------------------------------
|
21
|
+
# You may pass a few configuration options to a Chance instance:
|
22
|
+
#
|
23
|
+
# - :theme: a selector that will make up the initial value of the $theme
|
24
|
+
# variable. For example: :theme => "ace.test-controls"
|
25
|
+
#
|
26
|
+
# - :compress: if true, the slice names in the CSS will be shortened.
|
27
|
+
# This has two drawbacks: 1) the slice names will not be helpful for
|
28
|
+
# debugging, and 2) if using Chance in a standalone way and committing
|
29
|
+
# the output to a source control system, the output can change dramatically
|
30
|
+
# between runs, even if the input CSS is unchanged.
|
31
|
+
#
|
32
|
+
# As the most common use of Chance is as part of the SC build tools,
|
33
|
+
# and this debugging support is usually only required to debug Chance
|
34
|
+
# itself, :compress defaults to true
|
35
|
+
#
|
36
|
+
# How Slice & Slices work
|
37
|
+
# -------------------------------
|
38
|
+
# @include slice() and @include slices() are not actually responsible
|
39
|
+
# for slicing the image. They do not know the image's with or height.
|
40
|
+
#
|
41
|
+
# All that they do is determine the slice's configuration, including
|
42
|
+
# its file name, the rectangle to slice, etc.
|
43
|
+
require "json"
|
44
|
+
require "set"
|
45
|
+
require "stringio"
|
46
|
+
require "pathname"
|
47
|
+
|
48
|
+
module Chance
|
49
|
+
|
50
|
+
class Parser
|
51
|
+
attr_reader :slices, :css
|
52
|
+
|
53
|
+
UNTIL_SINGLE_QUOTE = /(?!\\)'/
|
54
|
+
UNTIL_DOUBLE_QUOTE = /(?!\\)"/
|
55
|
+
|
56
|
+
BEGIN_SCOPE = /\{/
|
57
|
+
END_SCOPE = /\}/
|
58
|
+
THEME_DIRECTIVE = /@theme\s*/
|
59
|
+
SELECTOR_THEME_VARIABLE = /\$theme\./
|
60
|
+
INCLUDE_SLICES_DIRECTIVE = /@include\s+slices\s*/
|
61
|
+
INCLUDE_SLICE_DIRECTIVE = /@include\s+slice\s*/
|
62
|
+
CHANCE_FILE_DIRECTIVE = /@_chance_file /
|
63
|
+
NORMAL_SCAN_UNTIL = /[^{}@$]+/
|
64
|
+
|
65
|
+
@@uid = 0
|
66
|
+
|
67
|
+
def initialize(string, opts = {})
|
68
|
+
@opts = { :theme => "", :compress => true }
|
69
|
+
@opts.merge!(opts)
|
70
|
+
@path = ""
|
71
|
+
|
72
|
+
|
73
|
+
@input = string
|
74
|
+
@css = ""
|
75
|
+
|
76
|
+
@slices = @opts[:slices] # we update the slices given to us
|
77
|
+
|
78
|
+
@theme = @opts[:theme]
|
79
|
+
|
80
|
+
@@uid += 1
|
81
|
+
@uid = @@uid
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
# SLICE MANAGEMENT
|
86
|
+
# -----------------------
|
87
|
+
def create_slice(opts)
|
88
|
+
filename = opts[:filename]
|
89
|
+
|
90
|
+
# get current relative path
|
91
|
+
relative = File.dirname(@path)
|
92
|
+
|
93
|
+
# Create a path
|
94
|
+
path = File.join(relative, filename)
|
95
|
+
path = path[2..-1] if path[0,2] == "./"
|
96
|
+
path = Pathname.new(path).cleanpath.to_s
|
97
|
+
|
98
|
+
opts = opts.merge({ :path => path })
|
99
|
+
opts = normalize_rectangle(opts)
|
100
|
+
|
101
|
+
slice_path = path[0..-File.extname(filename).length-1]
|
102
|
+
|
103
|
+
# we add a bit to the path: the slice info
|
104
|
+
rect_params = [:left, :top, :width, :height, :bottom, :right, :offset_x, :offset_y]
|
105
|
+
|
106
|
+
# Generate string-compatible params
|
107
|
+
slice_name_params = rect_params.map {|param|
|
108
|
+
ret = ""
|
109
|
+
ret = opts[param] if not opts[param].nil?
|
110
|
+
ret
|
111
|
+
}
|
112
|
+
slice_name_params.unshift slice_path
|
113
|
+
|
114
|
+
# validate and convert to integers
|
115
|
+
rect_params.each {|param|
|
116
|
+
value = opts[param]
|
117
|
+
if not value.nil?
|
118
|
+
value = Integer(value)
|
119
|
+
opts[param] = value
|
120
|
+
end
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
# it is too expensive to open the images and get their sizes at this point, though
|
126
|
+
# I rather would like to.transform the rectangle into absolute coordinates
|
127
|
+
# (left top width height) and use that instead of showing all six digits.
|
128
|
+
slice_path = "%s_%s_%s_%s_%s_%s_%s" % slice_name_params
|
129
|
+
|
130
|
+
if @slices.has_key?(slice_path)
|
131
|
+
slice = @slices[slice_path]
|
132
|
+
slice[:min_offset_x] = [slice[:min_offset_x], opts[:offset_x]].min
|
133
|
+
slice[:min_offset_y] = [slice[:min_offset_y], opts[:offset_y]].min
|
134
|
+
|
135
|
+
slice[:max_offset_x] = [slice[:max_offset_x], opts[:offset_x]].max
|
136
|
+
slice[:max_offset_y] = [slice[:max_offset_y], opts[:offset_y]].max
|
137
|
+
else
|
138
|
+
parts = slice_path.split("/")
|
139
|
+
css_name = "__slice_" + parts.join("_")
|
140
|
+
|
141
|
+
if @opts[:compress]
|
142
|
+
css_name = "__s" + @uid.to_s + "_" + @slices.length.to_s
|
143
|
+
end
|
144
|
+
|
145
|
+
slice = opts.merge({
|
146
|
+
:name => slice_path,
|
147
|
+
:path => path,
|
148
|
+
:css_name => css_name,
|
149
|
+
:min_offset_x => opts[:offset_x], # these will be taken into account when spriting.
|
150
|
+
:min_offset_y => opts[:offset_y],
|
151
|
+
:max_offset_x => opts[:offset_x],
|
152
|
+
:max_offset_y => opts[:offset_y],
|
153
|
+
:imaged_offset_x => 0, # the imaging process will re-define these.
|
154
|
+
:imaged_offset_y => 0
|
155
|
+
})
|
156
|
+
|
157
|
+
@slices[slice_path] = slice
|
158
|
+
end
|
159
|
+
|
160
|
+
return slice
|
161
|
+
end
|
162
|
+
|
163
|
+
def normalize_rectangle(rect)
|
164
|
+
# try to make the rectangle somewhat standard: that is, make it have
|
165
|
+
# all units which make sense
|
166
|
+
|
167
|
+
# it must have either a left or a right, no matter what
|
168
|
+
rect[:left] = 0 if rect[:left].nil? and rect[:right].nil?
|
169
|
+
|
170
|
+
# if there is no width, it must have a both left and right
|
171
|
+
if rect[:width].nil?
|
172
|
+
rect[:left] = 0 if rect[:left].nil?
|
173
|
+
rect[:right] = 0 if rect[:right].nil?
|
174
|
+
end
|
175
|
+
|
176
|
+
# it must have either a top or a bottom, no matter what
|
177
|
+
rect[:top] = 0 if rect[:top].nil? and rect[:bottom].nil?
|
178
|
+
|
179
|
+
# if there is no height, it must have _both_ top and bottom
|
180
|
+
if rect[:height].nil?
|
181
|
+
rect[:top] = 0 if rect[:top].nil?
|
182
|
+
rect[:bottom] = 0 if rect[:bottom].nil?
|
183
|
+
end
|
184
|
+
|
185
|
+
return rect
|
186
|
+
end
|
187
|
+
|
188
|
+
# PARSING
|
189
|
+
# -----------------------
|
190
|
+
def parse
|
191
|
+
@scanner = StringScanner.new(@input)
|
192
|
+
|
193
|
+
@image_names = {}
|
194
|
+
@css = _parse
|
195
|
+
|
196
|
+
if not @scanner.eos?
|
197
|
+
# how do we do an error?
|
198
|
+
raise SyntaxError, "Found end of block; expecting end of file."
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
|
203
|
+
# _parse will parse until it finds either the end or until it finds
|
204
|
+
# an unmatched ending brace. An unmatched ending brace is assumed
|
205
|
+
# to mean that this is a recursive call.
|
206
|
+
def _parse
|
207
|
+
scanner = @scanner
|
208
|
+
|
209
|
+
output = []
|
210
|
+
|
211
|
+
while not scanner.eos? do
|
212
|
+
output << handle_empty
|
213
|
+
break if scanner.eos?
|
214
|
+
|
215
|
+
if scanner.match?(BEGIN_SCOPE)
|
216
|
+
output << handle_scope
|
217
|
+
next
|
218
|
+
end
|
219
|
+
|
220
|
+
if scanner.match?(THEME_DIRECTIVE)
|
221
|
+
output << handle_theme
|
222
|
+
next
|
223
|
+
end
|
224
|
+
|
225
|
+
if scanner.match?(SELECTOR_THEME_VARIABLE)
|
226
|
+
output << handle_theme_variable
|
227
|
+
next
|
228
|
+
end
|
229
|
+
|
230
|
+
if scanner.match?(INCLUDE_SLICES_DIRECTIVE)
|
231
|
+
output << handle_slices
|
232
|
+
next
|
233
|
+
end
|
234
|
+
|
235
|
+
if scanner.match?(INCLUDE_SLICE_DIRECTIVE)
|
236
|
+
output << handle_slice_include
|
237
|
+
next
|
238
|
+
end
|
239
|
+
|
240
|
+
if scanner.match?(CHANCE_FILE_DIRECTIVE)
|
241
|
+
handle_file_change
|
242
|
+
next
|
243
|
+
end
|
244
|
+
|
245
|
+
break if scanner.match?(END_SCOPE)
|
246
|
+
|
247
|
+
# skip over anything that our tokens do not start with
|
248
|
+
res = scanner.scan(NORMAL_SCAN_UNTIL)
|
249
|
+
if res.nil?
|
250
|
+
output << scanner.getch
|
251
|
+
else
|
252
|
+
output << res
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
output = output.join
|
258
|
+
return output
|
259
|
+
end
|
260
|
+
|
261
|
+
def handle_comment
|
262
|
+
scanner = @scanner
|
263
|
+
scanner.pos += 2
|
264
|
+
scanner.scan_until /\*\//
|
265
|
+
end
|
266
|
+
|
267
|
+
def parse_string(cssString)
|
268
|
+
# I cheat: to parse strings, I use JSON.
|
269
|
+
# This will fail with strings quoted with "'", so I'm
|
270
|
+
# just not bothering for now. At some point, I should either make
|
271
|
+
# this function more proper or use some other function...
|
272
|
+
if not cssString[0..0] == '"'
|
273
|
+
return cssString
|
274
|
+
end
|
275
|
+
|
276
|
+
return JSON.parse("[" + cssString + "]").first
|
277
|
+
end
|
278
|
+
|
279
|
+
def handle_string
|
280
|
+
scanner = @scanner
|
281
|
+
|
282
|
+
str = scanner.getch
|
283
|
+
str += scanner.scan_until(str == "'" ? UNTIL_SINGLE_QUOTE : UNTIL_DOUBLE_QUOTE)
|
284
|
+
|
285
|
+
return str
|
286
|
+
end
|
287
|
+
|
288
|
+
def handle_empty
|
289
|
+
scanner = @scanner
|
290
|
+
output = ""
|
291
|
+
|
292
|
+
while true do
|
293
|
+
if scanner.match?(/\s+/)
|
294
|
+
output += scanner.scan /\s+/
|
295
|
+
next
|
296
|
+
end
|
297
|
+
if scanner.match?(/\/\*/)
|
298
|
+
handle_comment
|
299
|
+
next
|
300
|
+
end
|
301
|
+
break
|
302
|
+
end
|
303
|
+
|
304
|
+
return output
|
305
|
+
end
|
306
|
+
|
307
|
+
def handle_scope
|
308
|
+
scanner = @scanner
|
309
|
+
|
310
|
+
scanner.scan /\{/
|
311
|
+
|
312
|
+
output = '{'
|
313
|
+
output += _parse
|
314
|
+
output += '}'
|
315
|
+
|
316
|
+
raise SyntaxError, "Expected end of block." unless scanner.scan /\}/
|
317
|
+
|
318
|
+
return output
|
319
|
+
end
|
320
|
+
|
321
|
+
def handle_theme
|
322
|
+
scanner = @scanner
|
323
|
+
scanner.scan THEME_DIRECTIVE
|
324
|
+
|
325
|
+
if scanner.scan(/\((.+?)\)\s*/).nil?
|
326
|
+
raise SyntaxError, "Expected (theme-name) after @theme"
|
327
|
+
end
|
328
|
+
|
329
|
+
theme_name = scanner[1]
|
330
|
+
|
331
|
+
raise SyntaxError, "Expected { after @theme." unless scanner.scan /\{/
|
332
|
+
|
333
|
+
# calculate new theme name
|
334
|
+
old_theme = @theme
|
335
|
+
@theme = old_theme + "." + theme_name
|
336
|
+
|
337
|
+
|
338
|
+
output = ""
|
339
|
+
output += "\n$theme: '" + @theme + "';\n"
|
340
|
+
output += _parse
|
341
|
+
|
342
|
+
@theme = old_theme
|
343
|
+
output += "$theme: '" + @theme + "';\n"
|
344
|
+
|
345
|
+
raise SyntaxError, "Expected end of block." unless scanner.scan /\}/
|
346
|
+
|
347
|
+
return output
|
348
|
+
end
|
349
|
+
|
350
|
+
def handle_theme_variable
|
351
|
+
scanner = @scanner
|
352
|
+
scanner.scan SELECTOR_THEME_VARIABLE
|
353
|
+
|
354
|
+
output = "\#{$theme}."
|
355
|
+
|
356
|
+
return output
|
357
|
+
end
|
358
|
+
|
359
|
+
# when we receive a @_chance_file directive, it means that our current file
|
360
|
+
# scope has changed. We need to know this because we parse the combined file
|
361
|
+
# rather than the individual pieces, yet we have paths relative to the original
|
362
|
+
# files.
|
363
|
+
def handle_file_change
|
364
|
+
scanner = @scanner
|
365
|
+
scanner.scan CHANCE_FILE_DIRECTIVE
|
366
|
+
|
367
|
+
path = scanner.scan_until /;/
|
368
|
+
path = path[0..-1]
|
369
|
+
|
370
|
+
@path = path
|
371
|
+
end
|
372
|
+
|
373
|
+
def parse_argument
|
374
|
+
scanner = @scanner
|
375
|
+
|
376
|
+
# We do not care for whitespace or comments
|
377
|
+
handle_empty
|
378
|
+
|
379
|
+
# this is the final value; we won't actually set it until
|
380
|
+
# the very end.
|
381
|
+
value = nil
|
382
|
+
|
383
|
+
# this holds the value as we are parsing it
|
384
|
+
parsing_value = ""
|
385
|
+
|
386
|
+
|
387
|
+
# The key MAY be present if we are starting with a $.
|
388
|
+
# But remember: it could be $abc: $abc + $def
|
389
|
+
key = :NO_KEY
|
390
|
+
if scanner.match?(/\$/)
|
391
|
+
scanner.scan /\$/
|
392
|
+
|
393
|
+
handle_empty
|
394
|
+
parsing_value = scanner.scan(/[a-zA-Z_-][a-zA-Z0-9+_-]*/)
|
395
|
+
|
396
|
+
raise SyntaxError, "Expected a valid key." if key.nil?
|
397
|
+
|
398
|
+
handle_empty
|
399
|
+
|
400
|
+
if scanner.scan(/:/)
|
401
|
+
# ok, it was a key
|
402
|
+
key = parsing_value.intern
|
403
|
+
parsing_value = ""
|
404
|
+
|
405
|
+
handle_empty
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
value = nil
|
410
|
+
|
411
|
+
# we stop when we either a) reach the end of the arglist, or
|
412
|
+
# b) reach the end of the argument. Argument ends at ',', list ends
|
413
|
+
# at ')'
|
414
|
+
parsing_value += handle_empty
|
415
|
+
|
416
|
+
until scanner.match?(/[,)]/) or scanner.eos? do
|
417
|
+
if scanner.match?(/["']/)
|
418
|
+
parsing_value += handle_string
|
419
|
+
parsing_value += handle_empty
|
420
|
+
next
|
421
|
+
end
|
422
|
+
|
423
|
+
parsing_value += scanner.getch
|
424
|
+
|
425
|
+
parsing_value += handle_empty
|
426
|
+
end
|
427
|
+
|
428
|
+
value = parsing_value unless parsing_value.empty?
|
429
|
+
|
430
|
+
return { :key => key, :value => value }
|
431
|
+
end
|
432
|
+
|
433
|
+
# Parses a list of arguemnts, INCLUDING beginning AND ending
|
434
|
+
# parenthesis.
|
435
|
+
def parse_argument_list
|
436
|
+
scanner = @scanner
|
437
|
+
|
438
|
+
raise SyntaxError, "Expected ( to begin argument list." unless scanner.scan /\(/
|
439
|
+
|
440
|
+
idx = 0
|
441
|
+
args = {}
|
442
|
+
until scanner.match?(/\)/) or scanner.eos? do
|
443
|
+
arg = parse_argument
|
444
|
+
if arg[:key] == :NO_KEY
|
445
|
+
arg[:key] = idx
|
446
|
+
idx += 1
|
447
|
+
end
|
448
|
+
|
449
|
+
args[arg[:key]] = arg[:value].strip
|
450
|
+
|
451
|
+
scanner.scan /,/
|
452
|
+
end
|
453
|
+
|
454
|
+
scanner.scan /\)/
|
455
|
+
|
456
|
+
return args
|
457
|
+
end
|
458
|
+
|
459
|
+
def generate_slice_include(slice)
|
460
|
+
# the argument list is rather raw. We need to combine it with default values,
|
461
|
+
# and preprocess any arguments, before we can call create_slice to get the real
|
462
|
+
# slice definition
|
463
|
+
slice[:offset] = "0 0" if slice[:offset].nil?
|
464
|
+
slice[:repeat] = "none" if slice[:repeat].nil?
|
465
|
+
|
466
|
+
# the offset will be given to us as one string; however, it has two parts.
|
467
|
+
# splitting by whitespace doesn't handle everything, so we may want to refine
|
468
|
+
# this at some point unless we could just pass the whole offset to the offset
|
469
|
+
# function somehow.
|
470
|
+
offset = slice[:offset].strip.split(/\s+/)
|
471
|
+
slice[:offset_x] = offset[0]
|
472
|
+
slice[:offset_y] = offset[1]
|
473
|
+
|
474
|
+
slice = create_slice(slice)
|
475
|
+
|
476
|
+
|
477
|
+
output = ""
|
478
|
+
output += "@extend ." + slice[:css_name] + ";\n"
|
479
|
+
output += "background-position: "
|
480
|
+
output += "_slice_offset_x(" + slice[:name].dump + ", " + slice[:offset_x].to_s + ") "
|
481
|
+
output += "_slice_offset_y(" + slice[:name].dump + ", " + slice[:offset_y].to_s + ");"
|
482
|
+
output += "background-repeat: " + slice[:repeat]
|
483
|
+
return output
|
484
|
+
end
|
485
|
+
|
486
|
+
def handle_slice_include
|
487
|
+
scanner = @scanner
|
488
|
+
scanner.scan /@include slice\s*/
|
489
|
+
|
490
|
+
slice = parse_argument_list
|
491
|
+
|
492
|
+
# the image could be quoted or not; in any case, use parse_string to
|
493
|
+
# parse it. Sure, at the moment, we don't parse quoted strings properly,
|
494
|
+
# but it should work for most cases. single-quoted strings are out, though...
|
495
|
+
slice[:filename] = parse_string(slice[0])
|
496
|
+
|
497
|
+
# now that we have all of the info, we can get the actual slice information.
|
498
|
+
# This process will create a slice entry if needed.
|
499
|
+
return generate_slice_include(slice)
|
500
|
+
end
|
501
|
+
|
502
|
+
def should_include_slice?(slice)
|
503
|
+
return true if slice[:width].nil?
|
504
|
+
return true if slice[:height].nil?
|
505
|
+
|
506
|
+
return false if slice[:width] == 0
|
507
|
+
return false if slice[:height] == 0
|
508
|
+
|
509
|
+
return true
|
510
|
+
end
|
511
|
+
|
512
|
+
def slice_layout(slice)
|
513
|
+
output = ""
|
514
|
+
|
515
|
+
layout_properties = [:left, :top, :right, :bottom]
|
516
|
+
|
517
|
+
if not slice[:repeat].nil?
|
518
|
+
output += "background-repeat: " + slice[:repeat] + "; \n"
|
519
|
+
end
|
520
|
+
|
521
|
+
if slice[:right].nil? or slice[:left].nil?
|
522
|
+
layout_properties.push(:width)
|
523
|
+
end
|
524
|
+
|
525
|
+
if slice[:bottom].nil? or slice[:top].nil?
|
526
|
+
layout_properties.push(:height)
|
527
|
+
end
|
528
|
+
|
529
|
+
layout_properties.each {|prop|
|
530
|
+
unless slice[prop].nil?
|
531
|
+
output += prop.to_s + ": " + slice[prop].to_s + "px; \n"
|
532
|
+
end
|
533
|
+
}
|
534
|
+
|
535
|
+
return output
|
536
|
+
end
|
537
|
+
|
538
|
+
def handle_slices
|
539
|
+
scanner = @scanner
|
540
|
+
scanner.scan /@include slices\s*/
|
541
|
+
|
542
|
+
arguments = parse_argument_list
|
543
|
+
|
544
|
+
# slices() only supports four-param, left top right bottom rectangles.
|
545
|
+
[:top, :left, :bottom, :right].each {|key|
|
546
|
+
arguments[key] = Integer(arguments[key]) if not arguments[key].nil?
|
547
|
+
arguments[key] = 0 if arguments[key].nil?
|
548
|
+
}
|
549
|
+
|
550
|
+
values = arguments.values
|
551
|
+
|
552
|
+
left = arguments[:left]
|
553
|
+
top = arguments[:top]
|
554
|
+
right = arguments[:right]
|
555
|
+
bottom = arguments[:bottom]
|
556
|
+
|
557
|
+
# determine fill method
|
558
|
+
fill = arguments[:fill] || "1 0"
|
559
|
+
fill = fill.strip.split(/\s+/)
|
560
|
+
fill_width = Integer(fill[0])
|
561
|
+
fill_height = Integer(fill[1])
|
562
|
+
|
563
|
+
skip_top_left = values.include? 'skip-top-left'
|
564
|
+
skip_top = values.include? 'skip-top'
|
565
|
+
skip_top_right = values.include? 'skip-top-right'
|
566
|
+
|
567
|
+
skip_left = values.include? 'skip-left'
|
568
|
+
skip_middle = values.include? 'skip-middle'
|
569
|
+
skip_right = values.include? 'skip-right'
|
570
|
+
|
571
|
+
skip_bottom_left = values.include? 'skip-bottom-left'
|
572
|
+
skip_bottom = values.include? 'skip-bottom'
|
573
|
+
skip_bottom_right = values.include? 'skip-bottom-right'
|
574
|
+
|
575
|
+
filename = parse_string(arguments[0])
|
576
|
+
|
577
|
+
# we are going to form 9 slices. If any are empty we'll skip them
|
578
|
+
|
579
|
+
# top-left
|
580
|
+
top_left_slice = {
|
581
|
+
:left => 0,
|
582
|
+
:top => 0,
|
583
|
+
:width => left,
|
584
|
+
:height => top,
|
585
|
+
:sprite_anchor => arguments[:"top-left-anchor"],
|
586
|
+
:sprite_padding => arguments[:"top-left-padding"],
|
587
|
+
:offset => arguments[:"top-left-offset"],
|
588
|
+
:filename => filename
|
589
|
+
}
|
590
|
+
|
591
|
+
left_slice = {
|
592
|
+
:left => 0,
|
593
|
+
:top => top,
|
594
|
+
:width => left,
|
595
|
+
|
596
|
+
:sprite_anchor => arguments[:"left-anchor"],
|
597
|
+
:sprite_padding => arguments[:"left-padding"],
|
598
|
+
:offset => arguments[:"left-offset"],
|
599
|
+
:filename => filename,
|
600
|
+
:repeat => fill_height == 0 ? nil : "repeat-y"
|
601
|
+
|
602
|
+
|
603
|
+
# we fill in either height or bottom, depending on fill
|
604
|
+
}
|
605
|
+
|
606
|
+
bottom_left_slice = {
|
607
|
+
:left => 0,
|
608
|
+
:bottom => 0,
|
609
|
+
:width => left,
|
610
|
+
:height => bottom,
|
611
|
+
|
612
|
+
:sprite_anchor => arguments[:"bottom-left-anchor"],
|
613
|
+
:sprite_padding => arguments[:"bottom-left-padding"],
|
614
|
+
:offset => arguments[:"bottom-left-offset"],
|
615
|
+
:filename => filename
|
616
|
+
|
617
|
+
|
618
|
+
}
|
619
|
+
|
620
|
+
top_slice = {
|
621
|
+
:left => left,
|
622
|
+
:top => 0,
|
623
|
+
:height => top,
|
624
|
+
|
625
|
+
:sprite_anchor => arguments[:"top-anchor"],
|
626
|
+
:sprite_padding => arguments[:"top-padding"],
|
627
|
+
:offset => arguments[:"top-offset"],
|
628
|
+
:filename => filename,
|
629
|
+
:repeat => fill_width == 0 ? nil : "repeat-x"
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
# we fill in either width or right, depending on fill
|
634
|
+
}
|
635
|
+
|
636
|
+
middle_slice = {
|
637
|
+
:left => left,
|
638
|
+
:top => top,
|
639
|
+
|
640
|
+
:sprite_anchor => arguments[:"middle-anchor"],
|
641
|
+
:sprite_padding => arguments[:"middle-padding"],
|
642
|
+
:offset => arguments[:"middle-offset"],
|
643
|
+
:filename => filename,
|
644
|
+
:repeat => fill_height != 0 ? (fill_width != 0 ? "repeat-both" : "repeat-y") : (fill_width != 0 ? "repeat-x" : nil)
|
645
|
+
|
646
|
+
|
647
|
+
# fill in width, height or right, bottom depending on fill settings
|
648
|
+
}
|
649
|
+
|
650
|
+
bottom_slice = {
|
651
|
+
:left => left,
|
652
|
+
:bottom => 0,
|
653
|
+
:height => bottom,
|
654
|
+
|
655
|
+
:sprite_anchor => arguments[:"bottom-anchor"],
|
656
|
+
:sprite_padding => arguments[:"bottom-padding"],
|
657
|
+
:offset => arguments[:"bottom-offset"],
|
658
|
+
:filename => filename,
|
659
|
+
:repeat => fill_width == 0 ? nil : "repeat-x"
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
# we fill in width or right depending on fill settings
|
664
|
+
}
|
665
|
+
|
666
|
+
top_right_slice = {
|
667
|
+
:right => 0,
|
668
|
+
:top => 0,
|
669
|
+
:width => right,
|
670
|
+
:height => top,
|
671
|
+
|
672
|
+
:sprite_anchor => arguments[:"top-right-anchor"],
|
673
|
+
:sprite_padding => arguments[:"top-right-padding"],
|
674
|
+
:offset => arguments[:"top-right-offset"],
|
675
|
+
:filename => filename
|
676
|
+
|
677
|
+
|
678
|
+
}
|
679
|
+
|
680
|
+
right_slice = {
|
681
|
+
:right => 0,
|
682
|
+
:top => top,
|
683
|
+
:width => right,
|
684
|
+
|
685
|
+
:sprite_anchor => arguments[:"right-anchor"],
|
686
|
+
:sprite_padding => arguments[:"right-padding"],
|
687
|
+
:offset => arguments[:"right-offset"],
|
688
|
+
:filename => filename,
|
689
|
+
|
690
|
+
:repeat => fill_height == 0 ? nil : "repeat-y"
|
691
|
+
|
692
|
+
|
693
|
+
# we fill in either height or top depending on fill settings
|
694
|
+
}
|
695
|
+
|
696
|
+
bottom_right_slice = {
|
697
|
+
:right => 0,
|
698
|
+
:bottom => 0,
|
699
|
+
:width => right,
|
700
|
+
:height => bottom,
|
701
|
+
|
702
|
+
:sprite_anchor => arguments[:"bottom-right-anchor"],
|
703
|
+
:sprite_padding => arguments[:"bottom-right-padding"],
|
704
|
+
:offset => arguments[:"bottom-right-offset"],
|
705
|
+
:filename => filename
|
706
|
+
|
707
|
+
|
708
|
+
}
|
709
|
+
|
710
|
+
if fill_width == 0
|
711
|
+
top_slice[:right] = right
|
712
|
+
middle_slice[:right] = right
|
713
|
+
bottom_slice[:right] = right
|
714
|
+
else
|
715
|
+
top_slice[:width] = fill_width
|
716
|
+
middle_slice[:width] = fill_width
|
717
|
+
bottom_slice[:width] = fill_width
|
718
|
+
end
|
719
|
+
|
720
|
+
if fill_height == 0
|
721
|
+
left_slice[:bottom] = bottom
|
722
|
+
middle_slice[:bottom] = bottom
|
723
|
+
right_slice[:bottom] = bottom
|
724
|
+
else
|
725
|
+
left_slice[:height] = fill_height
|
726
|
+
middle_slice[:height] = fill_height
|
727
|
+
right_slice[:height] = fill_height
|
728
|
+
end
|
729
|
+
|
730
|
+
output = ""
|
731
|
+
|
732
|
+
# LEFT
|
733
|
+
if should_include_slice?(top_left_slice) and not skip_top_left
|
734
|
+
output += ".top-left {\n"
|
735
|
+
output += generate_slice_include(top_left_slice) + ";"
|
736
|
+
|
737
|
+
output += "\nposition: absolute;\n"
|
738
|
+
output += slice_layout(top_left_slice)
|
739
|
+
|
740
|
+
output += "}\n"
|
741
|
+
end
|
742
|
+
|
743
|
+
if should_include_slice?(left_slice) and not skip_left
|
744
|
+
output += ".left {\n"
|
745
|
+
output += generate_slice_include(left_slice) + ";"
|
746
|
+
|
747
|
+
output += "\nposition: absolute;\n"
|
748
|
+
output += slice_layout(left_slice.merge({ :bottom => bottom }))
|
749
|
+
|
750
|
+
output += "}\n"
|
751
|
+
end
|
752
|
+
|
753
|
+
if should_include_slice?(bottom_left_slice) and not skip_bottom_left
|
754
|
+
output += ".bottom-left {\n"
|
755
|
+
output += generate_slice_include(bottom_left_slice) + ";"
|
756
|
+
|
757
|
+
output += "\nposition: absolute;\n"
|
758
|
+
output += slice_layout(bottom_left_slice)
|
759
|
+
|
760
|
+
output += "}\n"
|
761
|
+
end
|
762
|
+
|
763
|
+
# MIDDLE
|
764
|
+
if should_include_slice?(top_slice) and not skip_top
|
765
|
+
output += ".top {\n"
|
766
|
+
output += generate_slice_include(top_slice) + ";"
|
767
|
+
|
768
|
+
output += "\nposition: absolute;\n"
|
769
|
+
output += slice_layout(top_slice.merge({ :right => right }))
|
770
|
+
|
771
|
+
output += "}\n"
|
772
|
+
end
|
773
|
+
|
774
|
+
if should_include_slice?(middle_slice) and not skip_middle
|
775
|
+
output += ".middle {\n"
|
776
|
+
output += generate_slice_include(middle_slice) + ";"
|
777
|
+
|
778
|
+
output += "\nposition: absolute;\n"
|
779
|
+
output += slice_layout(middle_slice.merge({ :bottom => bottom, :right => right }))
|
780
|
+
|
781
|
+
|
782
|
+
output += "}\n"
|
783
|
+
end
|
784
|
+
|
785
|
+
if should_include_slice?(bottom_slice) and not skip_bottom
|
786
|
+
output += ".bottom {\n"
|
787
|
+
output += generate_slice_include(bottom_slice) + ";"
|
788
|
+
|
789
|
+
output += "\nposition: absolute;\n"
|
790
|
+
output += slice_layout(bottom_slice.merge({ :right => right }))
|
791
|
+
|
792
|
+
|
793
|
+
output += "}\n"
|
794
|
+
end
|
795
|
+
|
796
|
+
# RIGHT
|
797
|
+
if should_include_slice?(top_right_slice) and not skip_top_right
|
798
|
+
output += ".top-right {\n"
|
799
|
+
output += generate_slice_include(top_right_slice) + ";"
|
800
|
+
|
801
|
+
output += "\nposition: absolute;\n"
|
802
|
+
output += slice_layout(top_right_slice)
|
803
|
+
|
804
|
+
output += "}\n"
|
805
|
+
end
|
806
|
+
|
807
|
+
if should_include_slice?(right_slice) and not skip_right
|
808
|
+
output += ".right {\n"
|
809
|
+
output += generate_slice_include(right_slice) + ";"
|
810
|
+
|
811
|
+
output += "\nposition: absolute;\n"
|
812
|
+
output += slice_layout(right_slice.merge({ :bottom => bottom }))
|
813
|
+
|
814
|
+
output += "}\n"
|
815
|
+
end
|
816
|
+
|
817
|
+
if should_include_slice?(bottom_right_slice) and not skip_bottom_right
|
818
|
+
output += ".bottom-right {\n"
|
819
|
+
output += generate_slice_include(bottom_right_slice) + ";"
|
820
|
+
|
821
|
+
output += "\nposition: absolute;\n"
|
822
|
+
output += slice_layout(bottom_right_slice)
|
823
|
+
|
824
|
+
output += "}\n"
|
825
|
+
end
|
826
|
+
|
827
|
+
return output
|
828
|
+
end
|
829
|
+
end
|
830
|
+
end
|
831
|
+
|