");
$input.on("blur.tt", function($e) {
var active, isActive, hasActive;
active = document.activeElement;
isActive = $menu.is(active);
hasActive = $menu.has(active).length > 0;
if (_.isMsie() && (isActive || hasActive)) {
$e.preventDefault();
$e.stopImmediatePropagation();
_.defer(function() {
$input.focus();
});
}
});
$menu.on("mousedown.tt", function($e) {
$e.preventDefault();
});
},
_onSelectableClicked: function onSelectableClicked(type, $el) {
this.select($el);
},
_onDatasetCleared: function onDatasetCleared() {
this._updateHint();
},
_onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
this._updateHint();
if (this.autoselect) {
var cursorClass = this.selectors.cursor.substr(1);
this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
}
this.eventBus.trigger("render", suggestions, async, dataset);
},
_onAsyncRequested: function onAsyncRequested(type, dataset, query) {
this.eventBus.trigger("asyncrequest", query, dataset);
},
_onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
this.eventBus.trigger("asynccancel", query, dataset);
},
_onAsyncReceived: function onAsyncReceived(type, dataset, query) {
this.eventBus.trigger("asyncreceive", query, dataset);
},
_onFocused: function onFocused() {
this._minLengthMet() && this.menu.update(this.input.getQuery());
},
_onBlurred: function onBlurred() {
if (this.input.hasQueryChangedSinceLastFocus()) {
this.eventBus.trigger("change", this.input.getQuery());
}
},
_onEnterKeyed: function onEnterKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
if (this.select($selectable)) {
$e.preventDefault();
$e.stopPropagation();
}
} else if (this.autoselect) {
if (this.select(this.menu.getTopSelectable())) {
$e.preventDefault();
$e.stopPropagation();
}
}
},
_onTabKeyed: function onTabKeyed(type, $e) {
var $selectable;
if ($selectable = this.menu.getActiveSelectable()) {
this.select($selectable) && $e.preventDefault();
} else if (this.autoselect) {
if ($selectable = this.menu.getTopSelectable()) {
this.autocomplete($selectable) && $e.preventDefault();
}
}
},
_onEscKeyed: function onEscKeyed() {
this.close();
},
_onUpKeyed: function onUpKeyed() {
this.moveCursor(-1);
},
_onDownKeyed: function onDownKeyed() {
this.moveCursor(+1);
},
_onLeftKeyed: function onLeftKeyed() {
if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onRightKeyed: function onRightKeyed() {
if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
}
},
_onQueryChanged: function onQueryChanged(e, query) {
this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
},
_onWhitespaceChanged: function onWhitespaceChanged() {
this._updateHint();
},
_onLangDirChanged: function onLangDirChanged(e, dir) {
if (this.dir !== dir) {
this.dir = dir;
this.menu.setLanguageDirection(dir);
}
},
_openIfActive: function openIfActive() {
this.isActive() && this.open();
},
_minLengthMet: function minLengthMet(query) {
query = _.isString(query) ? query : this.input.getQuery() || "";
return query.length >= this.minLength;
},
_updateHint: function updateHint() {
var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
$selectable = this.menu.getTopSelectable();
data = this.menu.getSelectableData($selectable);
val = this.input.getInputValue();
if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
query = Input.normalizeQuery(val);
escapedQuery = _.escapeRegExChars(query);
frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
match = frontMatchRegEx.exec(data.val);
match && this.input.setHint(val + match[1]);
} else {
this.input.clearHint();
}
},
isEnabled: function isEnabled() {
return this.enabled;
},
enable: function enable() {
this.enabled = true;
},
disable: function disable() {
this.enabled = false;
},
isActive: function isActive() {
return this.active;
},
activate: function activate() {
if (this.isActive()) {
return true;
} else if (!this.isEnabled() || this.eventBus.before("active")) {
return false;
} else {
this.active = true;
this.eventBus.trigger("active");
return true;
}
},
deactivate: function deactivate() {
if (!this.isActive()) {
return true;
} else if (this.eventBus.before("idle")) {
return false;
} else {
this.active = false;
this.close();
this.eventBus.trigger("idle");
return true;
}
},
isOpen: function isOpen() {
return this.menu.isOpen();
},
open: function open() {
if (!this.isOpen() && !this.eventBus.before("open")) {
this.input.setAriaExpanded(true);
this.menu.open();
this._updateHint();
this.eventBus.trigger("open");
}
return this.isOpen();
},
close: function close() {
if (this.isOpen() && !this.eventBus.before("close")) {
this.input.setAriaExpanded(false);
this.menu.close();
this.input.clearHint();
this.input.resetInputValue();
this.eventBus.trigger("close");
}
return !this.isOpen();
},
setVal: function setVal(val) {
this.input.setQuery(_.toStr(val));
},
getVal: function getVal() {
return this.input.getQuery();
},
select: function select($selectable) {
var data = this.menu.getSelectableData($selectable);
if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
this.input.setQuery(data.val, true);
this.eventBus.trigger("select", data.obj, data.dataset);
this.close();
return true;
}
return false;
},
autocomplete: function autocomplete($selectable) {
var query, data, isValid;
query = this.input.getQuery();
data = this.menu.getSelectableData($selectable);
isValid = data && query !== data.val;
if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
this.input.setQuery(data.val);
this.eventBus.trigger("autocomplete", data.obj, data.dataset);
return true;
}
return false;
},
moveCursor: function moveCursor(delta) {
var query, $candidate, data, suggestion, datasetName, cancelMove, id;
query = this.input.getQuery();
$candidate = this.menu.selectableRelativeToCursor(delta);
data = this.menu.getSelectableData($candidate);
suggestion = data ? data.obj : null;
datasetName = data ? data.dataset : null;
id = $candidate ? $candidate.attr("id") : null;
this.input.trigger("cursorchange", id);
cancelMove = this._minLengthMet() && this.menu.update(query);
if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
this.menu.setCursor($candidate);
if (data) {
if (typeof data.val === "string") {
this.input.setInputValue(data.val);
}
} else {
this.input.resetInputValue();
this._updateHint();
}
this.eventBus.trigger("cursorchange", suggestion, datasetName);
return true;
}
return false;
},
destroy: function destroy() {
this.input.destroy();
this.menu.destroy();
}
});
return Typeahead;
function c(ctx) {
var methods = [].slice.call(arguments, 1);
return function() {
var args = [].slice.call(arguments);
_.each(methods, function(method) {
return ctx[method].apply(ctx, args);
});
};
}
}();
(function() {
"use strict";
var old, keys, methods;
old = $.fn.typeahead;
keys = {
www: "tt-www",
attrs: "tt-attrs",
typeahead: "tt-typeahead"
};
methods = {
initialize: function initialize(o, datasets) {
var www;
datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
o = o || {};
www = WWW(o.classNames);
return this.each(attach);
function attach() {
var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
_.each(datasets, function(d) {
d.highlight = !!o.highlight;
});
$input = $(this);
$wrapper = $(www.html.wrapper);
$hint = $elOrNull(o.hint);
$menu = $elOrNull(o.menu);
defaultHint = o.hint !== false && !$hint;
defaultMenu = o.menu !== false && !$menu;
defaultHint && ($hint = buildHintFromInput($input, www));
defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
$hint && $hint.val("");
$input = prepInput($input, www);
if (defaultHint || defaultMenu) {
$wrapper.css(www.css.wrapper);
$input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
$input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
}
MenuConstructor = defaultMenu ? DefaultMenu : Menu;
eventBus = new EventBus({
el: $input
});
input = new Input({
hint: $hint,
input: $input,
menu: $menu
}, www);
menu = new MenuConstructor({
node: $menu,
datasets: datasets
}, www);
status = new Status({
$input: $input,
menu: menu
});
typeahead = new Typeahead({
input: input,
menu: menu,
eventBus: eventBus,
minLength: o.minLength,
autoselect: o.autoselect
}, www);
$input.data(keys.www, www);
$input.data(keys.typeahead, typeahead);
}
},
isEnabled: function isEnabled() {
var enabled;
ttEach(this.first(), function(t) {
enabled = t.isEnabled();
});
return enabled;
},
enable: function enable() {
ttEach(this, function(t) {
t.enable();
});
return this;
},
disable: function disable() {
ttEach(this, function(t) {
t.disable();
});
return this;
},
isActive: function isActive() {
var active;
ttEach(this.first(), function(t) {
active = t.isActive();
});
return active;
},
activate: function activate() {
ttEach(this, function(t) {
t.activate();
});
return this;
},
deactivate: function deactivate() {
ttEach(this, function(t) {
t.deactivate();
});
return this;
},
isOpen: function isOpen() {
var open;
ttEach(this.first(), function(t) {
open = t.isOpen();
});
return open;
},
open: function open() {
ttEach(this, function(t) {
t.open();
});
return this;
},
close: function close() {
ttEach(this, function(t) {
t.close();
});
return this;
},
select: function select(el) {
var success = false, $el = $(el);
ttEach(this.first(), function(t) {
success = t.select($el);
});
return success;
},
autocomplete: function autocomplete(el) {
var success = false, $el = $(el);
ttEach(this.first(), function(t) {
success = t.autocomplete($el);
});
return success;
},
moveCursor: function moveCursoe(delta) {
var success = false;
ttEach(this.first(), function(t) {
success = t.moveCursor(delta);
});
return success;
},
val: function val(newVal) {
var query;
if (!arguments.length) {
ttEach(this.first(), function(t) {
query = t.getVal();
});
return query;
} else {
ttEach(this, function(t) {
t.setVal(_.toStr(newVal));
});
return this;
}
},
destroy: function destroy() {
ttEach(this, function(typeahead, $input) {
revert($input);
typeahead.destroy();
});
return this;
}
};
$.fn.typeahead = function(method) {
if (methods[method]) {
return methods[method].apply(this, [].slice.call(arguments, 1));
} else {
return methods.initialize.apply(this, arguments);
}
};
$.fn.typeahead.noConflict = function noConflict() {
$.fn.typeahead = old;
return this;
};
function ttEach($els, fn) {
$els.each(function() {
var $input = $(this), typeahead;
(typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
});
}
function buildHintFromInput($input, www) {
return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
readonly: true,
required: false
}).removeAttr("id name placeholder").removeClass("required").attr({
spellcheck: "false",
tabindex: -1
});
}
function prepInput($input, www) {
$input.data(keys.attrs, {
dir: $input.attr("dir"),
autocomplete: $input.attr("autocomplete"),
spellcheck: $input.attr("spellcheck"),
style: $input.attr("style")
});
$input.addClass(www.classes.input).attr({
spellcheck: false
});
try {
!$input.attr("dir") && $input.attr("dir", "auto");
} catch (e) {}
return $input;
}
function getBackgroundStyles($el) {
return {
backgroundAttachment: $el.css("background-attachment"),
backgroundClip: $el.css("background-clip"),
backgroundColor: $el.css("background-color"),
backgroundImage: $el.css("background-image"),
backgroundOrigin: $el.css("background-origin"),
backgroundPosition: $el.css("background-position"),
backgroundRepeat: $el.css("background-repeat"),
backgroundSize: $el.css("background-size")
};
}
function revert($input) {
var www, $wrapper;
www = $input.data(keys.www);
$wrapper = $input.parent().filter(www.selectors.wrapper);
_.each($input.data(keys.attrs), function(val, key) {
_.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
});
$input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
if ($wrapper.length) {
$input.detach().insertAfter($wrapper);
$wrapper.remove();
}
}
function $elOrNull(obj) {
var isValid, $el;
isValid = _.isJQuery(obj) || _.isElement(obj);
$el = isValid ? $(obj).first() : [];
return $el.length ? $el : null;
}
})();
});
================================================
FILE: docs/search.json
================================================
{"Structs/PopoverConfig/Source.html#/s:12PresenterKit13PopoverConfigV6SourceO13barButtonItemyAESo05UIBargH0CcAEmF":{"name":"barButtonItem(_:)","abstract":"
Specifies that the popover should display from a UIBarButtonItem instance.
","parent_name":"Source"},"Structs/PopoverConfig/Source.html#/s:12PresenterKit13PopoverConfigV6SourceO4viewyAESo6UIViewC_So6CGRectVSgtcAEmF":{"name":"view(container:frame:)","abstract":"
Specifies that the popover should display from a UIView instance and be anchored on the specific frame.","parent_name":"Source"},"Structs/PopoverConfig/Source.html":{"name":"Source","abstract":"
Describes the source view from which the popover is showing.
","parent_name":"PopoverConfig"},"Structs/PopoverConfig.html#/s:12PresenterKit13PopoverConfigV6source14arrowDirection8delegateA2C6SourceO_So014UIPopoverArrowG0VSo0J30PresentationControllerDelegate_pSgtcfc":{"name":"init(source:arrowDirection:delegate:)","abstract":"
Initializes and returns a new PopoverConfig object.
","parent_name":"PopoverConfig"},"Structs/DismissButtonConfig/Content.html#/s:12PresenterKit19DismissButtonConfigV7ContentO10systemItemyAESo05UIBard6SystemH0VcAEmF":{"name":"systemItem(_:)","abstract":"
Specifies a UIBarButtonSystemItem.
","parent_name":"Content"},"Structs/DismissButtonConfig/Content.html#/s:12PresenterKit19DismissButtonConfigV7ContentO4textyAESScAEmF":{"name":"text(_:)","abstract":"
Specifies custom text for the bar button.
","parent_name":"Content"},"Structs/DismissButtonConfig/Content.html#/s:12PresenterKit19DismissButtonConfigV7ContentO5imageyAESo7UIImageCcAEmF":{"name":"image(_:)","abstract":"
Specifies a custom image for the bar button.
","parent_name":"Content"},"Structs/DismissButtonConfig/Style.html#/s:12PresenterKit19DismissButtonConfigV5StyleO4boldyA2EmF":{"name":"bold","abstract":"
Use bold text, .Done style.
","parent_name":"Style"},"Structs/DismissButtonConfig/Style.html#/s:12PresenterKit19DismissButtonConfigV5StyleO5plainyA2EmF":{"name":"plain","abstract":"
Use regular text, .Plain style.
","parent_name":"Style"},"Structs/DismissButtonConfig/Location.html#/s:12PresenterKit19DismissButtonConfigV8LocationO4leftyA2EmF":{"name":"left","abstract":"
The left side of the navigation bar.
","parent_name":"Location"},"Structs/DismissButtonConfig/Location.html#/s:12PresenterKit19DismissButtonConfigV8LocationO5rightyA2EmF":{"name":"right","abstract":"
The right side of the navigation bar.
","parent_name":"Location"},"Structs/DismissButtonConfig/Location.html":{"name":"Location","abstract":"
Specifies a bar button’s location in a navigation bar.
","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig/Style.html":{"name":"Style","abstract":"
Specifies a bar button’s item style.
","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig/Content.html":{"name":"Content","abstract":"
Specifies the content (title or image) for the bar button.
","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig.html#/s:12PresenterKit19DismissButtonConfigV8locationAC8LocationOvp":{"name":"location","abstract":"
The location for the bar button.","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig.html#/s:12PresenterKit19DismissButtonConfigV5styleAC5StyleOvp":{"name":"style","abstract":"
The style for the bar button.","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig.html#/s:12PresenterKit19DismissButtonConfigV7contentAC7ContentOvp":{"name":"content","abstract":"
The content for the bar button.","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig.html#/s:12PresenterKit19DismissButtonConfigV8location5style7contentA2C8LocationO_AC5StyleOAC7ContentOtcfc":{"name":"init(location:style:content:)","abstract":"
Initializes a new configuration instance.
","parent_name":"DismissButtonConfig"},"Structs/DismissButtonConfig.html":{"name":"DismissButtonConfig","abstract":"
A configuration for UIBarButtonItem."},"Structs/PopoverConfig.html":{"name":"PopoverConfig","abstract":"
A configuration for UIPopoverPresentationController.
"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE14withNavigationSo012UINavigationB0CyF":{"name":"withNavigation()","abstract":"
Wraps the receiving view controller in a navigation controller.","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE16withPresentationyABXDSo07UIModalF5StyleVF":{"name":"withPresentation(_:)","abstract":"
Applies the specified modal presentation style to the view controller.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE14withTransitionyABXDSo07UIModalF5StyleVF":{"name":"withTransition(_:)","abstract":"
Applies the specified modal transition style to the view controller.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE19withNavigationStyleyAbC0fG0OF":{"name":"withNavigationStyle(_:)","abstract":"
Applies the specified navigation style to the view controller.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE10withStyles10navigation12presentation10transitionAbC15NavigationStyleO_So019UIModalPresentationK0VSo0l10TransitionK0VtF":{"name":"withStyles(navigation:presentation:transition:)","abstract":"
Applies the specified navigation style to the view controller.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE07presentB0_4type8animated10completionyAB_AC16PresentationTypeOSbyycSgtF":{"name":"presentController(_:type:animated:completion:)","abstract":"
Presents a view controller using the specified presentation type.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE07dismissB08animated10completionySb_yycSgtF":{"name":"dismissController(animated:completion:)","abstract":"
Dismisses the receiving view controller.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE24addDismissButtonIfNeeded6configyAC0fG6ConfigV_tF":{"name":"addDismissButtonIfNeeded(config:)","abstract":"
Adds a dismiss button having the provided configuration, if needed.
","parent_name":"UIViewController"},"Extensions/UIViewController.html#/s:So16UIViewControllerC12PresenterKitE16addDismissButton6configyAC0fG6ConfigV_tF":{"name":"addDismissButton(config:)","abstract":"
Adds a dismiss button having the provided configuration.
","parent_name":"UIViewController"},"Extensions/UINavigationController.html#/s:So22UINavigationControllerC12PresenterKitE4push_8animated10completionySo06UIViewB0C_SbyycSgtF":{"name":"push(_:animated:completion:)","abstract":"
Pushes the given view controller and calls the given closure upon completion.
","parent_name":"UINavigationController"},"Extensions/UINavigationController.html#/s:So22UINavigationControllerC12PresenterKitE3pop8animated10completionySb_yycSgtF":{"name":"pop(animated:completion:)","abstract":"
Pops the top view controller and calls the given closure upon completion.
","parent_name":"UINavigationController"},"Extensions/UIBarButtonItem.html#/s:So15UIBarButtonItemC12PresenterKitE6config6target6actionAbC07DismissB6ConfigV_yXlSg10ObjectiveC8SelectorVtcfc":{"name":"init(config:target:action:)","abstract":"
Initializes a new bar button item using the specified configuration.
","parent_name":"UIBarButtonItem"},"Extensions/UIBarButtonItem.html":{"name":"UIBarButtonItem"},"Extensions/UINavigationController.html":{"name":"UINavigationController"},"Extensions/UIViewController.html":{"name":"UIViewController"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO5modalyAcA15NavigationStyleO_So07UIModalcG0VSo0h10TransitionG0VtcACmF":{"name":"modal(_:_:_:)","abstract":"
A modal presentation type with the specified navigation, presentation, and transition styles.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO7popoveryAcA13PopoverConfigVcACmF":{"name":"popover(_:)","abstract":"
A popover presentation type with the specified configuration.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO4pushyA2CmF":{"name":"push","abstract":"
A push presentation type.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO4showyA2CmF":{"name":"show","abstract":"
A “show” presentation type. This is an adaptive presentation that usually corresponds to .Push.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO10showDetailyAcA15NavigationStyleOcACmF":{"name":"showDetail(_:)","abstract":"
A “show detail” presentation type. This is an adaptive presentation that usually corresponds to .Modal.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO6customyACSo37UIViewControllerTransitioningDelegate_pcACmF":{"name":"custom(_:)","abstract":"
A custom presentation style that uses the specified delegate.
","parent_name":"PresentationType"},"Enums/PresentationType.html#/s:12PresenterKit16PresentationTypeO4noneyA2CmF":{"name":"none","abstract":"
No presentation type specified, use UIKit defaults. Use this when presenting system controllers, like UIAlertController.
","parent_name":"PresentationType"},"Enums/NavigationStyle.html#/s:12PresenterKit15NavigationStyleO4noneyA2CmF":{"name":"none","abstract":"
Do not embed a view controller in a UINavigationController.
","parent_name":"NavigationStyle"},"Enums/NavigationStyle.html#/s:12PresenterKit15NavigationStyleO04withC0yA2CmF":{"name":"withNavigation","abstract":"
Embed view controller in a UINavigationController.
","parent_name":"NavigationStyle"},"Enums/NavigationStyle.html":{"name":"NavigationStyle","abstract":"
Specifies the navigation style for a view controller.
"},"Enums/PresentationType.html":{"name":"PresentationType","abstract":"
Describes the type of presentation for a view controller.
"},"Classes.html#/c:@M@PresenterKit@objc(cs)HalfModalPresentationController":{"name":"HalfModalPresentationController","abstract":"
A modal presentation controller that presents the presented view controller modally,"},"getting-started.html":{"name":"Getting Started"},"Guides.html":{"name":"Guides","abstract":"
The following guides are available globally.
"},"Classes.html":{"name":"Classes","abstract":"
The following classes are available globally.
"},"Enums.html":{"name":"Enumerations","abstract":"
The following enumerations are available globally.
"},"Extensions.html":{"name":"Extensions","abstract":"
The following extensions are available globally.
"},"Structs.html":{"name":"Structures","abstract":"
The following structures are available globally.
"}}
================================================
FILE: docs/undocumented.json
================================================
{
"warnings": [
],
"source_directory": "/Users/jsq/GitHub/PresenterKit"
}
================================================
FILE: scripts/build_docs.zsh
================================================
#!/bin/zsh
# Created by Jesse Squires
# https://www.jessesquires.com
#
# Copyright © 2020-present Jesse Squires
#
# Docs by jazzy
# https://github.com/realm/jazzy/releases/latest
# ------------------------------
# Generates documentation using jazzy and checks for installation.
VERSION="0.13.6"
FOUND=$(jazzy --version)
LINK="https://github.com/realm/jazzy"
INSTALL="gem install jazzy"
PROJECT="PresenterKit"
if which jazzy >/dev/null; then
jazzy \
--clean \
--author "Jesse Squires" \
--author_url "https://jessesquires.com" \
--github_url "https://github.com/jessesquires/$PROJECT" \
--module "$PROJECT" \
--source-directory . \
--readme "README.md" \
--documentation "Guides/*.md" \
--output docs/
else
echo "
Error: Jazzy not installed!
Download: $LINK
Install: $INSTALL
"
exit 1
fi
if [ "$FOUND" != "jazzy version: $VERSION" ]; then
echo "
Warning: incorrect Jazzy installed! Please upgrade.
Expected: $VERSION
Found: $FOUND
Download: $LINK
Install: $INSTALL
"
fi
exit
================================================
FILE: scripts/lint.zsh
================================================
#!/bin/zsh
# Created by Jesse Squires
# https://www.jessesquires.com
#
# Copyright © 2020-present Jesse Squires
#
# SwiftLint
# https://github.com/realm/SwiftLint/releases/latest
# ------------------------------
# Runs SwiftLint and checks for installation.
VERSION="0.41.0"
FOUND=$(swiftlint version)
LINK="https://github.com/realm/SwiftLint"
INSTALL="brew install swiftlint"
if which swiftlint >/dev/null; then
swiftlint lint --config ./.swiftlint.yml
else
echo "
Error: SwiftLint not installed!
Download: $LINK
Install: $INSTALL
"
fi
if [ $FOUND != $VERSION ]; then
echo "
Warning: incorrect SwiftLint installed! Please upgrade.
Expected: $VERSION
Found: $FOUND
Download: $LINK
Install: $INSTALL
"
fi
exit