5 | // MIT License
6 | var options = {
7 | strictMode: false,
8 | key: ["source", "protocol", "authority", "userInfo", "user", "password",
9 | "host", "port", "relative", "path", "directory", "file", "query",
10 | "anchor"],
11 | q: {
12 | name: "queryKey",
13 | parser: /(?:^|&)([^&=]*)=?([^&]*)/g
14 | },
15 | parser: {
16 | /* jshint maxlen: false */
17 | strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
18 | loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
19 | }
20 | };
21 | function parseUri(str) {
22 | var o = options;
23 | var m = o.parser[o.strictMode ? "strict" : "loose"].exec(str);
24 | var uri = {};
25 | var i = 14;
26 |
27 | while (i--) {
28 | var key = o.key[i];
29 | var value = m[i] || "";
30 | var encoded = ['user', 'password'].indexOf(key) !== -1;
31 | uri[key] = encoded ? decodeURIComponent(value) : value;
32 | }
33 |
34 | uri[o.q.name] = {};
35 | uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
36 | if ($1) {
37 | uri[o.q.name][$1] = $2;
38 | }
39 | });
40 |
41 | return uri;
42 | }
43 |
44 |
45 | module.exports = parseUri;
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var gutil = require('gulp-util');
3 | var bower = require('bower');
4 | var concat = require('gulp-concat');
5 | var sass = require('gulp-sass');
6 | var minifyCss = require('gulp-minify-css');
7 | var rename = require('gulp-rename');
8 | var sh = require('shelljs');
9 |
10 | var paths = {
11 | sass: ['./scss/**/*.scss']
12 | };
13 |
14 | gulp.task('default', ['sass']);
15 |
16 | gulp.task('sass', function(done) {
17 | gulp.src('./scss/ionic.app.scss')
18 | .pipe(sass({
19 | errLogToConsole: true
20 | }))
21 | .pipe(gulp.dest('./www/css/'))
22 | .pipe(minifyCss({
23 | keepSpecialComments: 0
24 | }))
25 | .pipe(rename({ extname: '.min.css' }))
26 | .pipe(gulp.dest('./www/css/'))
27 | .on('end', done);
28 | });
29 |
30 | gulp.task('watch', function() {
31 | gulp.watch(paths.sass, ['sass']);
32 | });
33 |
34 | gulp.task('install', ['git-check'], function() {
35 | return bower.commands.install()
36 | .on('log', function(data) {
37 | gutil.log('bower', gutil.colors.cyan(data.id), data.message);
38 | });
39 | });
40 |
41 | gulp.task('git-check', function(done) {
42 | if (!sh.which('git')) {
43 | console.log(
44 | ' ' + gutil.colors.red('Git is not installed.'),
45 | '\n Git, the version control system, is required to download Ionic.',
46 | '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.',
47 | '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.'
48 | );
49 | process.exit(1);
50 | }
51 | done();
52 | });
53 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_includes/post_details.html:
--------------------------------------------------------------------------------
1 | {% unless post %}
2 | {% assign post = page %}
3 | {% endunless %}
4 |
5 | {% assign post_author = post.author %}
6 | {% assign post_gravatar = 'http://www.fillmurray.com/82/82' %}
7 | {% assign modified_date = '' %}
8 |
9 | {% for author in site.data.authors %}
10 | {% if author.name == post.author %}
11 | {% if author.twitter %}
12 | {% capture post_author %}{{ post.author }}{% endcapture %}
13 | {% endif %}
14 | {% if author.gravatar %}
15 | {% capture post_gravatar %}https://gravatar.com/avatar/{{ author.gravatar }}{% endcapture %}
16 | {% endif %}
17 | {% endif %}
18 | {% endfor %}
19 |
20 | {% if post.modified_date %}
21 | {% capture modified_date %}Updated: {{ post.modified_date | date_to_long_string }}
{% endcapture %}
22 | {% endif %}
23 |
24 |
41 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/code.less:
--------------------------------------------------------------------------------
1 | //
2 | // Code (inline and block)
3 | // --------------------------------------------------
4 |
5 |
6 | // Inline and block code styles
7 | code,
8 | kbd,
9 | pre,
10 | samp {
11 | font-family: @font-family-monospace;
12 | }
13 |
14 | // Inline code
15 | code {
16 | padding: 2px 4px;
17 | font-size: 90%;
18 | color: @code-color;
19 | background-color: @code-bg;
20 | white-space: nowrap;
21 | border-radius: @border-radius-base;
22 | }
23 |
24 | // User input typically entered via keyboard
25 | kbd {
26 | padding: 2px 4px;
27 | font-size: 90%;
28 | color: @kbd-color;
29 | background-color: @kbd-bg;
30 | border-radius: @border-radius-small;
31 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
32 | }
33 |
34 | // Blocks of code
35 | pre {
36 | display: block;
37 | padding: ((@line-height-computed - 1) / 2);
38 | margin: 0 0 (@line-height-computed / 2);
39 | font-size: (@font-size-base - 1); // 14px to 13px
40 | line-height: @line-height-base;
41 | word-break: break-all;
42 | word-wrap: break-word;
43 | color: @pre-color;
44 | background-color: @pre-bg;
45 | border: 1px solid @pre-border-color;
46 | border-radius: @border-radius-base;
47 |
48 | // Account for some code outputs that place code tags in pre tags
49 | code {
50 | padding: 0;
51 | font-size: inherit;
52 | color: inherit;
53 | white-space: pre-wrap;
54 | background-color: transparent;
55 | border-radius: 0;
56 | }
57 | }
58 |
59 | // Enable scrollable blocks of code
60 | .pre-scrollable {
61 | max-height: @pre-scrollable-max-height;
62 | overflow-y: scroll;
63 | }
64 |
--------------------------------------------------------------------------------
/www/js/overview.controller.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | angular.module('starter').controller('OverviewController', ['$scope', '$ionicModal', '$ionicPlatform', 'BirthdayService', OverviewController]);
3 |
4 | function OverviewController($scope, $ionicModal, $ionicPlatform, birthdayService) {
5 | var vm = this;
6 |
7 | // Initialize the database.
8 | $ionicPlatform.ready(function() {
9 | birthdayService.initDB();
10 |
11 | // Get all birthday records from the database.
12 | birthdayService.getAllBirthdays().then(function(birthdays) {
13 | vm.birthdays = birthdays;
14 | });
15 | });
16 |
17 | // Initialize the modal view.
18 | $ionicModal.fromTemplateUrl('add-or-edit-birthday.html', {
19 | scope: $scope,
20 | animation: 'slide-in-up'
21 | }).then(function(modal) {
22 | $scope.modal = modal;
23 | });
24 |
25 | vm.showAddBirthdayModal = function() {
26 | $scope.birthday = {};
27 | $scope.action = 'Add';
28 | $scope.isAdd = true;
29 | $scope.modal.show();
30 | };
31 |
32 | vm.showEditBirthdayModal = function(birthday) {
33 | $scope.birthday = birthday;
34 | $scope.action = 'Edit';
35 | $scope.isAdd = false;
36 | $scope.modal.show();
37 | };
38 |
39 | $scope.saveBirthday = function() {
40 | if ($scope.isAdd) {
41 | birthdayService.addBirthday($scope.birthday);
42 | } else {
43 | birthdayService.updateBirthday($scope.birthday);
44 | }
45 | $scope.modal.hide();
46 | };
47 |
48 | $scope.deleteBirthday = function() {
49 | birthdayService.deleteBirthday($scope.birthday);
50 | $scope.modal.hide();
51 | };
52 |
53 | $scope.$on('$destroy', function() {
54 | $scope.modal.remove();
55 | });
56 |
57 | return vm;
58 | }
59 | })();
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/alerts.less:
--------------------------------------------------------------------------------
1 | //
2 | // Alerts
3 | // --------------------------------------------------
4 |
5 |
6 | // Base styles
7 | // -------------------------
8 |
9 | .alert {
10 | padding: @alert-padding;
11 | margin-bottom: @line-height-computed;
12 | border: 1px solid transparent;
13 | border-radius: @alert-border-radius;
14 |
15 | // Headings for larger alerts
16 | h4 {
17 | margin-top: 0;
18 | // Specified for the h4 to prevent conflicts of changing @headings-color
19 | color: inherit;
20 | }
21 | // Provide class for links that match alerts
22 | .alert-link {
23 | font-weight: @alert-link-font-weight;
24 | }
25 |
26 | // Improve alignment and spacing of inner content
27 | > p,
28 | > ul {
29 | margin-bottom: 0;
30 | }
31 | > p + p {
32 | margin-top: 5px;
33 | }
34 | }
35 |
36 | // Dismissable alerts
37 | //
38 | // Expand the right padding and account for the close button's positioning.
39 |
40 | .alert-dismissable {
41 | padding-right: (@alert-padding + 20);
42 |
43 | // Adjust close link position
44 | .close {
45 | position: relative;
46 | top: -2px;
47 | right: -21px;
48 | color: inherit;
49 | }
50 | }
51 |
52 | // Alternate styles
53 | //
54 | // Generate contextual modifier classes for colorizing the alert.
55 |
56 | .alert-success {
57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
58 | }
59 | .alert-info {
60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
61 | }
62 | .alert-warning {
63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
64 | }
65 | .alert-danger {
66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
67 | }
68 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/viewScroll.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @ngdoc object
3 | * @name ui.router.state.$uiViewScrollProvider
4 | *
5 | * @description
6 | * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.
7 | */
8 | function $ViewScrollProvider() {
9 |
10 | var useAnchorScroll = false;
11 |
12 | /**
13 | * @ngdoc function
14 | * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll
15 | * @methodOf ui.router.state.$uiViewScrollProvider
16 | *
17 | * @description
18 | * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for
19 | * scrolling based on the url anchor.
20 | */
21 | this.useAnchorScroll = function () {
22 | useAnchorScroll = true;
23 | };
24 |
25 | /**
26 | * @ngdoc object
27 | * @name ui.router.state.$uiViewScroll
28 | *
29 | * @requires $anchorScroll
30 | * @requires $timeout
31 | *
32 | * @description
33 | * When called with a jqLite element, it scrolls the element into view (after a
34 | * `$timeout` so the DOM has time to refresh).
35 | *
36 | * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,
37 | * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.
38 | */
39 | this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {
40 | if (useAnchorScroll) {
41 | return $anchorScroll;
42 | }
43 |
44 | return function ($element) {
45 | $timeout(function () {
46 | $element[0].scrollIntoView();
47 | }, 0, false);
48 | };
49 | }];
50 | }
51 |
52 | angular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);
53 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_includes/api/compaction.html:
--------------------------------------------------------------------------------
1 | {% include anchor.html title="Compact the database" hash="compaction" %}
2 |
3 | {% highlight js %}
4 | db.compact([options], [callback])
5 | {% endhighlight %}
6 |
7 | Triggers a compaction operation in the local or remote database. This reduces the database's size by removing unused and old data, namely non-leaf revisions and attachments that are no longer referenced by those revisions. Note that this is a separate operation from [`viewCleanup()`](#view_cleanup).
8 |
9 | For remote databases, PouchDB checks the compaction status at regular intervals and fires the callback (or resolves the promise) upon completion. Consult the [compaction section of CouchDB's maintenance documentation](http://couchdb.readthedocs.org/en/latest/maintenance/compaction.html) for more details.
10 |
11 | Also see [auto-compaction](#create_database), which runs compaction automatically (local databases only).
12 |
13 | * `options.interval`: Number of milliseconds to wait before asking again if compaction is already done. Defaults to 200. (Only applies to remote databases.)
14 |
15 | #### Example Usage:
16 |
17 | {% include code/start.html id="compact" type="callback" %}
18 | {% highlight js %}
19 | db.compact(function (err, result) {
20 | if (err) { return console.log(err); }
21 | // handle result
22 | });
23 | {% endhighlight %}
24 | {% include code/end.html %}
25 | {% include code/start.html id="compact" type="promise" %}
26 | {% highlight js %}
27 | db.compact().then(function (result) {
28 | // handle result
29 | }).catch(function (err) {
30 | console.log(err);
31 | });
32 | {% endhighlight %}
33 | {% include code/end.html %}
34 |
35 | #### Example Response:
36 | {% highlight js %}
37 | { "ok" : "true" }
38 | {% endhighlight %}
39 |
40 |
41 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/taskqueue.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = TaskQueue;
4 |
5 | function TaskQueue() {
6 | this.isReady = false;
7 | this.failed = false;
8 | this.queue = [];
9 | }
10 |
11 | TaskQueue.prototype.execute = function () {
12 | var d, func;
13 | if (this.failed) {
14 | while ((d = this.queue.shift())) {
15 | if (typeof d === 'function') {
16 | d(this.failed);
17 | continue;
18 | }
19 | func = d.parameters[d.parameters.length - 1];
20 | if (typeof func === 'function') {
21 | func(this.failed);
22 | } else if (d.name === 'changes' && typeof func.complete === 'function') {
23 | func.complete(this.failed);
24 | }
25 | }
26 | } else if (this.isReady) {
27 | while ((d = this.queue.shift())) {
28 |
29 | if (typeof d === 'function') {
30 | d();
31 | } else {
32 | d.task = this.db[d.name].apply(this.db, d.parameters);
33 | }
34 | }
35 | }
36 | };
37 |
38 | TaskQueue.prototype.fail = function (err) {
39 | this.failed = err;
40 | this.execute();
41 | };
42 |
43 | TaskQueue.prototype.ready = function (db) {
44 | if (this.failed) {
45 | return false;
46 | } else if (arguments.length === 0) {
47 | return this.isReady;
48 | }
49 | this.isReady = db ? true: false;
50 | this.db = db;
51 | this.execute();
52 | };
53 |
54 | TaskQueue.prototype.addTask = function (name, parameters) {
55 | if (typeof name === 'function') {
56 | this.queue.push(name);
57 | if (this.failed) {
58 | this.execute();
59 | }
60 | } else {
61 | var task = { name: name, parameters: parameters };
62 | this.queue.push(task);
63 | if (this.failed) {
64 | this.execute();
65 | }
66 | return task;
67 | }
68 | };
69 |
--------------------------------------------------------------------------------
/www/lib/ionic/scss/_badge.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Badges
4 | * --------------------------------------------------
5 | */
6 |
7 | .badge {
8 | @include badge-style($badge-default-bg, $badge-default-text);
9 | z-index: $z-index-badge;
10 | display: inline-block;
11 | padding: 3px 8px;
12 | min-width: 10px;
13 | border-radius: $badge-border-radius;
14 | vertical-align: baseline;
15 | text-align: center;
16 | white-space: nowrap;
17 | font-weight: $badge-font-weight;
18 | font-size: $badge-font-size;
19 | line-height: $badge-line-height;
20 |
21 | &:empty {
22 | display: none;
23 | }
24 | }
25 |
26 | //Be sure to override specificity of rule that 'badge color matches tab color by default'
27 | .tabs .tab-item .badge,
28 | .badge {
29 | &.badge-light {
30 | @include badge-style($badge-light-bg, $badge-light-text);
31 | }
32 | &.badge-stable {
33 | @include badge-style($badge-stable-bg, $badge-stable-text);
34 | }
35 | &.badge-positive {
36 | @include badge-style($badge-positive-bg, $badge-positive-text);
37 | }
38 | &.badge-calm {
39 | @include badge-style($badge-calm-bg, $badge-calm-text);
40 | }
41 | &.badge-assertive {
42 | @include badge-style($badge-assertive-bg, $badge-assertive-text);
43 | }
44 | &.badge-balanced {
45 | @include badge-style($badge-balanced-bg, $badge-balanced-text);
46 | }
47 | &.badge-energized {
48 | @include badge-style($badge-energized-bg, $badge-energized-text);
49 | }
50 | &.badge-royal {
51 | @include badge-style($badge-royal-bg, $badge-royal-text);
52 | }
53 | &.badge-dark {
54 | @include badge-style($badge-dark-bg, $badge-dark-text);
55 | }
56 | }
57 |
58 | // Quick fix for labels/badges in buttons
59 | .button .badge {
60 | position: relative;
61 | top: -1px;
62 | }
63 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_posts/2014-09-04-pouchdb-3.0.4.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 |
4 | title: PouchDB 3.0.4: Night of the Living Attachments
5 |
6 | author: Calvin Metcalf
7 |
8 | ---
9 |
10 | This week we present [PouchDB 3.0.4](https://github.com/pouchdb/pouchdb/releases/tag/3.0.4), which fixes a bunch of stuff with attachments. Now the kittens generated by the [3.0.0 release](http://pouchdb.com/2014/08/12/pouchdb-3.0.0.html) may be safely stored in Pouch.
11 |
12 | {% include img.html src="kittens_small.jpg" alt="Kittens" %}
13 |
14 | ### Attachmentspalooza
15 |
16 | - In Firefox, different attachments now (correctly) have different MD5 hashes. Previously they were just hashes of the string `'[Object] object'`. With this, we also now check that the hashes we produce are identical to the ones that CouchDB produces (with the exception of plaintext ones due to Erlang being weird and not having ASCII strings) ([#2698](https://github.com/pouchdb/pouchdb/issues/2698)).
17 | - Weirdness in Chrome 37-39 with FileReader and empty blobs is now fixed ([#2713](https://github.com/pouchdb/pouchdb/issues/2713)).
18 | - Fix for [a bug in Chrome 37](https://code.google.com/p/chromium/issues/detail?id=408120) relating to blobs in IndexedDB ([#2701](https://github.com/pouchdb/pouchdb/issues/2701)).
19 | - HTTP pouches now support buffer/blob data in attachments ([#2577](https://github.com/pouchdb/pouchdb/issues/2577)).
20 |
21 | ### Other fixes in 3.0.4
22 |
23 | * When running sync, it only creates one instance for each database ([#2662](https://github.com/pouchdb/pouchdb/pull/2662)).
24 | * Performance improvements for persisted map/reduce, and it also uses less space ([pouchdb/mapreduce#191](https://github.com/pouchdb/mapreduce/pull/191) and [pouchdb/mapreduce#185](https://github.com/pouchdb/mapreduce/issues/185)).
25 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/grid.less:
--------------------------------------------------------------------------------
1 | //
2 | // Grid system
3 | // --------------------------------------------------
4 |
5 |
6 | // Container widths
7 | //
8 | // Set the container width, and override it for fixed navbars in media queries.
9 |
10 | .container {
11 | .container-fixed();
12 |
13 | @media (min-width: @screen-sm-min) {
14 | width: @container-sm;
15 | }
16 | @media (min-width: @screen-md-min) {
17 | width: @container-md;
18 | }
19 | @media (min-width: @screen-lg-min) {
20 | width: @container-lg;
21 | }
22 | }
23 |
24 |
25 | // Fluid container
26 | //
27 | // Utilizes the mixin meant for fixed width containers, but without any defined
28 | // width for fluid, full width layouts.
29 |
30 | .container-fluid {
31 | .container-fixed();
32 | }
33 |
34 |
35 | // Row
36 | //
37 | // Rows contain and clear the floats of your columns.
38 |
39 | .row {
40 | .make-row();
41 | }
42 |
43 |
44 | // Columns
45 | //
46 | // Common styles for small and large grid columns
47 |
48 | .make-grid-columns();
49 |
50 |
51 | // Extra small grid
52 | //
53 | // Columns, offsets, pushes, and pulls for extra small devices like
54 | // smartphones.
55 |
56 | .make-grid(xs);
57 |
58 |
59 | // Small grid
60 | //
61 | // Columns, offsets, pushes, and pulls for the small device range, from phones
62 | // to tablets.
63 |
64 | @media (min-width: @screen-sm-min) {
65 | .make-grid(sm);
66 | }
67 |
68 |
69 | // Medium grid
70 | //
71 | // Columns, offsets, pushes, and pulls for the desktop device range.
72 |
73 | @media (min-width: @screen-md-min) {
74 | .make-grid(md);
75 | }
76 |
77 |
78 | // Large grid
79 | //
80 | // Columns, offsets, pushes, and pulls for the large desktop device range.
81 |
82 | @media (min-width: @screen-lg-min) {
83 | .make-grid(lg);
84 | }
85 |
--------------------------------------------------------------------------------
/www/lib/ionic/scss/_platform.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Platform
4 | * --------------------------------------------------
5 | * Platform specific tweaks
6 | */
7 |
8 | .platform-ios.platform-cordova {
9 | // iOS has a status bar which sits on top of the header.
10 | // Bump down everything to make room for it. However, if
11 | // if its in Cordova, and set to fullscreen, then disregard the bump.
12 | &:not(.fullscreen) {
13 | .bar-header:not(.bar-subheader) {
14 | height: $bar-height + $ios-statusbar-height;
15 |
16 | &.item-input-inset .item-input-wrapper {
17 | margin-top: 19px !important;
18 | }
19 |
20 | > * {
21 | margin-top: $ios-statusbar-height;
22 | }
23 | }
24 | .tabs-top > .tabs,
25 | .tabs.tabs-top {
26 | top: $bar-height + $ios-statusbar-height;
27 | }
28 |
29 | .has-header,
30 | .bar-subheader {
31 | top: $bar-height + $ios-statusbar-height;
32 | }
33 | .has-subheader {
34 | top: $bar-height + $bar-subheader-height + $ios-statusbar-height;
35 | }
36 | .has-header.has-tabs-top {
37 | top: $bar-height + $tabs-height + $ios-statusbar-height;
38 | }
39 | .has-header.has-subheader.has-tabs-top {
40 | top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height;
41 | }
42 | }
43 | &.status-bar-hide {
44 | // Cordova doesn't adjust the body height correctly, this makes up for it
45 | margin-bottom: 20px;
46 | }
47 | }
48 |
49 | @media (orientation:landscape) {
50 | .platform-ios.platform-browser.platform-ipad {
51 | position: fixed; // required for iPad 7 Safari
52 | }
53 | }
54 |
55 | .platform-c:not(.enable-transitions) * {
56 | // disable transitions on grade-c devices (Android 2)
57 | -webkit-transition: none !important;
58 | transition: none !important;
59 | }
60 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_includes/api/database_information.html:
--------------------------------------------------------------------------------
1 | {% include anchor.html title="Get database information" hash="database_information" %}
2 |
3 | {% highlight js %}
4 | db.info([callback])
5 | {% endhighlight %}
6 |
7 | Get information about a database.
8 |
9 | #### Example Usage:
10 |
11 | {% include code/start.html id="dbinfo" type="callback" %}
12 | {% highlight js %}
13 | db.info(function(err, info) {
14 | if (err) { return console.log(err); }
15 | // handle result
16 | });
17 | {% endhighlight %}
18 | {% include code/end.html %}
19 | {% include code/start.html id="dbinfo" type="promise" %}
20 | {% highlight js %}
21 | db.info().then(function (result) {
22 | // handle result
23 | }).catch(function (err) {
24 | console.log(err);
25 | });
26 | {% endhighlight %}
27 | {% include code/end.html %}
28 |
29 | #### Example Response:
30 | {% highlight js %}
31 | {
32 | "db_name": "test",
33 | "doc_count": 4,
34 | "update_seq": 5
35 | }
36 | {% endhighlight %}
37 |
38 | **Response object:**
39 |
40 | * `db_name` is the name of the database you gave when you called `new PouchDB()`, and also the unique identifier for the database.
41 | * `doc_count` is the total number of non-deleted documents in the database.
42 | * `update_seq` is the sequence number of the database. It starts at 0 and gets incremented every time a document is added or modified.
43 |
44 | There are also some details you can use for debugging. These are unofficial and may change at any time:
45 |
46 | * `idb_attachment_format`: (IndexedDB) either `'base64'` or `'binary'`, depending on whether the browser [supports binary blobs](/faq.html#data_types).
47 | * `sqlite_plugin`: (WebSQL) true if the [SQLite Plugin][] is being used.
48 | * `websql_encoding`: (WebSQL) either `'UTF-8'` or `'UTF-16'`, depending on the [WebSQL implementation](http://pouchdb.com/faq.html#data_types)
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_includes/api/sync.html:
--------------------------------------------------------------------------------
1 | {% include anchor.html title="Sync a database" hash="sync" %}
2 |
3 | {% highlight js %}
4 | var sync = PouchDB.sync(src, target, [options])
5 | {% endhighlight %}
6 |
7 | Sync data from `src` to `target` and `target` to `src`. This is a convenience method for bidirectional data replication.
8 |
9 | In other words, this code:
10 |
11 | {% highlight js %}
12 | PouchDB.replicate('mydb', 'http://localhost:5984/mydb');
13 | PouchDB.replicate('http://localhost:5984/mydb', 'mydb');
14 | {% endhighlight %}
15 |
16 |
17 | is equivalent to this code:
18 |
19 | {% highlight js %}
20 | PouchDB.sync('mydb', 'http://localhost:5984/mydb');
21 | {% endhighlight %}
22 |
23 |
24 | ### Options
25 |
26 | Please refer to [replicate()](api.html#replication) for documentation on options, as `sync()` is just a convenience method that entails bidirectional replication.
27 |
28 | #### Example Usage:
29 | {% highlight js %}
30 | var sync = PouchDB.sync('mydb', 'http://localhost:5984/mydb', {
31 | live: true,
32 | retry: true
33 | }).on('change', function (info) {
34 | // handle change
35 | }).on('paused', function () {
36 | // replication paused (e.g. user went offline)
37 | }).on('active', function () {
38 | // replicate resumed (e.g. user went back online)
39 | }).on('denied', function (info) {
40 | // a document failed to replicate, e.g. due to permissions
41 | }).on('complete', function (info) {
42 | // handle complete
43 | }).on('error', function (err) {
44 | // handle error
45 | });
46 |
47 | sync.cancel(); // whenever you want to cancel
48 | {% endhighlight %}
49 |
50 | There is also a shorthand for syncing given existing PouchDB objects. This behaves the same as `PouchDB.sync()`:
51 |
52 | {% highlight js %}
53 | db.sync(remoteDB, [options]);
54 | {% endhighlight %}
55 |
56 | For any further details, please refer to [replicate()](api.html#replication).
57 |
58 |
59 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/pouchdb/variables.less:
--------------------------------------------------------------------------------
1 | @import "@{bootstrap}/variables.less";
2 |
3 | // Base img dir
4 | @img_dir: "../img";
5 |
6 | // Color
7 | @brand-accent: #fa3649;
8 | @brand-primary: #6ccb99;
9 | @twitter: cornflowerblue;
10 | @github: darkslategray;
11 |
12 | // Social colors
13 | @btn-twitter-color: lighten(@twitter, 25%);
14 | @btn-twitter-bg: @twitter;
15 | @btn-twitter-border: darken(@twitter, 10%);
16 | @btn-github-color: lighten(@github, 50%);
17 | @btn-github-bg: @github;
18 | @btn-github-border: darken(@github, 10%);
19 |
20 | // Scaffolding
21 | @body-bg: #f6f6f6;
22 | @text-color: @gray;
23 |
24 | // Container sizes
25 | @container-large-desktop: ((950px + @grid-gutter-width));
26 |
27 | // Code
28 | @code-color: darken(@brand-primary, 30%);
29 | @code-bg: lighten(@brand-primary, 30%);
30 |
31 | // Type
32 | @font-family-sans-serif: "Open Sans", Helvetica, Arial, sans-serif;
33 |
34 | @link-color: @brand-accent;
35 | @nav-link-hover-bg: none;
36 |
37 | @headings-font-family: "Lato", Helvetica, Arial, sans-serif;
38 | @header-color: #ffffff;
39 | @header-border-color: #c8c8c8;
40 |
41 | // Logo
42 | @logo-img: '@{img_dir}/mark.svg';
43 | @logo-fallback-img: '@{img_dir}/mark.png';
44 | @logo-img-ratio: .78;
45 | @logo-img-height: 70px;
46 | @logo-width: 250px;
47 | // When it gets silly small display only the mark.
48 | @logo-breakpoint: 330px;
49 |
50 | // Navs
51 |
52 | // Switch nav into justified view
53 | @navs-breakpoint-justified: @screen-sm-max;
54 | // Switch nav into horizontal view
55 | @navs-breakpoint-horizontal: 510px;
56 |
57 | // Minimum width and height for fixed sidebars
58 | @affix-min-width: @screen-sm-min;
59 | @affix-min-height: 475px;
60 |
61 | // Alerts
62 | @alert-before-size: 35px;
63 | @alert-before-info-text: 'i';
64 | @alert-before-success-text: '\2713';
65 | @alert-before-warning-text: '!';
66 | @alert-before-danger-text: 'x';
67 |
68 | // Pre
69 | @pre-padding: 15px;
70 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/deps/parse-hex.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | //
4 | // Parsing hex strings. Yeah.
5 | //
6 | // So basically we need this because of a bug in WebSQL:
7 | // https://code.google.com/p/chromium/issues/detail?id=422690
8 | // https://bugs.webkit.org/show_bug.cgi?id=137637
9 | //
10 | // UTF-8 and UTF-16 are provided as separate functions
11 | // for meager performance improvements
12 | //
13 |
14 | function decodeUtf8(str) {
15 | return decodeURIComponent(window.escape(str));
16 | }
17 |
18 | function hexToInt(charCode) {
19 | // '0'-'9' is 48-57
20 | // 'A'-'F' is 65-70
21 | // SQLite will only give us uppercase hex
22 | return charCode < 65 ? (charCode - 48) : (charCode - 55);
23 | }
24 |
25 |
26 | // Example:
27 | // pragma encoding=utf8;
28 | // select hex('A');
29 | // returns '41'
30 | function parseHexUtf8(str, start, end) {
31 | var result = '';
32 | while (start < end) {
33 | result += String.fromCharCode(
34 | (hexToInt(str.charCodeAt(start++)) << 4) |
35 | hexToInt(str.charCodeAt(start++)));
36 | }
37 | return result;
38 | }
39 |
40 | // Example:
41 | // pragma encoding=utf16;
42 | // select hex('A');
43 | // returns '4100'
44 | // notice that the 00 comes after the 41 (i.e. it's swizzled)
45 | function parseHexUtf16(str, start, end) {
46 | var result = '';
47 | while (start < end) {
48 | // UTF-16, so swizzle the bytes
49 | result += String.fromCharCode(
50 | (hexToInt(str.charCodeAt(start + 2)) << 12) |
51 | (hexToInt(str.charCodeAt(start + 3)) << 8) |
52 | (hexToInt(str.charCodeAt(start)) << 4) |
53 | hexToInt(str.charCodeAt(start + 1)));
54 | start += 4;
55 | }
56 | return result;
57 | }
58 |
59 | function parseHexString(str, encoding) {
60 | if (encoding === 'UTF-8') {
61 | return decodeUtf8(parseHexUtf8(str, 0, str.length));
62 | } else {
63 | return parseHexUtf16(str, 0, str.length);
64 | }
65 | }
66 |
67 | module.exports = parseHexString;
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/progress-bars.less:
--------------------------------------------------------------------------------
1 | //
2 | // Progress bars
3 | // --------------------------------------------------
4 |
5 |
6 | // Bar animations
7 | // -------------------------
8 |
9 | // WebKit
10 | @-webkit-keyframes progress-bar-stripes {
11 | from { background-position: 40px 0; }
12 | to { background-position: 0 0; }
13 | }
14 |
15 | // Spec and IE10+
16 | @keyframes progress-bar-stripes {
17 | from { background-position: 40px 0; }
18 | to { background-position: 0 0; }
19 | }
20 |
21 |
22 |
23 | // Bar itself
24 | // -------------------------
25 |
26 | // Outer container
27 | .progress {
28 | overflow: hidden;
29 | height: @line-height-computed;
30 | margin-bottom: @line-height-computed;
31 | background-color: @progress-bg;
32 | border-radius: @border-radius-base;
33 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
34 | }
35 |
36 | // Bar of progress
37 | .progress-bar {
38 | float: left;
39 | width: 0%;
40 | height: 100%;
41 | font-size: @font-size-small;
42 | line-height: @line-height-computed;
43 | color: @progress-bar-color;
44 | text-align: center;
45 | background-color: @progress-bar-bg;
46 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
47 | .transition(width .6s ease);
48 | }
49 |
50 | // Striped bars
51 | .progress-striped .progress-bar {
52 | #gradient > .striped();
53 | background-size: 40px 40px;
54 | }
55 |
56 | // Call animation for the active one
57 | .progress.active .progress-bar {
58 | .animation(progress-bar-stripes 2s linear infinite);
59 | }
60 |
61 |
62 |
63 | // Variations
64 | // -------------------------
65 |
66 | .progress-bar-success {
67 | .progress-bar-variant(@progress-bar-success-bg);
68 | }
69 |
70 | .progress-bar-info {
71 | .progress-bar-variant(@progress-bar-info-bg);
72 | }
73 |
74 | .progress-bar-warning {
75 | .progress-bar-variant(@progress-bar-warning-bg);
76 | }
77 |
78 | .progress-bar-danger {
79 | .progress-bar-variant(@progress-bar-danger-bg);
80 | }
81 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/pouchdb/navs.less:
--------------------------------------------------------------------------------
1 | @import "@{bootstrap}/navs.less";
2 |
3 | .nav-header {
4 | float: right;
5 | > li { min-width: 100px; }
6 | }
7 | .nav-silent {
8 | > li > a {
9 | padding: .1em 0;
10 | color: @text-color;
11 | }
12 | }
13 |
14 | /**
15 | * Sidebar navigation used in learn.html
16 | **/
17 | .nav-sidebar {
18 | > li.active > a,
19 | > li > a:hover {
20 | color: darken(@brand-primary, 10%);
21 | border-right: 2px solid lighten(@brand-primary, 10%);
22 | padding-right: 10px;
23 | }
24 | }
25 |
26 | @media (max-width: @navs-breakpoint-justified) {
27 | .nav-header {
28 | width: 100%;
29 | > li {
30 | float: none;
31 | display: table-cell;
32 | width: 1%;
33 | min-width: initial;
34 | > a { text-align: center; }
35 | }
36 | }
37 | }
38 |
39 | @media (max-width: @navs-breakpoint-horizontal) {
40 | .nav-header > li:last-child {
41 | float: left;
42 | width: 100%;
43 | }
44 | }
45 |
46 | @media (max-width: @logo-breakpoint) {
47 | .nav-header > li {
48 | float: left;
49 | width: 100%;
50 | }
51 | }
52 |
53 | @media (max-width: @screen-sm-min) {
54 | .nav.nav-sidebar { margin-bottom: 25px; }
55 | .nav-head,
56 | .nav.nav-sidebar { text-align: center; }
57 | }
58 |
59 |
60 | .nav-code {
61 | border-bottom: none;
62 | }
63 | .nav-code > li {
64 | float: right;
65 | }
66 | .nav-code > li > a {
67 | outline: 0;
68 | padding: .5em .75em;
69 | margin-right: 0;
70 | margin-left: 1px;
71 | font-size: .8em;
72 | line-height: 1.3;
73 | }
74 | .nav-code > li.active > a,
75 | .nav-code > li.active > a:hover,
76 | .nav-code > li.active > a:focus {
77 | border-color: #3f3f3f;
78 | background: #3f3f3f;
79 | color: #eee;
80 | padding-bottom: 15px;
81 | margin-bottom: -15px;
82 | }
83 | .nav-code > li > a:hover {
84 | border-color: transparent;
85 | }
86 | .nav-code + .tab-content pre {
87 | padding-top: 15px;
88 | padding-bottom: 15px;
89 | }
90 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/pouchdb/highlight.less:
--------------------------------------------------------------------------------
1 | .highlight {
2 | pre {
3 | background-color: #3f3f3f;
4 |
5 | border: none;
6 | border-radius: @border-radius-base;
7 | }
8 |
9 | code,
10 | pre{ color: #ffffff; }
11 |
12 | .hll { background-color: #3e403d }
13 | .c { color: #75715e }
14 | .err { color: #960050; background-color: #1e0010 }
15 | .k { color: #66d9ef }
16 | .l { color: #ae81ff }
17 | .n { color: #f8f8f2 }
18 | .o { color: #f92672 }
19 | .p { color: #f8f8f2 }
20 | .cm { color: #75715e }
21 | .cp { color: #75715e }
22 | .c1 { color: #75715e }
23 | .cs { color: #75715e }
24 | .ge { font-style: italic }
25 | .gs { font-weight: bold }
26 | .kc { color: #66d9ef }
27 | .kd { color: #66d9ef }
28 | .kn { color: #f92672 }
29 | .kp { color: #66d9ef }
30 | .kr { color: #66d9ef }
31 | .kt { color: #66d9ef }
32 | .ld { color: #e6db74 }
33 | .m { color: #ae81ff }
34 | .s { color: #e6db74 }
35 | .na { color: #a6e22e }
36 | .nb { color: #f8f8f2 }
37 | .nc { color: #a6e22e }
38 | .no { color: #66d9ef }
39 | .nd { color: #a6e22e }
40 | .ni { color: #f8f8f2 }
41 | .ne { color: #a6e22e }
42 | .nf { color: #a6e22e }
43 | .nl { color: #f8f8f2 }
44 | .nn { color: #f8f8f2 }
45 | .nx { color: #6eca97 }
46 | .py { color: #f8f8f2 }
47 | .nt { color: #f92672 }
48 | .nv { color: #f8f8f2 }
49 | .ow { color: #f92672 }
50 | .w { color: #f8f8f2 }
51 | .mf { color: #ae81ff }
52 | .mh { color: #ae81ff }
53 | .mi { color: #ae81ff }
54 | .mo { color: #ae81ff }
55 | .sb { color: #e6db74 }
56 | .sc { color: #e6db74 }
57 | .sd { color: #e6db74 }
58 | .s2 { color: #e6db74 }
59 | .se { color: #ae81ff }
60 | .sh { color: #e6db74 }
61 | .si { color: #e6db74 }
62 | .sx { color: #e6db74 }
63 | .sr { color: #e6db74 }
64 | .s1 { color: #e6db74 }
65 | .ss { color: #e6db74 }
66 | .bp { color: #f8f8f2 }
67 | .vc { color: #f8f8f2 }
68 | .vg { color: #f8f8f2 }
69 | .vi { color: #f8f8f2 }
70 | .il { color: #ae81ff }
71 | }
72 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/bin/build-site.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | 'use strict';
4 |
5 | var fs = require('fs');
6 |
7 | var http_server = require('http-server');
8 | var execSync = require('exec-sync');
9 | var mkdirp = require('mkdirp');
10 | var watchGlob = require('watch-glob');
11 | var replace = require('replace');
12 |
13 | var POUCHDB_CSS = __dirname + '/../docs/static/css/pouchdb.css';
14 | var POUCHDB_LESS = __dirname + '/../docs/static/less/pouchdb/pouchdb.less';
15 |
16 | if (!execSync('gem list jekyll -i')) {
17 | console.log('Install Jekyll');
18 | process.exit(1);
19 | }
20 |
21 | mkdirp.sync(__dirname + '/../docs/static/css');
22 |
23 | function buildCSS() {
24 | var css =
25 | execSync(__dirname + '/../node_modules/less/bin/lessc ' + POUCHDB_LESS);
26 | fs.writeFileSync(POUCHDB_CSS, css);
27 | console.log('Updated: ', POUCHDB_CSS);
28 | }
29 |
30 | if (!process.env.BUILD) {
31 | watchGlob('docs/static/less/*/*.less', buildCSS);
32 | }
33 | buildCSS();
34 |
35 | process.chdir('docs');
36 |
37 | function buildJekyll(path) {
38 | // Dont rebuild on website artifacts being written
39 | if (path && /^_site/.test(path.relative)) {
40 | return;
41 | }
42 | execSync('jekyll build');
43 | console.log('=> Rebuilt jekyll');
44 | highlightEs6();
45 | console.log('=> Highlighted ES6');
46 | }
47 |
48 | function highlightEs6() {
49 |
50 | var path = require('path').resolve(__dirname, '../docs/_site');
51 |
52 | // TODO: this is a fragile and hacky way to get
53 | // 'async' and 'await' to highlight correctly
54 | // in this blog post.
55 | replace({
56 | regex: '(await|async|of)',
57 | replacement: '$1',
58 | paths: [path],
59 | recursive: true
60 | });
61 | }
62 |
63 | if (!process.env.BUILD) {
64 | watchGlob('**', buildJekyll);
65 | buildJekyll();
66 | http_server.createServer({root: '_site', cache: '-1'}).listen(4000);
67 | console.log('Server address: http://0.0.0.0:4000');
68 | } else {
69 | execSync('jekyll build');
70 | highlightEs6();
71 | }
72 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_posts/2014-05-01-pouchdb-2.2.0.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 |
4 | title: PouchDB 2.2.0
5 |
6 | author: Dale Harvey
7 |
8 | ---
9 |
10 | [PouchDB 2.2.0](https://github.com/daleharvey/pouchdb/releases/tag/2.2.0) is now released! Please [file issues](https://github.com/daleharvey/pouchdb/issues) or [tell us what you think](https://github.com/daleharvey/pouchdb/blob/master/CONTRIBUTING.md#get-in-touch). We would also like to give a huge thanks to our [new and existing contributors](https://github.com/daleharvey/pouchdb/graphs/contributors?from=2014-04-01&to=2014-05-01).
11 |
12 | {% include alert/start.html variant="warning"%}
13 | We have removed the ES5 shims from PouchDB. If you require support for older browsers, it can be included from https://github.com/es-shims/es5-shim.
14 | {% include alert/end.html %}
15 |
16 | ### Major Changes:
17 |
18 | * Fix replication for large databases ([#1954](https://github.com/pouchdb/pouchdb/issues/1954))
19 | * Persistent map/reduce ([#1658](https://github.com/pouchdb/pouchdb/issues/1658))
20 | * Fix experimental `.sync()` API ([#1696](https://github.com/pouchdb/pouchdb/issues/1696))
21 | * `.replication()` API switched to an `EventEmitter` ([#1916](https://github.com/pouchdb/pouchdb/issues/1916))
22 | * `.changes()` API switched to an `EventEmitter` ([#1768](http://github.com/daleharvey/pouchdb/issues/1768))
23 | * Experimental LevelDB-based LocalStorage adapter ([#44](http://github.com/daleharvey/pouchdb/issues/44))
24 | * Performance improvements ([#1869](http://github.com/daleharvey/pouchdb/issues/1869), [#1871](http://github.com/daleharvey/pouchdb/issues/1871), [#1889](https://github.com/pouchdb/pouchdb/pull/1889), [#1897](https://github.com/pouchdb/pouchdb/pull/1897), [#1990](https://github.com/pouchdb/pouchdb/issues/1990))
25 | * Remove ES5 shims ([#1753](http://github.com/daleharvey/pouchdb/issues/1753))
26 | * Performance tests ([#113](http://github.com/daleharvey/pouchdb/issues/113))
27 |
28 |
29 | ###### [Complete list of changes](https://github.com/daleharvey/pouchdb/compare/2.1.0...2.2.0)
30 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/pouchdb/icons.less:
--------------------------------------------------------------------------------
1 | .icon {
2 | margin: 0 auto;
3 | margin-top: @grid-gutter-width;
4 | background-image: url("@{img_dir}/icons.svg");
5 | background-repeat: no-repeat;
6 |
7 | & ~ * { text-align: center; }
8 |
9 | &-twitter,
10 | &-couchdb,
11 | &-github,
12 | &-travis,
13 | &-leveldb,
14 | &-saucelabs {
15 | opacity: .75;
16 | &:hover { opacity: 1; }
17 | }
18 |
19 | &-node {
20 | background-position: 0;
21 | width: 68px;
22 | height: 73px;
23 | }
24 |
25 | &-light {
26 | background-position: -73px -1px;
27 | width: 92px;
28 | height: 85px;
29 | }
30 |
31 | &-learn {
32 | background-position: -170px 0;
33 | width: 92px;
34 | height: 87px;
35 | }
36 | &-open {
37 | background-position: -267px -5px;
38 | width: 111px;
39 | height: 77px;
40 | }
41 | &-twitter {
42 | background-position: -388px -24px;
43 | width: 46px;
44 | height: 39px;
45 | }
46 | &-couchdb {
47 | background-position: -439px -15px;
48 | width: 90px;
49 | height: 57px;
50 | }
51 | &-github {
52 | background-position: -537px -22px;
53 | width: 45px;
54 | height: 43px;
55 | }
56 | &-travis {
57 | background-position: -589px -20px;
58 | width: 45px;
59 | height: 43px;
60 | }
61 | &-leveldb {
62 | background-position: -640px -20px;
63 | width: 40px;
64 | height: 43px;
65 | }
66 | &-saucelabs {
67 | background-position: -686px -22px;
68 | width: 45px;
69 | height: 43px;
70 | }
71 |
72 | @media (max-width: @screen-sm-min) {
73 | &-node,
74 | &-light,
75 | &-learn,
76 | &-open {
77 | height: 70px;
78 | width: 67px;
79 | background-size: 500px;
80 | + * { margin-top: 0; }
81 | }
82 | &-node {
83 | height: 60px;
84 | width: 50px;
85 | background-position: 0 0;
86 | }
87 | &-light { background-position: -50px 0; }
88 | &-learn { background-position: -117px 0; }
89 | &-open {
90 | background-position: -181px 0;
91 | width: 85px;
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/deps/uuid.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | // BEGIN Math.uuid.js
4 |
5 | /*!
6 | Math.uuid.js (v1.4)
7 | http://www.broofa.com
8 | mailto:robert@broofa.com
9 |
10 | Copyright (c) 2010 Robert Kieffer
11 | Dual licensed under the MIT and GPL licenses.
12 | */
13 |
14 | /*
15 | * Generate a random uuid.
16 | *
17 | * USAGE: Math.uuid(length, radix)
18 | * length - the desired number of characters
19 | * radix - the number of allowable values for each character.
20 | *
21 | * EXAMPLES:
22 | * // No arguments - returns RFC4122, version 4 ID
23 | * >>> Math.uuid()
24 | * "92329D39-6F5C-4520-ABFC-AAB64544E172"
25 | *
26 | * // One argument - returns ID of the specified length
27 | * >>> Math.uuid(15) // 15 character ID (default base=62)
28 | * "VcydxgltxrVZSTV"
29 | *
30 | * // Two arguments - returns ID of the specified length, and radix.
31 | * // (Radix must be <= 62)
32 | * >>> Math.uuid(8, 2) // 8 character ID (base=2)
33 | * "01001010"
34 | * >>> Math.uuid(8, 10) // 8 character ID (base=10)
35 | * "47473046"
36 | * >>> Math.uuid(8, 16) // 8 character ID (base=16)
37 | * "098F4D35"
38 | */
39 | var chars = (
40 | '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
41 | 'abcdefghijklmnopqrstuvwxyz'
42 | ).split('');
43 | function getValue(radix) {
44 | return 0 | Math.random() * radix;
45 | }
46 | function uuid(len, radix) {
47 | radix = radix || chars.length;
48 | var out = '';
49 | var i = -1;
50 |
51 | if (len) {
52 | // Compact form
53 | while (++i < len) {
54 | out += chars[getValue(radix)];
55 | }
56 | return out;
57 | }
58 | // rfc4122, version 4 form
59 | // Fill in random data. At i==19 set the high bits of clock sequence as
60 | // per rfc4122, sec. 4.1.5
61 | while (++i < 36) {
62 | switch (i) {
63 | case 8:
64 | case 13:
65 | case 18:
66 | case 23:
67 | out += '-';
68 | break;
69 | case 19:
70 | out += chars[(getValue(16) & 0x3) | 0x8];
71 | break;
72 | default:
73 | out += chars[getValue(16)];
74 | }
75 | }
76 |
77 | return out;
78 | }
79 |
80 |
81 |
82 | module.exports = uuid;
83 |
84 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_posts/2014-06-01-pouchdb-2.2.3.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 |
4 | title: PouchDB 2.2.3
5 |
6 | author: Dale Harvey
7 |
8 | ---
9 |
10 | [PouchDB 2.2.3](https://github.com/daleharvey/pouchdb/releases/tag/2.2.3) is now released! Please [file issues](https://github.com/daleharvey/pouchdb/issues) or [tell us what you think](https://github.com/daleharvey/pouchdb/blob/master/CONTRIBUTING.md#get-in-touch). We would also like to give a huge thanks to our [new and existing contributors](https://github.com/daleharvey/pouchdb/graphs/contributors?from=2014-05-01&to=2014-06-01).
11 |
12 | ### Major Changes:
13 |
14 | * Experimental browser adapter plugins ([#2190](http://github.com/daleharvey/pouchdb/issues/2190))
15 | * Fix Ember.js integration ([#2158](http://github.com/daleharvey/pouchdb/issues/2158))
16 | * Fix Browserify integration ([#2249](http://github.com/daleharvey/pouchdb/issues/2249), [pouchdb/mapreduce#170](https://github.com/pouchdb/mapreduce/issues/170))
17 | * Fixes for conflict resolution ([#2072](http://github.com/daleharvey/pouchdb/issues/2072))
18 | * Better error handling in replication ([#2122](http://github.com/daleharvey/pouchdb/issues/2122))
19 | * Fix Internet Explorer 10-11 ([#1661](http://github.com/daleharvey/pouchdb/issues/1661), [#2198](http://github.com/daleharvey/pouchdb/issues/2198), [#2132](http://github.com/daleharvey/pouchdb/issues/2132))
20 | * Fix attachments in Android 4.x ([#1992](http://github.com/daleharvey/pouchdb/issues/1992))
21 | * Fix LevelDB memory leak, race condition, error messages ([#2250](http://github.com/daleharvey/pouchdb/issues/2250), [#2251](http://github.com/daleharvey/pouchdb/issues/2251), [#2144](http://github.com/daleharvey/pouchdb/issues/2144))
22 | * Perf improvements for replication in WebSQL & IndexedDB ([#2180](http://github.com/daleharvey/pouchdb/issues/2180), [#2178](http://github.com/daleharvey/pouchdb/issues/2178))
23 | * Bugfixes for IndexedDB inclusive_end ([#2129](http://github.com/daleharvey/pouchdb/issues/2129))
24 | * Fix `changes()` memory leak ([#2311](http://github.com/daleharvey/pouchdb/issues/2311))
25 |
26 | ###### [Complete list of changes](https://github.com/daleharvey/pouchdb/compare/2.2.0...2.2.3)
27 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/print.less:
--------------------------------------------------------------------------------
1 | //
2 | // Basic print styles
3 | // --------------------------------------------------
4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
5 |
6 | @media print {
7 |
8 | * {
9 | text-shadow: none !important;
10 | color: #000 !important; // Black prints faster: h5bp.com/s
11 | background: transparent !important;
12 | box-shadow: none !important;
13 | }
14 |
15 | a,
16 | a:visited {
17 | text-decoration: underline;
18 | }
19 |
20 | a[href]:after {
21 | content: " (" attr(href) ")";
22 | }
23 |
24 | abbr[title]:after {
25 | content: " (" attr(title) ")";
26 | }
27 |
28 | // Don't show links for images, or javascript/internal links
29 | a[href^="javascript:"]:after,
30 | a[href^="#"]:after {
31 | content: "";
32 | }
33 |
34 | pre,
35 | blockquote {
36 | border: 1px solid #999;
37 | page-break-inside: avoid;
38 | }
39 |
40 | thead {
41 | display: table-header-group; // h5bp.com/t
42 | }
43 |
44 | tr,
45 | img {
46 | page-break-inside: avoid;
47 | }
48 |
49 | img {
50 | max-width: 100% !important;
51 | }
52 |
53 | p,
54 | h2,
55 | h3 {
56 | orphans: 3;
57 | widows: 3;
58 | }
59 |
60 | h2,
61 | h3 {
62 | page-break-after: avoid;
63 | }
64 |
65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
66 | // Once fixed, we can just straight up remove this.
67 | select {
68 | background: #fff !important;
69 | }
70 |
71 | // Bootstrap components
72 | .navbar {
73 | display: none;
74 | }
75 | .table {
76 | td,
77 | th {
78 | background-color: #fff !important;
79 | }
80 | }
81 | .btn,
82 | .dropup > .btn {
83 | > .caret {
84 | border-top-color: #000 !important;
85 | }
86 | }
87 | .label {
88 | border: 1px solid #000;
89 | }
90 |
91 | .table {
92 | border-collapse: collapse !important;
93 | }
94 | .table-bordered {
95 | th,
96 | td {
97 | border: 1px solid #ddd !important;
98 | }
99 | }
100 |
101 | }
102 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_includes/api/get_attachment.html:
--------------------------------------------------------------------------------
1 | {% include anchor.html title="Get an attachment" hash="get_attachment" %}
2 |
3 | {% highlight js %}
4 | db.getAttachment(docId, attachmentId, [options], [callback])
5 | {% endhighlight %}
6 |
7 | Get attachment data.
8 |
9 | #### Example Usage:
10 |
11 | {% include code/start.html id="get_att1" type="callback" %}
12 | {% highlight js %}
13 | db.getAttachment('doc', 'att.txt', function(err, res) {
14 | if (err) { return console.log(err); }
15 | // handle result
16 | });
17 | {% endhighlight %}
18 | {% include code/end.html %}
19 | {% include code/start.html id="get_att1" type="promise" %}
20 | {% highlight js %}
21 | db.getAttachment('doc', 'att.txt').then(function (result) {
22 | // handle result
23 | }).catch(function (err) {
24 | console.log(err);
25 | });
26 | {% endhighlight %}
27 | {% include code/end.html %}
28 |
29 | #### Example Response:
30 |
31 | The response will be a `Blob` object in the browser, and a `Buffer` object in Node.js.
32 |
33 | #### Inline base64 attachments
34 |
35 | You can specify `{attachments: true}` to most "read" operations, such as `get()`, `allDocs()`, `changes()`, and `query()`. The attachment data will then be included inlined in the resulting doc(s). However, it will always be supplied as base64. For example:
36 |
37 | {% highlight js %}
38 | {
39 | "_attachments": {
40 | "att.txt": {
41 | "content_type": "text/plain",
42 | "digest": "d5ccfd24a8748bed4e2c9a279a2b6089",
43 | "data": "SXMgdGhlcmUgbGlmZSBvbiBNYXJzPw=="
44 | }
45 | },
46 | "_id": "mydoc",
47 | "_rev": "1-e147d9ec9c85139dfe7e93bc17148d1a"
48 | }
49 | {% endhighlight %}
50 |
51 | For such APIs, when you don't specify `{attachments: true}`, you will instead get metadata about the attachments. For example:
52 |
53 | {% highlight js %}
54 | {
55 | "_attachments": {
56 | "att.txt": {
57 | "content_type": "text/plain",
58 | "digest": "d5ccfd24a8748bed4e2c9a279a2b6089",
59 | "stub": true
60 | }
61 | },
62 | "_id": "mydoc",
63 | "_rev": "1-e147d9ec9c85139dfe7e93bc17148d1a"
64 | }
65 | {% endhighlight %}
66 |
67 | This "summary" operation may be faster in some cases, because the attachment itself does not need to be read from disk.
--------------------------------------------------------------------------------
/www/lib/ionic/scss/ionicons/_ionicons-animation.scss:
--------------------------------------------------------------------------------
1 | // Animation Icons
2 | // --------------------------
3 |
4 | .#{$ionicons-prefix}spin {
5 | -webkit-animation: spin 1s infinite linear;
6 | -moz-animation: spin 1s infinite linear;
7 | -o-animation: spin 1s infinite linear;
8 | animation: spin 1s infinite linear;
9 | }
10 |
11 | @-moz-keyframes spin {
12 | 0% { -moz-transform: rotate(0deg); }
13 | 100% { -moz-transform: rotate(359deg); }
14 | }
15 | @-webkit-keyframes spin {
16 | 0% { -webkit-transform: rotate(0deg); }
17 | 100% { -webkit-transform: rotate(359deg); }
18 | }
19 | @-o-keyframes spin {
20 | 0% { -o-transform: rotate(0deg); }
21 | 100% { -o-transform: rotate(359deg); }
22 | }
23 | @-ms-keyframes spin {
24 | 0% { -ms-transform: rotate(0deg); }
25 | 100% { -ms-transform: rotate(359deg); }
26 | }
27 | @keyframes spin {
28 | 0% { transform: rotate(0deg); }
29 | 100% { transform: rotate(359deg); }
30 | }
31 |
32 |
33 | .#{$ionicons-prefix}loading-a,
34 | .#{$ionicons-prefix}loading-b,
35 | .#{$ionicons-prefix}loading-c,
36 | .#{$ionicons-prefix}loading-d,
37 | .#{$ionicons-prefix}looping,
38 | .#{$ionicons-prefix}refreshing,
39 | .#{$ionicons-prefix}ios7-reloading {
40 | @extend .ion;
41 | // must spin entire element for android 4.3 and below
42 | @extend .#{$ionicons-prefix}spin;
43 | }
44 |
45 | .#{$ionicons-prefix}loading-a {
46 | -webkit-animation-timing-function: steps(8, start);
47 | -moz-animation-timing-function: steps(8, start);
48 | animation-timing-function: steps(8, start);
49 | }
50 |
51 | .#{$ionicons-prefix}loading-a:before {
52 | @extend .#{$ionicons-prefix}load-a:before;
53 | }
54 |
55 | .#{$ionicons-prefix}loading-b:before {
56 | @extend .#{$ionicons-prefix}load-b:before;
57 | }
58 |
59 | .#{$ionicons-prefix}loading-c:before {
60 | @extend .#{$ionicons-prefix}load-c:before;
61 | }
62 |
63 | .#{$ionicons-prefix}loading-d:before {
64 | @extend .#{$ionicons-prefix}load-d:before;
65 | }
66 |
67 | .#{$ionicons-prefix}looping:before {
68 | @extend .#{$ionicons-prefix}loop:before;
69 | }
70 |
71 | .#{$ionicons-prefix}refreshing:before {
72 | @extend .#{$ionicons-prefix}refresh:before;
73 | }
74 |
75 | .#{$ionicons-prefix}ios7-reloading:before {
76 | @extend .#{$ionicons-prefix}ios7-reload:before;
77 | }
78 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/js/code.js:
--------------------------------------------------------------------------------
1 | function codeWrap(){
2 | var codeTpl = '' +
3 | '' +
11 | '{{tapPanes}}
';
12 |
13 | var codeGroups =
14 | $('[data-code-id]')
15 | .get()
16 | .map(function(div){
17 | return div.attributes["data-code-id"].value
18 | })
19 | .filter(function(item, index, inputArray){
20 | return inputArray.indexOf(item) == index;
21 | })
22 | .forEach(function(id){
23 | var $code = $("[data-code-id='" + id + "']");
24 |
25 | var paneHeight = 0;
26 |
27 | var paneHtml = $code.get().map(function(div){
28 | if(div.clientHeight > paneHeight){
29 | paneHeight = div.clientHeight;
30 | }
31 | return div.outerHTML;
32 | }).join('');
33 |
34 | // Pad the pane height
35 | paneHeight = paneHeight + 15;
36 |
37 | var codeHtml = codeTpl
38 | .replace(/{{tapPanes}}/g, paneHtml)
39 | .replace(//g, " li {
11 | display: inline; // Remove list-style and block-level defaults
12 | > a,
13 | > span {
14 | position: relative;
15 | float: left; // Collapse white-space
16 | padding: @padding-base-vertical @padding-base-horizontal;
17 | line-height: @line-height-base;
18 | text-decoration: none;
19 | color: @pagination-color;
20 | background-color: @pagination-bg;
21 | border: 1px solid @pagination-border;
22 | margin-left: -1px;
23 | }
24 | &:first-child {
25 | > a,
26 | > span {
27 | margin-left: 0;
28 | .border-left-radius(@border-radius-base);
29 | }
30 | }
31 | &:last-child {
32 | > a,
33 | > span {
34 | .border-right-radius(@border-radius-base);
35 | }
36 | }
37 | }
38 |
39 | > li > a,
40 | > li > span {
41 | &:hover,
42 | &:focus {
43 | color: @pagination-hover-color;
44 | background-color: @pagination-hover-bg;
45 | border-color: @pagination-hover-border;
46 | }
47 | }
48 |
49 | > .active > a,
50 | > .active > span {
51 | &,
52 | &:hover,
53 | &:focus {
54 | z-index: 2;
55 | color: @pagination-active-color;
56 | background-color: @pagination-active-bg;
57 | border-color: @pagination-active-border;
58 | cursor: default;
59 | }
60 | }
61 |
62 | > .disabled {
63 | > span,
64 | > span:hover,
65 | > span:focus,
66 | > a,
67 | > a:hover,
68 | > a:focus {
69 | color: @pagination-disabled-color;
70 | background-color: @pagination-disabled-bg;
71 | border-color: @pagination-disabled-border;
72 | cursor: not-allowed;
73 | }
74 | }
75 | }
76 |
77 | // Sizing
78 | // --------------------------------------------------
79 |
80 | // Large
81 | .pagination-lg {
82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
83 | }
84 |
85 | // Small
86 | .pagination-sm {
87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
88 | }
89 |
--------------------------------------------------------------------------------
/www/lib/angular/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular
15 | ```
16 |
17 | Then add a `
21 | ```
22 |
23 | Note that this package is not in CommonJS format, so doing `require('angular')` will return `undefined`.
24 | If you're using [Browserify](https://github.com/substack/node-browserify), you can use
25 | [exposify](https://github.com/thlorenz/exposify) to have `require('angular')` return the `angular`
26 | global.
27 |
28 | ### bower
29 |
30 | ```shell
31 | bower install angular
32 | ```
33 |
34 | Then add a `
38 | ```
39 |
40 | ## Documentation
41 |
42 | Documentation is available on the
43 | [AngularJS docs site](http://docs.angularjs.org/).
44 |
45 | ## License
46 |
47 | The MIT License
48 |
49 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
50 |
51 | Permission is hereby granted, free of charge, to any person obtaining a copy
52 | of this software and associated documentation files (the "Software"), to deal
53 | in the Software without restriction, including without limitation the rights
54 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55 | copies of the Software, and to permit persons to whom the Software is
56 | furnished to do so, subject to the following conditions:
57 |
58 | The above copyright notice and this permission notice shall be included in
59 | all copies or substantial portions of the Software.
60 |
61 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67 | THE SOFTWARE.
68 |
--------------------------------------------------------------------------------
/www/lib/angular-ui-router/src/view.js:
--------------------------------------------------------------------------------
1 |
2 | $ViewProvider.$inject = [];
3 | function $ViewProvider() {
4 |
5 | this.$get = $get;
6 | /**
7 | * @ngdoc object
8 | * @name ui.router.state.$view
9 | *
10 | * @requires ui.router.util.$templateFactory
11 | * @requires $rootScope
12 | *
13 | * @description
14 | *
15 | */
16 | $get.$inject = ['$rootScope', '$templateFactory'];
17 | function $get( $rootScope, $templateFactory) {
18 | return {
19 | // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
20 | /**
21 | * @ngdoc function
22 | * @name ui.router.state.$view#load
23 | * @methodOf ui.router.state.$view
24 | *
25 | * @description
26 | *
27 | * @param {string} name name
28 | * @param {object} options option object.
29 | */
30 | load: function load(name, options) {
31 | var result, defaults = {
32 | template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}
33 | };
34 | options = extend(defaults, options);
35 |
36 | if (options.view) {
37 | result = $templateFactory.fromConfig(options.view, options.params, options.locals);
38 | }
39 | if (result && options.notify) {
40 | /**
41 | * @ngdoc event
42 | * @name ui.router.state.$state#$viewContentLoading
43 | * @eventOf ui.router.state.$view
44 | * @eventType broadcast on root scope
45 | * @description
46 | *
47 | * Fired once the view **begins loading**, *before* the DOM is rendered.
48 | *
49 | * @param {Object} event Event object.
50 | * @param {Object} viewConfig The view config properties (template, controller, etc).
51 | *
52 | * @example
53 | *
54 | *
55 | * $scope.$on('$viewContentLoading',
56 | * function(event, viewConfig){
57 | * // Access to all the view config properties.
58 | * // and one special property 'targetView'
59 | * // viewConfig.targetView
60 | * });
61 | *
62 | */
63 | $rootScope.$broadcast('$viewContentLoading', options);
64 | }
65 | return result;
66 | }
67 | };
68 | }
69 | }
70 |
71 | angular.module('ui.router.state').provider('$view', $ViewProvider);
72 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/manifest.appcache:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | CACHE MANIFEST
5 | # rev {{ site.time }}
6 |
7 | CACHE:
8 | {% for page in site.pages %}{% if page.url != '/manifest.appcache' %}{{ page.url | replace:'index.html','' }}{% endif %}
9 | {% endfor %}
10 | {% for page in site.guides %}{{ page.url | replace:'index.html','' }}
11 | {% endfor %}
12 | {% for page in site.posts %}{{ page.url | replace:'index.html','' }}
13 | {% endfor %}
14 |
15 | /static/css/pouchdb.css
16 | /static/favicon.ico
17 | /static/js/code.min.js
18 |
19 | http://code.jquery.com/jquery.min.js
20 | http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js
21 | http://cdn.jsdelivr.net/pouchdb/latest/pouchdb.min.js
22 |
23 | http://fonts.googleapis.com/css?family=Lato:400,700|Open+Sans:400,700
24 | http://fonts.gstatic.com/s/lato/v11/8qcEw_nrk_5HEcCpYdJu8BTbgVql8nDJpwnrE27mub0.woff2
25 | http://fonts.gstatic.com/s/lato/v11/MDadn8DQ_3oT6kvnUq_2rxTbgVql8nDJpwnrE27mub0.woff2
26 | http://fonts.gstatic.com/s/lato/v11/rZPI2gHXi8zxUjnybc2ZQFKPGs1ZzpMvnHX-7fPOuAc.woff2
27 | http://fonts.gstatic.com/s/lato/v11/MgNNr5y1C_tIEuLEmicLm1KPGs1ZzpMvnHX-7fPOuAc.woff2
28 | http://fonts.gstatic.com/s/opensans/v10/u-WUoqrET9fUeobQW7jkRZBw1xU1rKptJj_0jans920.woff2
29 | http://fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2
30 | http://fonts.gstatic.com/s/opensans/v10/k3k702ZOKiLJc3WVjuplzCYtBUPDK3WL7KRKS_3q7OE.woff2
31 | http://fonts.gstatic.com/s/opensans/v10/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2
32 |
33 | /static/img/apple-indexeddb.png
34 | /static/img/cors_in_couchdb.png
35 | /static/img/fauxton.png
36 | /static/img/kittens.jpg
37 | /static/img/logo.svg
38 | /static/img/safari_popup.png
39 | /static/img/dev_tools.png
40 | /static/img/icons.svg
41 | /static/img/kittens_small.jpg
42 | /static/img/mark.svg
43 | /static/img/screenshots/todo-1.png
44 | /static/img/travis-screenshot.png
45 |
46 | /static/img/browser-logos/android_32x32.png
47 | /static/img/browser-logos/chrome-android_32x32.png
48 | /static/img/browser-logos/firefox_32x32.png
49 | /static/img/browser-logos/internet-explorer_32x32.png
50 | /static/img/browser-logos/safari-ios_32x32.png
51 | /static/img/browser-logos/blackberry_32x32.png
52 | /static/img/browser-logos/chrome_32x32.png
53 | /static/img/browser-logos/internet-explorer-tile_32x32.png
54 | /static/img/browser-logos/opera_32x32.png
55 | /static/img/browser-logos/safari_32x32.png
56 |
57 | NETWORK:
58 | *
59 | http://*
60 | https://*
61 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/static/less/bootstrap/responsive-utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Responsive: Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // IE10 in Windows (Phone) 8
7 | //
8 | // Support for responsive views via media queries is kind of borked in IE10, for
9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix
10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and
11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
12 | // our Getting Started page for more information on this bug.
13 | //
14 | // For more information, see the following:
15 | //
16 | // Issue: https://github.com/twbs/bootstrap/issues/10497
17 | // Docs: http://getbootstrap.com/getting-started/#browsers
18 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
19 |
20 | @-ms-viewport {
21 | width: device-width;
22 | }
23 |
24 |
25 | // Visibility utilities
26 | .visible-xs,
27 | .visible-sm,
28 | .visible-md,
29 | .visible-lg {
30 | .responsive-invisibility();
31 | }
32 |
33 | .visible-xs {
34 | @media (max-width: @screen-xs-max) {
35 | .responsive-visibility();
36 | }
37 | }
38 | .visible-sm {
39 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
40 | .responsive-visibility();
41 | }
42 | }
43 | .visible-md {
44 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
45 | .responsive-visibility();
46 | }
47 | }
48 | .visible-lg {
49 | @media (min-width: @screen-lg-min) {
50 | .responsive-visibility();
51 | }
52 | }
53 |
54 | .hidden-xs {
55 | @media (max-width: @screen-xs-max) {
56 | .responsive-invisibility();
57 | }
58 | }
59 | .hidden-sm {
60 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
61 | .responsive-invisibility();
62 | }
63 | }
64 | .hidden-md {
65 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
66 | .responsive-invisibility();
67 | }
68 | }
69 | .hidden-lg {
70 | @media (min-width: @screen-lg-min) {
71 | .responsive-invisibility();
72 | }
73 | }
74 |
75 |
76 | // Print utilities
77 | //
78 | // Media queries are placed on the inside to be mixin-friendly.
79 |
80 | .visible-print {
81 | .responsive-invisibility();
82 |
83 | @media print {
84 | .responsive-visibility();
85 | }
86 | }
87 |
88 | .hidden-print {
89 | @media print {
90 | .responsive-invisibility();
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/bin/run-test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | : ${CLIENT:="node"}
4 |
5 | if [[ ! -z $SERVER ]]; then
6 | if [ "$SERVER" == "pouchdb-server" ]; then
7 | if [[ "$TRAVIS_REPO_SLUG" == "pouchdb/pouchdb" ]]; then
8 | # for pouchdb-server to link to pouchdb, only in travis
9 | rm -fr ./node_modules/pouchdb-server/node_modules/pouchdb
10 | ln -s ../../.. ./node_modules/pouchdb-server/node_modules/pouchdb
11 | fi
12 | export COUCH_HOST='http://127.0.0.1:6984'
13 | echo -e "Starting up pouchdb-server\n"
14 | TESTDIR=./tests/pouchdb_server
15 | rm -rf $TESTDIR && mkdir -p $TESTDIR
16 | if [[ "$SERVER_ADAPTER" == "memory" ]]; then
17 | FLAGS='--in-memory'
18 | else
19 | FLAGS="-d $TESTDIR"
20 | fi
21 | ./node_modules/.bin/pouchdb-server -p 6984 $FLAGS &
22 | export SERVER_PID=$!
23 | sleep 15 # give it a chance to start up
24 | elif [ "$SERVER" == "couchdb-master" ]; then
25 | if [[ "$TRAVIS_REPO_SLUG" == "pouchdb/pouchdb" ]]; then
26 | ./bin/run-couch-master-on-travis.sh
27 | fi
28 | export COUCH_HOST='http://127.0.0.1:15984'
29 | elif [ "$SERVER" == "pouchdb-express-router" ]; then
30 | node ./tests/misc/pouchdb-express-router.js &
31 | export SERVER_PID=$!
32 | sleep 5
33 | export COUCH_HOST='http://127.0.0.1:3000'
34 | elif [ "$SERVER" == "express-pouchdb-minimum" ]; then
35 | node ./tests/misc/express-pouchdb-minimum-for-pouchdb.js &
36 | export SERVER_PID=$!
37 | sleep 5
38 | export COUCH_HOST='http://127.0.0.1:3000'
39 | elif [ "$SERVER" == "sync-gateway" ]; then
40 | if [[ -z $COUCH_HOST ]]; then
41 | export COUCH_HOST='http://127.0.0.1:4985'
42 | fi
43 | if [[ "$TRAVIS_REPO_SLUG" == "pouchdb/pouchdb" ]]; then
44 | ./bin/run-csg-on-travis.sh
45 | fi
46 | node ./tests/misc/sync-gateway-config-server.js &
47 | # not the Sync Gateway pid, the config server pid
48 | export SERVER_PID=$!
49 | else
50 | # I mistype pouchdb-server a lot
51 | echo -e "Unknown SERVER $SERVER. Did you mean pouchdb-server?\n"
52 | exit 1
53 | fi
54 | fi
55 |
56 | if [ "$CLIENT" == "unit" ]; then
57 | npm run test-unit
58 | elif [ "$CLIENT" == "node" ]; then
59 | npm run test-node
60 | elif [ "$CLIENT" == "dev" ]; then
61 | npm run launch-dev-server
62 | else
63 | npm run test-browser
64 | fi
65 |
66 | EXIT_STATUS=$?
67 | if [[ ! -z $SERVER_PID ]]; then
68 | kill $SERVER_PID
69 | fi
70 | exit $EXIT_STATUS
71 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/adapters/leveldb/leveldb-transaction.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // similar to an idb or websql transaction object
4 | // designed to be passed around. basically just caches
5 | // things in-memory and then does a big batch() operation
6 | // when you're done
7 |
8 | var utils = require('../../utils');
9 |
10 | function getCacheFor(transaction, store) {
11 | var prefix = store.prefix();
12 | var cache = transaction._cache;
13 | var subCache = cache.get(prefix);
14 | if (!subCache) {
15 | subCache = new utils.Map();
16 | cache.set(prefix, subCache);
17 | }
18 | return subCache;
19 | }
20 |
21 | function LevelTransaction() {
22 | this._batch = [];
23 | this._cache = new utils.Map();
24 | }
25 |
26 | LevelTransaction.prototype.get = function (store, key, callback) {
27 | var cache = getCacheFor(this, store);
28 | var exists = cache.get(key);
29 | if (exists) {
30 | return process.nextTick(function () {
31 | callback(null, exists);
32 | });
33 | } else if (exists === null) { // deleted marker
34 | return process.nextTick(function () {
35 | callback({name: 'NotFoundError'});
36 | });
37 | }
38 | store.get(key, function (err, res) {
39 | if (err) {
40 | if (err.name === 'NotFoundError') {
41 | cache.set(key, null);
42 | }
43 | return callback(err);
44 | }
45 | cache.set(key, res);
46 | callback(null, res);
47 | });
48 | };
49 |
50 | LevelTransaction.prototype.batch = function (batch) {
51 | for (var i = 0, len = batch.length; i < len; i++) {
52 | var operation = batch[i];
53 |
54 | var cache = getCacheFor(this, operation.prefix);
55 |
56 | if (operation.type === 'put') {
57 | cache.set(operation.key, operation.value);
58 | } else {
59 | cache.set(operation.key, null);
60 | }
61 | }
62 | this._batch = this._batch.concat(batch);
63 | };
64 |
65 | LevelTransaction.prototype.execute = function (db, callback) {
66 |
67 | var keys = new utils.Set();
68 | var uniqBatches = [];
69 |
70 | // remove duplicates; last one wins
71 | for (var i = this._batch.length - 1; i >= 0; i--) {
72 | var operation = this._batch[i];
73 | var lookupKey = operation.prefix.prefix() + '\xff' + operation.key;
74 | if (keys.has(lookupKey)) {
75 | continue;
76 | }
77 | keys.add(lookupKey);
78 | uniqBatches.push(operation);
79 | }
80 |
81 | db.batch(uniqBatches, callback);
82 | };
83 |
84 | module.exports = LevelTransaction;
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/deps/md5.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var crypto = require('crypto');
4 | var Md5 = require('spark-md5');
5 | var setImmediateShim = global.setImmediate || global.setTimeout;
6 | var MD5_CHUNK_SIZE = 32768;
7 |
8 | // convert a 64-bit int to a binary string
9 | function intToString(int) {
10 | var bytes = [
11 | (int & 0xff),
12 | ((int >>> 8) & 0xff),
13 | ((int >>> 16) & 0xff),
14 | ((int >>> 24) & 0xff)
15 | ];
16 | return bytes.map(function (byte) {
17 | return String.fromCharCode(byte);
18 | }).join('');
19 | }
20 |
21 | // convert an array of 64-bit ints into
22 | // a base64-encoded string
23 | function rawToBase64(raw) {
24 | var res = '';
25 | for (var i = 0; i < raw.length; i++) {
26 | res += intToString(raw[i]);
27 | }
28 | return btoa(res);
29 | }
30 |
31 | function appendBuffer(buffer, data, start, end) {
32 | if (start > 0 || end < data.byteLength) {
33 | // only create a subarray if we really need to
34 | data = new Uint8Array(data, start,
35 | Math.min(end, data.byteLength) - start);
36 | }
37 | buffer.append(data);
38 | }
39 |
40 | function appendString(buffer, data, start, end) {
41 | if (start > 0 || end < data.length) {
42 | // only create a substring if we really need to
43 | data = data.substring(start, end);
44 | }
45 | buffer.appendBinary(data);
46 | }
47 |
48 | module.exports = function (data, callback) {
49 | if (!process.browser) {
50 | var base64 = crypto.createHash('md5').update(data).digest('base64');
51 | callback(null, base64);
52 | return;
53 | }
54 | var inputIsString = typeof data === 'string';
55 | var len = inputIsString ? data.length : data.byteLength;
56 | var chunkSize = Math.min(MD5_CHUNK_SIZE, len);
57 | var chunks = Math.ceil(len / chunkSize);
58 | var currentChunk = 0;
59 | var buffer = inputIsString ? new Md5() : new Md5.ArrayBuffer();
60 |
61 | var append = inputIsString ? appendString : appendBuffer;
62 |
63 | function loadNextChunk() {
64 | var start = currentChunk * chunkSize;
65 | var end = start + chunkSize;
66 | currentChunk++;
67 | if (currentChunk < chunks) {
68 | append(buffer, data, start, end);
69 | setImmediateShim(loadNextChunk);
70 | } else {
71 | append(buffer, data, start, end);
72 | var raw = buffer.end(true);
73 | var base64 = rawToBase64(raw);
74 | callback(null, base64);
75 | buffer.destroy();
76 | }
77 | }
78 | loadNextChunk();
79 | };
80 |
--------------------------------------------------------------------------------
/www/lib/ionic/scss/_spinner.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Spinners
3 | * --------------------------------------------------
4 | */
5 |
6 | .spinner {
7 | svg {
8 | width: $spinner-width;
9 | height: $spinner-height;
10 | }
11 |
12 | stroke: $spinner-default-stroke;
13 | fill: $spinner-default-fill;
14 |
15 | &.spinner-light {
16 | stroke: $spinner-light-stroke;
17 | fill: $spinner-light-fill;
18 | }
19 | &.spinner-stable {
20 | stroke: $spinner-stable-stroke;
21 | fill: $spinner-stable-fill;
22 | }
23 | &.spinner-positive {
24 | stroke: $spinner-positive-stroke;
25 | fill: $spinner-positive-fill;
26 | }
27 | &.spinner-calm {
28 | stroke: $spinner-calm-stroke;
29 | fill: $spinner-calm-fill;
30 | }
31 | &.spinner-balanced {
32 | stroke: $spinner-balanced-stroke;
33 | fill: $spinner-balanced-fill;
34 | }
35 | &.spinner-assertive {
36 | stroke: $spinner-assertive-stroke;
37 | fill: $spinner-assertive-fill;
38 | }
39 | &.spinner-energized {
40 | stroke: $spinner-energized-stroke;
41 | fill: $spinner-energized-fill;
42 | }
43 | &.spinner-royal {
44 | stroke: $spinner-royal-stroke;
45 | fill: $spinner-royal-fill;
46 | }
47 | &.spinner-dark {
48 | stroke: $spinner-dark-stroke;
49 | fill: $spinner-dark-fill;
50 | }
51 | }
52 |
53 | .spinner-android {
54 | stroke: #4b8bf4;
55 | }
56 |
57 | .spinner-ios,
58 | .spinner-ios-small {
59 | stroke: #69717d;
60 | }
61 |
62 | .spinner-spiral {
63 | .stop1 {
64 | stop-color: $spinner-light-fill;
65 | stop-opacity: 0;
66 | }
67 |
68 | &.spinner-light {
69 | .stop1 {
70 | stop-color: $spinner-default-fill;
71 | }
72 | .stop2 {
73 | stop-color: $spinner-light-fill;
74 | }
75 | }
76 | &.spinner-stable .stop2 {
77 | stop-color: $spinner-stable-fill;
78 | }
79 | &.spinner-positive .stop2 {
80 | stop-color: $spinner-positive-fill;
81 | }
82 | &.spinner-calm .stop2 {
83 | stop-color: $spinner-calm-fill;
84 | }
85 | &.spinner-balanced .stop2 {
86 | stop-color: $spinner-balanced-fill;
87 | }
88 | &.spinner-assertive .stop2 {
89 | stop-color: $spinner-assertive-fill;
90 | }
91 | &.spinner-energized .stop2 {
92 | stop-color: $spinner-energized-fill;
93 | }
94 | &.spinner-royal .stop2 {
95 | stop-color: $spinner-royal-fill;
96 | }
97 | &.spinner-dark .stop2 {
98 | stop-color: $spinner-dark-fill;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_posts/2015-04-07-better-late-than-never.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 |
4 | title: PouchDB 3.4.0: Better late than never
5 | author: Dale Harvey
6 |
7 | ---
8 |
9 | Everyone needs a break, and for March PouchDB relaxed and enjoyed the arrival of spring. However, regularly scheduled programming has resumed, and today I am happy to announce PouchDB 3.4.0.
10 |
11 | ### Documentation, Documentation, Documentation
12 |
13 | Over the last 2 months a huge amount of work has gone into PouchDB's documentation, including [#3584](https://github.com/pouchdb/pouchdb/pull/3584), which allows you to switch between a Promises and a callback format for your code examples.
14 |
15 | We have hugely expanded the coverage of the documentation, so if there is anything missing please feel free to point it out.
16 |
17 | ### Changelog:
18 |
19 | * Fix incompatibilities with Couchbase Sync Gateway ([#3556](https://github.com/pouchdb/pouchdb/issues/3556), [#3552](https://github.com/pouchdb/pouchdb/issues/3552), [#3555](https://github.com/pouchdb/pouchdb/issues/3555), [#3561](https://github.com/pouchdb/pouchdb/issues/3561), [#3562](https://github.com/pouchdb/pouchdb/issues/3562), [#3562](https://github.com/pouchdb/pouchdb/issues/3562), [#3495](https://github.com/pouchdb/pouchdb/issues/3495), [#3493](https://github.com/pouchdb/pouchdb/issues/3493))
20 | * Added a copy of PouchDB to PouchDB.com (check the inspector - [#2960](https://github.com/pouchdb/pouchdb/issues/2960))
21 | * Fix replication using design documents ([#3543](https://github.com/pouchdb/pouchdb/issues/3543))
22 | * Fix immediately cancelling live replication ([#3605](https://github.com/pouchdb/pouchdb/issues/3605))
23 | * Fix replication with a view ([#3606](https://github.com/pouchdb/pouchdb/issues/3606))
24 | * Add support for new SqlitePlugin parameters ([#3617](https://github.com/pouchdb/pouchdb/issues/3617))
25 | * Fix for deleted conflicts ([#3646](https://github.com/pouchdb/pouchdb/issues/3646))
26 | * Fix design documents that contain a slash ([#3680](https://github.com/pouchdb/pouchdb/issues/3680))
27 | * Fix for setting ajax headers in GET requests ([#3689](https://github.com/pouchdb/pouchdb/issues/3689))
28 | * Allow setting auth headers in replication ([#3543](https://github.com/pouchdb/pouchdb/issues/3543))
29 |
30 | ### Get in touch
31 |
32 | Please [file issues](https://github.com/pouchdb/pouchdb/issues) or [tell us what you think](https://github.com/pouchdb/pouchdb/blob/master/CONTRIBUTING.md#get-in-touch). And as always, a big thanks to all of our [new and existing contributors](https://github.com/pouchdb/pouchdb/graphs/contributors)!
33 |
--------------------------------------------------------------------------------
/www/lib/angular-animate/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-animate
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-animate
15 | ```
16 |
17 | Add a `
21 | ```
22 |
23 | Then add `ngAnimate` as a dependency for your app:
24 |
25 | ```javascript
26 | angular.module('myApp', ['ngAnimate']);
27 | ```
28 |
29 | Note that this package is not in CommonJS format, so doing `require('angular-animate')` will
30 | return `undefined`.
31 |
32 | ### bower
33 |
34 | ```shell
35 | bower install angular-animate
36 | ```
37 |
38 | Then add a `
42 | ```
43 |
44 | Then add `ngAnimate` as a dependency for your app:
45 |
46 | ```javascript
47 | angular.module('myApp', ['ngAnimate']);
48 | ```
49 |
50 | ## Documentation
51 |
52 | Documentation is available on the
53 | [AngularJS docs site](http://docs.angularjs.org/api/ngAnimate).
54 |
55 | ## License
56 |
57 | The MIT License
58 |
59 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
60 |
61 | Permission is hereby granted, free of charge, to any person obtaining a copy
62 | of this software and associated documentation files (the "Software"), to deal
63 | in the Software without restriction, including without limitation the rights
64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
65 | copies of the Software, and to permit persons to whom the Software is
66 | furnished to do so, subject to the following conditions:
67 |
68 | The above copyright notice and this permission notice shall be included in
69 | all copies or substantial portions of the Software.
70 |
71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
77 | THE SOFTWARE.
78 |
--------------------------------------------------------------------------------
/www/lib/angular-sanitize/README.md:
--------------------------------------------------------------------------------
1 | # packaged angular-sanitize
2 |
3 | This repo is for distribution on `npm` and `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngSanitize).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | You can install this package either with `npm` or with `bower`.
10 |
11 | ### npm
12 |
13 | ```shell
14 | npm install angular-sanitize
15 | ```
16 |
17 | Add a `
21 | ```
22 |
23 | Then add `ngSanitize` as a dependency for your app:
24 |
25 | ```javascript
26 | angular.module('myApp', ['ngSanitize']);
27 | ```
28 |
29 | Note that this package is not in CommonJS format, so doing `require('angular-sanitize')` will
30 | return `undefined`.
31 |
32 | ### bower
33 |
34 | ```shell
35 | bower install angular-sanitize
36 | ```
37 |
38 | Add a `
42 | ```
43 |
44 | Then add `ngSanitize` as a dependency for your app:
45 |
46 | ```javascript
47 | angular.module('myApp', ['ngSanitize']);
48 | ```
49 |
50 | ## Documentation
51 |
52 | Documentation is available on the
53 | [AngularJS docs site](http://docs.angularjs.org/api/ngSanitize).
54 |
55 | ## License
56 |
57 | The MIT License
58 |
59 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
60 |
61 | Permission is hereby granted, free of charge, to any person obtaining a copy
62 | of this software and associated documentation files (the "Software"), to deal
63 | in the Software without restriction, including without limitation the rights
64 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
65 | copies of the Software, and to permit persons to whom the Software is
66 | furnished to do so, subject to the following conditions:
67 |
68 | The above copyright notice and this permission notice shall be included in
69 | all copies or substantial portions of the Software.
70 |
71 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
72 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
76 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
77 | THE SOFTWARE.
78 |
--------------------------------------------------------------------------------
/www/lib/ionic/scss/_popup.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Popups
4 | * --------------------------------------------------
5 | */
6 |
7 | .popup-container {
8 | position: absolute;
9 | top: 0;
10 | left: 0;
11 | bottom: 0;
12 | right: 0;
13 | background: rgba(0,0,0,0);
14 |
15 | @include display-flex();
16 | @include justify-content(center);
17 | @include align-items(center);
18 |
19 | z-index: $z-index-popup;
20 |
21 | // Start hidden
22 | visibility: hidden;
23 | &.popup-showing {
24 | visibility: visible;
25 | }
26 |
27 | &.popup-hidden .popup {
28 | @include animation-name(scaleOut);
29 | @include animation-duration($popup-leave-animation-duration);
30 | @include animation-timing-function(ease-in-out);
31 | @include animation-fill-mode(both);
32 | }
33 |
34 | &.active .popup {
35 | @include animation-name(superScaleIn);
36 | @include animation-duration($popup-enter-animation-duration);
37 | @include animation-timing-function(ease-in-out);
38 | @include animation-fill-mode(both);
39 | }
40 |
41 | .popup {
42 | width: $popup-width;
43 | max-width: 100%;
44 | max-height: 90%;
45 |
46 | border-radius: $popup-border-radius;
47 | background-color: $popup-background-color;
48 |
49 | @include display-flex();
50 | @include flex-direction(column);
51 | }
52 |
53 | input,
54 | textarea {
55 | width: 100%;
56 | }
57 | }
58 |
59 | .popup-head {
60 | padding: 15px 10px;
61 | border-bottom: 1px solid #eee;
62 | text-align: center;
63 | }
64 | .popup-title {
65 | margin: 0;
66 | padding: 0;
67 | font-size: 15px;
68 | }
69 | .popup-sub-title {
70 | margin: 5px 0 0 0;
71 | padding: 0;
72 | font-weight: normal;
73 | font-size: 11px;
74 | }
75 | .popup-body {
76 | padding: 10px;
77 | overflow: auto;
78 | }
79 |
80 | .popup-buttons {
81 | @include display-flex();
82 | @include flex-direction(row);
83 | padding: 10px;
84 | min-height: $popup-button-min-height + 20;
85 |
86 | .button {
87 | @include flex(1);
88 | display: block;
89 | min-height: $popup-button-min-height;
90 | border-radius: $popup-button-border-radius;
91 | line-height: $popup-button-line-height;
92 |
93 | margin-right: 5px;
94 | &:last-child {
95 | margin-right: 0px;
96 | }
97 | }
98 | }
99 |
100 | .popup-open {
101 | pointer-events: none;
102 |
103 | &.modal-open .modal {
104 | pointer-events: none;
105 | }
106 |
107 | .popup-backdrop, .popup {
108 | pointer-events: auto;
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/lib/adapters/idb/idb-blob-support.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var utils = require('../../utils');
4 | var idbConstants = require('./idb-constants');
5 | var DETECT_BLOB_SUPPORT_STORE = idbConstants.DETECT_BLOB_SUPPORT_STORE;
6 |
7 | //
8 | // Detect blob support. Chrome didn't support it until version 38.
9 | // In version 37 they had a broken version where PNGs (and possibly
10 | // other binary types) aren't stored correctly, because when you fetch
11 | // them, the content type is always null.
12 | //
13 | // Furthermore, they have some outstanding bugs where blobs occasionally
14 | // are read by FileReader as null, or by ajax as 404s.
15 | //
16 | // Sadly we use the 404 bug to detect the FileReader bug, so if they
17 | // get fixed independently and released in different versions of Chrome,
18 | // then the bug could come back. So it's worthwhile to watch these issues:
19 | // 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916
20 | // FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836
21 | //
22 | function checkBlobSupport(txn, idb) {
23 | return new utils.Promise(function (resolve, reject) {
24 | var blob = utils.createBlob([''], {type: 'image/png'});
25 | txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');
26 | txn.oncomplete = function () {
27 | // have to do it in a separate transaction, else the correct
28 | // content type is always returned
29 | var blobTxn = idb.transaction([DETECT_BLOB_SUPPORT_STORE],
30 | 'readwrite');
31 | var getBlobReq = blobTxn.objectStore(
32 | DETECT_BLOB_SUPPORT_STORE).get('key');
33 | getBlobReq.onerror = reject;
34 | getBlobReq.onsuccess = function (e) {
35 |
36 | var storedBlob = e.target.result;
37 | var url = URL.createObjectURL(storedBlob);
38 |
39 | utils.ajax({
40 | url: url,
41 | cache: true,
42 | binary: true
43 | }, function (err, res) {
44 | if (err && err.status === 405) {
45 | // firefox won't let us do that. but firefox doesn't
46 | // have the blob type bug that Chrome does, so that's ok
47 | resolve(true);
48 | } else {
49 | resolve(!!(res && res.type === 'image/png'));
50 | if (err && err.status === 404) {
51 | utils.explain404('PouchDB is just detecting blob URL support.');
52 | }
53 | }
54 | URL.revokeObjectURL(url);
55 | });
56 | };
57 | };
58 | }).catch(function () {
59 | return false; // error, so assume unsupported
60 | });
61 | }
62 |
63 | module.exports = checkBlobSupport;
--------------------------------------------------------------------------------
/www/lib/ionic/scss/_modal.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Modals
4 | * --------------------------------------------------
5 | * Modals are independent windows that slide in from off-screen.
6 | */
7 |
8 | .modal-backdrop,
9 | .modal-backdrop-bg {
10 | position: fixed;
11 | top: 0;
12 | left: 0;
13 | z-index: $z-index-modal;
14 | width: 100%;
15 | height: 100%;
16 | }
17 |
18 | .modal-backdrop-bg {
19 | pointer-events: none;
20 | }
21 |
22 | .modal {
23 | display: block;
24 | position: absolute;
25 | top: 0;
26 | z-index: $z-index-modal;
27 | overflow: hidden;
28 | min-height: 100%;
29 | width: 100%;
30 | background-color: $modal-bg-color;
31 | }
32 |
33 | @media (min-width: $modal-inset-mode-break-point) {
34 | // inset mode is when the modal doesn't fill the entire
35 | // display but instead is centered within a large display
36 | .modal {
37 | top: $modal-inset-mode-top;
38 | right: $modal-inset-mode-right;
39 | bottom: $modal-inset-mode-bottom;
40 | left: $modal-inset-mode-left;
41 | min-height: $modal-inset-mode-min-height;
42 | width: (100% - $modal-inset-mode-left - $modal-inset-mode-right);
43 | }
44 |
45 | .modal.ng-leave-active {
46 | bottom: 0;
47 | }
48 |
49 | // remove ios header padding from inset header
50 | .platform-ios.platform-cordova .modal-wrapper .modal {
51 | .bar-header:not(.bar-subheader) {
52 | height: $bar-height;
53 | > * {
54 | margin-top: 0;
55 | }
56 | }
57 | .tabs-top > .tabs,
58 | .tabs.tabs-top {
59 | top: $bar-height;
60 | }
61 | .has-header,
62 | .bar-subheader {
63 | top: $bar-height;
64 | }
65 | .has-subheader {
66 | top: $bar-height + $bar-subheader-height;
67 | }
68 | .has-header.has-tabs-top {
69 | top: $bar-height + $tabs-height;
70 | }
71 | .has-header.has-subheader.has-tabs-top {
72 | top: $bar-height + $bar-subheader-height + $tabs-height;
73 | }
74 | }
75 |
76 | .modal-backdrop-bg {
77 | @include transition(opacity 300ms ease-in-out);
78 | background-color: $modal-backdrop-bg-active;
79 | opacity: 0;
80 | }
81 |
82 | .active .modal-backdrop-bg {
83 | opacity: 0.5;
84 | }
85 | }
86 |
87 | // disable clicks on all but the modal
88 | .modal-open {
89 | pointer-events: none;
90 |
91 | .modal,
92 | .modal-backdrop {
93 | pointer-events: auto;
94 | }
95 | // prevent clicks on modal when loading overlay is active though
96 | &.loading-active {
97 | .modal,
98 | .modal-backdrop {
99 | pointer-events: none;
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/www/lib/pouchdb/docs/_posts/2014-08-29-pouchdb-3.0.3.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 |
4 | title: PouchDB 3.0.3
5 |
6 | author: Nolan Lawson
7 |
8 | ---
9 |
10 | Another week, another PouchDB patch release!
11 |
12 | This week we present [PouchDB 3.0.3](https://github.com/pouchdb/pouchdb/releases/tag/3.0.3), which fixes some ornery issues with replication that were introduced by recent performance optimizations ([#2685](https://github.com/pouchdb/pouchdb/issues/2685)).
13 |
14 | In fact, those performance optimizations have been rolled back. The current implementation appears to be the fastest possible given CouchDB's replication protocol, and the clever tricks introduced in 3.0.0 actually pushed conflicts into CouchDB's revision history, which is bad news for apps that rely on custom conflict resolution. (If you just use the default "pick a random winner," you probably didn't notice anything.)
15 |
16 | And although "custom conflict resolution" may only describe a minority of apps, we felt it's better to be correct 100% of the time than to be speedy.
17 |
18 | ### Dealing with slow replication
19 |
20 | If you experience slow replications after upgrading to 3.0.3, here are some suggestions:
21 |
22 | 1. Avoid CORS if you can, because it uses twice as many HTTP requests. Some tips for doing this:
23 | * If you are using IrisCouch, you can [create a couchapp](https://github.com/couchapp/couchapp) (i.e. let CouchDB serve your HTML/CSS/JS).
24 | * If you are running your own CouchDB, you can set up a reverse proxy with Apache or Nginx that allows you to serve your app and CouchDB from the same domain. Or create a couchapp.
25 | 2. Try using the "every doc is a delta" pattern, as described in [this blog post](http://atypical.net/archive/2014/04/17/understanding-race-induced-conflicts-in-bigcouch) and exemplified in [the delta-pouch plugin](https://github.com/redgeoff/delta-pouch). Your replications will be much faster, because PouchDB is able to use an optimization for generation-1 documents, and in this setup, every document is a generation-1 document.
26 | 3. Otherwise, just minimize the number of documents you create. Or minimize the number of documents you sync to the client. Views can be helpful with this, although the low performance of the `query()` API relative to the `allDocs()` API should be balanced with that.
27 |
28 | ### Other fixes in 3.0.3
29 |
30 | * Auto-compaction is no longer experimental! It's fully supported. ([#2655](https://github.com/pouchdb/pouchdb/issues/2655))
31 | * `'change'` listeners aren't called after replication is canceled. ([#2478](https://github.com/pouchdb/pouchdb/issues/2478))
32 | * Bower package is smaller. ([#2659](https://github.com/pouchdb/pouchdb/issues/2659))
--------------------------------------------------------------------------------