create-instantsearch-app 6.4.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/README.md +4 -5
  2. package/package.json +3 -2
  3. package/src/api/__tests__/__snapshots__/index.test.js.snap +4 -4
  4. package/src/api/__tests__/resolve-template.test.js +0 -28
  5. package/src/api/resolve-template.js +1 -28
  6. package/src/templates/React InstantSearch/.editorconfig +0 -1
  7. package/src/templates/React InstantSearch/.gitignore.template +20 -18
  8. package/src/templates/React InstantSearch/.template.js +4 -3
  9. package/src/templates/React InstantSearch/README.md +0 -2
  10. package/src/templates/React InstantSearch/package.json +8 -21
  11. package/src/templates/React InstantSearch/src/App.css +11 -0
  12. package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/App.tsx.hbs +3 -3
  13. package/src/templates/React InstantSearch Native/.gitignore.template +13 -16
  14. package/src/templates/React InstantSearch Native/.template.js +2 -1
  15. package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/App.tsx.hbs +1 -1
  16. package/src/templates/React InstantSearch Native/app.json +24 -1
  17. package/src/templates/React InstantSearch Native/package.json +14 -16
  18. package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/InfiniteHits.tsx +1 -1
  19. package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/SearchBox.tsx.hbs +1 -1
  20. package/src/utils/__tests__/fetchLibraryVersions.test.js +24 -0
  21. package/src/utils/__tests__/index.test.js +8 -5
  22. package/src/utils/fetchLibraryVersions.js +37 -0
  23. package/src/utils/index.js +1 -18
  24. package/src/templates/Autocomplete.js 0/.editorconfig +0 -9
  25. package/src/templates/Autocomplete.js 0/.eslintignore +0 -3
  26. package/src/templates/Autocomplete.js 0/.eslintrc.js +0 -3
  27. package/src/templates/Autocomplete.js 0/.gitignore.template +0 -22
  28. package/src/templates/Autocomplete.js 0/.prettierrc +0 -5
  29. package/src/templates/Autocomplete.js 0/.template.js +0 -13
  30. package/src/templates/Autocomplete.js 0/README.md +0 -21
  31. package/src/templates/Autocomplete.js 0/favicon.png +0 -0
  32. package/src/templates/Autocomplete.js 0/index.html.hbs +0 -46
  33. package/src/templates/Autocomplete.js 0/manifest.webmanifest +0 -15
  34. package/src/templates/Autocomplete.js 0/package.json +0 -26
  35. package/src/templates/Autocomplete.js 0/src/app.css +0 -85
  36. package/src/templates/Autocomplete.js 0/src/app.js.hbs +0 -31
  37. package/src/templates/Autocomplete.js 0/src/index.css +0 -7
  38. package/src/templates/InstantSearch.js 2/.editorconfig +0 -9
  39. package/src/templates/InstantSearch.js 2/.eslintignore +0 -3
  40. package/src/templates/InstantSearch.js 2/.eslintrc.js +0 -3
  41. package/src/templates/InstantSearch.js 2/.gitignore.template +0 -22
  42. package/src/templates/InstantSearch.js 2/.prettierrc +0 -5
  43. package/src/templates/InstantSearch.js 2/.template.js +0 -14
  44. package/src/templates/InstantSearch.js 2/README.md +0 -21
  45. package/src/templates/InstantSearch.js 2/favicon.png +0 -0
  46. package/src/templates/InstantSearch.js 2/index.html.hbs +0 -56
  47. package/src/templates/InstantSearch.js 2/manifest.webmanifest +0 -15
  48. package/src/templates/InstantSearch.js 2/package.json +0 -22
  49. package/src/templates/InstantSearch.js 2/src/app.css +0 -75
  50. package/src/templates/InstantSearch.js 2/src/app.js.hbs +0 -54
  51. package/src/templates/InstantSearch.js 2/src/index.css +0 -10
  52. package/src/templates/JavaScript Helper 2/.editorconfig +0 -9
  53. package/src/templates/JavaScript Helper 2/.eslintignore +0 -3
  54. package/src/templates/JavaScript Helper 2/.eslintrc.js +0 -3
  55. package/src/templates/JavaScript Helper 2/.gitignore.template +0 -22
  56. package/src/templates/JavaScript Helper 2/.prettierrc +0 -5
  57. package/src/templates/JavaScript Helper 2/.template.js +0 -14
  58. package/src/templates/JavaScript Helper 2/README.md +0 -21
  59. package/src/templates/JavaScript Helper 2/favicon.png +0 -0
  60. package/src/templates/JavaScript Helper 2/index.html.hbs +0 -42
  61. package/src/templates/JavaScript Helper 2/manifest.webmanifest +0 -15
  62. package/src/templates/JavaScript Helper 2/package.json +0 -26
  63. package/src/templates/JavaScript Helper 2/src/app.css +0 -74
  64. package/src/templates/JavaScript Helper 2/src/app.js.hbs +0 -44
  65. package/src/templates/JavaScript Helper 2/src/index.css +0 -10
  66. package/src/templates/React InstantSearch/.eslintrc.js +0 -3
  67. package/src/templates/React InstantSearch/public/favicon.png +0 -0
  68. package/src/templates/React InstantSearch/public/index.html +0 -29
  69. package/src/templates/React InstantSearch/public/manifest.json +0 -15
  70. package/src/templates/React InstantSearch/src/App.js.hbs +0 -112
  71. package/src/templates/React InstantSearch/src/index.css +0 -10
  72. package/src/templates/React InstantSearch/src/index.js +0 -6
  73. package/src/templates/React InstantSearch Hooks/.editorconfig +0 -8
  74. package/src/templates/React InstantSearch Hooks/.gitignore.template +0 -23
  75. package/src/templates/React InstantSearch Hooks/.prettierrc +0 -5
  76. package/src/templates/React InstantSearch Hooks/.template.js +0 -25
  77. package/src/templates/React InstantSearch Hooks/README.md +0 -19
  78. package/src/templates/React InstantSearch Hooks/package.json +0 -21
  79. package/src/templates/React InstantSearch Hooks/src/App.css +0 -71
  80. package/src/templates/React InstantSearch Hooks Native/.gitignore.template +0 -14
  81. package/src/templates/React InstantSearch Hooks Native/.template.js +0 -34
  82. package/src/templates/React InstantSearch Hooks Native/README.md +0 -19
  83. package/src/templates/React InstantSearch Hooks Native/app.json +0 -30
  84. package/src/templates/React InstantSearch Hooks Native/babel.config.js +0 -6
  85. package/src/templates/React InstantSearch Hooks Native/package.json +0 -30
  86. package/src/templates/React InstantSearch Native/.editorconfig +0 -9
  87. package/src/templates/React InstantSearch Native/.eslintrc.js +0 -3
  88. package/src/templates/React InstantSearch Native/.prettierrc +0 -5
  89. package/src/templates/React InstantSearch Native/.watchmanconfig +0 -1
  90. package/src/templates/React InstantSearch Native/App.js.hbs +0 -38
  91. package/src/templates/React InstantSearch Native/src/Highlight.js +0 -36
  92. package/src/templates/React InstantSearch Native/src/InfiniteHits.js.hbs +0 -56
  93. package/src/templates/React InstantSearch Native/src/SearchBox.js.hbs +0 -42
  94. package/src/templates/React InstantSearch widget/.eslintignore +0 -2
  95. package/src/templates/React InstantSearch widget/.eslintrc.cjs +0 -13
  96. package/src/templates/React InstantSearch widget/.prettierrc +0 -5
  97. package/src/templates/React InstantSearch widget/.template.js +0 -21
  98. package/src/templates/React InstantSearch widget/CONTRIBUTING.md +0 -49
  99. package/src/templates/React InstantSearch widget/LICENSE.md.hbs +0 -21
  100. package/src/templates/React InstantSearch widget/README.md +0 -85
  101. package/src/templates/React InstantSearch widget/babel.config.cjs +0 -8
  102. package/src/templates/React InstantSearch widget/example/index.html.hbs +0 -12
  103. package/src/templates/React InstantSearch widget/example/index.tsx.hbs +0 -22
  104. package/src/templates/React InstantSearch widget/package.json.hbs +0 -81
  105. package/src/templates/React InstantSearch widget/src/index.tsx.hbs +0 -3
  106. package/src/templates/React InstantSearch widget/src/lib/__tests__/dummy-test.tsx.hbs +0 -39
  107. package/src/templates/React InstantSearch widget/src/lib/component.tsx.hbs +0 -15
  108. package/src/templates/React InstantSearch widget/src/lib/connector.ts.hbs +0 -35
  109. package/src/templates/React InstantSearch widget/src/lib/widget.tsx.hbs +0 -14
  110. package/src/templates/React InstantSearch widget/src/types/connector.ts +0 -17
  111. package/src/templates/React InstantSearch widget/tsconfig.declaration.json +0 -10
  112. package/src/templates/React InstantSearch widget/tsconfig.json +0 -20
  113. package/src/templates/React InstantSearch widget/vite.config.ts +0 -34
  114. package/src/templates/Vue InstantSearch 1/.editorconfig +0 -9
  115. package/src/templates/Vue InstantSearch 1/.eslintrc.js +0 -9
  116. package/src/templates/Vue InstantSearch 1/.gitignore.template +0 -21
  117. package/src/templates/Vue InstantSearch 1/.prettierrc +0 -5
  118. package/src/templates/Vue InstantSearch 1/.template.js +0 -14
  119. package/src/templates/Vue InstantSearch 1/README.md +0 -21
  120. package/src/templates/Vue InstantSearch 1/babel.config.js +0 -3
  121. package/src/templates/Vue InstantSearch 1/package.json +0 -35
  122. package/src/templates/Vue InstantSearch 1/public/favicon.png +0 -0
  123. package/src/templates/Vue InstantSearch 1/public/index.html +0 -22
  124. package/src/templates/Vue InstantSearch 1/src/App.vue +0 -167
  125. package/src/templates/Vue InstantSearch 1/src/main.js +0 -11
  126. package/src/templates/Vue InstantSearch 2/.editorconfig +0 -9
  127. package/src/templates/Vue InstantSearch 2/.eslintrc.js +0 -9
  128. package/src/templates/Vue InstantSearch 2/.gitignore.template +0 -21
  129. package/src/templates/Vue InstantSearch 2/.prettierrc +0 -5
  130. package/src/templates/Vue InstantSearch 2/.template.js +0 -15
  131. package/src/templates/Vue InstantSearch 2/README.md +0 -21
  132. package/src/templates/Vue InstantSearch 2/babel.config.js +0 -3
  133. package/src/templates/Vue InstantSearch 2/package.json +0 -37
  134. package/src/templates/Vue InstantSearch 2/public/favicon.png +0 -0
  135. package/src/templates/Vue InstantSearch 2/public/index.html +0 -22
  136. package/src/templates/Vue InstantSearch 2/src/App.vue +0 -147
  137. package/src/templates/Vue InstantSearch 2/src/main.js +0 -11
  138. package/src/utils/__tests__/__snapshots__/index.test.js.snap +0 -7
  139. /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/favicon.png +0 -0
  140. /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/index.html +0 -0
  141. /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/Panel.tsx +0 -0
  142. /package/src/templates/{React InstantSearch Hooks → React InstantSearch}/src/index.tsx +0 -0
  143. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/.expo-shared/assets.json +0 -0
  144. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/adaptive-icon.png +0 -0
  145. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/favicon.png +0 -0
  146. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/icon.png +0 -0
  147. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/assets/splash.png +0 -0
  148. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/src/Highlight.tsx +0 -0
  149. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/tsconfig.json +0 -0
  150. /package/src/templates/{React InstantSearch Hooks Native → React InstantSearch Native}/types/ProductHit.ts +0 -0
@@ -1,147 +0,0 @@
1
- <template>
2
- <div>
3
- <header class="header">
4
- <h1 class="header-title">
5
- <a href="/">
6
- {{name}}
7
- </a>
8
- </h1>
9
- <p class="header-subtitle">
10
- using
11
- <a href="https://github.com/algolia/instantsearch/tree/master/packages/vue-instantsearch">
12
- Vue InstantSearch
13
- </a>
14
- </p>
15
- </header>
16
-
17
- <div class="container">
18
- <ais-instant-search :search-client="searchClient" index-name="{{indexName}}">
19
- <div class="search-panel">
20
- {{#if attributesForFaceting.length}}
21
- <div class="search-panel__filters">
22
- {{#each attributesForFaceting}}
23
- <ais-refinement-list attribute="{{this}}" />
24
- {{/each}}
25
- </div>
26
-
27
- {{/if}}
28
- <div class="search-panel__results">
29
- <div class="searchbox">
30
- <ais-search-box placeholder="{{searchPlaceholder}}" />
31
- </div>
32
- {{#if attributesToDisplay}}
33
- <ais-hits>
34
- <template slot="item" slot-scope="{ item }">
35
- <article>
36
- <h1>
37
- <ais-highlight :hit="item" attribute="{{attributesToDisplay.[0]}}" />
38
- </h1>
39
- {{#each attributesToDisplay}}
40
- {{#unless @first}}
41
- <p>
42
- <ais-highlight :hit="item" attribute="{{this}}" />
43
- </p>
44
- {{/unless}}
45
- {{/each}}
46
- </article>
47
- </template>
48
- </ais-hits>
49
- {{else}}
50
- <ais-hits/>
51
- {{/if}}
52
-
53
- <div class="pagination">
54
- <ais-pagination />
55
- </div>
56
- </div>
57
- </div>
58
- </ais-instant-search>
59
- </div>
60
- </div>
61
- </template>
62
-
63
- <script>
64
- import algoliasearch from 'algoliasearch/lite';
65
-
66
- export default {
67
- data() {
68
- return {
69
- searchClient: algoliasearch('{{appId}}', '{{apiKey}}'),
70
- };
71
- },
72
- };
73
- </script>
74
-
75
- <style>
76
- body,
77
- h1 {
78
- margin: 0;
79
- padding: 0;
80
- }
81
-
82
- body {
83
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
84
- Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
85
- }
86
-
87
- em {
88
- background: cyan;
89
- font-style: normal;
90
- }
91
-
92
- .header {
93
- display: flex;
94
- align-items: center;
95
- min-height: 50px;
96
- padding: 0.5rem 1rem;
97
- background-image: linear-gradient(to right, #4dba87, #2f9088);
98
- color: #fff;
99
- margin-bottom: 1rem;
100
- }
101
-
102
- .header a {
103
- color: #fff;
104
- text-decoration: none;
105
- }
106
-
107
- .header-title {
108
- font-size: 1.2rem;
109
- font-weight: normal;
110
- }
111
-
112
- .header-title::after {
113
- content: ' ▸ ';
114
- padding: 0 0.5rem;
115
- }
116
-
117
- .header-subtitle {
118
- font-size: 1.2rem;
119
- }
120
-
121
- .container {
122
- max-width: 1200px;
123
- margin: 0 auto;
124
- padding: 1rem;
125
- }
126
-
127
- .search-panel {
128
- display: flex;
129
- }
130
-
131
- .search-panel__filters {
132
- flex: 1;
133
- }
134
-
135
- .search-panel__results {
136
- flex: 3;
137
- }
138
-
139
- .searchbox {
140
- margin-bottom: 2rem;
141
- }
142
-
143
- .pagination {
144
- margin: 2rem auto;
145
- text-align: center;
146
- }
147
- </style>
@@ -1,11 +0,0 @@
1
- import Vue from 'vue';
2
- import InstantSearch from 'vue-instantsearch';
3
- import App from './App.vue';
4
-
5
- Vue.config.productionTip = false;
6
-
7
- Vue.use(InstantSearch);
8
-
9
- new Vue({
10
- render: h => h(App),
11
- }).$mount('#app');
@@ -1,7 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`checkAppName throws with correct error message 1`] = `
4
- "Could not create a project called \\"./project-name\\" because of npm naming restrictions.
5
- - name cannot start with a period
6
- - name can only contain URL-friendly characters"
7
- `;